[[(item=awx.target) => {"ansible_loop_var": "item", "changed": false, "item": "awx.target", "msg": "Could not find the requested service awx.target: host"}
The playbook is not yet idempotent
When missing one or more of the above preparations, the database may have been configured before the playbook run fails, running it again, it will fail on the database steps:
TASK [awx-rpm : Initialize Postgres Database] **********************************
fatal: [198.51.100.33]: FAILED! => {"changed": true, "cmd": "/usr/bin/postgresql-setup --initdb", "delta": "0:00:00.152351", "end": "2023-08-08 10:07:58.209718", "msg": "non-zero return code", "rc": 1, "start": "2023-08-08 10:07:58.057367", "stderr": " * Initializing database in '/var/lib/pgsql/data'\nERROR: Data directory /var/lib/pgsql/data is not empty!\nERROR: Initializing database failed, possibly see /var/lib/pgsql/initdb_postgresql.log", "stderr_lines": [" * Initializing database in '/var/lib/pgsql/data'", "ERROR: Data directory /var/lib/pgsql/data is not empty!", "ERROR: Initializing database failed, possibly see /var/lib/pgsql/initdb_postgresql.log"], "stdout": "", "stdout_lines": []}
...ignoring
TASK [awx-rpm : Start and enable PostgreSQL] ***********************************
ok: [198.51.100.33]
TASK [awx-rpm : Create User and database for AWX-RPM] **************************
failed: [198.51.100.33] (item=createuser -S awx) => {"ansible_loop_var": "item", "changed": true, "cmd": "createuser -S awx", "delta": "0:00:00.135206", "end": "2023-08-08 10:07:59.426252", "item": "createuser -S awx", "msg": "non-zero return code", "rc": 1, "start": "2023-08-08 10:07:59.291046", "stderr": "createuser: error: creation of new role failed: ERROR: role \"awx\" already exists", "stderr_lines": ["createuser: error: creation of new role failed: ERROR: role \"awx\" already exists"], "stdout": "", "stdout_lines": []}
failed: [198.51.100.33] (item=createdb -O awx awx) => {"ansible_loop_var": "item", "changed": true, "cmd": "createdb -O awx awx", "delta": "0:00:00.015690", "end": "2023-08-08 10:07:59.768870", "item": "createdb -O awx awx", "msg": "non-zero return code", "rc": 1, "start": "2023-08-08 10:07:59.753180", "stderr": "createdb: error: database creation failed: ERROR: database \"awx\" already exists", "stderr_lines": ["createdb: error: database creation failed: ERROR: database \"awx\" already exists"], "stdout": "", "stdout_lines": []}
PLAY RECAP *********************************************************************
198.51.100.33 : ok=15 changed=1 unreachable=0 failed=1 skipped=2 rescued=0 ignored=1
Post install
# su - awx
$ awx-manage changepassword admin
Changing password for user 'admin'
Password:
Password (again):
Password changed successfully for user 'admin'
Behind a firewall / transparent proxy / ..
Make sure:
dnf copr
.. (curl
) can accesshttps://copr.fedorainfracloud.org/
codeready-builder-for-rhel-9-x86_64-rpms
repository is available and enabled (Red Hat Satellite configuration)ansible-galaxy
can accesshttps://galaxy.ansible.com/
dockker://quay.io
/ https://quay.io)Before installation
python3-pyyaml
, remove before running the plabyookinsights-client
also198.51.100.33
in your inventoryBefore running the playbook
To workaround a current issue with the playbook: After cloning GitHub awx-rpm-v2, manually copy the following service
Otherwise, the playbook run will fail
The playbook is not yet idempotent
When missing one or more of the above preparations, the database may have been configured before the playbook run fails, running it again, it will fail on the database steps:
Post install