add cronjob to execute ansible-pull once a day

This commit is contained in:
2022-11-20 17:52:31 +01:00
parent 205f1ffbc9
commit 2bf9be7e3b

View File

@@ -13,6 +13,17 @@
enabled: true enabled: true
when: ansible_distribution == "Archlinux" when: ansible_distribution == "Archlinux"
- name: "add cronjob for ansible"
become: true
become_user: root
cron:
name: "ansible provision"
user: "{{ ansible_user_id }}"
job: 'ansible-pull --vault-password-file=~/.vaultpass -U "https://gitea.mewissen.site/rene/ansible-pull.git" -d "/opt/ansible-pull" -C master'
state: present
minute: 0
hour: 1
# - name: system setup | cron | schedule automatic ansible provisioning # - name: system setup | cron | schedule automatic ansible provisioning
# tags: cron # tags: cron
# cron: # cron: