From 518dfcf4534a58be0588957b62f4b04aca66d174 Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Wed, 22 Jul 2015 23:14:30 +0200 Subject: [PATCH] Added fix not allowing the PXE booted client to contact external security.ubuntu.com. Thx Enrico Bacis. --- roles/kickstart/tasks/kickstart.yml | 5 +- .../templates/profiles/client-trusty.cfg | 5 ++ .../templates/profiles/docenti-trusty.cfg | 5 ++ .../templates/profiles/ubuntu-trusty.cfg | 52 ------------------- 4 files changed, 12 insertions(+), 55 deletions(-) delete mode 100644 roles/kickstart/templates/profiles/ubuntu-trusty.cfg diff --git a/roles/kickstart/tasks/kickstart.yml b/roles/kickstart/tasks/kickstart.yml index 0015347..c24f499 100644 --- a/roles/kickstart/tasks/kickstart.yml +++ b/roles/kickstart/tasks/kickstart.yml @@ -33,11 +33,11 @@ # Gestisco caso con virtualbox, dove non devo overridare il mirror - name: ubuntumirrorpath per Virtualbox (no mirror) - set_fact: ubuntumirrorpath="" + 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 }}" + 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 profili kickstart @@ -46,7 +46,6 @@ with_items: - client-trusty.cfg - docenti-trusty.cfg - - ubuntu-trusty.cfg - name: Copia configurazioni kickstart template: src=post-ks.sh dest=/var/lib/nethserver/ibay/ks/post-ks.sh diff --git a/roles/kickstart/templates/profiles/client-trusty.cfg b/roles/kickstart/templates/profiles/client-trusty.cfg index 4d2b401..748d43f 100644 --- a/roles/kickstart/templates/profiles/client-trusty.cfg +++ b/roles/kickstart/templates/profiles/client-trusty.cfg @@ -21,6 +21,11 @@ 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 diff --git a/roles/kickstart/templates/profiles/docenti-trusty.cfg b/roles/kickstart/templates/profiles/docenti-trusty.cfg index b3fad56..3ac7514 100644 --- a/roles/kickstart/templates/profiles/docenti-trusty.cfg +++ b/roles/kickstart/templates/profiles/docenti-trusty.cfg @@ -21,6 +21,11 @@ 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 diff --git a/roles/kickstart/templates/profiles/ubuntu-trusty.cfg b/roles/kickstart/templates/profiles/ubuntu-trusty.cfg deleted file mode 100644 index e6422ad..0000000 --- a/roles/kickstart/templates/profiles/ubuntu-trusty.cfg +++ /dev/null @@ -1,52 +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 -#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 -@ ubuntu-desktop -openssh-server -#Post installation commands -%post --nochroot -#the target filesystem in nochroot environment is in /target -TARGETHOSTNAME=$(wget -qO- http://{{ ansible_local.domain.serverfqdn }}:3000/whatsmyhostname) -echo $TARGETHOSTNAME > /target/etc/hostname -sed -i "s/kickseed/$TARGETHOSTNAME/g" /target/etc/hosts