Replies: 1 comment 1 reply
-
I am running into this too. Does anyone have any thoughts on this? "{{ variable_name_from_playbook }}": "{{ lookup('ansible.builtin.sometask', **criteria ) }}"
vars:
criteria:
critera1:
critera2: |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Such a basic example task, with variable name templating:
... works fine, but ansible-lint (as expected to current rules) returns:
But I cannot find any information why this is actually a bad practice? Could you please explain?
I've only found only a single thing in this topic which is ansible-lint issue (relatively old as from 2021) #1680 , where it seems like templating variables was acceptable at that point of time.
Additionally, ansible-lint finds this violation only when used in playbook, while the same task defined in role is not flagged.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions