103 lines
3.3 KiB
YAML
103 lines
3.3 KiB
YAML
---
|
|
- name: Verifica configurazione ibay kickstart
|
|
shell: /sbin/e-smith/db accounts show ks
|
|
register: chk_ks_created
|
|
changed_when: chk_ks_created.rc != 0
|
|
ignore_errors: yes
|
|
sudo: yes
|
|
|
|
- name: Configurazione web kickstart
|
|
shell: /sbin/e-smith/db accounts set ks ibay Description "Kickstart share" GroupAccess rw HttpAccess private HttpAliasType default HttpAllowOverrideStatus disabled HttpForceSslStatus disabled HttpPasswordStatus disabled HttpStatus enabled HttpVirtualHost __ANY__ OtherAccess r OwningGroup locals SmbAuditStatus disabled SmbStatus disabled
|
|
when: chk_ks_created|failed
|
|
sudo: yes
|
|
|
|
- name: Attivazione web kickstart
|
|
shell: /sbin/e-smith/signal-event ibay-create ks
|
|
when: chk_ks_created|failed
|
|
sudo: yes
|
|
|
|
- name: Verifica presenza directory mirror
|
|
file: path=/var/spool/apt-mirror/mirror state=directory
|
|
register: chk_mirror_dir
|
|
ignore_errors: yes
|
|
sudo: yes
|
|
|
|
- name: Collegamento directory mirror
|
|
file: path=/var/lib/nethserver/ibay/ks/mirror src=/var/spool/apt-mirror/mirror state=link
|
|
sudo: yes
|
|
when: chk_mirror_dir|success
|
|
|
|
- name: Creazione directory kickstart
|
|
file:
|
|
path: "/var/lib/nethserver/ibay/ks/{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- profiles
|
|
- preseed
|
|
sudo: yes
|
|
|
|
# Gestisco caso con virtualbox, dove non devo overridare il mirror
|
|
- name: ubuntumirrorpath per Virtualbox (no mirror)
|
|
set_fact: ubuntumirrorpath="" secmirror="security.ubuntu.com" secpath="/ubuntu"
|
|
when: ansible_bios_version == "VirtualBox"
|
|
|
|
- name: ubuntumirrorpath per altro (usa mirror locale)
|
|
set_fact: ubuntumirrorpath="{{ ansible_local.domain.mirrorpath }}" secmirror="{{ ansible_local.domain.serverfqdn }}" secpath="/ks/mirror/security.ubuntu.com/ubuntu"
|
|
when: ansible_bios_version != "VirtualBox"
|
|
|
|
- name: Copia profilo kickstart per client
|
|
template:
|
|
src: profiles/client-trusty.cfg
|
|
dest: /var/lib/nethserver/ibay/ks/profiles/client-trusty.cfg
|
|
sudo: yes
|
|
|
|
- name: Copia profilo kickstart per docenti
|
|
template:
|
|
src: profiles/docenti-trusty.cfg
|
|
dest: /var/lib/nethserver/ibay/ks/profiles/docenti-trusty.cfg
|
|
sudo: yes
|
|
|
|
- name: Copia preseed - standard
|
|
template:
|
|
src: preseed/edubuntu.seed
|
|
dest: /var/lib/nethserver/ibay/ks/preseed/edubuntu.seed
|
|
when: ansible_bios_version != "VirtualBox"
|
|
sudo: yes
|
|
|
|
- name: Copia preseed - virtuale
|
|
template:
|
|
src: preseed/edubuntu-vm.seed
|
|
dest: /var/lib/nethserver/ibay/ks/preseed/edubuntu.seed
|
|
when: ansible_bios_version == "VirtualBox"
|
|
sudo: yes
|
|
|
|
- name: Copia script post-installazione per client
|
|
template:
|
|
src: post-client-ks.sh
|
|
dest: /var/lib/nethserver/ibay/ks/post-client-ks.sh
|
|
sudo: yes
|
|
|
|
- name: Copia script post-installazione per docenti
|
|
template:
|
|
src: post-docenti-ks.sh
|
|
dest: /var/lib/nethserver/ibay/ks/post-docenti-ks.sh
|
|
sudo: yes
|
|
|
|
- name: Copio la chiave GPG del repository ansible per installazione locale
|
|
copy:
|
|
src: ppa-ansible.gpg
|
|
dest: /var/lib/nethserver/ibay/ks/ppa-ansible.gpg
|
|
sudo: yes
|
|
|
|
- name: Copio la configurazione del repo di ansible per installazione locale
|
|
template:
|
|
src: ansible-ansible-trusty.list
|
|
dest: /var/lib/nethserver/ibay/ks/ansible-ansible-trusty.list
|
|
sudo: yes
|
|
|
|
- name: Copio la configurazione del repo di LibreOffice per installazione locale
|
|
template:
|
|
src: libreoffice-5-trusty.list
|
|
dest: /var/lib/nethserver/ibay/ks/libreoffice-5-trusty.list
|
|
sudo: yes
|