forked from LibreSchool/server-config
Allowing for an ansible.-pull.sh script to be run locally. for some reason, on a client, running curl directly within cron.d was not working.
This commit is contained in:
parent
137db72cdf
commit
ed0ef3428f
@ -1 +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
|
||||
@reboot root /var/lib/{{ ansible_local.domain.domainfull }}/bin/ansible-pull.sh >>/var/log/ansible-pull.log 2>&1
|
||||
|
@ -3,8 +3,14 @@
|
||||
# Creo directory dipendenti
|
||||
echo "$(date --rfc-3339=seconds) Installing config directory"
|
||||
/usr/bin/install -d -o root -g users /var/lib/{{ ansible_local.domain.domainfull }}/config
|
||||
/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 }}
|
||||
|
||||
# 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
|
||||
chmod a+x /var/lib/{{ ansible_local.domain.domainfull }}/bin/ansible-pull.sh
|
||||
|
||||
# Installo il cronjob per ansible-pull
|
||||
echo "$(date --rfc-3339=seconds) Creating crontab"
|
||||
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/crontab -O /etc/cron.d/ansible-pull
|
||||
|
Loading…
x
Reference in New Issue
Block a user