Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Parameter validation not working #2

Open
b0tting opened this issue Jul 9, 2021 · 0 comments
Open

Parameter validation not working #2

b0tting opened this issue Jul 9, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@b0tting
Copy link

b0tting commented Jul 9, 2021

Hi! I noticed the parameter validation structure used in this role (and other controller roles) might not have been set up correctly. This causes my playbooks to fail with vague errors. This might be an ansible version related issue.

If I change this line in nginxinc.nginx_controller_user_role/tasks/main.yml on line 5:
that: ("{{ item }} is defined") and ("{{ item }} | length > 0")
To:
that: item is in vars and vars[item] | length > 0
..validation works as expected

My version info:

ansible [core 2.11.2]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.8.10 (default, Jun  2 2021, 10:49:15) [GCC 9.4.0]
  jinja version = 2.10.1
  libyaml = True
@aknot242 aknot242 self-assigned this Sep 22, 2021
@aknot242 aknot242 added the bug Something isn't working label Sep 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants