This is a very simple role that will install a list of packages.
variable | default | required | description |
---|---|---|---|
pgi_packages |
unset | true | List of packages to install. See below example for the exact definition |
pgi_quiet_assert |
false |
false | Whether to quiet the assert statements |
An extended example of only the pgi_packages
variable is illustrated down below:
pgi_packages:
- name: 'qemu-guest-agent'
state: 'latest'
- name: 'openssh-server'
state: 'present'
- name: 'vim'
The only required option for a package is the name
. The state
can be either latest
, to install the latest available version (so upgrade if it is already present), or present
to ensure that the package exists, which is also the default, if the state
has not been defined.
None
---
- name: 'Install packages'
hosts: 'all'
gather_facts: false
roles:
- role: 'package_installation'
vars:
pgi_packages:
- name: 'qemu-guest-agent'
state: 'latest'
- name: 'openssh-server'
state: 'present'
- name: 'vim'
...
GPL-2.0-or-later