| |
@@ -86,96 +86,110 @@
|
| |
- config
|
| |
when: ipa_initial
|
| |
|
| |
- - name: determine whether we need to set up replication
|
| |
- stat: path=/etc/ipa/default.conf
|
| |
- register: replication_status
|
| |
- tags:
|
| |
- - ipa/server
|
| |
- - config
|
| |
- when: not ipa_initial
|
| |
-
|
| |
- - name: create replica file
|
| |
- delegate_to: ipa01{{ env_suffix }}.iad2.fedoraproject.org
|
| |
- command: ipa-replica-prepare
|
| |
- --password={{ipa_dm_password}}
|
| |
- {{inventory_hostname}}
|
| |
- creates=/var/lib/ipa/replica-info-{{inventory_hostname}}.gpg
|
| |
- tags:
|
| |
- - ipa/server
|
| |
- - config
|
| |
- when: not ipa_initial and ansible_distribution_major_version|int < 8 and not replication_status.stat.exists
|
| |
-
|
| |
- - name: retrieve replica file
|
| |
- delegate_to: ipa01{{ env_suffix }}.iad2.fedoraproject.org
|
| |
- fetch: src=/var/lib/ipa/replica-info-{{inventory_hostname}}.gpg
|
| |
- dest=/tmp/ipa_replica_{{inventory_hostname}}.gpg
|
| |
- flat=yes
|
| |
- tags:
|
| |
- - ipa/server
|
| |
- - config
|
| |
- when: not ipa_initial and ansible_distribution_major_version|int < 8 and not replication_status.stat.exists
|
| |
-
|
| |
- - name: deploy replica file
|
| |
- copy: src=/tmp/ipa_replica_{{inventory_hostname}}.gpg
|
| |
- dest=/root/ipa_replica_{{inventory_hostname}}.gpg
|
| |
- mode=0600 owner=root group=root
|
| |
+ - name: Create LDIF directory
|
| |
+ file:
|
| |
+ path: /root/ldif
|
| |
+ state: directory
|
| |
+ owner: root
|
| |
+ group: root
|
| |
+ mode: 0750
|
| |
tags:
|
| |
- ipa/server
|
| |
- config
|
| |
- when: not ipa_initial and ansible_distribution_major_version|int < 8 and not replication_status.stat.exists
|
| |
|
| |
- - name: destroy replica file on ansible host
|
| |
- delegate_to: localhost
|
| |
- file: path=/tmp/ipa_replica_{{inventory_hostname}}.gpg state=absent
|
| |
+ - name: Copy LDIF files
|
| |
+ copy:
|
| |
+ src: "{{item}}"
|
| |
+ dest: /root/ldif/{{item}}
|
| |
+ with_items:
|
| |
+ - grant_anonymous_replication_view.ldif
|
| |
+ - grant_fas_sync.ldif
|
| |
+ - use_id_fp_o.ldif
|
| |
+ - replica-install.ldif
|
| |
tags:
|
| |
- ipa/server
|
| |
- config
|
| |
- when: not ipa_initial and ansible_distribution_major_version|int < 8 and not replication_status.stat.exists
|
| |
|
| |
- - name: deploy replica
|
| |
- command: ipa-replica-install
|
| |
- --setup-ca
|
| |
- --setup-kra
|
| |
- --password={{ipa_dm_password}}
|
| |
- --admin-password={{ipa_admin_password}}
|
| |
- --mkhomedir
|
| |
- --no-ntp
|
| |
- --unattended
|
| |
- --no-ssh
|
| |
- --no-sshd
|
| |
- --setup-dns
|
| |
- --forwarder=10.3.163.33
|
| |
- --forwarder=10.3.163.34
|
| |
- --skip-conncheck
|
| |
- --log-file=/var/log/ipainstall.log
|
| |
- /root/ipa_replica_{{inventory_hostname}}.gpg
|
| |
- creates=/etc/ipa/default.conf
|
| |
+ - name: determine whether we need to set up replication
|
| |
+ stat: path=/etc/ipa/default.conf
|
| |
+ register: replication_status
|
| |
tags:
|
| |
- ipa/server
|
| |
- config
|
| |
- when: not ipa_initial and ansible_distribution_major_version|int < 8 and not replication_status.stat.exists
|
| |
+ when: not ipa_initial
|
| |
|
| |
- - name: deploy replica
|
| |
- command: ipa-replica-install
|
| |
- --setup-ca
|
| |
- --setup-kra
|
| |
- --admin-password={{ipa_admin_password}}
|
| |
- --no-host-dns
|
| |
- --mkhomedir
|
| |
- --no-ntp
|
| |
- --unattended
|
| |
- --no-ssh
|
| |
- --no-sshd
|
| |
- --skip-conncheck
|
| |
- --force-join
|
| |
- --log-file=/var/log/ipainstall.log
|
| |
- --domain={{ipa_realm}}
|
| |
- --server=ipa01{{ env_suffix }}.iad2.fedoraproject.org
|
| |
- creates=/etc/ipa/default.conf
|
| |
+ - name: configure replication
|
| |
+ block:
|
| |
+ - name: create replica file
|
| |
+ delegate_to: ipa01{{ env_suffix }}.iad2.fedoraproject.org
|
| |
+ command: ipa-replica-prepare
|
| |
+ --password={{ipa_dm_password}}
|
| |
+ {{inventory_hostname}}
|
| |
+ creates=/var/lib/ipa/replica-info-{{inventory_hostname}}.gpg
|
| |
+ when: ansible_distribution_major_version|int < 8
|
| |
+
|
| |
+ - name: retrieve replica file
|
| |
+ delegate_to: ipa01{{ env_suffix }}.iad2.fedoraproject.org
|
| |
+ fetch: src=/var/lib/ipa/replica-info-{{inventory_hostname}}.gpg
|
| |
+ dest=/tmp/ipa_replica_{{inventory_hostname}}.gpg
|
| |
+ flat=yes
|
| |
+ when: ansible_distribution_major_version|int < 8
|
| |
+
|
| |
+ - name: deploy replica file
|
| |
+ copy: src=/tmp/ipa_replica_{{inventory_hostname}}.gpg
|
| |
+ dest=/root/ipa_replica_{{inventory_hostname}}.gpg
|
| |
+ mode=0600 owner=root group=root
|
| |
+ when: ansible_distribution_major_version|int < 8
|
| |
+
|
| |
+ - name: destroy replica file on ansible host
|
| |
+ delegate_to: localhost
|
| |
+ file: path=/tmp/ipa_replica_{{inventory_hostname}}.gpg state=absent
|
| |
+ when: ansible_distribution_major_version|int < 8
|
| |
+
|
| |
+ - name: deploy replica
|
| |
+ command: ipa-replica-install
|
| |
+ --setup-ca
|
| |
+ --setup-kra
|
| |
+ --password={{ipa_dm_password}}
|
| |
+ --admin-password={{ipa_admin_password}}
|
| |
+ --mkhomedir
|
| |
+ --no-ntp
|
| |
+ --unattended
|
| |
+ --no-ssh
|
| |
+ --no-sshd
|
| |
+ --setup-dns
|
| |
+ --forwarder=10.3.163.33
|
| |
+ --forwarder=10.3.163.34
|
| |
+ --skip-conncheck
|
| |
+ --log-file=/var/log/ipainstall.log
|
| |
+ --dirsrv-config-file=/root/ldif/replica-install.ldif
|
| |
+ /root/ipa_replica_{{inventory_hostname}}.gpg
|
| |
+ creates=/etc/ipa/default.conf
|
| |
+ when: ansible_distribution_major_version|int < 8
|
| |
+
|
| |
+ - name: deploy replica
|
| |
+ command: ipa-replica-install
|
| |
+ --setup-ca
|
| |
+ --setup-kra
|
| |
+ --admin-password={{ipa_admin_password}}
|
| |
+ --no-host-dns
|
| |
+ --mkhomedir
|
| |
+ --no-ntp
|
| |
+ --unattended
|
| |
+ --no-ssh
|
| |
+ --no-sshd
|
| |
+ --skip-conncheck
|
| |
+ --force-join
|
| |
+ --log-file=/var/log/ipainstall.log
|
| |
+ --domain={{ipa_realm}}
|
| |
+ --server=ipa01{{ env_suffix }}.iad2.fedoraproject.org
|
| |
+ --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
|
| |
tags:
|
| |
- ipa/server
|
| |
- config
|
| |
- when: not ipa_initial and ansible_distribution_major_version|int >= 8 and not replication_status.stat.exists
|
| |
|
| |
- name: Disable rewrites
|
| |
copy: src=ipa-rewrite.conf dest=/etc/httpd/conf.d/ipa-rewrite.conf
|
| |
@@ -620,22 +634,6 @@
|
| |
- config
|
| |
|
| |
|
| |
- - name: Create LDIF directory
|
| |
- file: path=/root/ldif state=directory owner=root group=root mode=0750
|
| |
- tags:
|
| |
- - ipa/server
|
| |
- - config
|
| |
-
|
| |
- - name: Copy LDIF files
|
| |
- copy: src={{item}} dest=/root/ldif/{{item}}
|
| |
- with_items:
|
| |
- - grant_anonymous_replication_view.ldif
|
| |
- - grant_fas_sync.ldif
|
| |
- - use_id_fp_o.ldif
|
| |
- tags:
|
| |
- - ipa/server
|
| |
- - config
|
| |
-
|
| |
# This is a special one, in that it needs to apply on each master since it's non-replicated.
|
| |
- name: Grant access to replication status
|
| |
command: ldapmodify -Y EXTERNAL -H {{ ipa_ldap_socket }}
|
| |
I'm actually not sure if this will work as this file is already created in ipa-client-install, which is called before this. I mentioned this in https://pagure.io/fedora-infrastructure/issue/10358#comment-875614, but I'm not sure how to exactly fix it.