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