#!/usr/bin/ansible-playbook # vim:ft=ansible: --- - name: Set up system for Ansible block: - name: Copy Ansible password file copy: src: ansiblevaultpass dest: /root/ansiblevaultpass mode: "0600" - name: Create system copy of Ansible repo git: repo: "https://git.9iron.club/salt/ansible" dest: /opt/ansible-repo update: yes - name: Set up pull and run cronjob cron: minute: "0" hour: "*/12" name: ansible-pull job: "cd /opt/ansible-repo && ANSIBLE_CONFIG=/opt/ansible-repo/ansiblehost-config.cfg HOME=/root /usr/local/bin/ansible-playbook \"{{ pullplaybook }}\" --vault-password-file /root/ansiblevaultpass > /var/log/ansible-pull.log 2>&1" disabled: yes become: true