diff --git a/tasks/install.yml b/tasks/install.yml index e80a5c5..5e49069 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -109,7 +109,7 @@ notify: restart consul-template - name: copy template templates - template: src={{ item.src }} dest="{{ consul_template_home }}/templates/{{ item.srcĀ | basename | regex_replace('^(.*)\.j2$', '\\1') }}" + template: src={{ item.src }} dest="{{ consul_template_home }}/templates/{{ item.dest if item.dest is defined else item.srcĀ | basename | regex_replace('^(.*)\.j2$', '\\1') }}" with_items: "{{ consul_template_template_templates | default([]) }}" when: consul_template_template_templates notify: restart consul-template