Skip to content

Commit

Permalink
Add verification debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyphreak committed Mar 20, 2024
1 parent 3c848c3 commit 452bf04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions molecule/configure/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ provisioner:
all:
vars:
postgresql_nolog: false
postgresql_conf_max_connections: 600
postgresql_conf_max_conns: 600
postgresql_conf_ansible: |
max_connections = {{ postgresql_conf_max_connections }}
max_connections = {{ postgresql_conf_max_conns }}
verifier:
name: ansible
scenario:
Expand Down
7 changes: 5 additions & 2 deletions molecule/configure/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@

- name: Check PostgreSQL settings
ansible.builtin.assert:
that: _max_connections.setting == postgresql_conf_max_connections
that: _max_connections == postgresql_conf_max_conns
fail_msg: "Expected max_connections = {{ postgresql_conf_max_conns }}, found {{ _max_connections }}"
success_msg: "max_connections = {{ _max_connections }}"
vars:
_settings: "{{ _postgresql_settings.query_result }}"
_max_connections: "{{ _settings | selectattr('name', 'equalto', 'max_connections') | first }}"
_max_connections_setting: "{{ _settings | selectattr('name', 'equalto', 'max_connections') | first }}"
_max_connections: "{{ _max_connections.setting }}"

0 comments on commit 452bf04

Please sign in to comment.