From 26c85ea9434ebb7f1394be36dd08daf6e5712ad3 Mon Sep 17 00:00:00 2001 From: Kyle Walker Date: Wed, 19 Feb 2014 09:34:00 -0800 Subject: [PATCH 1/2] Added with_items dictionary example. Example of using with items with more than one parameter. --- language_features/loop_with_items.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/language_features/loop_with_items.yml b/language_features/loop_with_items.yml index 3b9efba..bb93fab 100644 --- a/language_features/loop_with_items.yml +++ b/language_features/loop_with_items.yml @@ -26,5 +26,10 @@ - testuser1 - testuser2 - - + - name: copy templates + template: src={{ item.src }} dest={{ item.dest }} + with_items: + - src: templates/testsource1 + dest: dest=/example/dest1/test.conf + - src: templates/testsource2 + dest: dest=dest=/example/dest2/test.conf From 467b5785c0a6f693ceb8a47d4a1f0b1f1b5f540c Mon Sep 17 00:00:00 2001 From: Kyle Walker Date: Wed, 19 Feb 2014 09:55:55 -0800 Subject: [PATCH 2/2] Fix with_items dictionary example. --- language_features/loop_with_items.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/language_features/loop_with_items.yml b/language_features/loop_with_items.yml index bb93fab..8bda190 100644 --- a/language_features/loop_with_items.yml +++ b/language_features/loop_with_items.yml @@ -30,6 +30,6 @@ template: src={{ item.src }} dest={{ item.dest }} with_items: - src: templates/testsource1 - dest: dest=/example/dest1/test.conf + dest: /example/dest1/test.conf - src: templates/testsource2 - dest: dest=dest=/example/dest2/test.conf + dest: /example/dest2/test.conf