2021-04-01 21:51:25 +02:00
|
|
|
---
|
2020-08-18 11:57:53 +02:00
|
|
|
- name: install common-packages
|
|
|
|
become: yes
|
2021-01-02 10:30:54 +01:00
|
|
|
ansible.builtin.package:
|
2021-11-05 21:10:27 +01:00
|
|
|
name: "{{ apt_packages_common }}"
|
2020-08-18 11:57:53 +02:00
|
|
|
state: present
|
|
|
|
|
2020-12-22 13:20:29 +01:00
|
|
|
- name: install extra-packages
|
|
|
|
become: yes
|
2021-01-02 10:30:54 +01:00
|
|
|
ansible.builtin.package:
|
2021-11-05 21:10:27 +01:00
|
|
|
name: "{{ apt_packages_extra }}"
|
2020-12-22 13:20:29 +01:00
|
|
|
state: present
|
2021-11-05 21:10:27 +01:00
|
|
|
when: apt_packages_extra is defined
|
2020-12-22 13:20:29 +01:00
|
|
|
|
2020-08-18 11:57:53 +02:00
|
|
|
- name: install vm-packages
|
|
|
|
become: yes
|
2021-01-02 10:30:54 +01:00
|
|
|
ansible.builtin.package:
|
2021-11-05 21:10:27 +01:00
|
|
|
name: "{{ apt_packages_vm }}"
|
2020-08-18 11:57:53 +02:00
|
|
|
state: present
|
|
|
|
when: ansible_virtualization_role == 'guest'
|
|
|
|
|
|
|
|
- name: install physical-packages
|
|
|
|
become: yes
|
2021-01-02 10:30:54 +01:00
|
|
|
ansible.builtin.package:
|
2021-11-05 21:10:27 +01:00
|
|
|
name: "{{ apt_packages_physical }}"
|
2020-08-18 11:57:53 +02:00
|
|
|
state: present
|
|
|
|
when: ansible_virtualization_role != 'guest'
|
2021-11-05 21:10:27 +01:00
|
|
|
|
2021-11-27 23:39:02 +01:00
|
|
|
- name: install packages from the internet
|
|
|
|
become: yes
|
|
|
|
ansible.builtin.apt:
|
|
|
|
deb: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
when: apt_packages_internet is defined
|
|
|
|
loop: "{{ apt_packages_internet }}"
|
|
|
|
|
2021-11-05 21:10:27 +01:00
|
|
|
- name: remove packages
|
|
|
|
become: yes
|
|
|
|
ansible.builtin.package:
|
|
|
|
name: "{{ apt_packages_absent }}"
|
|
|
|
state: absent
|