From 81f35e8d67bd6971ae0f75ad0f7ec222cd757daa Mon Sep 17 00:00:00 2001 From: MKletz Date: Wed, 14 Jun 2023 12:07:57 -0500 Subject: [PATCH] Solution #72 loop variables (#71) --- .../demo/patching/roles/report_linux/tasks/main.yml | 4 +++- .../demo/patching/roles/report_windows/tasks/main.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/collections/ansible_collections/demo/patching/roles/report_linux/tasks/main.yml b/collections/ansible_collections/demo/patching/roles/report_linux/tasks/main.yml index cc07816c3..978fc6b2b 100644 --- a/collections/ansible_collections/demo/patching/roles/report_linux/tasks/main.yml +++ b/collections/ansible_collections/demo/patching/roles/report_linux/tasks/main.yml @@ -15,7 +15,7 @@ - name: Copy logos over ansible.builtin.copy: - src: "{{ item }}" + src: "{{ logo }}" dest: "{{ file_path }}" directory_mode: true mode: "0644" @@ -24,6 +24,8 @@ - "redhat-ansible-logo.svg" - "server.png" check_mode: false + loop_control: + loop_var: logo - name: Display link to inventory report ansible.builtin.debug: diff --git a/collections/ansible_collections/demo/patching/roles/report_windows/tasks/main.yml b/collections/ansible_collections/demo/patching/roles/report_windows/tasks/main.yml index b02e9f19d..bd60fc5cb 100644 --- a/collections/ansible_collections/demo/patching/roles/report_windows/tasks/main.yml +++ b/collections/ansible_collections/demo/patching/roles/report_windows/tasks/main.yml @@ -14,7 +14,7 @@ - name: Copy logos over ansible.windows.win_copy: - src: "{{ item }}" + src: "{{ logo }}" dest: "{{ file_path }}" directory_mode: true loop: @@ -22,6 +22,8 @@ - "redhat-ansible-logo.svg" - "server.png" check_mode: false + loop_control: + loop_var: logo # - name: display link to inventory report # ansible.builtin.debug: