client-pull-installation/roles/base/tasks/base.yml

62 lines
1.5 KiB
YAML

---
# Configurazione di base del sistema.
- name: Cambiamento apt/sources.list
template:
src: apt/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: Verifica desktop Edubuntu
shell: 'tasksel --list-tasks | grep "^i edubuntu-desktop-gnome"'
ignore_errors: yes
register: check_edubuntu_desktop
changed_when: check_edubuntu_desktop.rc != 0
sudo: yes
- name: Installazione desktop environment
shell: 'tasksel install edubuntu-desktop-gnome'
when: check_edubuntu_desktop|changed
sudo: yes
- name: Installazione pacchetti aggiuntivi
apt: pkg={{ item }} state=installed
with_items:
- ubuntu-edu-secondary
- epoptes-client
sudo: yes
- name: Aggiungo VirtualBox Guest Additions, se necessario
apt: pkg=virtualbox-guest-dkms state=present
when: ansible_product_name == "VirtualBox"
sudo: yes
- name: Rimozione di pacchetti non richiesti
apt: pkg={{ item }} state=absent purge=yes
with_items:
- unity-webapps-common
- zeitgeist-core
- zeitgeist-datahub
- epoptes
sudo: yes
- name: Correggo NetworkManager per gestire la rete
lineinfile:
dest: /etc/network/interfaces
regexp: "{{ item }}"
state: absent
with_items:
- ^auto eth0
- ^iface eth0
- name: Cambio greeter di default
lineinfile:
dest: /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
regexp: "^user-session=ubuntu$"
line: "user-session=gnome-fallback"