Compare commits
2 Commits
7f39793df7
...
3a8a1b5ab6
Author | SHA1 | Date | |
---|---|---|---|
3a8a1b5ab6 | |||
2ff8124dcf |
@ -29,7 +29,15 @@
|
||||
name: sudo
|
||||
become: true
|
||||
|
||||
- name: Désinstaller les paquets communs
|
||||
- name: Construire la liste des paquets à désinstaller
|
||||
ansible.builtin.set_fact:
|
||||
apt_remove: "{{ apt_remove + specific }}"
|
||||
when: specific | length > 0
|
||||
loop: "{{ lookup('ansible.builtin.varnames', '^apt_remove_.+', wantlist=True) }}"
|
||||
vars:
|
||||
specific: "{{ lookup('ansible.builtin.vars', item, default='') }}"
|
||||
|
||||
- name: Désinstaller des paquets
|
||||
ansible.builtin.apt:
|
||||
state: absent
|
||||
purge: true
|
||||
@ -43,7 +51,15 @@
|
||||
update_cache: true
|
||||
upgrade: dist
|
||||
|
||||
- name: Installer les paquets communs
|
||||
- name: Construire la liste des paquets à installer
|
||||
ansible.builtin.set_fact:
|
||||
apt_install: "{{ apt_install + specific }}"
|
||||
when: specific | length > 0
|
||||
loop: "{{ lookup('ansible.builtin.varnames', '^apt_install_.+', wantlist=True) }}"
|
||||
vars:
|
||||
specific: "{{ lookup('ansible.builtin.vars', item, default='') }}"
|
||||
|
||||
- name: Installer des paquets
|
||||
ansible.builtin.apt:
|
||||
name: "{{ apt_install }}"
|
||||
become: true
|
||||
|
Loading…
Reference in New Issue
Block a user