Files
role-common-packages/tasks/base-packages.yml
hygienic-books f122b06697 feat(role): Add package-specific global config files
Packages can now have a global (i.e. system-wide) config defined and
applied. If package is missing the config file is deleted. This is
helpful for example for Git where we want to define helpful aliases
for every logged in user and for tmux where every user should have
access to the tmux-resurrect session manager etc.
2025-08-21 03:48:22 +02:00

24 lines
885 B
YAML

# SPDX-License-Identifier: MIT
- name: 'Gather package facts'
ansible.builtin.package_facts:
manager: 'auto'
- name: 'If OS is a Linux flavor install Linux-specific packages'
when: 'ansible_facts[''system''] | lower == ''linux'''
ansible.builtin.package:
name: '{{ packages_linux_common_all_families }}'
state: 'present'
- name: 'If ''os_family'' is ''{{ ansible_facts[''os_family''] | lower }}'' install {{ ansible_facts[''os_family''] | lower }}-specific packages'
ansible.builtin.package:
name: '{{ vars[''packages_linux_common_'' + ansible_facts[''os_family''] | lower] }}'
state: 'present'
- name: 'If Arch Linux install Arch User Repository (AUR) packages'
when: 'ansible_facts[''os_family''] | lower == ''archlinux'''
kewlfft.aur.aur:
name: '{{ packages_linux_paru_archlinux }}'
state: 'present'
become: 'yes'
become_user: 'build'