mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-06-11 19:25:54 +00:00
Use ansible_facts variable
Without this change the "Import variables specific to distribution" tasks fail with "Could not find file on the Ansible Controller..." on environments with inject facts disabled. This changes the tests to run with ansible with inject_facts_as_vars = false and fixes other roles and playbooks.
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
ipahostgroup:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: cluster
|
||||
host: "{{ ansible_fqdn }}"
|
||||
host: "{{ ansible_facts['fqdn'] }}"
|
||||
|
||||
- name: Ensure some sudocmds are available
|
||||
ipasudocmd:
|
||||
@@ -500,20 +500,20 @@
|
||||
register: result
|
||||
failed_when: result.changed
|
||||
|
||||
- name: Ensure host "{{ ansible_fqdn }}" is present in sudorule.
|
||||
- name: Ensure host "{{ ansible_facts['fqdn'] }}" is present in sudorule.
|
||||
ipasudorule:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: testrule1
|
||||
host: "{{ ansible_fqdn }}"
|
||||
host: "{{ ansible_facts['fqdn'] }}"
|
||||
action: member
|
||||
register: result
|
||||
failed_when: not result.changed
|
||||
|
||||
- name: Ensure host "{{ ansible_fqdn }}" is present in sudorule, again.
|
||||
- name: Ensure host "{{ ansible_facts['fqdn'] }}" is present in sudorule, again.
|
||||
ipasudorule:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: testrule1
|
||||
host: "{{ ansible_fqdn }}"
|
||||
host: "{{ ansible_facts['fqdn'] }}"
|
||||
action: member
|
||||
register: result
|
||||
failed_when: result.changed
|
||||
|
||||
Reference in New Issue
Block a user