replication_manager_password_file: '/root/.private/dirserv-repl-mngr-pwd.txt'
replication_manager_idle_timeout: 0
haproxy_backend_name: 'be-ldap-dev1'
- haproxy_user_socket: '/run/haproxy/user.sock'
- haproxy_admin_socket: '/run/haproxy/admin.sock'
# ds389_plugin_attr_uniq_purge: false
ds389_plugin_attr_uniq_attributes:
'uid':
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'
ds389_plugin_attr_uniq_config: false
# ds389_plugin_attr_uniq_purge: false
ds389_plugin_attr_uniq_attributes:
msg: "No HAProxy server found on host '{{ inventory_hostname }}'."
when: version_haproxy == ''
+- name: "Get file stat of HAProxy admin socket ..."
+ ansible.builtin.stat:
+ path: "{{ haproxy_admin_socket }}"
+ register: admin_socket
+
+- name: "File stat of HAProxy admin socket: "
+ debug:
+ var: admin_socket
+ verbosity: 3
+
+- name: "Check existence of HAProxy admin socket."
+ ansible.builtin.fail:
+ msg: "The HAProxy admin socket '{{ haproxy_admin_socket }}' does not exists."
+ when: admin_socket.stat.exists != true
+
+- name: "Checking, whether '{{ haproxy_admin_socket }}' is a socket."
+ ansible.builtin.fail:
+ msg: "The path '{{ haproxy_admin_socket }}' for the HAProxy admin socket is not a socket."
+ when: admin_socket.stat.issock != true
+
+- name: "Get file stat of HAProxy operator socket ..."
+ ansible.builtin.stat:
+ path: "{{ haproxy_operator_socket }}"
+ register: operator_socket
+
+- name: "File stat of HAProxy operator socket: "
+ debug:
+ var: operator_socket
+ verbosity: 3
+
+- name: "Check existence of HAProxy operator socket."
+ ansible.builtin.fail:
+ msg: "The HAProxy operator socket '{{ haproxy_operator_socket }}' does not exists."
+ when: operator_socket.stat.exists != true
+
+- name: "Checking, whether '{{ haproxy_operator_socket }}' is a socket."
+ ansible.builtin.fail:
+ msg: "The path '{{ haproxy_operator_socket }}' for the HAProxy operator socket is not a socket."
+ when: operator_socket.stat.issock != true
+
+- name: "Get file stat of HAProxy user socket ..."
+ ansible.builtin.stat:
+ path: "{{ haproxy_user_socket }}"
+ register: user_socket
+
+- name: "File stat of HAProxy user socket: "
+ debug:
+ var: user_socket
+ verbosity: 3
+
+- name: "Check existence of HAProxy user socket."
+ ansible.builtin.fail:
+ msg: "The HAProxy user socket '{{ haproxy_user_socket }}' does not exists."
+ when: user_socket.stat.exists != true
+
+- name: "Checking, whether '{{ haproxy_user_socket }}' is a socket."
+ ansible.builtin.fail:
+ msg: "The path '{{ haproxy_user_socket }}' for the HAProxy user socket is not a socket."
+ when: user_socket.stat.issock != true
+
# vim: filetype=yaml
msg: "Setting server '{{ backend_server }}' on HAProxy backend '{{ backend }}' into maintenance ..."
verbosity: 0
-- name: "Get file stat of HAProxy admin socket '{{ haproxy_admin_socket }}' ..."
- ansible.builtin.stat:
- path: "{{ haproxy_admin_socket }}"
- register: admin_socket
-
-- name: "File stat of HAProxy admin socket '{{ haproxy_admin_socket }}': "
- debug:
- var: admin_socket
- verbosity: 3
-
-- name: "Check existence of HAProxy admin socket '{{ haproxy_admin_socket }}'."
- ansible.builtin.fail:
- msg: "The HAProxy admin socket '{{ haproxy_admin_socket }}' does not exists."
- when: admin_socket.stat.exists != true
-
-- name: "Checkinf, whether '{{ haproxy_admin_socket }}' is a socket."
- ansible.builtin.fail:
- msg: "The path '{{ haproxy_admin_socket }}' for the HAProxy admin socket is not a socket."
- when: admin_socket.stat.issock != true
-
- name: "Setting backend server {{ backend }}/{{ backend_server }} into maintenance."
community.general.haproxy:
state: drain