From b2bab82ee90874e261ded5c90e37eb18886920fb Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Mon, 28 Sep 2015 22:41:13 +0200 Subject: [PATCH] Modifying kickstart to add preseeds. Added Edubuntu classic installation from pxe. Added to apt-mirror also libreoffice, allowing for libreoffice ppa installation. --- .../files/preseed/edubuntu-nomirror.seed | 52 +++++++++++++++++++ roles/kickstart/tasks/kickstart.yml | 26 +++++++++- .../templates/libreoffice-5-trusty.list | 2 + .../kickstart/templates/preseed/edubuntu.seed | 52 +++++++++++++++++++ roles/pxe/templates/pxelinux.cfg/default | 34 ++++++++++++ roles/ubuntu-mirror/files/apt-mirror.list | 6 +++ 6 files changed, 170 insertions(+), 2 deletions(-) create mode 100644 roles/kickstart/files/preseed/edubuntu-nomirror.seed create mode 100644 roles/kickstart/templates/libreoffice-5-trusty.list create mode 100644 roles/kickstart/templates/preseed/edubuntu.seed diff --git a/roles/kickstart/files/preseed/edubuntu-nomirror.seed b/roles/kickstart/files/preseed/edubuntu-nomirror.seed new file mode 100644 index 0000000..5fa98b6 --- /dev/null +++ b/roles/kickstart/files/preseed/edubuntu-nomirror.seed @@ -0,0 +1,52 @@ +# 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 string 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 archive.ubuntu.com +d-i mirror/http/directory string /ubuntu +d-i mirror/http/proxy string +# Enable extras.ubuntu.com. +d-i apt-setup/extras boolean true +# Setup and enable libreoffice PPA +d-i apt-setup/local0/repository string http://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://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 +# Install the Edubuntu desktop. +tasksel tasksel/first multiselect ubuntu-desktop, edubuntu-desktop-gnome +tasksel tasksel/first seen false +# Upgrade installation to full +d-i pkgsel/upgrade select full-upgrade +# 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 +# Adding libreoffice and ansible +d-i pkgsel/include string openssh-server libreoffice libreoffice-l10n ansible +# Grub installation on MBR +d-i grub-installer/only_debian boolean true +# On live DVDs, don't spend huge amounts of time removing substantial +# application packages pulled in by language packs. Given that we clearly +# have the space to include them on the DVD, they're useful and we might as +# well keep them installed. +ubiquity ubiquity/keep-installed string icedtea6-plugin openoffice.org diff --git a/roles/kickstart/tasks/kickstart.yml b/roles/kickstart/tasks/kickstart.yml index 3a944f8..60bbe6a 100644 --- a/roles/kickstart/tasks/kickstart.yml +++ b/roles/kickstart/tasks/kickstart.yml @@ -28,7 +28,12 @@ when: chk_mirror_dir|success - name: Creazione directory kickstart - file: path=/var/lib/nethserver/ibay/ks/profiles state=directory + 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 @@ -52,6 +57,18 @@ dest: /var/lib/nethserver/ibay/ks/profiles/docenti-trusty.cfg sudo: yes +- name: Copia preseed con repo + template: + src: preseed/edubuntu.seed + dest: /var/lib/nethserver/ibay/ks/preseed/edubuntu.seed + sudo: yes + +- name: Copia preseed senza repo + copy: + src: preseed/edubuntu-nomirror.seed + dest: /var/lib/nethserver/ibay/ks/preseed/edubuntu-nomirror.seed + sudo: yes + - name: Copia script post-installazione per client template: src: post-client-ks.sh @@ -75,4 +92,9 @@ 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/templates/libreoffice-5-trusty.list b/roles/kickstart/templates/libreoffice-5-trusty.list new file mode 100644 index 0000000..1e745a8 --- /dev/null +++ b/roles/kickstart/templates/libreoffice-5-trusty.list @@ -0,0 +1,2 @@ +deb http://{{ ansible_local.domain.mirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main +deb-src http://{{ ansible_local.domain.mirrorpath }}ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu trusty main diff --git a/roles/kickstart/templates/preseed/edubuntu.seed b/roles/kickstart/templates/preseed/edubuntu.seed new file mode 100644 index 0000000..8cb7974 --- /dev/null +++ b/roles/kickstart/templates/preseed/edubuntu.seed @@ -0,0 +1,52 @@ +# 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 string 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 +# Enable extras.ubuntu.com. +d-i apt-setup/extras boolean true +# 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 +# Install the Edubuntu desktop. +tasksel tasksel/first multiselect ubuntu-desktop, edubuntu-desktop-gnome +tasksel tasksel/first seen false +# Upgrade installation to full +d-i pkgsel/upgrade select full-upgrade +# 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 +# Adding libreoffice and ansible +d-i pkgsel/include string openssh-server libreoffice libreoffice-l10n ansible +# Grub installation on MBR +d-i grub-installer/only_debian boolean true +# On live DVDs, don't spend huge amounts of time removing substantial +# application packages pulled in by language packs. Given that we clearly +# have the space to include them on the DVD, they're useful and we might as +# well keep them installed. +ubiquity ubiquity/keep-installed string icedtea6-plugin openoffice.org diff --git a/roles/pxe/templates/pxelinux.cfg/default b/roles/pxe/templates/pxelinux.cfg/default index 1fa64ef..baf2003 100644 --- a/roles/pxe/templates/pxelinux.cfg/default +++ b/roles/pxe/templates/pxelinux.cfg/default @@ -19,6 +19,40 @@ LABEL docenti MENU SEPARATOR +MENU BEGIN +MENU TITLE Edubuntu Classica + +LABEL edubuntu-64 + MENU LABEL Installa Edubuntu 64 bit (nomirror) + LINUX /ubuntu/14.04/amd64/linux + INITRD /ubuntu/14.04/amd64/initrd.gz + APPEND locale=it_IT.UTF-8 keyboard-configuration/layoutcode=it url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/edubuntu-nomirror.seed + +LABEL edubuntu-64-mirr + MENU LABEL Installa Edubuntu 64 bit (con mirror) + LINUX /ubuntu/14.04/amd64/linux + INITRD /ubuntu/14.04/amd64/initrd.gz + APPEND locale=it_IT.UTF-8 keyboard-configuration/layoutcode=it url=http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/edubuntu.seed + +LABEL edubuntu-32 + MENU LABEL Installa Edubuntu 32 bit (nomirror) + 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-nomirror.seed + +LABEL edubuntu-32-mirr + MENU LABEL Installa Edubuntu 32 bit (con mirror) + 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 + +MENU SEPARATOR + +LABEL return-edu + MENU LABEL ^Torna al menu principale + MENU EXIT +MENU END + LABEL local MENU LABEL Boot from ^local hard drive LOCALBOOT 0 diff --git a/roles/ubuntu-mirror/files/apt-mirror.list b/roles/ubuntu-mirror/files/apt-mirror.list index 80268f5..19e5d9d 100644 --- a/roles/ubuntu-mirror/files/apt-mirror.list +++ b/roles/ubuntu-mirror/files/apt-mirror.list @@ -67,6 +67,11 @@ deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted univer deb-i386 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main deb-amd64 http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main +# LibreOffice PPA +deb-i386 http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main +deb-amd64 http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main +deb-src http://ppa.launchpad.net/libreoffice/ppa/ubuntu trusty main + # sys42 deb-i386 http://bglug.sys42.eu/ubuntu trusty main deb-amd64 http://bglug.sys42.eu/ubuntu trusty main @@ -77,4 +82,5 @@ clean http://extras.ubuntu.com/ubuntu clean http://archive.canonical.com clean http://security.ubuntu.com/ubuntu clean http://ppa.launchpad.net/ansible/ansible/ubuntu +clean http://ppa.launchpad.net/libreoffice/ppa/ubuntu clean http://bglug.sys42.eu/ubuntu