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
2025-04-02 03:17:05 +02:00
2025-04-02 03:17:05 +02:00
2025-04-02 00:52:18 +00:00
2025-04-07 00:17:48 +02:00

Role Name

role-common-packages

Description

Installs a smattering of packages into target machines.

Requirements

Currently deals exclusively with Linux machines.

Role Variables

Per defaults/main.yml this role is equipped to deal with Arch Linux and Debian.

  • packages_linux_common_all_families: Place package names in this list that are identical across all Linux flavors.
    packages_linux_common_all_families:
      - 'git'
      - 'parted'
      - 'wget'
    
  • packages_linux_common_*: Add package names to an operating system-specific list if it's unique to that operating system. The asterisk (*) is a placeholder for ansible_facts['os_family'] | lower. If ansible_facts['os_family'] equals Debian then this becomes debian and the list turns into packages_linux_common_debian; same for packages_linux_common_archlinux etc. Note that for Arch Linux these are official packages only, not packages from the Arch User Repository.
    packages_linux_common_archlinux:
      - 'difftastic'
      - 'eza'
      - 'openbsd-netcat'
    
    packages_linux_common_debian:
      - 'bind9-dnsutils'
      - 'unattended-upgrades'
      - 'xxd'
    
  • packages_linux_paru_archlinux: Add package names to this list that are exclusive to Arch Linux and must be installed from the Arch User Repository (AUR).
    `packages_linux_paru_archlinux`:
      - 'downgrade'
      - 'flent'
      - 'paccache-hook'
    

Dependencies

This role depends on the kewlfft.aur Ansible collection to install packages from Arch User Repository on Arch Linux target machines.

Example Playbook

In your playbook.yml call it like so:

- name: 'Awesome playbook'
  hosts: all
  roles:
    - 'role-common-packages'

License

MIT

Description
Install packages
Readme MIT 57 KiB