vitabaks / postgresql_cluster

PostgreSQL High-Availability Cluster (based on Patroni). Automating with Ansible.
https://postgresql-cluster.org
MIT License
1.69k stars 411 forks source link

Molecule: Add config_pgcluster.yml and update_pgcluster.yml playbooks to tests #478

Closed vitabaks closed 1 year ago

vitabaks commented 1 year ago

Perform testing of config_pgcluster.yml and update_pgcluster.yml playbooks for all commits/MRs.

Fix (update_pgcluster.yml): Import a variable file vars/main.yml for Play "(1/4) PRE-UPDATE: Perform Pre-Checks"

Fixed:

 TASK [Running Pre-Checks] ******************************************************
  fatal: [10.172.0.20]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'postgresql_port' is undefined. 'postgresql_port' is undefined\n\nThe error appears to be in '/home/runner/work/postgresql_cluster/postgresql_cluster/roles/update/tasks/pre_checks.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: '[Pre-Check] (ALL) Test PostgreSQL DB Access'\n  ^ here\n"}

Issue: https://github.com/vitabaks/postgresql_cluster/issues/477