mirror of
https://github.com/ansible-middleware/keycloak.git
synced 2026-11-25 02:13:49 +00:00
AMW-628 Replace deprecated top-level fact variables with ansible_facts syntax
This commit is contained in:
@@ -256,8 +256,8 @@
|
||||
{
|
||||
"name": item,
|
||||
"address": 'jgroups-' + item,
|
||||
"inventory_host": hostvars[item].ansible_default_ipv4.address | default(item) + '[' + (keycloak_jgroups_port | string) + ']',
|
||||
"value": hostvars[item].ansible_default_ipv4.address | default(item)
|
||||
"inventory_host": hostvars[item].ansible_facts['default_ipv4']['address'] | default(item) + '[' + (keycloak_jgroups_port | string) + ']',
|
||||
"value": hostvars[item].ansible_facts['default_ipv4']['address'] | default(item)
|
||||
}
|
||||
] }}
|
||||
loop: "{{ ansible_play_batch }}"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
- name: Distro specific tasks
|
||||
ansible.builtin.include_tasks:
|
||||
file: "{{ ansible_os_family | lower }}.yml"
|
||||
file: "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||
apply:
|
||||
tags:
|
||||
- unbound
|
||||
|
||||
@@ -42,13 +42,13 @@
|
||||
- name: Validate OS family
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- ansible_os_family in ["RedHat", "Debian"]
|
||||
- ansible_facts['os_family'] in ["RedHat", "Debian"]
|
||||
quiet: true
|
||||
fail_msg: "Can only install on RedHat or Debian OS families; found {{ ansible_os_family }}"
|
||||
success_msg: "Installing on {{ ansible_os_family }}"
|
||||
fail_msg: "Can only install on RedHat or Debian OS families; found {{ ansible_facts['os_family'] }}"
|
||||
success_msg: "Installing on {{ ansible_facts['os_family'] }}"
|
||||
|
||||
- name: Load OS specific variables
|
||||
ansible.builtin.include_vars: "vars/{{ ansible_os_family | lower }}.yml"
|
||||
ansible.builtin.include_vars: "vars/{{ ansible_facts['os_family'] | lower }}.yml"
|
||||
tags:
|
||||
- always
|
||||
|
||||
|
||||
Reference in New Issue
Block a user