Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
6dac8512
Commit
6dac8512
authored
Sep 10, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12307 from jtyr/doc_fixes
Doc fixes
parents
1fed03a6
14dc16ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
docsite/rst/playbooks_filters.rst
+5
-5
No files found.
docsite/rst/playbooks_filters.rst
View file @
6dac8512
...
...
@@ -324,25 +324,25 @@ Combining hashes/dictionaries
.. versionadded:: 2.0
The `combine` filter allows hashes to be merged. For example, the
following would override keys in one hash:
following would override keys in one hash:
:
{{ {'a':1, 'b':2}|combine({'b':3}) }}
The resulting hash would be:
The resulting hash would be:
:
{'a':1, 'b':3}
The filter also accepts an optional `recursive=True` parameter to not
only override keys in the first hash, but also recurse into nested
hashes and merge their keys too:
hashes and merge their keys too:
:
{{ {'a':{'foo':1, 'bar':2}, 'b':2}|combine({'a':{'bar':3, 'baz':4}}, recursive=True) }}
This would result in:
This would result in:
:
{'a':{'foo':1, 'bar':3, 'baz':4}, 'b':2}
The filter can also take multiple arguments to merge:
The filter can also take multiple arguments to merge:
:
{{ a|combine(b, c, d) }}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment