diff --git a/README.md b/README.md index 43f68eb..f743d28 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -# Ansible Role: base_pkgs +# Ansible Role: aur_builder ## Introduction -This role will install a selected set of packages as a desired baseline -package collection. +This role will set up a user for retrieving, building and installing arch +packages from the AUR. diff --git a/tasks/main.yml b/tasks/main.yml index 4ca8f5a..46c979f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,61 +1,24 @@ --- ########################################################### # -# This role will install a selected set of packages as a desired baseline -# package collection. +# This role will set up a user for retrieving, building and installing arch +# packages from the AUR. # ########################################################### -# tasks file for base_pkgs +# tasks file for aur_builder -- debug: msg="Installing desired list of base packages" +- debug: msg="Setting up aur_builder acount (Arch)" -- name: Installed desired list of base packages (Debian based distros) - apt: - name: - - build-essential - - conspy - - cron - - curl - - dnsutils - - elinks - - git - - htop - - logrotate - - multitail - - net-tools - - pandoc - - pylint - - python3 - - python3-pip - - rsyslog - - sudo - - tmux - - tree - - vim - - vim-scripts - - wget - state: latest - when: ansible_os_family == "Debian" +- name: Create the `aur_builder` user + ansible.builtin.user: + name: aur_builder + create_home: yes + group: wheel -- name: Installed desired list of base packages (Arch based distros) - pacman: - name: - - cronie - - curl - - elinks - - git - - htop - - inetutils - - multitail - - net-tools - - python3 - - tmux - - tree - - vim - - wget - state: present - force: true - update_cache: true - when: ansible_os_family == "Archlinux" +- name: Allow the `aur_builder` user to run `sudo pacman` without a password + ansible.builtin.lineinfile: + path: /etc/sudoers.d/11-install-aur_builder + line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman' + create: yes + validate: 'visudo -cf %s' -# EOF