diff --git a/defaults/main.yml b/defaults/main.yml index 3ddd13e..ee732d1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,3 +4,4 @@ service: dummy compose_dir: /home/core/compose state: present # or running, build, absent execute: smart # or always or never +disable_template: false diff --git a/tasks/present.yml b/tasks/present.yml index 3f6ff6c..c207213 100644 --- a/tasks/present.yml +++ b/tasks/present.yml @@ -27,7 +27,18 @@ with_filetree: "{{ service_base }}/{{ service | mandatory }}" loop_control: label: '{{ item.path }}' - when: item.state == 'file' + when: item.state == 'file' and not disable_template + - name: Copy Service Files + ansible.builtin.copy: + src: "{{ item.src }}" + dest: "{{ temp_file.path }}/{{ item.path }}" + mode: "{{ item.mode }}" + force: true + changed_when: false + with_filetree: "{{ service_base }}/{{ service | mandatory }}" + loop_control: + label: '{{ item.path }}' + when: item.state == 'file' and disable_template delegate_to: localhost check_mode: no