2015-07-08 02:30:07 +02:00
|
|
|
---
|
|
|
|
# Configurazione di base del sistema.
|
|
|
|
|
|
|
|
- name: Cambiamento apt/sources.list
|
|
|
|
template:
|
2015-07-22 22:56:25 +02:00
|
|
|
src: sources.list
|
2015-07-08 02:30:07 +02:00
|
|
|
dest: /etc/apt/sources.list
|
|
|
|
backup: yes
|
|
|
|
when: ansible_product_name != "VirtualBox"
|
|
|
|
|
|
|
|
- name: Aggiornamento pacchetti disponibili
|
|
|
|
apt: update_cache=yes
|
2015-07-08 17:17:23 +02:00
|
|
|
sudo: yes
|
2015-07-08 02:30:07 +02:00
|
|
|
|
2015-07-28 22:23:46 +02:00
|
|
|
- name: Aggiornamento sistema
|
|
|
|
apt: upgrade=full
|
|
|
|
sudo: yes
|
|
|
|
|
2015-07-14 22:41:02 +02:00
|
|
|
- name: Verifica presenza desktop environment
|
|
|
|
shell: 'tasksel --list-tasks | grep "^i edubuntu-desktop-gnome"'
|
|
|
|
ignore_errors: yes
|
|
|
|
register: check_edubuntu_pkg
|
|
|
|
changed_when: check_edubuntu_pkg.rc != 0
|
2015-07-15 09:33:46 +02:00
|
|
|
tags: edu-install
|
2015-07-14 22:41:02 +02:00
|
|
|
sudo: yes
|
|
|
|
|
2015-07-09 02:04:38 +02:00
|
|
|
- name: Installazione desktop environment
|
2015-07-15 09:33:46 +02:00
|
|
|
shell: "DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -y install edubuntu-desktop-gnome^"
|
2015-07-14 22:41:02 +02:00
|
|
|
when: check_edubuntu_pkg|changed
|
2015-07-15 09:33:46 +02:00
|
|
|
tags: edu-install
|
2015-07-09 02:04:38 +02:00
|
|
|
sudo: yes
|
|
|
|
|
2015-07-29 21:26:21 +02:00
|
|
|
- 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
|
|
|
|
sudo: yes
|
|
|
|
|
|
|
|
- name: Rimozione pacchetti non più necessari
|
|
|
|
shell: apt-get -y autoremove
|
2015-08-20 05:04:47 +02:00
|
|
|
register: autoremove
|
2015-08-20 05:06:25 +02:00
|
|
|
changed_when: "'Rimozione' in autoremove.stdout"
|
2015-07-29 21:26:21 +02:00
|
|
|
sudo: yes
|
|
|
|
|
2015-07-09 02:04:38 +02:00
|
|
|
- name: Installazione pacchetti aggiuntivi
|
2015-07-08 02:30:07 +02:00
|
|
|
apt: pkg={{ item }} state=installed
|
|
|
|
with_items:
|
2015-07-12 23:13:12 +02:00
|
|
|
- vim
|
|
|
|
- screen
|
|
|
|
- cifs-utils
|
2015-07-08 02:30:07 +02:00
|
|
|
- ubuntu-edu-secondary
|
2015-07-09 02:04:38 +02:00
|
|
|
- epoptes-client
|
2015-07-28 22:57:57 +02:00
|
|
|
- firefox-locale-it
|
2015-08-20 06:31:44 +02:00
|
|
|
- libnss-myhostname
|
2015-07-15 09:33:46 +02:00
|
|
|
tags: edu-install
|
2015-07-08 12:16:14 +02:00
|
|
|
sudo: yes
|
2015-07-08 02:30:07 +02:00
|
|
|
|
2015-07-10 01:16:35 +02:00
|
|
|
- name: Aggiungo VirtualBox Guest Additions, se necessario
|
|
|
|
apt: pkg=virtualbox-guest-dkms state=present
|
2015-07-10 01:28:13 +02:00
|
|
|
when: ansible_product_name == "VirtualBox"
|
2015-07-10 01:16:35 +02:00
|
|
|
sudo: yes
|
|
|
|
|
2015-07-12 21:08:55 +02:00
|
|
|
- name: Correggo NetworkManager per gestire la rete
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/network/interfaces
|
|
|
|
regexp: "{{ item }}"
|
|
|
|
state: absent
|
2015-08-19 03:15:24 +02:00
|
|
|
when: ansible_product_name != "VirtualBox"
|
2015-07-12 21:08:55 +02:00
|
|
|
with_items:
|
|
|
|
- ^auto eth0
|
|
|
|
- ^iface eth0
|
|
|
|
|
2015-08-20 04:51:42 +02:00
|
|
|
- name: 'Cambio sessione di default (gnome-fallback)'
|
2015-08-20 04:55:13 +02:00
|
|
|
replace:
|
2015-07-12 21:08:55 +02:00
|
|
|
dest: /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
|
|
|
|
regexp: "^user-session=ubuntu$"
|
2015-08-20 04:55:13 +02:00
|
|
|
replace: "user-session=gnome-fallback"
|