forked from LibreSchool/server-config
Added fix not allowing the PXE booted client to contact external security.ubuntu.com. Thx Enrico Bacis.
This commit is contained in:
parent
a99eaa7103
commit
518dfcf453
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user