Managed packages to be added/removed with the help of a default variable file.

This commit is contained in:
Emiliano Vavassori 2015-09-07 22:16:36 +02:00
parent a2be77b34d
commit ffae669d8a
2 changed files with 55 additions and 14 deletions

View 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:

View File

@ -32,14 +32,21 @@
- name: Rimozione di pacchetti installati ma non richiesti
apt: pkg={{ item }} state=absent purge=yes
with_items:
- libnss-mdns
- unity-webapps-common
- zeitgeist-core
- zeitgeist-datahub
- epoptes
with_items: "{{ base_common_delpkg }}"
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
shell: apt-get -y autoremove
register: autoremove
@ -48,17 +55,31 @@
- name: Installazione pacchetti aggiuntivi
apt: pkg={{ item }} state=installed
with_items:
- vim
- screen
- cifs-utils
- ubuntu-edu-secondary
- epoptes-client
- firefox-locale-it
- libnss-myhostname
with_items: "{{ base_common_addpkg }}"
tags: edu-install
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
apt: pkg=virtualbox-guest-dkms state=present
when: ansible_product_name == "VirtualBox"