From 291c86bb343ec804fb37197b13c5a5c0fa7ec109 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Fri, 2 Oct 2015 02:06:02 +0200 Subject: [PATCH] Migrating installations to preseed. Removed kickstart scripts. Fixing pxe scripts. --- roles/client-install/meta/main.yml | 2 +- roles/kickstart/tasks/kickstart.yml | 102 -------------- roles/kickstart/tasks/main.yml | 11 -- .../templates/profiles/client-trusty.cfg | 69 ---------- .../templates/profiles/docenti-trusty.cfg | 69 ---------- roles/{kickstart => preseed}/files/cert8.db | Bin .../files/ppa-ansible.gpg | 0 roles/{kickstart => preseed}/meta/main.yml | 0 .../tasks/firefoxcert.yml | 0 roles/preseed/tasks/main.yml | 8 ++ roles/preseed/tasks/preseed.yml | 53 ++++++++ .../templates/ansible-ansible-trusty.list | 0 .../templates/libreoffice-5-trusty.list | 0 .../templates/preseed/client-trusty.seed} | 17 ++- .../templates/preseed/docenti-trusty.seed | 127 ++++++++++++++++++ .../templates/preseed/edubuntu.seed | 15 ++- .../templates/preseed}/post-client-ks.sh | 0 .../templates/preseed}/post-docenti-ks.sh | 0 roles/pxe/templates/pxelinux.cfg/default | 6 +- 19 files changed, 216 insertions(+), 263 deletions(-) delete mode 100644 roles/kickstart/tasks/kickstart.yml delete mode 100644 roles/kickstart/tasks/main.yml delete mode 100644 roles/kickstart/templates/profiles/client-trusty.cfg delete mode 100644 roles/kickstart/templates/profiles/docenti-trusty.cfg rename roles/{kickstart => preseed}/files/cert8.db (100%) rename roles/{kickstart => preseed}/files/ppa-ansible.gpg (100%) rename roles/{kickstart => preseed}/meta/main.yml (100%) rename roles/{kickstart => preseed}/tasks/firefoxcert.yml (100%) create mode 100644 roles/preseed/tasks/main.yml create mode 100644 roles/preseed/tasks/preseed.yml rename roles/{kickstart => preseed}/templates/ansible-ansible-trusty.list (100%) rename roles/{kickstart => preseed}/templates/libreoffice-5-trusty.list (100%) rename roles/{kickstart/templates/preseed/edubuntu-vm.seed => preseed/templates/preseed/client-trusty.seed} (83%) create mode 100644 roles/preseed/templates/preseed/docenti-trusty.seed rename roles/{kickstart => preseed}/templates/preseed/edubuntu.seed (91%) rename roles/{kickstart/templates => preseed/templates/preseed}/post-client-ks.sh (100%) rename roles/{kickstart/templates => preseed/templates/preseed}/post-docenti-ks.sh (100%) diff --git a/roles/client-install/meta/main.yml b/roles/client-install/meta/main.yml index 996316e..ca23720 100644 --- a/roles/client-install/meta/main.yml +++ b/roles/client-install/meta/main.yml @@ -1,7 +1,7 @@ --- dependencies: - { role: pxe, tags: [ 'client-install' ] } - - { role: kickstart, tags: [ 'client-install' ] } + - { role: preseed, tags: [ 'client-install' ] } - { role: ansible-pull, tags: [ 'client-install' ] } - { role: ubuntu-mirror, tags: [ 'client-install' ] } - { role: doraemon, tags: [ 'client-install' ] } diff --git a/roles/kickstart/tasks/kickstart.yml b/roles/kickstart/tasks/kickstart.yml deleted file mode 100644 index 5f268a5..0000000 --- a/roles/kickstart/tasks/kickstart.yml +++ /dev/null @@ -1,102 +0,0 @@ ---- -- 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 diff --git a/roles/kickstart/tasks/main.yml b/roles/kickstart/tasks/main.yml deleted file mode 100644 index a1b9448..0000000 --- a/roles/kickstart/tasks/main.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- include: kickstart.yml - tags: - - kickstart - - ks - -- include: firefoxcert.yml - tags: - - kickstart - - ks - - firefox diff --git a/roles/kickstart/templates/profiles/client-trusty.cfg b/roles/kickstart/templates/profiles/client-trusty.cfg deleted file mode 100644 index c7aa299..0000000 --- a/roles/kickstart/templates/profiles/client-trusty.cfg +++ /dev/null @@ -1,69 +0,0 @@ -#System language -lang it_IT -#Language modules to install -langsupport it_IT -#System keyboard -keyboard it -#System mouse -mouse -#System timezone -timezone Europe/Rome -#Root password -rootpw --disabled -#Initial user -user bglug --fullname "BgLUG User" --iscrypted --password $1$9zGKOCDN$//dSCH70wDHZITGDDxdiv1 -#Reboot after installation -reboot -#Use text mode install -text -#Install OS instead of upgrade -install -#Use Web installation -#url --url http://archive.ubuntu.com/ubuntu -url --url http://{{ ubuntumirrorpath }}archive.ubuntu.com/ubuntu -# Doesn't permit the client to contact external security.ubuntu.com for some packages -preseed mirror/country string manual -preseed apt-setup/services-select multiselect security -preseed apt-setup/security_host string {{ secmirror }} -preseed apt-setup/security_path string {{ secpath }} -#System bootloader configuration -bootloader --location=mbr -#Clear the Master Boot Record -zerombr yes -#Partition clearing information -clearpart --all --initlabel -#Disk partitioning information -part swap --recommended -part / --fstype ext4 --size 1 --grow -#System authorization infomation -auth --useshadow --enablemd5 -#Network information -network --bootproto=dhcp --device=eth0 -#Firewall configuration -firewall --disabled -#Do not configure the X Window System -skipx -# Services -services --enabled=openssh -#Install packages -%packages -dialog -vim -screen -cifs-utils -curl -git -openssh-server -software-properties-common -libyaml-0-2 -python-jinja2 -python-markupsafe -python-paramiko -python-support -python-yaml -python-crypto -sshpass -#Post installation commands -%post -#the target filesystem in nochroot environment is in /target -\curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/post-client-ks.sh | bash >/root/post-ks.log 2>&1 diff --git a/roles/kickstart/templates/profiles/docenti-trusty.cfg b/roles/kickstart/templates/profiles/docenti-trusty.cfg deleted file mode 100644 index e11e582..0000000 --- a/roles/kickstart/templates/profiles/docenti-trusty.cfg +++ /dev/null @@ -1,69 +0,0 @@ -#System language -lang it_IT -#Language modules to install -langsupport it_IT -#System keyboard -keyboard it -#System mouse -mouse -#System timezone -timezone Europe/Rome -#Root password -rootpw --disabled -#Initial user -user bglug --fullname "BgLUG User" --iscrypted --password $1$9zGKOCDN$//dSCH70wDHZITGDDxdiv1 -#Reboot after installation -reboot -#Use text mode install -text -#Install OS instead of upgrade -install -#Use Web installation -#url --url http://archive.ubuntu.com/ubuntu -url --url http://{{ ubuntumirrorpath }}archive.ubuntu.com/ubuntu -# Doesn't permit the client to contact external security.ubuntu.com for some packages -preseed mirror/country string manual -preseed apt-setup/services-select multiselect security -preseed apt-setup/security_host string {{ secmirror }} -preseed apt-setup/security_path string {{ secpath }} -#System bootloader configuration -bootloader --location=mbr -#Clear the Master Boot Record -zerombr yes -#Partition clearing information -clearpart --all --initlabel -#Disk partitioning information -part swap --recommended -part / --fstype ext4 --size 1 --grow -#System authorization infomation -auth --useshadow --enablemd5 -#Network information -network --bootproto=dhcp --device=eth0 -#Firewall configuration -firewall --disabled -#Do not configure the X Window System -skipx -# Services -services --enabled=openssh -#Install packages -%packages -dialog -vim -screen -cifs-utils -curl -git -openssh-server -software-properties-common -libyaml-0-2 -python-jinja2 -python-markupsafe -python-paramiko -python-support -python-yaml -python-crypto -sshpass -#Post installation commands -%post -#the target filesystem in nochroot environment is in /target -\curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/post-docenti-ks.sh | bash >/root/post-ks.log 2>&1 diff --git a/roles/kickstart/files/cert8.db b/roles/preseed/files/cert8.db similarity index 100% rename from roles/kickstart/files/cert8.db rename to roles/preseed/files/cert8.db diff --git a/roles/kickstart/files/ppa-ansible.gpg b/roles/preseed/files/ppa-ansible.gpg similarity index 100% rename from roles/kickstart/files/ppa-ansible.gpg rename to roles/preseed/files/ppa-ansible.gpg diff --git a/roles/kickstart/meta/main.yml b/roles/preseed/meta/main.yml similarity index 100% rename from roles/kickstart/meta/main.yml rename to roles/preseed/meta/main.yml diff --git a/roles/kickstart/tasks/firefoxcert.yml b/roles/preseed/tasks/firefoxcert.yml similarity index 100% rename from roles/kickstart/tasks/firefoxcert.yml rename to roles/preseed/tasks/firefoxcert.yml diff --git a/roles/preseed/tasks/main.yml b/roles/preseed/tasks/main.yml new file mode 100644 index 0000000..9b045ce --- /dev/null +++ b/roles/preseed/tasks/main.yml @@ -0,0 +1,8 @@ +--- +- include: preseed.yml + tags: + - preseed + +- include: firefoxcert.yml + tags: + - firefox diff --git a/roles/preseed/tasks/preseed.yml b/roles/preseed/tasks/preseed.yml new file mode 100644 index 0000000..6057793 --- /dev/null +++ b/roles/preseed/tasks/preseed.yml @@ -0,0 +1,53 @@ +--- +- name: Verifica configurazione ibay preseed + 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 preseed + shell: /sbin/e-smith/db accounts set ks ibay Description "Preseed 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 preseed + 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 preseed + file: + path: "/var/lib/nethserver/ibay/ks/preseed" + state: directory + sudo: yes + +- name: Copia profili preseed + template: + src: 'preseed/{{ item }}' + dest: '/var/lib/nethserver/ibay/ks/preseed/{{ item }}' + with_items: + - edubuntu.seed + - client-trusty.seed + - docenti-trusty.seed + sudo: yes + +- name: Copia script post-installazione + template: + src: 'preseed/{{ item }}' + dest: '/var/lib/nethserver/ibay/ks/{{ item }}' + with_items: + - post-client-ks.sh + - post-docenti-ks.sh + sudo: yes diff --git a/roles/kickstart/templates/ansible-ansible-trusty.list b/roles/preseed/templates/ansible-ansible-trusty.list similarity index 100% rename from roles/kickstart/templates/ansible-ansible-trusty.list rename to roles/preseed/templates/ansible-ansible-trusty.list diff --git a/roles/kickstart/templates/libreoffice-5-trusty.list b/roles/preseed/templates/libreoffice-5-trusty.list similarity index 100% rename from roles/kickstart/templates/libreoffice-5-trusty.list rename to roles/preseed/templates/libreoffice-5-trusty.list diff --git a/roles/kickstart/templates/preseed/edubuntu-vm.seed b/roles/preseed/templates/preseed/client-trusty.seed similarity index 83% rename from roles/kickstart/templates/preseed/edubuntu-vm.seed rename to roles/preseed/templates/preseed/client-trusty.seed index 044a902..2a5d94a 100644 --- a/roles/kickstart/templates/preseed/edubuntu-vm.seed +++ b/roles/preseed/templates/preseed/client-trusty.seed @@ -54,6 +54,14 @@ d-i time/zone string Europe/Rome d-i clock-setup/ntp boolean true d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }} +# Hostname +d-i netcfg/hostname string kickseed + +# User creation +d-i passwd/user-fullname string BgLUG User +d-i passwd/username string bglug +d-i passwd/user-password-crypted string 74810f762fb7a0d8011131b2d8509619 + # Partitioning d-i partman-auto/init_automatically_partition select biggest_free d-i partman-auto/disk string /dev/sda @@ -96,7 +104,11 @@ popularity-contest popularity-contest/participate boolean false d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-kde-$LL kde-i18n-$LL libreoffice-help-$LL libreoffice-l10n-$LL firefox-locale-$LL gimp-help-$LL thunderbird-locale-$LL # Adding libreoffice and ansible -d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-secondary libnss-myhostname geogebra geogebra-gnome +{% if ansible_bios_version == 'VirtualBox' %} +d-i pkgsel/include string dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary libreoffice ansible libnss-myhostname sysv-rc-conf virtualbox-guest-dkms +{% else %} +d-i pkgsel/include string dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary libreoffice ansible libnss-myhostname sysv-rc-conf +{% endif %} # Post installation tasks # Update system @@ -104,7 +116,8 @@ d-i preseed/late_command string in-target apt-get -y upgrade; \ in-target apt-get -y dist-upgrade; \ in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub; \ in-target apt-get -y autoremove; \ - in-target sed -i'' -e 's/ubuntu/gnome-fallback/g' /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf + in-target sed -i'' -e 's/ubuntu/gnome-fallback/g' /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf \ + in-target \curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/post-client-ks.sh | bash >/root/post-ks.log 2>&1 # Grub installation on MBR d-i grub-installer/only_debian boolean true diff --git a/roles/preseed/templates/preseed/docenti-trusty.seed b/roles/preseed/templates/preseed/docenti-trusty.seed new file mode 100644 index 0000000..bb24cd7 --- /dev/null +++ b/roles/preseed/templates/preseed/docenti-trusty.seed @@ -0,0 +1,127 @@ +# No questions if possible +debconf debconf/priority string critical + +# Localization - Italiano +d-i debian-installer/locale string it_IT.UTF-8 +d-i debian-installer/supported-locales multiselect it_IT it_IT@euro en_US en_US.UTF-8 + +# Keyboard settings +d-i console-setup/ask_detect boolean false +d-i keyboard-configuration/layoutcode string it + +# Network +d-i netcfg/choose_interface select auto + +# Adjust the default hostname. +# Not specifying the hostname should ask for it at install-time. +#d-i netcfg/get_hostname string edubuntu +#d-i netcfg/get_hostname seen false +# Enabling non-free firmware +d-i hw-detect/load_firmware boolean true + +# Setting up repositories from local mirror +d-i mirror/country string manual +d-i mirror/protocol string http +d-i mirror/http/hostname string {{ ansible_local.domain.serverfqdn }} +d-i mirror/http/directory string /ks/mirror/archive.ubuntu.com/ubuntu +d-i mirror/http/proxy string +d-i mirror/suite string trusty + +# Apt-setup additional repos +d-i apt-setup/extras boolean true +d-i apt-setup/restricted boolean true +d-i apt-setup/universe boolean true +d-i apt-setup/backports boolean true +d-i apt-setup/non-free boolean true +d-i apt-setup/contrib boolean true +d-i apt-setup/services-select multiselect security, updates +d-i apt-setup/security_host string {{ ansible_local.domain.serverfqdn }} +d-i apt-setup/security_path string /ks/mirror/security.ubuntu.com/ubuntu + +# Setup and enable libreoffice PPA +d-i apt-setup/local0/repository string http://{{ ansible_local.domain.mirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main +d-i apt-setup/local0/comment string LibreOffice Official PPA +d-i apt-setup/local0/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x36E81C9267FD1383FCC4490983FBA1751378B444&op=get + +# Setup and enable ansible PPA +d-i apt-setup/local1/repository string http://{{ ansible_local.domain.mirrorpath }}ppa.launchpad.net/ansible/ansible/ubuntu trusty main +d-i apt-setup/local1/comment string Ansible Official PPA +d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367&op=get + +# Time and date +d-i clock-setup/utc boolean true +d-i time/zone string Europe/Rome +d-i clock-setup/ntp boolean true +d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }} + +# Hostname +d-i netcfg/hostname string kickseed + +# User creation +d-i passwd/user-fullname string BgLUG User +d-i passwd/username string bglug +d-i passwd/user-password-crypted string 74810f762fb7a0d8011131b2d8509619 + +# Partitioning +d-i partman-auto/init_automatically_partition select biggest_free +d-i partman-auto/disk string /dev/sda +d-i partman-auto/method string regular +d-i partman-lvm/device_remove_lvm boolean true +d-i partman-md/device_remove_md boolean true +d-i partman-auto/choose_recipe select atomic +d-i partman-partitioning/confirm_write_new_label boolean true +d-i partman/choose_partition select finish +d-i partman/confirm boolean true +d-i partman/confirm_nooverwrite boolean true +d-i partman/mount_style select uuid +d-i user-setup/encrypt-home boolean false + +# Kernel installation +d-i base-installer/kernel/image string linux-generic + +# Install the Edubuntu desktop. +tasksel tasksel/first multiselect edubuntu-desktop-gnome + +# No asking for installation in language +d-i pkgsel/install-language-support boolean true +d-i pkgsel/ignore-incomplete-language-support boolean true +d-i localechooser/translation/warn-severe boolean true +d-i localechooser/translation/warn-light boolean true + +# Policy to upgrade: none +d-i pkgsel/update-policy select none + +# UPgrade after installation: no +d-i pkgsel/upgrade select none + +# Language pack selection +d-i pkgsel/language-packs multiselect it, en + +# Disable popularity contest +popularity-contest popularity-contest/participate boolean false + +# Install both GNOME and KDE translation packages. +d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-kde-$LL kde-i18n-$LL libreoffice-help-$LL libreoffice-l10n-$LL firefox-locale-$LL gimp-help-$LL thunderbird-locale-$LL + +# Adding libreoffice and ansible +{% if ansible_bios_version == 'VirtualBox' %} +d-i pkgsel/include string dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary libreoffice ansible libnss-myhostname sysv-rc-conf virtualbox-guest-dkms +{% else %} +d-i pkgsel/include string dialog vim screen cifs-utils curl git openssh-server software-properties-common sshpass ubuntu-edu-secondary libreoffice ansible libnss-myhostname sysv-rc-conf +{% endif %} + +# Post installation tasks +# Update system +d-i preseed/late_command string in-target apt-get -y upgrade; \ + in-target apt-get -y dist-upgrade; \ + in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub; \ + in-target apt-get -y autoremove; \ + in-target sed -i'' -e 's/ubuntu/gnome-fallback/g' /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf \ + in-target \curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/post-docenti-ks.sh | bash >/root/post-ks.log 2>&1 + +# Grub installation on MBR +d-i grub-installer/only_debian boolean true +d-i grub-installer/bootdev string /dev/sda + +# No reboot message +d-i finish-install/reboot_in_progress note diff --git a/roles/kickstart/templates/preseed/edubuntu.seed b/roles/preseed/templates/preseed/edubuntu.seed similarity index 91% rename from roles/kickstart/templates/preseed/edubuntu.seed rename to roles/preseed/templates/preseed/edubuntu.seed index bfcbfca..4978980 100644 --- a/roles/kickstart/templates/preseed/edubuntu.seed +++ b/roles/preseed/templates/preseed/edubuntu.seed @@ -2,16 +2,12 @@ debconf debconf/priority string critical # Localization - Italiano -d-i debian-installer/language string it d-i debian-installer/locale string it_IT.UTF-8 -d-i debian-installer/preferred-locale string it_IT.UTF-8 d-i debian-installer/supported-locales multiselect it_IT it_IT@euro en_US en_US.UTF-8 # Keyboard settings d-i console-setup/ask_detect boolean false -d-i console-setup/layoutcode string it d-i keyboard-configuration/layoutcode string it -d-i keyboard-configuration/variantcode string nodeadkeys # Network d-i netcfg/choose_interface select auto @@ -29,6 +25,9 @@ d-i mirror/protocol string http d-i mirror/http/hostname string {{ ansible_local.domain.serverfqdn }} d-i mirror/http/directory string /ks/mirror/archive.ubuntu.com/ubuntu d-i mirror/http/proxy string +d-i mirror/suite string trusty + +# Apt-setup additional repos d-i apt-setup/extras boolean true d-i apt-setup/restricted boolean true d-i apt-setup/universe boolean true @@ -51,7 +50,7 @@ d-i apt-setup/local1/key string http://keyserver.ubuntu.com:11371/pks/lookup?s # Time and date d-i clock-setup/utc boolean true -d-i time/zone string Europe/Rome +d-i time/zone string Europe/Rome d-i clock-setup/ntp boolean true d-i clock-setup/ntp-server string {{ ansible_local.domain.ntpserver }} @@ -97,7 +96,11 @@ popularity-contest popularity-contest/participate boolean false d-i pkgsel/language-pack-patterns string language-pack-gnome-$LL language-pack-kde-$LL kde-i18n-$LL libreoffice-help-$LL libreoffice-l10n-$LL firefox-locale-$LL gimp-help-$LL thunderbird-locale-$LL # Adding libreoffice and ansible -d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-secondary libnss-myhostname geogebra geogebra-gnome +{% if ansible_bios_version == 'VirtualBox' %} +d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-secondary libnss-myhostname geogebra geogebra-gnome sysv-rc-conf virtualbox-guest-dkms +{% else %} +d-i pkgsel/include string openssh-server libreoffice ansible vim screen git curl cifs-utils ubuntu-edu-secondary libnss-myhostname geogebra geogebra-gnome sysv-rc-conf +{% endif %} # Post installation tasks # Update system diff --git a/roles/kickstart/templates/post-client-ks.sh b/roles/preseed/templates/preseed/post-client-ks.sh similarity index 100% rename from roles/kickstart/templates/post-client-ks.sh rename to roles/preseed/templates/preseed/post-client-ks.sh diff --git a/roles/kickstart/templates/post-docenti-ks.sh b/roles/preseed/templates/preseed/post-docenti-ks.sh similarity index 100% rename from roles/kickstart/templates/post-docenti-ks.sh rename to roles/preseed/templates/preseed/post-docenti-ks.sh diff --git a/roles/pxe/templates/pxelinux.cfg/default b/roles/pxe/templates/pxelinux.cfg/default index 8aeaea4..0a251f0 100644 --- a/roles/pxe/templates/pxelinux.cfg/default +++ b/roles/pxe/templates/pxelinux.cfg/default @@ -9,13 +9,13 @@ LABEL client MENU LABEL Installa nuova macchina CLIENT LINUX /ubuntu/14.04/amd64/linux INITRD /ubuntu/14.04/amd64/initrd.gz - APPEND vga=normal ks=http://{{ ansible_local.domain.serverfqdn }}/ks/profiles/client-trusty.cfg -- quiet + APPEND vga=normal auto=true url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/client-trusty.seed -- quiet LABEL docenti MENU LABEL Installa nuova macchina DOCENTI LINUX /ubuntu/14.04/amd64/linux INITRD /ubuntu/14.04/amd64/initrd.gz - APPEND vga=normal ks=http://{{ ansible_local.domain.serverfqdn }}/ks/profiles/docenti-trusty.cfg -- quiet + APPEND vga=normal auto=true url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/docenti-trusty.seed -- quiet MENU SEPARATOR @@ -32,7 +32,7 @@ LABEL edubuntu-32 MENU LABEL Installa Edubuntu 32 bit LINUX /ubuntu/14.04/i386/linux INITRD /ubuntu/14.04/i386/initrd.gz - APPEND locale=it_IT.UTF-8 keyboard-configuration/layoutcode=it url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/edubuntu.seed + APPEND auto=true url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/edubuntu.seed quiet MENU SEPARATOR