diff --git a/facts/general/package.yml b/facts/general/package.yml index 9524fa4..15d66de 100644 --- a/facts/general/package.yml +++ b/facts/general/package.yml @@ -14,6 +14,7 @@ lightdm: lightdm sddm: sddm tmux: tmux + base_devel: htop # Placeholder for Arch package. - name: General | Facts | Package | Parrot OS Fixes set_fact: @@ -42,6 +43,7 @@ cron: cronie encfs: encfs dig: bind + base_devel: base-devel when: ansible_pkg_mgr == "pacman" - name: General | Facts | Package | FreeBSD diff --git a/local.yml b/local.yml index e14956b..5bb361b 100644 --- a/local.yml +++ b/local.yml @@ -88,6 +88,8 @@ - include_tasks: tasks/general/software/sendmail.yml when: ansible_system == "FreeBSD" + - include_tasks: tasks/general/software/aur.yml + # Gather again in case missing programs have now been installed. - include_tasks: facts/general/gather.yml diff --git a/tasks/general/software/aur.yml b/tasks/general/software/aur.yml new file mode 100644 index 0000000..7ec17b1 --- /dev/null +++ b/tasks/general/software/aur.yml @@ -0,0 +1,50 @@ +--- +# 20260731 - Hyperling +# Install the AUR on pacman-related distros. + +- name: General | Software | AUR | Facts 01 + set_fact: + aur_user: aur-user + aur_build_dir: ~/src + aur_helper: yay + aur_helper_url: https://aur.archlinux.org/yay-bin.git + +- name: General | Software | AUR | Facts 02 + set_fact: + aur_helper_dir: "{{ aur_build_dir }}/{{ aur_helper }}" + +- name: General | Software | AUR | User + user: + name: "{{ aur_user }}" + groups: wheel + create_home: true + +- name: General | Software | AUR | Sudoers + lineinfile: + path: /etc/sudoers.d/aurbuilder + line: "{{ aur_user }} ALL=(ALL) NOPASSWD: /usr/bin/pacman" + create: true + mode: '0440' + validate: 'visudo -cf %s' + +- name: General | Software | AUR | Check + command: "which {{ aur_helper }}" + register: yay_check + changed_when: false + failed_when: false + +- name: General | Software | AUR | Install + block: + + - name: General | Software | AUR | Install | Clone Repo + git: + repo: "{{ aur_helper_url }}" + dest: "{{ aur_helper_dir }}" + + - name: General | Software | AUR | Install | Build & Integrate + command: "cd {{ aur_helper_dir }} && makepkg -si --noconfirm" + changed_when: true + + when: yay_check.rc != 0 + become_user: "{{ aur_user }}" + diff --git a/tasks/general/software/packages.yml b/tasks/general/software/packages.yml index a97409a..2db5b9a 100644 --- a/tasks/general/software/packages.yml +++ b/tasks/general/software/packages.yml @@ -61,6 +61,7 @@ - "{{ ntp_server }}" - "{{ dig }}" - "{{ tmux }}" + - "{{ base_devel }}" state: present - name: General | Software | Packages | Install Software (DEV) @@ -92,13 +93,13 @@ when: ansible_distribution == "Debian" ignore_errors: yes -- name: General | Software | Services | Install killall (Looking at you, Debian) +- name: General | Software | Packages | Install killall (Looking at you, Debian) package: name: psmisc state: present when: ansible_distribution == "Debian" -- name: General | Software | Services | Install "Bloat" (Looking at you, Arch Base) +- name: General | Software | Packages | Install "Bloat" (Looking at you, Arch Base) package: name: - which @@ -106,7 +107,7 @@ state: present when: ansible_distribution == "Archlinux" -- name: General | Software | Services | Install Fix (Looking at you, openSUSE) +- name: General | Software | Packages | Install Fix (Looking at you, openSUSE) package: name: # openSUSE Tumbleweed comes without gnome-control-center being able to open @@ -135,7 +136,7 @@ state: absent # Ubuntu still uses snap for critical components like GNOME, must keep. -- name: General | Software | Services | Disable Snap Daemon +- name: General | Software | Packages | Disable Snap Daemon service: name: snapd pattern: snapd diff --git a/tasks/workstation/linux/software/i3.yml b/tasks/workstation/linux/software/i3.yml index 4c2a054..ae7478d 100644 --- a/tasks/workstation/linux/software/i3.yml +++ b/tasks/workstation/linux/software/i3.yml @@ -23,6 +23,17 @@ set_fact: i3_config_file: "{{ i3_config_dir }}/config" +- name: Workstation | Linux | Software | i3 | Facts | pacman + set_fact: + i3_theme01: htop + when: ansible_pkg_mgr == "pacman" + +- name: Workstation | Linux | Software | i3 | Facts | yay + set_fact: + i3_yay_packages: + - greybird-gtk-theme + when: ansible_pkg_mgr == "pacman" + #- name: Workstation | Linux | Software | i3 | Facts | TBD # set_fact: # i3_package: i3-wm @@ -44,6 +55,13 @@ state: present update_cache: yes +- name: Workstation | Linux | Software | i3 | Install (yay) + package: + name: i3_yay_packages + state: present + use: yay + when: ansible_pkg_mgr == "pacman" + - name: Workstation | Linux | Software | i3 | Config | Create Dir ansible.builtin.file: path: "{{ i3_config_dir }}" @@ -120,3 +138,11 @@ #- name: FAIL - DELETEME # meta: end_play + +- name: Workstation | Linux | Software | i3 | Install (yay) + package: + name: i3_yay_packages + state: present + executable: yay + when: ansible_pkg_mgr == "pacman" +