--- - name: Verify hosts: all become: true tasks: - name: Check Koji database connection ansible.builtin.command: argv: - psql - -t - --csv - -c - "SELECT 'exists' FROM pg_database WHERE datname='koji'" - "postgresql://koji:{{ koji_db_server_password }}@127.0.0.1:5432/koji" register: psql_cmd - name: Verify Koji database connection status ansible.builtin.assert: that: | psql_cmd.rc == 0 and psql_cmd.stdout == 'exists'