You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was about to create an issue but in reality that's more of a question or a misunderstanding.
In the keycloak_realm role, a variable of the same name is defined in vars/main.yml with no value, causing Ansible to complain about conversion from NoneType to str if the user does not redefine it.
That happened to me by mistake when instead of passing it via vars: in the role inclusion task, I tried to rely on the variable being defined in my inventory (in group_vars/*), which is of lower precedence than role vars according to the documentation.
While I understand the need to decouple this role variable from a single inventory variable if you're going to create multiple realms, I found it a bit annoying when creating just one.
Moreover, the contribution guidelines specify the folowing:
vars/ vs defaults/ - internal or interpolated variables that don't need to change or be overridden by user go in vars/, those that a user would likely override, go under defaults/ directory
The keycloak_realm variable should not be defined in role vars then? (Obviously not in defaults either since it is mandatory with no default).
Maybe I'm misunderstanding the way we are supposed to use the role, in which case I'd like to learn the intended way of using it.
Thanks in advance!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was about to create an issue but in reality that's more of a question or a misunderstanding.
In the
keycloak_realm
role, a variable of the same name is defined invars/main.yml
with no value, causing Ansible to complain about conversion from NoneType to str if the user does not redefine it.That happened to me by mistake when instead of passing it via
vars:
in the role inclusion task, I tried to rely on the variable being defined in my inventory (ingroup_vars/*
), which is of lower precedence than role vars according to the documentation.While I understand the need to decouple this role variable from a single inventory variable if you're going to create multiple realms, I found it a bit annoying when creating just one.
Moreover, the contribution guidelines specify the folowing:
The
keycloak_realm
variable should not be defined in role vars then? (Obviously not in defaults either since it is mandatory with no default).Maybe I'm misunderstanding the way we are supposed to use the role, in which case I'd like to learn the intended way of using it.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions