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.
This commit is contained in:
@@ -1,25 +1,7 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
- 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'
|
||||
|
||||
- import_tasks: 'base-packages.yml'
|
||||
- import_tasks: 'base-package-auxiliary-settings.yml'
|
||||
- import_tasks: 'arch-linux-local-aur-repo-chroot.yml'
|
||||
when: 'ansible_facts[''os_family''] | lower == ''archlinux'''
|
||||
|
||||
- import_tasks: 'maintenance-unattended-upgrades.yml'
|
||||
when: 'ansible_facts[''os_family''] | lower == ''debian'''
|
||||
|
Reference in New Issue
Block a user