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
[WIP] Add _post_validate_tags to flatten extended tags that need templating #70329
base: devel
Are you sure you want to change the base?
Conversation
add tests ci_complete
5936b01
to
ead1b5f
Compare
lib/ansible/playbook/taggable.py
Outdated
@@ -42,12 +42,63 @@ def _load_tags(self, attr, ds): | |||
else: | |||
raise AnsibleError('tags must be specified as a list', obj=ds) | |||
|
|||
def _post_validate_tags(self, attr, value, templar): | |||
'''Tags are templatable and use extend=True, so this value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not just tags, i would make this a generic function for templatable and appendable FieldAttirbutes (tags, environment, module_defaults and conditionals)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
though .. conditionals can get 'iffy' since when: []
is kindof valid
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
79a8e59
to
deafe52
Compare
deafe52
to
abcfdc6
Compare
993cd21
to
85a2d71
Compare
This comment has been minimized.
This comment has been minimized.
85a2d71
to
9ed9ef7
Compare
…hey provided rather than the resolution
fix taggable mixin
9ed9ef7
to
5083fc9
Compare
SUMMARY
Fixes #69903
Since the tags FieldAttribute uses
extend=True
, we may get a list containing list variables. Post validation needs to flatten and deduplicate those after templating.ISSUE TYPE