From: Frank Brehm Date: Mon, 2 Dec 2024 11:17:59 +0000 (+0100) Subject: Adding and using role 389ds-repl-tasks-cleanallruv. X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=dbb0b4dff7f9e938abcc96d2da32288ef4890423;p=pixelpark%2Fpp-admin-tools.git Adding and using role 389ds-repl-tasks-cleanallruv. --- diff --git a/includes/389ds-repl-tasks-cleanallruv.yaml b/includes/389ds-repl-tasks-cleanallruv.yaml deleted file mode 100644 index 3193ec4..0000000 --- a/includes/389ds-repl-tasks-cleanallruv.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- - -- name: "Clean all RUVs for Replication ID {{ target_replica_id }} on suffix '{{ suffix }}' ..." - ansible.builtin.shell: "dsconf '{{ slapd_instance }}' repl-tasks cleanallruv --suffix '{{ suffix }}' --replica-id={{ target_replica_id }}" - ignore_errors: true - -- name: "Get the result of cleaning RUVs on suffix '{{ suffix }}' ..." - ansible.builtin.shell: "dsconf '{{ slapd_instance }}' repl-tasks list-cleanruv-tasks --suffix '{{ suffix }}'" - register: list_cleanruv_tasks_results - ignore_errors: true - check_mode: false - changed_when: false - -- name: "Show current list_cleanruv_tasks_results for suffix '{{ suffix }}'." - debug: - msg: "{{ list_cleanruv_tasks_results.stdout }}" - verbosity: 0 - -# vim: filetype=yaml diff --git a/playbooks/disable-ldap-server.yaml b/playbooks/disable-ldap-server.yaml index a7b2731..b89d028 100644 --- a/playbooks/disable-ldap-server.yaml +++ b/playbooks/disable-ldap-server.yaml @@ -199,7 +199,8 @@ loop: "{{ suffixes | dict2items | list }}" - name: "Clean all RUVs for Replication ID {{ target_replica_id }} on all suffixes ..." - include_tasks: '../includes/389ds-repl-tasks-cleanallruv.yaml' + include_role: + name: 389ds-repl-tasks-cleanallruv when: ldapserver_to_disable != inventory_hostname vars: suffix: "{{ item.key }}" diff --git a/roles/389ds-repl-tasks-cleanallruv/tasks/main.yaml b/roles/389ds-repl-tasks-cleanallruv/tasks/main.yaml new file mode 100644 index 0000000..3193ec4 --- /dev/null +++ b/roles/389ds-repl-tasks-cleanallruv/tasks/main.yaml @@ -0,0 +1,19 @@ +--- + +- name: "Clean all RUVs for Replication ID {{ target_replica_id }} on suffix '{{ suffix }}' ..." + ansible.builtin.shell: "dsconf '{{ slapd_instance }}' repl-tasks cleanallruv --suffix '{{ suffix }}' --replica-id={{ target_replica_id }}" + ignore_errors: true + +- name: "Get the result of cleaning RUVs on suffix '{{ suffix }}' ..." + ansible.builtin.shell: "dsconf '{{ slapd_instance }}' repl-tasks list-cleanruv-tasks --suffix '{{ suffix }}'" + register: list_cleanruv_tasks_results + ignore_errors: true + check_mode: false + changed_when: false + +- name: "Show current list_cleanruv_tasks_results for suffix '{{ suffix }}'." + debug: + msg: "{{ list_cleanruv_tasks_results.stdout }}" + verbosity: 0 + +# vim: filetype=yaml