Commit Graph

34 Commits (d5aecfdd14ae9db5fc2834fba7e51ed05dc3b92a)

Author SHA1 Message Date
Roman Belyakovsky d80d986a38 Added to_datetime filter (#17145)
* Added to_datetime filter

* Added to_datetime filter documentation
8 years ago
Tim Whittington b3c686f4c5 Note that to_nice_yaml(indent=X) was new in 2.2 (#17085)
The ability to pass indent parameter to to_nice_yaml was introduced in 2.2, but this is not noted in the docs.
8 years ago
Brian Coca ed7623ecde J2 test docs (#16646)
* moved tests from filters to actual jinja2 tests

also removed some unused declarations and imports

* split tests into their own docs

removed isnan as existing jinja2's 'number' already covers same
added missing docs for several tests

* updated as per feedback
8 years ago
Jiri Tyr 27d065924f Adding custom indentation of YAML and JSON filters (#10008) 8 years ago
Brian Coca ec95f50cb6 updated docs with new test grammer examples 9 years ago
Brian Coca 06b0161e6d fixed extract version 9 years ago
Brian Coca 41a417be1f noted that regex_escape was added in 2.0
fixes #13759
9 years ago
Brian Coca 7d073bdd17 Merge pull request #13345 from amenonsen/extract
Add an 'extract' filter
9 years ago
Abhijit Menon-Sen 8cf1815867 Add an 'extract' filter
At its most basic, this is nothing more than an array or hash lookup,
but when used in conjunction with map, it is very useful. For example,
while constructing an "ssh-keyscan …" command to update known_hosts on
all hosts in a group, one can get a list of IP addresses with:

    groups['x']|map('extract', hostvars, 'ec2_ip_address')|list

This returns hostvars[a].ec2_ip_address, hostvars[b].ec2_ip_address, and
so on. You can even specify an array of keys for a recursive lookup, and
mix string and integer keys depending on what you're looking up:

    ['localhost']|map('extract', hostvars, ['vars','group_names',0])|first
        == hostvars['localhost']['vars']['group_names'][0]
            == 'ungrouped'

Includes documentation and tests.
9 years ago
muffl0n fa3848a1f2 Add example for regex_replace using named groups 9 years ago
Toshio Kuratomi 6292520c45 Merge pull request #12444 from knakayama/bugfix/update-docs
Update docs (playbooks_loops.rst, playbooks_filters.rst)
9 years ago
deyvsh c4c8493f1b Add an example for map() to the filters page 9 years ago
Marius Gedminas b57d549e16 Typo in shell command in example 9 years ago
knakayama f717f14fe9 Update docs (playbooks_loops.rst, playbooks_filters.rst) 9 years ago
Gerard Lynch e5211a9b18 playbooks_filters - minor fixes 9 years ago
Brian Coca 6dac8512a1 Merge pull request #12307 from jtyr/doc_fixes
Doc fixes
9 years ago
Jiri tyr 14dc16ca54 Adding missing colon to fix the block formating 9 years ago
Jiri tyr 174f805fb3 Resurrection of the comment filter 9 years ago
Toshio Kuratomi 8cac397841 Note that backslash escaping has changed in some places 9 years ago
Abhijit Menon-Sen b328bc023d Add a combine filter with documentation
This is based on some code from (closed) PR #7872, but reworked based on
suggestions by @abadger and the other core team members.

Closes #7872 by @darkk (hash_merge/hash_replace filters)
Closes #11153 by @telbizov (merged_dicts lookup plugin)
9 years ago
Jon Hawkesworth a46b500851 Add win_splitdrive filter for windows users 9 years ago
Jon Hawkesworth f69da544f7 add win_basename and win_dirname filters 9 years ago
Sébastien Gross c0b7fcd304 Add documentation for regex_escape filter 9 years ago
James Cammarata f6a08ce1ba Adding a note about chaining filters after default(omit)
Fixes #10164
9 years ago
Brian Coca bb1a907823 added version added for regex_replace
fixes #8994
9 years ago
Matt Martz 4059904a18 Add splitext filter 9 years ago
Gerard Lynch a6a86a5bdb added missing filters, changed since to new in version 9 years ago
Brian Coca 337b1dc45c minor doc fixes 9 years ago
Carlos E. Garcia cfbfd38723 just a few spelling error changes 9 years ago
Matt Martz d34e7d7bca Correct the ternary example. Fixes #10763 9 years ago
Brian Coca 39a3d6f5ed added version to ternary example 9 years ago
Toshio Kuratomi 82685799cb filter name is realpath, not readlink
Fixes #10062
9 years ago
Maciej Delmanowski 71dae62b2a Add IP address filter documentation 10 years ago
Maciej Delmanowski c866a26d81 Move Jinja2 filters documentation to separate file 10 years ago