homeserver/roles/mgrote_apt_manage_packages/tasks/main.yml
Michael Grote 40b5321f8d
Some checks failed
ansible-lint / gitleaks (pull_request) Successful in 3s
ansible-lint / Ansible Lint (pull_request) Failing after 25s
dd
2024-12-29 11:21:06 +01:00

33 lines
844 B
YAML

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