mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-29 19:04:42 +00:00
Replaced groups.ipaserver[0] by ansible_fqdn.
Since we are using docker for running the tests we can no longer rely on groups.ipaserver[0] as the managed host hostname.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
tasks:
|
||||
- name: Get Domain from server name
|
||||
set_fact:
|
||||
ipaserver_domain: "{{ groups.ipaserver[0].split('.')[1:] | join ('.') }}"
|
||||
ipaserver_domain: "{{ ansible_fqdn.split('.')[1:] | join ('.') }}"
|
||||
when: ipaserver_domain is not defined
|
||||
|
||||
- name: Set host1_fqdn .. host2_fqdn
|
||||
@@ -55,39 +55,39 @@
|
||||
register: result
|
||||
failed_when: result.changed
|
||||
|
||||
- name: Host "{{ host1_fqdn }}" managed by "{{ groups.ipaserver[0] }}"
|
||||
- name: Host "{{ host1_fqdn }}" managed by "{{ ansible_fqdn }}"
|
||||
ipahost:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: "{{ host1_fqdn }}"
|
||||
managedby_host: "{{ groups.ipaserver[0] }}"
|
||||
managedby_host: "{{ ansible_fqdn }}"
|
||||
action: member
|
||||
register: result
|
||||
failed_when: not result.changed
|
||||
|
||||
- name: Host "{{ host1_fqdn }}" managed by "{{ groups.ipaserver[0] }}" again
|
||||
- name: Host "{{ host1_fqdn }}" managed by "{{ ansible_fqdn }}" again
|
||||
ipahost:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: "{{ host1_fqdn }}"
|
||||
managedby_host: "{{ groups.ipaserver[0] }}"
|
||||
managedby_host: "{{ ansible_fqdn }}"
|
||||
action: member
|
||||
register: result
|
||||
failed_when: result.changed
|
||||
|
||||
- name: Host "{{ host1_fqdn }}" not managed by "{{ groups.ipaserver[0] }}"
|
||||
- name: Host "{{ host1_fqdn }}" not managed by "{{ ansible_fqdn }}"
|
||||
ipahost:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: "{{ host1_fqdn }}"
|
||||
managedby_host: "{{ groups.ipaserver[0] }}"
|
||||
managedby_host: "{{ ansible_fqdn }}"
|
||||
action: member
|
||||
state: absent
|
||||
register: result
|
||||
failed_when: not result.changed
|
||||
|
||||
- name: Host "{{ host1_fqdn }}" not managed by "{{ groups.ipaserver[0] }}" again
|
||||
- name: Host "{{ host1_fqdn }}" not managed by "{{ ansible_fqdn }}" again
|
||||
ipahost:
|
||||
ipaadmin_password: SomeADMINpassword
|
||||
name: "{{ host1_fqdn }}"
|
||||
managedby_host: "{{ groups.ipaserver[0] }}"
|
||||
managedby_host: "{{ ansible_fqdn }}"
|
||||
action: member
|
||||
state: absent
|
||||
register: result
|
||||
|
||||
Reference in New Issue
Block a user