forked from LibreSchool/server-config
Correcting options for running curl only on IPv4.
This commit is contained in:
parent
dffa6108e1
commit
137db72cdf
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Aggiorna crontab e logrotate forzosamente.
|
# Aggiorna crontab e logrotate forzosamente.
|
||||||
echo "$(date --rfc-3339=seconds) Loading and running init-ansible.sh"
|
echo "$(date --rfc-3339=seconds) Loading and running init-ansible.sh"
|
||||||
/usr/bin/curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | /bin/bash
|
/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | /bin/bash
|
||||||
|
|
||||||
# Script provvisorio.
|
# Script provvisorio.
|
||||||
# Potremmo decidere di far eseguire uno script generato da servizio
|
# Potremmo decidere di far eseguire uno script generato da servizio
|
||||||
@ -15,7 +15,7 @@ branch=master
|
|||||||
playbook=local.yml
|
playbook=local.yml
|
||||||
|
|
||||||
echo "$(date --rfc-3339=seconds) Getting vault password"
|
echo "$(date --rfc-3339=seconds) Getting vault password"
|
||||||
vaultpassfile=$(/usr/bin/curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/getvaultpass.py | /usr/bin/python)
|
vaultpassfile=$(/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/getvaultpass.py | /usr/bin/python)
|
||||||
|
|
||||||
echo "$(date --rfc-3339=seconds) Running ansible-pull"
|
echo "$(date --rfc-3339=seconds) Running ansible-pull"
|
||||||
/usr/bin/ansible-pull --accept-host-key -d "${repo}" -U "${url}" -C "${branch}" "${playbook}" --vault-password-file "${vaultpassfile}" $@
|
/usr/bin/ansible-pull --accept-host-key -d "${repo}" -U "${url}" -C "${branch}" "${playbook}" --vault-password-file "${vaultpassfile}" $@
|
||||||
|
@ -1 +1 @@
|
|||||||
@reboot root /usr/bin/curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/ansible-pull.sh | /bin/bash >>/var/log/ansible-pull.log 2>&1
|
@reboot root /usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/ansible-pull.sh | /bin/bash >>/var/log/ansible-pull.log 2>&1
|
||||||
|
@ -113,7 +113,7 @@ d-i preseed/late_command string in-target apt-get -y upgrade; \
|
|||||||
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes; \
|
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes; \
|
||||||
in-target apt-get -y autoremove; \
|
in-target apt-get -y autoremove; \
|
||||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||||
in-target /bin/bash -c "curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-client.sh | /bin/bash >/root/postseed.log 2>&1";
|
in-target /bin/bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-client.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||||
|
|
||||||
# Grub installation on MBR
|
# Grub installation on MBR
|
||||||
d-i grub-installer/only_debian boolean true
|
d-i grub-installer/only_debian boolean true
|
||||||
|
@ -113,7 +113,7 @@ d-i preseed/late_command string in-target apt-get -y upgrade; \
|
|||||||
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes-client; \
|
in-target apt-get -y purge libnss-mdns unity-webapps-common zeitgeist-core zeitgeist-datahub epoptes-client; \
|
||||||
in-target apt-get -y autoremove; \
|
in-target apt-get -y autoremove; \
|
||||||
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
sed -i'' -e 's/ubuntu/gnome-fallback/g' /target/usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf; \
|
||||||
in-target bash -c "curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-docenti.sh | /bin/bash >/root/post-ks.log 2>&1";
|
in-target bash -c "/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/preseed/postseed-docenti.sh | /bin/bash >/root/postseed.log 2>&1";
|
||||||
|
|
||||||
# Grub installation on MBR
|
# Grub installation on MBR
|
||||||
d-i grub-installer/only_debian boolean true
|
d-i grub-installer/only_debian boolean true
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Cambio username con quello fornito da servizio
|
# Cambio username con quello fornito da servizio
|
||||||
TARGETHOSTNAME=$(wget -qO- http://{{ ansible_local.domain.serverfqdn }}:3000/whatsmyhostname)
|
TARGETHOSTNAME=$(/usr/bin/wget -qO- http://{{ ansible_local.domain.serverfqdn }}:3000/whatsmyhostname)
|
||||||
echo $TARGETHOSTNAME > /etc/hostname
|
echo $TARGETHOSTNAME > /etc/hostname
|
||||||
sed -i'' -e "s/kickseed/$TARGETHOSTNAME/g" /etc/hosts
|
/bin/sed -i'' -e "s/kickseed/$TARGETHOSTNAME/g" /etc/hosts
|
||||||
|
|
||||||
# Installo i file necessari per ansible.
|
# Installo i file necessari per ansible.
|
||||||
curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | bash
|
/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | /bin/bash
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Cambio username con quello fornito da servizio
|
# Cambio username con quello fornito da servizio
|
||||||
TARGETHOSTNAME=$(wget -qO- http://{{ ansible_local.domain.serverfqdn }}:3000/whatsmyhostname?role=docenti)
|
TARGETHOSTNAME=$(/usr/bin/wget -qO- http://{{ ansible_local.domain.serverfqdn }}:3000/whatsmyhostname?role=docenti)
|
||||||
echo $TARGETHOSTNAME > /etc/hostname
|
echo $TARGETHOSTNAME > /etc/hostname
|
||||||
sed -i'' -e "s/kickseed/$TARGETHOSTNAME/g" /etc/hosts
|
/bin/sed -i'' -e "s/kickseed/$TARGETHOSTNAME/g" /etc/hosts
|
||||||
|
|
||||||
# Installo i file necessari per ansible.
|
# Installo i file necessari per ansible.
|
||||||
curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | bash
|
/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | /bin/bash
|
||||||
|
Loading…
x
Reference in New Issue
Block a user