Correcting ansible-pull functionality on update.

This commit is contained in:
Emiliano Vavassori 2016-02-20 01:06:33 +01:00
parent 54ec8d4bc0
commit 4d47dfe31b
2 changed files with 1 additions and 7 deletions

View File

@ -23,5 +23,5 @@ echo "$(date --rfc-3339=seconds) Getting vault password"
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"
/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 -i localhost -d "${repo}" -U "${url}" -C "${branch}" "${playbook}" --vault-password-file "${vaultpassfile}" $@
rm -f "${vaultpassfile}"

View File

@ -5,12 +5,6 @@ echo "$(date --rfc-3339=seconds) Installing bin directory."
/usr/bin/install -d -o root -g users /var/lib/{{ ansible_local.domain.domainfull }}/bin
/bin/chown -R root:users /var/lib/{{ ansible_local.domain.domainfull }}
# Prepopulating the config folder to allow correct first run of ansible-pull.
echo "$(date --rfc-3339=seconds) Prepopulating config folder."
if [[ ! -f /var/lib/{{ ansible_local.domain.domainfull }}/config/local.yml ]]; then
git clone -b {{ ansible_local.domain.client_gitbranch }} git://{{ ansible_local.domain.serverfqdn }}/client-pull-installation.git
fi
# Installo ansible-pull.sh
echo "$(date --rfc-3339=seconds) Creating ansible-pull.sh."
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/ansible-pull.sh -O /var/lib/{{ ansible_local.domain.domainfull }}/bin/ansible-pull.sh