Managed packages to be added/removed with the help of a default variable file.
This commit is contained in:
parent
a2be77b34d
commit
ffae669d8a
20
roles/base/defaults/main.yml
Normal file
20
roles/base/defaults/main.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
base_common_addpkg:
|
||||||
|
- vim
|
||||||
|
- screen
|
||||||
|
- cifs-utils
|
||||||
|
- ubuntu-edu-secondary
|
||||||
|
- epoptes-client
|
||||||
|
- firefox-locale-it
|
||||||
|
- libnss-myhostname
|
||||||
|
base_common_delpkg:
|
||||||
|
- libnss-mdns
|
||||||
|
- unity-webapps-common
|
||||||
|
- zeitgeist-core
|
||||||
|
- zeitgeist-datahub
|
||||||
|
base_client_addpkg:
|
||||||
|
base_client_delpkg:
|
||||||
|
- epoptes
|
||||||
|
base_docenti_addpkg:
|
||||||
|
- epoptes
|
||||||
|
base_docenti_delpkg:
|
@ -32,14 +32,21 @@
|
|||||||
|
|
||||||
- name: Rimozione di pacchetti installati ma non richiesti
|
- name: Rimozione di pacchetti installati ma non richiesti
|
||||||
apt: pkg={{ item }} state=absent purge=yes
|
apt: pkg={{ item }} state=absent purge=yes
|
||||||
with_items:
|
with_items: "{{ base_common_delpkg }}"
|
||||||
- libnss-mdns
|
|
||||||
- unity-webapps-common
|
|
||||||
- zeitgeist-core
|
|
||||||
- zeitgeist-datahub
|
|
||||||
- epoptes
|
|
||||||
sudo: yes
|
sudo: yes
|
||||||
|
|
||||||
|
- name: Rimozione pacchetti installati ruolo client
|
||||||
|
apt: pkg={{ item }} state=absent purge=yes
|
||||||
|
with_items: {{ base_client_delpkg }}
|
||||||
|
sudo: yes
|
||||||
|
when: "{{ role }} == 'client'"
|
||||||
|
|
||||||
|
- name: Rimozione pacchetti installati ruolo docenti
|
||||||
|
apt: pkg={{ item }} state=absent purge=yes
|
||||||
|
with_items: {{ base_docenti_delpkg }}
|
||||||
|
sudo: yes
|
||||||
|
when: "{{ role }} == 'docenti'"
|
||||||
|
|
||||||
- name: Rimozione pacchetti non più necessari
|
- name: Rimozione pacchetti non più necessari
|
||||||
shell: apt-get -y autoremove
|
shell: apt-get -y autoremove
|
||||||
register: autoremove
|
register: autoremove
|
||||||
@ -48,17 +55,31 @@
|
|||||||
|
|
||||||
- name: Installazione pacchetti aggiuntivi
|
- name: Installazione pacchetti aggiuntivi
|
||||||
apt: pkg={{ item }} state=installed
|
apt: pkg={{ item }} state=installed
|
||||||
with_items:
|
with_items: "{{ base_common_addpkg }}"
|
||||||
- vim
|
|
||||||
- screen
|
|
||||||
- cifs-utils
|
|
||||||
- ubuntu-edu-secondary
|
|
||||||
- epoptes-client
|
|
||||||
- firefox-locale-it
|
|
||||||
- libnss-myhostname
|
|
||||||
tags: edu-install
|
tags: edu-install
|
||||||
sudo: yes
|
sudo: yes
|
||||||
|
|
||||||
|
- name: Rimozione pacchetti installati ruolo client
|
||||||
|
apt: pkg={{ item }} state=present
|
||||||
|
with_items: "{{ base_client_addpkg }}"
|
||||||
|
sudo: yes
|
||||||
|
when: "{{ role }} == 'client'"
|
||||||
|
|
||||||
|
- name: Rimozione pacchetti installati ruolo docenti
|
||||||
|
apt: pkg={{ item }} state=present
|
||||||
|
with_items: "{{ base_docenti_addpkg }}"
|
||||||
|
sudo: yes
|
||||||
|
when: "{{ role }} == 'docenti'"
|
||||||
|
|
||||||
|
|
||||||
|
- name: Installazione pacchetti aggiuntivi ruolo docente
|
||||||
|
apt: pkg={{ item }} state=installed
|
||||||
|
with_items:
|
||||||
|
- epoptes
|
||||||
|
tags: roles
|
||||||
|
sudo: yes
|
||||||
|
when: "{{ role }} == 'docenti'"
|
||||||
|
|
||||||
- name: Aggiungo VirtualBox Guest Additions, se necessario
|
- name: Aggiungo VirtualBox Guest Additions, se necessario
|
||||||
apt: pkg=virtualbox-guest-dkms state=present
|
apt: pkg=virtualbox-guest-dkms state=present
|
||||||
when: ansible_product_name == "VirtualBox"
|
when: ansible_product_name == "VirtualBox"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user