Gestita configurazione client con script post-ks.sh. Aggiustato il tiro per installare il minimo indispensabile e una versione di ansible sufficientemente aggiornata.
This commit is contained in:
parent
6f238cfa32
commit
3a2533a948
@ -128,6 +128,7 @@
|
|||||||
- client-trusty.cfg
|
- client-trusty.cfg
|
||||||
- docenti-trusty.cfg
|
- docenti-trusty.cfg
|
||||||
- ubuntu-trusty.cfg
|
- ubuntu-trusty.cfg
|
||||||
|
- post-ks.sh
|
||||||
|
|
||||||
- name: Ripristino impostazioni mirrorpath
|
- name: Ripristino impostazioni mirrorpath
|
||||||
set_fact: mirrorpath="{{ oldmirrorpath }}"
|
set_fact: mirrorpath="{{ oldmirrorpath }}"
|
||||||
|
@ -42,16 +42,21 @@ skipx
|
|||||||
services --enabled=openssh
|
services --enabled=openssh
|
||||||
#Install packages
|
#Install packages
|
||||||
%packages
|
%packages
|
||||||
@ ubuntu-desktop
|
|
||||||
@ edubuntu-desktop
|
|
||||||
@ ubuntu-edu-secondary
|
|
||||||
vim
|
vim
|
||||||
screen
|
screen
|
||||||
cifs-utils
|
cifs-utils
|
||||||
|
curl
|
||||||
openssh-server
|
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 installation commands
|
||||||
%post --nochroot
|
%post
|
||||||
#the target filesystem in nochroot environment is in /target
|
#the target filesystem in nochroot environment is in /target
|
||||||
TARGETHOSTNAME=$(wget -qO- http://{{ serverfqdn }}:3000/whatsmyhostname)
|
\curl -sSL http://{{ serverfqdn }}/ks/post-ks.sh | bash
|
||||||
echo $TARGETHOSTNAME > /target/etc/hostname
|
|
||||||
sed -i "s/kickseed/$TARGETHOSTNAME/g" /target/etc/hosts
|
|
||||||
|
12
roles/pxe/templates/ks/post-ks.sh
Normal file
12
roles/pxe/templates/ks/post-ks.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Cambio username con quello fornito da servizio
|
||||||
|
TARGETHOSTNAME=$(wget -qO- http://{{ serverfqdn }}:3000/whatsmyhostname)
|
||||||
|
echo $TARGETHOSTNAME > /etc/hostname
|
||||||
|
sed -i "s/kickseed/$TARGETHOSTNAME/g" /etc/hosts
|
||||||
|
|
||||||
|
# Installo l'ultimo ansible per ansible-pull
|
||||||
|
export https_proxy=https://{{ serverip }}:3128
|
||||||
|
add-apt-repository -y ppa:ansible/ansible
|
||||||
|
apt-get update && apt-get install -y ansible
|
||||||
|
unset https_proxy
|
Loading…
x
Reference in New Issue
Block a user