Skip to content

Commit

Permalink
Merge pull request #45 from camptocamp/master
Browse files Browse the repository at this point in the history
Allow to change the destination filename when using a templated template
  • Loading branch information
griggheo authored Feb 28, 2020
2 parents bf550ca + 3938fef commit 8239020
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8239020

Please sign in to comment.