From 13184fdcca98f89bf62f2eed5a7e1fa5f27bd123 Mon Sep 17 00:00:00 2001
From: psy <psy@darmstadt.ccc.de>
Date: Tue, 27 Oct 2020 13:03:04 +0100
Subject: [PATCH] copy file if file.src is given

---
 tasks/file.yml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tasks/file.yml b/tasks/file.yml
index 6d71f46..d550f31 100644
--- a/tasks/file.yml
+++ b/tasks/file.yml
@@ -15,6 +15,7 @@
   when:
     - not file.content
     - not file.template
+    - not file.src
   file:
     path: "{{ file.path }}"
     group: "{{ file.group }}"
@@ -31,3 +32,13 @@
     owner: "{{ file.owner }}"
     mode: "{{ file.mode }}"
     content: "{{ file.content }}"
+
+- name: create file/folder
+  when:
+    - file.src
+  copy:
+    dest: "{{ file.path }}"
+    group: "{{ file.group }}"
+    owner: "{{ file.owner }}"
+    mode: "{{ file.mode }}"
+    src: "{{ file.src }}"
\ No newline at end of file
-- 
GitLab