Correcting some errors in postseed scripts and init-ansible script.
This commit is contained in:
parent
bef75210f5
commit
85783747a4
@ -1,14 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Creo directory dipendenti
|
||||
install -d -o root -g locals /var/lib/{{ ansible_local.domain.domainfull }}/config
|
||||
install -d -o root -g users /var/lib/{{ ansible_local.domain.domainfull }}/config
|
||||
chmod -R root:users /var/lib/{{ ansible_local.domain.domainfull }}
|
||||
|
||||
# Installo il cronjob per ansible-pull
|
||||
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/crontab -O /etc/cron.d/ansible-pull
|
||||
chown root:locals /etc/cron.d/ansible-pull
|
||||
chown root:root /etc/cron.d/ansible-pull
|
||||
chmod 0644 /etc/cron.d/ansible-pull
|
||||
|
||||
# Installo il logrotate per ansible
|
||||
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/logrotate -O /etc/logrotate.d/ansible-pull
|
||||
chown root:locals /etc/logrotate.d/ansible-pull
|
||||
chown root:root /etc/logrotate.d/ansible-pull
|
||||
chmod 0644 /etc/logrotate.d/ansible-pull
|
||||
|
@ -48,6 +48,6 @@
|
||||
src: 'preseed/{{ item }}'
|
||||
dest: '/var/lib/nethserver/ibay/ks/preseed/{{ item }}'
|
||||
with_items:
|
||||
- post-client-ks.sh
|
||||
- post-docenti-ks.sh
|
||||
- postseed-client.sh
|
||||
- postseed-docenti.sh
|
||||
sudo: yes
|
||||
|
@ -112,8 +112,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 curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/post-client-ks.sh | in-target /bin/bash >/target/root/post-ks.log 2>&1
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target "curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-client.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||
|
||||
# Grub installation on MBR
|
||||
d-i grub-installer/only_debian boolean true
|
||||
|
@ -112,8 +112,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 curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/post-docenti-ks.sh | bash >/root/post-ks.log 2>&1
|
||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||
in-target "curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-docenti.sh | /bin/bash >/root/post-ks.log 2>&1";
|
||||
|
||||
# Grub installation on MBR
|
||||
d-i grub-installer/only_debian boolean true
|
||||
|
@ -3,7 +3,7 @@
|
||||
# Cambio username con quello fornito da servizio
|
||||
TARGETHOSTNAME=$(wget -qO- http://{{ ansible_local.domain.serverfqdn }}:3000/whatsmyhostname)
|
||||
echo $TARGETHOSTNAME > /etc/hostname
|
||||
sed -i '' -e "s/kickseed/$TARGETHOSTNAME/g" /etc/hosts
|
||||
sed -i'' -e "s/kickseed/$TARGETHOSTNAME/g" /etc/hosts
|
||||
|
||||
# Installo i file necessari per ansible.
|
||||
curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | /bin/bash
|
@ -3,7 +3,7 @@
|
||||
# Cambio username con quello fornito da servizio
|
||||
TARGETHOSTNAME=$(wget -qO- http://{{ ansible_local.domain.serverfqdn }}:3000/whatsmyhostname?role=docenti)
|
||||
echo $TARGETHOSTNAME > /etc/hostname
|
||||
sed -i '' -e "s/kickseed/$TARGETHOSTNAME/g" /etc/hosts
|
||||
sed -i'' -e "s/kickseed/$TARGETHOSTNAME/g" /etc/hosts
|
||||
|
||||
# Installo i file necessari per ansible.
|
||||
curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | bash
|
Loading…
x
Reference in New Issue
Block a user