mg
ddae32ea0a
Co-authored-by: Michael Grote <michael.grote@posteo.de> Reviewed-on: mg/ansible#256 Co-authored-by: mg <michael.grote@posteo.de> Co-committed-by: mg <michael.grote@posteo.de>
41 lines
1 KiB
YAML
41 lines
1 KiB
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: install packages from the internet
|
|
become: yes
|
|
ansible.builtin.apt:
|
|
deb: "{{ item }}"
|
|
state: present
|
|
when: apt_packages_internet is defined
|
|
loop: "{{ apt_packages_internet }}"
|
|
|
|
- name: remove packages
|
|
become: yes
|
|
ansible.builtin.package:
|
|
name: "{{ apt_packages_absent }}"
|
|
state: absent
|