Files
ansible-freeipa/tests/service/env_vars.yml
Grzegorz Grasza 7a23531047 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.
2021-03-19 13:55:44 +01:00

16 lines
570 B
YAML

---
- name: Get Domain from server name
set_fact:
test_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}"
- name: Set host1, host2 and svc hosts fqdn
set_fact:
host1_fqdn: "{{ 'host1.' + test_domain }}"
host2_fqdn: "{{ 'host2.' + test_domain }}"
svc_fqdn: "{{ 'svc.' + test_domain }}"
nohost_fqdn: "{{ 'nohost.' + test_domain }}"
- name: Get IPv4 address prefix from server node
set_fact:
ipv4_prefix: "{{ ansible_facts['default_ipv4'].address.split('.')[:-1] | join('.') }}"