[ipa/server] Save the results to other hosts in run
Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
parent
76c167eba6
commit
ad52399ecf
1 changed files with 12 additions and 2 deletions
|
@ -106,13 +106,23 @@
|
||||||
|
|
||||||
- name: ask admin if they are ok reinstalling this ipa server replica
|
- name: ask admin if they are ok reinstalling this ipa server replica
|
||||||
ansible.builtin.pause:
|
ansible.builtin.pause:
|
||||||
prompt: "Do you want to reinstall replica for {{ item }}? (yes/no)"
|
prompt: "Do you want to reinstall replica for {{ item }} (ignored for master node)? (yes/no)"
|
||||||
register: confirm_replica
|
register: confirm_replica
|
||||||
with_items: "{{ play_hosts }}"
|
with_items: "{{ play_hosts }}"
|
||||||
tags:
|
tags:
|
||||||
- ipa/server
|
- ipa/server
|
||||||
- config
|
- config
|
||||||
|
|
||||||
|
- name: save the confirmation results to other hosts
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
confirm_replica: "{{ item.user_input }}"
|
||||||
|
with_items: "{{ hostvars[play_hosts.0].confirm_replica.results }}"
|
||||||
|
when: item.item == inventory_hostname
|
||||||
|
|
||||||
|
- name: validate the variable is set
|
||||||
|
ansible.builtin.debug:
|
||||||
|
var: confirm_replica
|
||||||
|
|
||||||
- name: configure replication
|
- name: configure replication
|
||||||
block:
|
block:
|
||||||
# The ipa-client-install makes the ipa-replica-install fail
|
# The ipa-client-install makes the ipa-replica-install fail
|
||||||
|
@ -145,7 +155,7 @@
|
||||||
when:
|
when:
|
||||||
- not ipa_initial
|
- not ipa_initial
|
||||||
- not check_replica.stat.exists
|
- not check_replica.stat.exists
|
||||||
- confirm_replica.user_input | default('no') | bool
|
- confirm_replica | default('no') | bool
|
||||||
tags:
|
tags:
|
||||||
- ipa/server
|
- ipa/server
|
||||||
- config
|
- config
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue