2015-09-14 00:23:31 +02:00
|
|
|
---
|
|
|
|
# Management of packages
|
|
|
|
|
|
|
|
- name: Removing packages commonly not required
|
2016-01-12 22:23:52 +01:00
|
|
|
apt:
|
|
|
|
pkg: '{{ item }}'
|
|
|
|
state: absent
|
|
|
|
purge: yes
|
2015-09-14 00:23:31 +02:00
|
|
|
with_items: "{{ base_common_delpkg }}"
|
|
|
|
|
|
|
|
- name: Removing packages from client machines
|
2016-01-12 22:23:52 +01:00
|
|
|
apt:
|
|
|
|
pkg: '{{ item }}'
|
|
|
|
state: absent
|
|
|
|
purge: yes
|
2015-09-14 00:23:31 +02:00
|
|
|
with_items: "{{ base_client_delpkg }}"
|
2016-02-18 01:22:05 +01:00
|
|
|
when: ansible_local.noderole.role == 'client' and base_client_delpkg|length > 0
|
2015-09-14 00:23:31 +02:00
|
|
|
|
|
|
|
- name: Removing packages from docenti machines
|
2016-01-12 22:23:52 +01:00
|
|
|
apt:
|
|
|
|
pkg: '{{ item }}'
|
|
|
|
state: absent
|
|
|
|
purge: yes
|
2015-09-14 00:23:31 +02:00
|
|
|
with_items: "{{ base_docenti_delpkg }}"
|
2016-02-18 01:22:05 +01:00
|
|
|
when: ansible_local.noderole.role == 'docenti' and base_docenti_delpkg|length > 0
|
2015-09-14 00:23:31 +02:00
|
|
|
|
|
|
|
- name: Cleanup of unneeded packages
|
|
|
|
shell: apt-get -y autoremove
|
|
|
|
register: autoremove
|
|
|
|
changed_when: "'Rimozione' in autoremove.stdout"
|
|
|
|
|
|
|
|
- name: Installing additional common packages
|
2016-01-12 22:23:52 +01:00
|
|
|
apt:
|
|
|
|
pkg: '{{ item }}'
|
|
|
|
state: installed
|
2015-09-14 00:23:31 +02:00
|
|
|
with_items: "{{ base_common_addpkg }}"
|
|
|
|
tags: edu-install
|
|
|
|
|
|
|
|
- name: Installing additional packages for client role
|
2016-01-12 22:23:52 +01:00
|
|
|
apt:
|
|
|
|
pkg: '{{ item }}'
|
|
|
|
state: present
|
2015-09-14 00:23:31 +02:00
|
|
|
with_items: "{{ base_client_addpkg }}"
|
2016-02-18 01:22:05 +01:00
|
|
|
when: ansible_local.noderole.role == 'client' and base_client_addpkg|length > 0
|
2015-09-14 00:23:31 +02:00
|
|
|
|
|
|
|
- name: Installing additional packages for docenti role
|
2016-01-12 22:23:52 +01:00
|
|
|
apt:
|
|
|
|
pkg: '{{ item }}'
|
|
|
|
state: present
|
2015-09-14 00:23:31 +02:00
|
|
|
with_items: "{{ base_docenti_addpkg }}"
|
2016-02-18 01:22:05 +01:00
|
|
|
when: ansible_local.noderole.role == 'docenti' and base_docenti_addpkg|length > 0
|