2015-10-02 02:33:59 +02:00
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
# Creo directory dipendenti
|
2016-02-18 22:29:01 +01:00
|
|
|
|
echo "$(date --rfc-3339=seconds) Installing bin directory."
|
2015-10-11 02:57:48 +02:00
|
|
|
|
/usr/bin/install -d -o root -g users /var/lib/{{ ansible_local.domain.domainfull }}/bin
|
2015-10-11 02:04:15 +02:00
|
|
|
|
/bin/chown -R root:users /var/lib/{{ ansible_local.domain.domainfull }}
|
2015-10-02 02:33:59 +02:00
|
|
|
|
|
2015-10-11 02:57:48 +02:00
|
|
|
|
# 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
|
|
|
|
|
|
2015-10-02 02:33:59 +02:00
|
|
|
|
# Installo il cronjob per ansible-pull
|
2015-10-11 02:09:06 +02:00
|
|
|
|
echo "$(date --rfc-3339=seconds) Creating crontab"
|
2015-10-11 02:04:15 +02:00
|
|
|
|
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/crontab -O /etc/cron.d/ansible-pull
|
|
|
|
|
/bin/chown root:root /etc/cron.d/ansible-pull
|
|
|
|
|
/bin/chmod 0644 /etc/cron.d/ansible-pull
|
2015-10-02 02:33:59 +02:00
|
|
|
|
|
|
|
|
|
# Installo il logrotate per ansible
|
2015-10-11 02:09:06 +02:00
|
|
|
|
echo "$(date --rfc-3339=seconds) Creating logrotate"
|
2015-10-11 02:04:15 +02:00
|
|
|
|
/usr/bin/wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/logrotate -O /etc/logrotate.d/ansible-pull
|
|
|
|
|
/bin/chown root:root /etc/logrotate.d/ansible-pull
|
|
|
|
|
/bin/chmod 0644 /etc/logrotate.d/ansible-pull
|