switched to new facts-syntax

This commit is contained in:
2026-01-12 12:31:24 +01:00
parent 037b998219
commit 9fd07d57a4
41 changed files with 111 additions and 109 deletions

View File

@@ -11,14 +11,14 @@
name: cronie
state: started
enabled: true
when: ansible_distribution == "Archlinux"
when: ansible_facts['distribution'] == "Archlinux"
- name: system setup | cron | add cronjob for ansible on reboot
become: true
become_user: root
cron:
name: "ansible provision"
user: "{{ ansible_user_id }}"
user: "{{ ansible_facts['user_id'] }}"
job: 'ansible-pull --vault-password-file=~/.vaultpass -U "https://gitea.mewissen.site/rene/ansible-pull.git" -d "/opt/ansible-pull" -C master > /var/log/ansible_pull.log || cat /var/log/ansible_pull.log'
state: present
special_time: reboot
@@ -28,7 +28,7 @@
become_user: root
cron:
name: "ansible provision"
user: "{{ ansible_user_id }}"
user: "{{ ansible_facts['user_id'] }}"
job: 'ansible-pull --vault-password-file=~/.vaultpass -U "https://gitea.mewissen.site/rene/ansible-pull.git" -d "/opt/ansible-pull" -C master > /var/log/ansible_pull.log || cat /var/log/ansible_pull.log'
state: present
minute: 0
@@ -105,7 +105,7 @@
hour: "0"
minute: "0"
job: "apt list --upgradeable"
when: ansible_distribution in ["Debian", "Ubuntu", "Linux Mint"]
when: ansible_facts['distribution'] in ["Debian", "Ubuntu", "Linux Mint"]
- name: system setup | cron | Send me a list of upgradeable packages daily (Archlinux)
tags: cron
@@ -115,4 +115,4 @@
hour: "0"
minute: "0"
job: "{{ root_home }} + '/bin/cron_pacman'"
when: ansible_distribution in ["Archlinux"]
when: ansible_facts['distribution'] in ["Archlinux"]