msg: "The Directory Server instances '{{ slapd_instance }}' was not found on '{{ inventory_hostname }}'."
when: slapd_instance not in instances_389ds
+- name: "Get file stat of Directory Server admin password file ..."
+ ansible.builtin.stat:
+ path: "{{ dirsrv_root_passwd_file }}"
+ register: dirsrv_admin_passwd_file
+
+- name: "File stat of Directory Server admin password file: "
+ debug:
+ var: dirsrv_admin_passwd_file
+ verbosity: 3
+
+- name: "Check existence of Directory Server admin password file."
+ ansible.builtin.fail:
+ msg: "The Directory Server admin password file {{ dirsrv_root_passwd_file | quote }} does not exists."
+ when: dirsrv_admin_passwd_file.stat.exists != true
+
+- name: "Checking, whether Directory Server admin password file is a regular file."
+ ansible.builtin.fail:
+ msg: "The path {{ dirsrv_root_passwd_file | quote }} for the Directory Server admin password file is not a regular file."
+ when: dirsrv_admin_passwd_file.stat.isreg != true
+
- name: 'Get the admin password from the password file.'
ansible.builtin.shell: "cat {{ dirsrv_root_passwd_file | quote }}"
register: get_dirsrv_root_passwd
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."
+- name: "Checking, whether HAProxy admin socket path 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
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."
+- name: "Checking, whether HAProxy operator socket path 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
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."
+- name: "Checking, whether HAProxy user socket path 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