[IPA] Use ipactl status output for replication check
As the /etc/ipa/default.conf is already created by ipa/client role, we need to find another way to check if replication is needed. Calling `ipactl status` should be more reliable. Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
parent
4025b4d158
commit
3e349c80ec
1 changed files with 7 additions and 2 deletions
|
@ -110,8 +110,13 @@
|
|||
- ipa/server
|
||||
- config
|
||||
|
||||
# ipactl status has return code > 0 when the IPA is not set up yet
|
||||
# even if the client is already installed
|
||||
# Previously we checked in /etc/ipa/default.conf exists, but this
|
||||
# is already created in ipa/client role so the replica never
|
||||
# started
|
||||
- name: determine whether we need to set up replication
|
||||
stat: path=/etc/ipa/default.conf
|
||||
shell: ipactl status
|
||||
register: replication_status
|
||||
tags:
|
||||
- ipa/server
|
||||
|
@ -186,7 +191,7 @@
|
|||
--dirsrv-config-file=/root/ldif/replica-install.ldif
|
||||
creates=/etc/ipa/default.conf
|
||||
when: ansible_distribution_major_version|int >= 8
|
||||
when: not ipa_initial and not replication_status.stat.exists
|
||||
when: not ipa_initial and replication_status.rc > 0
|
||||
tags:
|
||||
- ipa/server
|
||||
- config
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue