forked from LibreSchool/server-config
Correcting cleanup of libreoffice ppa within apt-mirror.list. Correcting scripts for ansible-pull to include paths for executables.
This commit is contained in:
parent
6177b9b87b
commit
12b06745ac
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Aggiorna crontab e logrotate forzosamente.
|
||||
curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | bash
|
||||
/usr/bin/curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/init-ansible.sh | /bin/bash
|
||||
|
||||
# Script provvisorio.
|
||||
# Potremmo decidere di far eseguire uno script generato da servizio
|
||||
@ -13,7 +13,7 @@ logfile=/var/lib/ansible-pull.log
|
||||
branch=master
|
||||
playbook=local.yml
|
||||
|
||||
vaultpassfile=$(\curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/getvaultpass.py | python)
|
||||
vaultpassfile=$(/usr/bin/curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/getvaultpass.py | /usr/bin/python)
|
||||
|
||||
ansible-pull --accept-host-key -d "${repo}" -U "${url}" -C "${branch}" "${playbook}" --vault-password-file "${vaultpassfile}" $@
|
||||
/usr/bin/ansible-pull --accept-host-key -d "${repo}" -U "${url}" -C "${branch}" "${playbook}" --vault-password-file "${vaultpassfile}" $@
|
||||
rm -f "${vaultpassfile}"
|
||||
|
@ -1 +1 @@
|
||||
@reboot root curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/ansible-pull.sh | bash >>/var/log/ansible-pull.log 2>&1
|
||||
@reboot root /usr/bin/curl -sSL http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/ansible-pull.sh | /bin/bash >>/var/log/ansible-pull.log 2>&1
|
||||
|
@ -1,15 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Creo directory dipendenti
|
||||
install -d -o root -g users /var/lib/{{ ansible_local.domain.domainfull }}/config
|
||||
chown -R root:users /var/lib/{{ ansible_local.domain.domainfull }}
|
||||
/usr/bin/install -d -o root -g users /var/lib/{{ ansible_local.domain.domainfull }}/config
|
||||
/bin/chown -R root:users /var/lib/{{ ansible_local.domain.domainfull }}
|
||||
|
||||
# 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:root /etc/cron.d/ansible-pull
|
||||
chmod 0644 /etc/cron.d/ansible-pull
|
||||
/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
|
||||
|
||||
# Installo il logrotate per ansible
|
||||
wget -q http://{{ ansible_local.domain.serverfqdn }}/ks/ansible-pull/logrotate -O /etc/logrotate.d/ansible-pull
|
||||
chown root:root /etc/logrotate.d/ansible-pull
|
||||
chmod 0644 /etc/logrotate.d/ansible-pull
|
||||
/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
|
||||
|
@ -82,5 +82,5 @@ clean http://extras.ubuntu.com/ubuntu
|
||||
clean http://archive.canonical.com
|
||||
clean http://security.ubuntu.com/ubuntu
|
||||
clean http://ppa.launchpad.net/ansible/ansible/ubuntu
|
||||
clean http://ppa.launchpad.net/libreoffice/ppa/ubuntu
|
||||
clean http://ppa.launchpad.net/libreoffice/libreoffice-5-0/ubuntu
|
||||
clean http://bglug.sys42.eu/ubuntu
|
||||
|
Loading…
x
Reference in New Issue
Block a user