diff --git a/tasks/collect_config/collect_directory.yml b/tasks/collect_config/collect_directory.yml index 1190049f26f8251a078922bdc43b427ea9bee853..212845c548b1123ec2fd1c286039f5b37e21fcf0 100644 --- a/tasks/collect_config/collect_directory.yml +++ b/tasks/collect_config/collect_directory.yml @@ -7,6 +7,7 @@ file: path: '{{ directory.src }}' state: directory + become: no - name: Read directories in working copy shell: find . -type d @@ -19,6 +20,7 @@ path: '{{ directory.dest }}/{{ item }}' state: directory with_items: '{{ list_config_paths.stdout_lines }}' + become: no - name: Read file name in working copy shell: find . -type f @@ -32,6 +34,7 @@ dest: '{{ directory.dest }}/{{ item }}' remote_src: yes with_items: '{{ list_config_files.stdout_lines }}' + become: no when: item|regex_replace('/\.', '/') == item - name: Delete in config path @@ -39,6 +42,7 @@ path: '{{ directory.dest }}/{{ item|regex_replace("/\.", "/") }}' state: absent with_items: '{{ list_config_files.stdout_lines }}' + become: no when: item|regex_replace('/\.', '/') != item - name: Delete working directory