From 88eed6b06b6780fb67413e90f57e55bdd3b6c81d Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sat, 13 Sep 2025 17:47:23 -0700 Subject: Fix tasks permissions --- tasks/copy-rendered-templates-recursive.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tasks/copy-rendered-templates-recursive.yml') diff --git a/tasks/copy-rendered-templates-recursive.yml b/tasks/copy-rendered-templates-recursive.yml index 57322cd..b255fab 100644 --- a/tasks/copy-rendered-templates-recursive.yml +++ b/tasks/copy-rendered-templates-recursive.yml @@ -85,12 +85,14 @@ recursive: true - name: Ensure destination exists + become: true ansible.builtin.file: path: "{{ destination_dir }}" owner: "{{ owner }}" state: directory - name: Copy files to final destination, preserving ownership stuff + become: true ansible.builtin.command: cmd: bash -c 'cp -rp {{ tempdir.path }}/* {{ destination_dir }}/' @@ -102,7 +104,7 @@ state: absent - name: Remove remote temporary directory + become: true ansible.builtin.file: path: "{{ tempdir.path }}" state: absent - -- cgit v1.2.3-70-g09d2