Trying to run setup-openstack.yml from the playbooks

I’m setting up an openstack-ansible environment across three servers (called clapp1, clapp2, and clapp3) and was successful in running the setup-hosts and setup-infrastructure playbooks, but setup-openstack errors out during

TASK [openstack.osa.db_setup : Create database for service]**
task path: /etc/ansible/ansible_collections/openstack/osa/roles/db_setup/tasks/main.yml:23
container_name: "clapp1"
physical_host: "clapp1"
Using module file /etc/ansible/ansible_collections/community/mysql/plugins/modules/mysql_db.py
Pipelining is enabled.
<10.10.10.81> ESTABLISH SSH CONNECTION FOR USER: root
<10.10.10.81> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=300 -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=5 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ServerAliveInterval=64 -o ServerAliveCountMax=1024 -o Compression=no -o TCPKeepAlive=yes -o VerifyHostKeyDNS=no -o ForwardX11=no -o ForwardAgent=yes -T -o 'ControlPath="/root/.ansible/cp/60ae57596d"' 10.10.10.81 '/bin/sh -c '"'"'/usr/bin/python3 && sleep 0'"'"''
<Then, after a few hours>

<10.10.10.81> (1, b'\n{"failed": true, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (2013, \'Lost connection to MySQL server during query\')", "exception": "  File \\"/tmp/ansible_community.mysql.mysql_db_payload_7xo99soo/ansible_community.mysql.mysql_db_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_db.py\\", line 696, in main\\n    cursor, db_conn = mysql_connect(module, login_user, login_password, config_file, ssl_cert, ssl_key, ssl_ca,\\n                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n  File \\"/tmp/ansible_community.mysql.mysql_db_payload_7xo99soo/ansible_community.mysql.mysql_db_payload.zip/ansible_collections/community/mysql/plugins/module_utils/mysql.py\\", line 154, in mysql_connect\\n    db_connection = mysql_driver.connect(autocommit=autocommit, **config)\\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\\n  File \\"/usr/lib/python3.12/site-packages/pymysql/connections.py\\", line 361, in __init__\\n    self.connect()\\n  File \\"/usr/lib/python3.12/site-packages/pymysql/connections.py\\", line 668, in connect\\n    self._get_server_information()\\n  File \\"/usr/lib/python3.12/site-packages/pymysql/connections.py\\", line 1098, in _get_server_information\\n    packet = self._read_packet()\\n             ^^^^^^^^^^^^^^^^^^^\\n  File \\"/usr/lib/python3.12/site-packages/pymysql/connections.py\\", line 744, in _read_packet\\n    packet_header = self._read_bytes(4)\\n                    ^^^^^^^^^^^^^^^^^^^\\n  File \\"/usr/lib/python3.12/site-packages/pymysql/connections.py\\", line 798, in _read_bytes\\n    raise err.OperationalError(\\n", "invocation": {"module_args": {"name": ["keystone"], "login_host": "10.10.10.81", "login_port": 3306, "check_hostname": true, "config_file": "/root/.my.cnf", "connect_timeout": 30, "encoding": "", "collation": "", "state": "present", "single_transaction": false, "quick": true, "ignore_tables": [], "hex_blob": false, "force": false, "master_data": 0, "skip_lock_tables": false, "use_shell": false, "unsafe_login_password": false, "restrict_config_file": false, "check_implicit_admin": false, "config_overrides_defaults": false, "pipefail": false, "login_user": null, "login_password": null, "login_unix_socket": null, "client_cert": null, "client_key": null, "ca_cert": null, "target": null, "dump_extra_args": null, "chdir": null}}}\n', b"OpenSSH_9.9p1, OpenSSL 3.5.7 9 Jun 2026\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf\r\ndebug2: checking match for 'final all' host 10.10.10.81 originally 10.10.10.81\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: not matched 'final'\r\ndebug2: match not found\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)\r\ndebug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config\r\ndebug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]\r\ndebug3: kex names ok: [mlkem768x25519-sha256,mlkem768nistp256-sha256,mlkem1024nistp384-sha384,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]\r\ndebug1: configuration requests final Match pass\r\ndebug2: resolve_canonicalize: hostname 10.10.10.81 is address\r\ndebug1: re-parsing configuration\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0\r\ndebug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf\r\ndebug2: checking match for 'final all' host 10.10.10.81 originally 10.10.10.81\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: matched 'final'\r\ndebug2: match found\r\ndebug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1\r\ndebug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config\r\ndebug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]\r\ndebug3: kex names ok: [mlkem768x25519-sha256,mlkem768nistp256-sha256,mlkem1024nistp384-sha384,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]\r\ndebug1: auto-mux: Trying existing master at '/root/.ansible/cp/60ae57596d'\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 3248559\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 4\r\ndebug3: mux_client_read_packet_timeout: read header failed: Broken pipe\r\ndebug2: Received exit status from master 1\r\n")
<10.10.10.81> Failed to connect to the host via ssh: OpenSSH_9.9p1, OpenSSL 3.5.7 9 Jun 2026
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug2: checking match for 'final all' host 10.10.10.81 originally 10.10.10.81
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: not matched 'final'
debug2: match not found
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1 (parse only)
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
debug3: kex names ok: [mlkem768x25519-sha256,mlkem768nistp256-sha256,mlkem1024nistp384-sha384,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
debug1: configuration requests final Match pass
debug2: resolve_canonicalize: hostname 10.10.10.81 is address
debug1: re-parsing configuration
debug1: Reading configuration data /etc/ssh/ssh_config
debug3: /etc/ssh/ssh_config line 55: Including file /etc/ssh/ssh_config.d/50-redhat.conf depth 0
debug1: Reading configuration data /etc/ssh/ssh_config.d/50-redhat.conf
debug2: checking match for 'final all' host 10.10.10.81 originally 10.10.10.81
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 3: matched 'final'
debug2: match found
debug3: /etc/ssh/ssh_config.d/50-redhat.conf line 5: Including file /etc/crypto-policies/back-ends/openssh.config depth 1
debug1: Reading configuration data /etc/crypto-policies/back-ends/openssh.config
debug3: gss kex names ok: [gss-curve25519-sha256-,gss-nistp256-sha256-,gss-group14-sha256-,gss-group16-sha512-]
debug3: kex names ok: [mlkem768x25519-sha256,mlkem768nistp256-sha256,mlkem1024nistp384-sha384,curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512]
debug1: auto-mux: Trying existing master at '/root/.ansible/cp/60ae57596d'
debug2: fd 3 setting O_NONBLOCK
debug2: mux_client_hello_exchange: master version 4
debug3: mux_client_forwards: request forwardings: 0 local, 0 remote
debug3: mux_client_request_session: entering
debug3: mux_client_request_alive: entering
debug3: mux_client_request_alive: done pid = 3248559
debug3: mux_client_request_session: session request sent
debug1: mux_client_request_session: master session id: 4
debug3: mux_client_read_packet_timeout: read header failed: Broken pipe
debug2: Received exit status from master 1
The full traceback is:
  File "/tmp/ansible_community.mysql.mysql_db_payload_7xo99soo/ansible_community.mysql.mysql_db_payload.zip/ansible_collections/community/mysql/plugins/modules/mysql_db.py", line 696, in main
    cursor, db_conn = mysql_connect(module, login_user, login_password, config_file, ssl_cert, ssl_key, ssl_ca,
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/ansible_community.mysql.mysql_db_payload_7xo99soo/ansible_community.mysql.mysql_db_payload.zip/ansible_collections/community/mysql/plugins/module_utils/mysql.py", line 154, in mysql_connect
    db_connection = mysql_driver.connect(autocommit=autocommit, **config)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pymysql/connections.py", line 361, in __init__
    self.connect()
  File "/usr/lib/python3.12/site-packages/pymysql/connections.py", line 668, in connect
    self._get_server_information()
  File "/usr/lib/python3.12/site-packages/pymysql/connections.py", line 1098, in _get_server_information
    packet = self._read_packet()
             ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pymysql/connections.py", line 744, in _read_packet
    packet_header = self._read_bytes(4)
                    ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/pymysql/connections.py", line 798, in _read_bytes
    raise err.OperationalError(
failed: [clapp1] (item={'name': 'keystone', 'users': [{'username': 'keystone', 'password': '********'}], 'databases': [{'name': 'keystone'}]}) =>
    ansible_loop_var: item
    changed: false
    invocation:
        module_args:
            ca_cert: null
            chdir: null
            check_hostname: true
            check_implicit_admin: false
            client_cert: null
            client_key: null
            collation: ''
            config_file: /root/.my.cnf
            config_overrides_defaults: false
            connect_timeout: 30
            dump_extra_args: null
            encoding: ''
            force: false
            hex_blob: false
            ignore_tables: []
            login_host: 10.10.10.81
            login_password: null
            login_port: 3306
            login_unix_socket: null
            login_user: null
            master_data: 0
            name:
            - keystone
            pipefail: false
            quick: true
            restrict_config_file: false
            single_transaction: false
            skip_lock_tables: false
            state: present
            target: null
            unsafe_login_password: false
            use_shell: false
    item:
        databases:
        -   name: keystone
        name: keystone
        users:
        -   password: ********
            username: keystone
    msg: 'unable to connect to database, check login_user and login_password are correct
        or /root/.my.cnf has the credentials. Exception message: (2013, ''Lost connection
        to MySQL server during query'')'