Add disable_template parameter

This commit is contained in:
Tobias Manske 2023-05-26 19:41:40 +02:00
parent 7d13bf712b
commit 4616ae691d
Signed by: tobias
GPG Key ID: 9164B527694A0709
2 changed files with 13 additions and 1 deletions

View File

@ -4,3 +4,4 @@ service: dummy
compose_dir: /home/core/compose compose_dir: /home/core/compose
state: present # or running, build, absent state: present # or running, build, absent
execute: smart # or always or never execute: smart # or always or never
disable_template: false

View File

@ -27,7 +27,18 @@
with_filetree: "{{ service_base }}/{{ service | mandatory }}" with_filetree: "{{ service_base }}/{{ service | mandatory }}"
loop_control: loop_control:
label: '{{ item.path }}' 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 delegate_to: localhost
check_mode: no check_mode: no