Waiting for network to be ready, then run ansible-pull.

This commit is contained in:
Emiliano Vavassori 2015-10-11 03:09:55 +02:00
parent ed0ef3428f
commit 539fa6ddd5
1 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,10 @@
#!/bin/bash
# waiting for dns stack to be ready
while true; do
[[ "$(dig +short {{ ansible_local.domain.serverfqdn }})" == "{{ ansible_local.domain.serverip }}" ]] && break;
done
# Aggiorna crontab e logrotate forzosamente.
echo "$(date --rfc-3339=seconds) Loading and running init-ansible.sh"
/usr/bin/curl -sSL4 http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | /bin/bash