Re: [ansible-project] Possible approaches to iteration

2018-04-10 Thread Brian Coca
In the case of 'set_fact' you should not see much difference, but in most other cases map will always be faster, with_ executes the task once per item, except when squashing, but that is magic reserved to only a few plugins. FYI the 'item's part is equivalent of loop: '{{ [ "four", "five", "six"]

[ansible-project] Possible approaches to iteration

2018-04-09 Thread tom . reynick
I would like to understand semantics of `with_items` in ansible and compare this approach to `map` for example. For example, let consider: `{{ ["1","2", "3"] | map('regex_replace', '^(.*)$', \1'some tail') tail }}` How to reach the same effect using `with_items` ? And in general how