From c785deea1d12ebdb5b1187c2a7e861dd1c9ca7b7 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Mon, 11 Nov 2024 13:16:41 +0100 Subject: [PATCH] Moving Ansible playbook files into directory playbooks, minor changes on playbook and inventory --- inventory/spk-ldap-stage.yaml | 2 ++ .../adjust-puppet-facts-customer.yaml | 0 .../disable-ldap-server.yaml | 11 +++-------- 3 files changed, 5 insertions(+), 8 deletions(-) rename adjust-puppet-facts-customer.yaml => playbooks/adjust-puppet-facts-customer.yaml (100%) rename disable-ldap-server.yaml => playbooks/disable-ldap-server.yaml (85%) diff --git a/inventory/spk-ldap-stage.yaml b/inventory/spk-ldap-stage.yaml index b6c5796..4d1d35d 100644 --- a/inventory/spk-ldap-stage.yaml +++ b/inventory/spk-ldap-stage.yaml @@ -20,4 +20,6 @@ all: replication_manager_password_file: '/root/.private/dirserv-repl-mngr-pwd.txt' replication_manager_idle_timeout: 0 haproxy_backend_name: 'be-stage-ldap' + haproxy_user_socket: '/run/haproxy/user.sock' + haproxy_admin_socket: '/run/haproxy/admin.sock' diff --git a/adjust-puppet-facts-customer.yaml b/playbooks/adjust-puppet-facts-customer.yaml similarity index 100% rename from adjust-puppet-facts-customer.yaml rename to playbooks/adjust-puppet-facts-customer.yaml diff --git a/disable-ldap-server.yaml b/playbooks/disable-ldap-server.yaml similarity index 85% rename from disable-ldap-server.yaml rename to playbooks/disable-ldap-server.yaml index 8ad04e9..cdc5433 100644 --- a/disable-ldap-server.yaml +++ b/playbooks/disable-ldap-server.yaml @@ -1,11 +1,7 @@ --- - name: "Validate the LDAP server to take off replication" - hosts: 127.0.0.1 - # vars_prompt: - - # - name: ldapserver_to_disable - # prompt: 'On which LDAP server do you want to disable replication?' - # private: false + hosts: localhost + gather_facts: false tasks: @@ -37,12 +33,11 @@ - name: "Setting backend server {{ haproxy_backend_name }}/{{ ldapserver_to_disable }} into maintenance." community.general.haproxy: - state: disabled + state: drain host: "{{ ldapserver_to_disable }}" socket: "{{ haproxy_admin_socket }}" backend: "{{ haproxy_backend_name }}" wait: true - drain: true wait_interval: 2 wait_retries: 60 -- 2.39.5