[TIDY] Move to ansible_facts dict instead of injected variables
This commit is contained in:
parent
d1c6d34a64
commit
1c734cefb1
15 changed files with 39 additions and 39 deletions
|
|
@ -14,9 +14,9 @@
|
|||
- name: Borgbackup - Install application
|
||||
ansible.builtin.include_tasks: "{{ item }}"
|
||||
with_first_found:
|
||||
- "borgbackup-{{ ansible_distribution }}.{{ ansible_distribution_release }}.yml"
|
||||
- "borgbackup-{{ ansible_distribution }}.yml"
|
||||
- "borgbackup-{{ (override_os_family is defined) | ternary(override_os_family, ansible_os_family) }}.yml"
|
||||
- "borgbackup-{{ ansible_facts['distribution'] }}.{{ ansible_facts['distribution_release'] }}.yml"
|
||||
- "borgbackup-{{ ansible_facts['distribution'] }}.yml"
|
||||
- "borgbackup-{{ (override_os_family is defined) | ternary(override_os_family, ansible_facts['os_family']) }}.yml"
|
||||
ignore_errors: true
|
||||
|
||||
# copy backup script and enable cronjob
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
ansible.builtin.template:
|
||||
src: "{{ role_path }}/templates/borgbackup.sh"
|
||||
dest: /usr/local/bin/borgbackup.sh
|
||||
owner: "{{ ansible_user_id }}"
|
||||
group: "{{ ansible_user_id }}"
|
||||
owner: "{{ ansible_facts['user_id'] }}"
|
||||
group: "{{ ansible_facts['user_id'] }}"
|
||||
mode: "0775"
|
||||
- name: Borgbackup - Run Borgbackup script at 1:00 daily
|
||||
become: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue