Move to new ansible_facts format
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
- name: Add ssh key to authorized_keys
|
||||
ansible.posix.authorized_key:
|
||||
user: "{{ hostvars[target.host].ansible_user_id }}"
|
||||
user: "{{ hostvars[target.host].ansible_facts.user_id }}"
|
||||
key: >-
|
||||
{{
|
||||
_borgmatic_key.public_key + ' ' + _borgmatic_key.comment
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
- name: Create backup directories
|
||||
ansible.builtin.file:
|
||||
path: "{{ hostvars[target.host].ansible_user_dir }}/{{ item }}/{{ ansible_fqdn }}"
|
||||
path: "{{ hostvars[target.host].ansible_facts.user_dir }}/{{ item }}/{{ ansible_facts.fqdn }}"
|
||||
state: directory
|
||||
mode: "0700"
|
||||
loop: "{{ target.directories }}"
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
components:
|
||||
- main
|
||||
when: >
|
||||
(ansible_distribution == 'Debian' and ansible_distribution_major_version | int == 11) or
|
||||
(ansible_distribution == 'Ubuntu' and ansible_distribution_major_version | int < 24)
|
||||
(ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version | int == 11) or
|
||||
(ansible_facts.distribution == 'Ubuntu' and ansible_facts.distribution_major_version | int < 24)
|
||||
|
||||
- name: Install caddy
|
||||
ansible.builtin.apt:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: Include variables for os family {{ ansible_os_family }}
|
||||
- name: Include variables for os family {{ ansible_facts.os_family }}
|
||||
ansible.builtin.include_vars: "{{ ansible_facts.os_family }}.yaml"
|
||||
|
||||
- name: Install locales package
|
||||
|
||||
Reference in New Issue
Block a user