From 11a7510966d7f0db156aab1dd06fd57b638544e9 Mon Sep 17 00:00:00 2001 From: L3D Date: Tue, 22 Feb 2022 22:12:16 +0100 Subject: [PATCH] Additional folder mechanism --- defaults/main.yml | 8 ++++++-- tasks/directory.yml | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 25fd8a4..f0bba1c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,9 @@ --- win_obs_szene__project: 'default' win_obs_szene_files: [] -# - src: https://example.com/foo,pnf' -# file: foo.pnd +# - src: https://example.com/foo.pdf' +# file: foo.pdf +# - src: https://example.com/bar.png' +# file: folder1\bar.png +win_obs_additional_dirs: [] +# - folder1 diff --git a/tasks/directory.yml b/tasks/directory.yml index 7413c9b..d0c009d 100644 --- a/tasks/directory.yml +++ b/tasks/directory.yml @@ -3,3 +3,10 @@ ansible.windows.win_file: path: 'C:\obs\{{ win_obs_szene__project }}' state: directory + +- name: create additional dirs + ansible.windows.win_file: + path: 'C:\obs\{{ win_obs_szene__project }}\{{ item }}' + state: directory + with_items: '{{ win_obs_additional_dirs }}' + when: win_obs_additional_dirs | length>0