Update `with_subelements` to handle sub-lists located deeper in dict #9005
Conversation
Before, `with_subelements` could only handle that the nested list was one element 'deep' compared to the first argument. Now, `with_subelements` accepts the second parameter in the form of `foo.bar.baz`, which will get the list at `foo.bar.baz` instead of complaining that the literal key `foo.bar.baz` doesn't exist.
+1 This would be extremely useful. |
+1 We are utilizing the change from the PR. Would love to see this pull request accepted. |
+1 Would be handy. |
+1, we need this |
+1 yes please |
+1 |
Something similar seems to have been merged into what will be Ansible v2: #10995. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Before,
with_subelements
could only handle that the nested list was one element 'deep' compared to the first argument.Now,
with_subelements
accepts the second parameter in the form offoo.bar.baz
, which will get the list atfoo.bar.baz
instead of complaining that the literal keyfoo.bar.baz
doesn't exist.