homeserver/roles/mgrote.apt_manage_packages/tasks/main.yml
mg 10bc3a7f98 rolle: apt_install_packages umgebaut + Pakete entfernen eingebaut (#237)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: mg/ansible#237
Co-authored-by: mg <michael.grote@posteo.de>
Co-committed-by: mg <michael.grote@posteo.de>
2021-11-05 21:10:27 +01:00

33 lines
832 B
YAML

---
- name: install common-packages
become: yes
ansible.builtin.package:
name: "{{ apt_packages_common }}"
state: present
- name: install extra-packages
become: yes
ansible.builtin.package:
name: "{{ apt_packages_extra }}"
state: present
when: apt_packages_extra is defined
- name: install vm-packages
become: yes
ansible.builtin.package:
name: "{{ apt_packages_vm }}"
state: present
when: ansible_virtualization_role == 'guest'
- name: install physical-packages
become: yes
ansible.builtin.package:
name: "{{ apt_packages_physical }}"
state: present
when: ansible_virtualization_role != 'guest'
- name: remove packages
become: yes
ansible.builtin.package:
name: "{{ apt_packages_absent }}"
state: absent