First attempt to convey package addition/removal from configuration.
This commit is contained in:
parent
ce71b22055
commit
09bdc182ea
@ -1,3 +1,3 @@
|
|||||||
[defaults]
|
[defaults]
|
||||||
inventory=hosts
|
inventory=ansdyninv.py
|
||||||
log_path=/var/log/ansible.log
|
log_path=/var/log/ansible.log
|
||||||
|
@ -7,3 +7,8 @@
|
|||||||
tags:
|
tags:
|
||||||
- base
|
- base
|
||||||
- edubuntu
|
- edubuntu
|
||||||
|
|
||||||
|
- include: role.yml
|
||||||
|
tags:
|
||||||
|
- base
|
||||||
|
- role
|
||||||
|
13
roles/base/tasks/role.yml
Normal file
13
roles/base/tasks/role.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
# Role based package installation
|
||||||
|
- name: Installazione pacchetti da aggiungere per il ruolo
|
||||||
|
apt: name={{ item }} state=present
|
||||||
|
sudo: yes
|
||||||
|
when: "{{ addpkg }}|length > 0"
|
||||||
|
with_items: "{{ addpkg }}"
|
||||||
|
|
||||||
|
- name: Rimozione pacchetti da rimuovere per il ruolo
|
||||||
|
apt: name={{ item }} state=absent purge=yes
|
||||||
|
sudo: yes
|
||||||
|
when: "{{ delpkg }}|length > 0"
|
||||||
|
with_items: "{{ delpkg }}"
|
Loading…
x
Reference in New Issue
Block a user