Skip to content
Snippets Groups Projects
Commit 266f79b5 authored by Thomas Woerner's avatar Thomas Woerner
Browse files

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.
parent 90f6e14c
Branches
Tags
No related merge requests found
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
- block: - block:
- name: Get server name from hostname - name: Get server name from hostname
set_fact: set_fact:
ipa_server_name: "{{ ansible_facts['hostname'].split('.')[0] }}" ipa_server_name: "{{ ansible_facts['fqdn'].split('.')[0] }}"
rescue: rescue:
- name: Fallback to 'ipaserver' - name: Fallback to 'ipaserver'
set_fact: set_fact:
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
- block: - block:
- name: Get domain name from hostname. - name: Get domain name from hostname.
set_fact: set_fact:
ipaserver_domain: "{{ ansible_facts['hostname'].split('.')[0][1:] }}" ipaserver_domain: "{{ ansible_facts['fqdn'].split('.')[1:] | join('.') }}"
rescue: rescue:
- name: Fallback to 'ipa.test' - name: Fallback to 'ipa.test'
set_fact: set_fact:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment