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

@@ -3,14 +3,14 @@
package:
name: systemd-timesyncd
state: latest
when: ansible_distribution in ["Pop!_OS", "Ubuntu", "Linux Mint"]
when: ansible_facts['distribution'] in ["Pop!_OS", "Ubuntu", "Linux Mint"]
- name: system setup | clock | install systemd-timesyncd (debian)
tags: ntp, system setup
apt:
name: systemd-timesyncd
state: latest
when: ansible_distribution == "Debian"
when: ansible_facts['distribution'] == "Debian"
- name: system setup | clock | start and enable systemd-timestampd
tags: ntp,system setup

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"]

View File

@@ -1,7 +1,7 @@
- name: base | system_setup | git config user.email
git_config:
name: user.email # not required. The name of the setting. If no value is supplied, the value will be read from the config if it has been set.
value: 'root@{{ ansible_fqdn }}'
value: 'root@{{ ansible_facts["fqdn"] }}'
scope: global
- name: base | system_setup | git config user.name

View File

@@ -4,7 +4,7 @@
name:
- locales-all
state: latest
when: ansible_distribution in [ "Debian", "Ubuntu", "Linux Mint" ]
when: ansible_facts['distribution'] in [ "Debian", "Ubuntu", "Linux Mint" ]
- name: system setup | locale | add de_DE
tags: locale,system,setup