Brian Coca
ec95f50cb6
updated docs with new test grammer examples
2016-01-14 12:29:02 -05:00
Brian Coca
06b0161e6d
fixed extract version
2016-01-12 13:26:46 -05:00
Brian Coca
41a417be1f
noted that regex_escape was added in 2.0
...
fixes #13759
2016-01-07 19:02:49 -05:00
Brian Coca
7d073bdd17
Merge pull request #13345 from amenonsen/extract
...
Add an 'extract' filter
2015-12-03 11:19:06 -08:00
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.
2015-12-02 18:16:38 +05:30
muffl0n
fa3848a1f2
Add example for regex_replace using named groups
2015-11-26 12:56:30 +01:00
Toshio Kuratomi
6292520c45
Merge pull request #12444 from knakayama/bugfix/update-docs
...
Update docs (playbooks_loops.rst, playbooks_filters.rst)
2015-10-09 20:09:53 -07:00
deyvsh
c4c8493f1b
Add an example for map() to the filters page
2015-10-07 12:33:39 +01:00
Marius Gedminas
b57d549e16
Typo in shell command in example
2015-09-25 10:27:35 +03:00
knakayama
f717f14fe9
Update docs (playbooks_loops.rst, playbooks_filters.rst)
2015-09-20 22:48:07 +09:00
Gerard Lynch
e5211a9b18
playbooks_filters - minor fixes
2015-09-13 12:29:53 +01:00
Brian Coca
6dac8512a1
Merge pull request #12307 from jtyr/doc_fixes
...
Doc fixes
2015-09-10 09:17:22 -04:00
Jiri tyr
14dc16ca54
Adding missing colon to fix the block formating
2015-09-10 15:14:23 +02:00
Jiri tyr
174f805fb3
Resurrection of the comment filter
2015-09-10 14:37:42 +02:00
Toshio Kuratomi
8cac397841
Note that backslash escaping has changed in some places
2015-09-01 08:04:23 -07:00
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)
2015-08-27 23:29:12 +05:30
Jon Hawkesworth
a46b500851
Add win_splitdrive filter for windows users
2015-08-20 13:54:54 +01:00
Jon Hawkesworth
f69da544f7
add win_basename and win_dirname filters
2015-08-05 18:38:15 +01:00
Sébastien Gross
c0b7fcd304
Add documentation for regex_escape filter
2015-07-26 19:08:34 +02:00
James Cammarata
f6a08ce1ba
Adding a note about chaining filters after default(omit)
...
Fixes #10164
2015-07-23 16:58:12 -04:00
Brian Coca
bb1a907823
added version added for regex_replace
...
fixes #8994
2015-07-20 08:59:09 -04:00
Matt Martz
4059904a18
Add splitext filter
2015-06-29 15:39:57 -05:00
Gerard Lynch
a6a86a5bdb
added missing filters, changed since to new in version
2015-06-26 21:49:04 +01:00
Brian Coca
337b1dc45c
minor doc fixes
2015-06-03 20:56:33 -04:00
Carlos E. Garcia
cfbfd38723
just a few spelling error changes
2015-04-28 09:36:42 -04:00
Matt Martz
d34e7d7bca
Correct the ternary example. Fixes #10763
2015-04-18 16:05:35 -05:00
Brian Coca
39a3d6f5ed
added version to ternary example
2015-03-10 12:42:55 -04:00
Toshio Kuratomi
82685799cb
filter name is realpath, not readlink
...
Fixes #10062
2015-02-26 14:17:39 -08:00
Maciej Delmanowski
71dae62b2a
Add IP address filter documentation
2015-02-21 13:21:07 +01:00
Maciej Delmanowski
c866a26d81
Move Jinja2 filters documentation to separate file
2015-02-21 13:01:22 +01:00