mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-07 05:43:26 +00:00
tests/server/test_server.yml: Fix generation of ipaserver_domain
The generation of ipaserver_domain has issues: At first ansible_facts['hostname'] instead of ansible_facts['fqdn'] is used and second the first entry after the split operation is used and third the final join is missing.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
- block:
|
||||
- name: Get server name from hostname
|
||||
set_fact:
|
||||
ipa_server_name: "{{ ansible_facts['hostname'].split('.')[0] }}"
|
||||
ipa_server_name: "{{ ansible_facts['fqdn'].split('.')[0] }}"
|
||||
rescue:
|
||||
- name: Fallback to 'ipaserver'
|
||||
set_fact:
|
||||
@@ -20,7 +20,7 @@
|
||||
- block:
|
||||
- name: Get domain name from hostname.
|
||||
set_fact:
|
||||
ipaserver_domain: "{{ ansible_facts['hostname'].split('.')[0][1:] }}"
|
||||
ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}"
|
||||
rescue:
|
||||
- name: Fallback to 'ipa.test'
|
||||
set_fact:
|
||||
|
||||
Reference in New Issue
Block a user