From 63a0c7896ee238574a4b50dd7a8b032be5e3d410 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sat, 30 Jan 2021 15:00:18 +0100 Subject: [PATCH] Setup aur builder --- arch.yaml | 1 + requirements.yaml | 2 ++ roles/aur-builder/tasks/main.yaml | 21 +++++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 requirements.yaml create mode 100644 roles/aur-builder/tasks/main.yaml diff --git a/arch.yaml b/arch.yaml index 3295de1..725b816 100644 --- a/arch.yaml +++ b/arch.yaml @@ -21,6 +21,7 @@ - acpid - docker - wayland + - aur-builder tasks: - name: Install common user applications diff --git a/requirements.yaml b/requirements.yaml new file mode 100644 index 0000000..f46775a --- /dev/null +++ b/requirements.yaml @@ -0,0 +1,2 @@ +# Install Ansible AUR helper +- src: kewlfft.aur diff --git a/roles/aur-builder/tasks/main.yaml b/roles/aur-builder/tasks/main.yaml new file mode 100644 index 0000000..8d353e1 --- /dev/null +++ b/roles/aur-builder/tasks/main.yaml @@ -0,0 +1,21 @@ +--- +- name: setup account + user: + name: aur_builder + create_home: no + register: aur_builder + +- name: install tools + package: + name: "{{ item }}" + state: latest + loop: + - fakeroot + +- name: allow sudo pacman + lineinfile: + path: /etc/sudoers.d/aur_builder + state: present + line: "{{ aur_builder.name }} ALL=(ALL) NOPASSWD: /usr/bin/pacman" + validate: /usr/bin/visudo -cf %s + create: yes