2023-10-25 22:26:17 +02:00
|
|
|
---
|
|
|
|
- name: install common-packages
|
|
|
|
become: true
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{ apt_packages_common }}"
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: install extra-packages
|
|
|
|
become: true
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{ apt_packages_extra }}"
|
|
|
|
state: present
|
|
|
|
when: apt_packages_extra is defined
|
|
|
|
|
|
|
|
- name: install vm-packages
|
|
|
|
become: true
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{ apt_packages_vm }}"
|
|
|
|
state: present
|
|
|
|
when: ansible_virtualization_role == 'guest'
|
|
|
|
|
|
|
|
- name: install physical-packages
|
|
|
|
become: true
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{ apt_packages_physical }}"
|
|
|
|
state: present
|
|
|
|
when: ansible_virtualization_role != 'guest'
|
|
|
|
|
|
|
|
- name: install packages from the internet
|
|
|
|
become: true
|
|
|
|
ansible.builtin.apt:
|
2024-01-25 10:24:47 +01:00
|
|
|
deb: "{{ apt_packages_internet }}"
|
2023-10-25 22:26:17 +02:00
|
|
|
state: present
|
|
|
|
when: apt_packages_internet is defined
|
|
|
|
|
|
|
|
- name: remove packages
|
|
|
|
become: true
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{ apt_packages_absent }}"
|
|
|
|
state: absent
|