An Ansible Role that installs a set of predefined packages on the host.
[TOC]
None.
Available variables are listed below, along with default values (see defaults/main.yml
):
packages:
- zsh
- mosh
- rsync
- vim
The optional variable packages
defines the list of packages to be installed.
Each item can also be a mapping; in this case, there should be a key all
which is the fallback name
for all package managers. Using the package manager name as key
you can define an alternative package name for that specific package manager.
Using ''
as a value for a package manager skips this package for that package manager.
These are variables internally created by the role. Please do not use them in your code.
_packages_selected_raw
The internal variable _packages_selected_raw
contains a string of comma separated package names taken from the packages
variable.
_packages_selected
The internal variable _packages_selected
contains a list of package names taken from the _packages_selected_raw
variable.
- The community.general collection:
ansible-galaxy collection install --force community.general
---
# This installs the built-in list of packages
- hosts: localhost
roles:
- role:
name: maxvalue.default_packages
...
---
# This installs the given list of packages
- hosts: localhost
roles:
- role:
name: maxvalue.default_packages
vars:
packages:
- all: false
homebrew: little-snitch
...
You can support the development of this role and other similar roles by donating to one of the accounts below.
This role was created in 2023 by Max Fuxjäger:
- Mastodon: @[email protected]
- Matrix: @ypsilon:matrix.org