forked from LibreSchool/server-config
Correcting ansible-pull functionality on update.
This commit is contained in:
parent
54ec8d4bc0
commit
4d47dfe31b
@ -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)
|
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 -i localhost -d "${repo}" -U "${url}" -C "${branch}" "${playbook}" --vault-password-file "${vaultpassfile}" $@
|
||||||
rm -f "${vaultpassfile}"
|
rm -f "${vaultpassfile}"
|
||||||
|
@ -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
|
/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 }}
|
/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
|
# Installo ansible-pull.sh
|
||||||
echo "$(date --rfc-3339=seconds) Creating 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
|
/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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user