82 lines
2.0 KiB
YAML
82 lines
2.0 KiB
YAML
---
|
|
# Configurazione di base del sistema.
|
|
|
|
- name: Cambiamento apt/sources.list
|
|
template:
|
|
src: sources.list
|
|
dest: /etc/apt/sources.list
|
|
backup: yes
|
|
when: ansible_product_name != "VirtualBox"
|
|
|
|
- name: Aggiornamento pacchetti disponibili
|
|
apt: update_cache=yes
|
|
sudo: yes
|
|
|
|
- name: Aggiornamento sistema
|
|
apt: upgrade=full
|
|
sudo: yes
|
|
|
|
- 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
|
|
tags: edu-install
|
|
sudo: yes
|
|
|
|
- name: Installazione desktop environment
|
|
shell: "DEBIAN_FRONTEND=noninteractive /usr/bin/apt-get -y install edubuntu-desktop-gnome^"
|
|
when: check_edubuntu_pkg|changed
|
|
tags: edu-install
|
|
sudo: yes
|
|
|
|
- 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
|
|
register: autoremove
|
|
changed_when: "'Rimozione' in autoremove.stdout"
|
|
sudo: yes
|
|
|
|
- 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
|
|
tags: edu-install
|
|
sudo: yes
|
|
|
|
- name: Aggiungo VirtualBox Guest Additions, se necessario
|
|
apt: pkg=virtualbox-guest-dkms state=present
|
|
when: ansible_product_name == "VirtualBox"
|
|
sudo: yes
|
|
|
|
- name: Correggo NetworkManager per gestire la rete
|
|
lineinfile:
|
|
dest: /etc/network/interfaces
|
|
regexp: "{{ item }}"
|
|
state: absent
|
|
when: ansible_product_name != "VirtualBox"
|
|
with_items:
|
|
- ^auto eth0
|
|
- ^iface eth0
|
|
|
|
- name: 'Cambio sessione di default (gnome-fallback)'
|
|
replace:
|
|
dest: /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
|
|
regexp: "^user-session=ubuntu$"
|
|
replace: "user-session=gnome-fallback"
|