By setting the `desired_package_state` variable we can change if ansible should only ensure that the packages exist on the system (`present`) or that they are also updated to their latest version (`latest`).
18 lines
426 B
YAML
18 lines
426 B
YAML
- name: Install gnupg and smartcard addon
|
|
community.general.xbps:
|
|
name:
|
|
- gnupg
|
|
- gnupg2-scdaemon
|
|
state: "{{ desired_package_state | default('present') }}"
|
|
tags: packages
|
|
|
|
- name: Ensure user group plugdev exist
|
|
ansible.builtin.group:
|
|
name: plugdev
|
|
state: "present"
|
|
|
|
- name: Put user in plugdev group
|
|
ansible.builtin.user:
|
|
name: "{{ user_name }}"
|
|
groups: [plugdev]
|
|
append: true
|