server-config/roles/ansible-pull/templates/init-ansible.sh

15 lines
587 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# Creo directory dipendenti
install -d -o root -g locals /var/lib/{{ ansible_local.domain.domainfull }}/config
# Installo il cronjob per ansible-pull
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/crontab -O /etc/cron.d/ansible-pull
chown root:locals /etc/cron.d/ansible-pull
chmod 0644 /etc/cron.d/ansible-pull
# Installo il logrotate per ansible
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/logrotate -O /etc/logrotate.d/ansible-pull
chown root:locals /etc/logrotate.d/ansible-pull
chmod 0644 /etc/logrotate.d/ansible-pull