Add host-specific packages

This commit is contained in:
exu 2024-10-13 20:37:03 +02:00
parent ea13de5731
commit c569b582c3
2 changed files with 24 additions and 3 deletions

View File

@ -0,0 +1,3 @@
additional_pacman_packages:
- mattermost-desktop
- wireguard-tools

View File

@ -33,7 +33,6 @@
- name: Install other packages - name: Install other packages
community.general.pacman: community.general.pacman:
state: present state: present
# select the lines and use 'M-x sort-lines'
name: "{{ item }}" name: "{{ item }}"
loop: loop:
#- gnome-keyring #- gnome-keyring
@ -176,7 +175,6 @@
- name: x86_64 | Install other packages unavailable/unnecessary on ALARM - name: x86_64 | Install other packages unavailable/unnecessary on ALARM
community.general.pacman: community.general.pacman:
state: present state: present
# select the lines and use 'M-x sort-lines'
name: "{{ item }}" name: "{{ item }}"
loop: loop:
- amd-ucode # microcode - amd-ucode # microcode
@ -207,7 +205,6 @@
- name: x86_64 | Install multilib packages - name: x86_64 | Install multilib packages
community.general.pacman: community.general.pacman:
state: present state: present
# select the lines and use 'M-x sort-lines'
name: "{{ item }}" name: "{{ item }}"
loop: loop:
- lib32-mesa # video driver - lib32-mesa # video driver
@ -219,6 +216,27 @@
tags: packages tags: packages
become: true become: true
- name: Host | Check if host variables exist
ansible.builtin.stat:
path: "host_vars/{{ ansible_hostname }}.yml"
register: host_file
tags: packages
- name: Host | Get host specific variables
include_vars:
file: "host_vars/{{ ansible_hostname }}.yml"
when: host_file.stat.exists
tags: packages
- name: Host | Install host specific packages
community.general.pacman:
state: present
name: "{{ item }}"
loop: "{{ additional_pacman_packages|default([]) }}"
when: host_file.stat.exists
become: true
tags: packages
- name: Doom Emacs | Clone - name: Doom Emacs | Clone
ansible.builtin.git: ansible.builtin.git:
repo: https://github.com/doomemacs/doomemacs repo: https://github.com/doomemacs/doomemacs