Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing vars_files in update_pgcluster.yml #477

Closed
roks531 opened this issue Sep 28, 2023 · 2 comments
Closed

Missing vars_files in update_pgcluster.yml #477

roks531 opened this issue Sep 28, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@roks531
Copy link

roks531 commented Sep 28, 2023

Description of the problem:

I am just testing the newest additions of the update playbook and I found out that there is a missing vars_files in the update_pgcluster.yml for task name: "(1/4) PRE-UPDATE: Perform Pre-Checks". The update_pgcluster.yml playbook therefore fails.

Result of running ansible-playbook update_pgcluster.yml:

PLAY [(1/4) PRE-UPDATE: Perform Pre-Checks] ********************************************************************************************************************************

TASK [Running Pre-Checks] **************************************************************************************************************************************************

TASK [update : [Pre-Check] (ALL) Test PostgreSQL DB Access] ****************************************************************************************************************
fatal: [192.168.1.101]: 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/user/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"}

Resolution:
Add the missing

  vars_files:
    - vars/main.yml

to the task name: "(1/4) PRE-UPDATE: Perform Pre-Checks"

@vitabaks
Copy link
Owner

vitabaks commented Sep 28, 2023

Thank you @roks531 for notifying! I'll fix it.

This commit added the variable postgresql_port

Definitely I should add a update_pgcluster.yml playbook to the tests.

@vitabaks
Copy link
Owner

Fixed here #478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants
@vitabaks @roks531 and others