You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
542 B
22 lines
542 B
11 months ago
|
---
|
||
|
- 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'
|