Ansible-Zammad/roles/zammad/tasks/customTemplates.yml
2023-04-04 15:33:23 -06:00

27 lines
823 B
YAML

---
# file: roles/zammad/tasks/customTemplates.yml
- name: Get current files from folders
find:
paths: "{{ role_path }}/{{ zammad_custom_templates }}/{{ templateType.path | basename }}/"
file_type: file
register: templateFiles
loop: "{{ templateDirs.files }}"
delegate_to: 127.0.0.1
- name: Ensure directory exists
file:
path: "/opt/zammad/app/views/mailer/{{ templateType.path | basename }}"
state: directory
owner: zammad
group: zammad
- name: Deploy mail templates
template:
src: "{{ item }}"
dest: "/opt/zammad/app/views/mailer/{{ templateType.path | basename }}/{{ item | basename }}"
owner: zammad
group: zammad
loop: "{{ lookup('fileglob', '{{ zammad_custom_templates }}/{{ templateType.path | basename }}/*', wantlist=True) }}"
notify: Zammad precompile