ansible-zammad/roles/zammad/tasks/main.yml

40 lines
899 B
YAML
Raw Permalink Normal View History

2023-09-25 18:42:20 +02:00
---
- name: zammad_datadirs
file:
path: '{{ item.path }}'
state: directory
owner: '{{ item.owner | default(omit) }}'
group: '{{ item.group | default(omit) }}'
loop:
- path: /srv/zammad/search
owner: 1000
group: 1000
- path: /srv/zammad/zammad
owner: 1000
group: 1000
- name: zammad_composedir
file:
path: /etc/docker/compose/zammad
state: directory
mode: 0700
- name: zammad_composefile
template:
dest: /etc/docker/compose/zammad/docker-compose.yml
src: docker-compose.yml.j2
mode: 0600
- name: zammad_search
include_tasks: search.yml
when: zammad_enable_search
- name: zammad_compose
community.docker.docker_compose:
project_src: /etc/docker/compose/zammad
build: '{{ zammad_upgrade }}'
remove_orphans: yes
environment:
ELASTICSEARCH_REINDEX: "{{ 'true' if zammad_upgrade else 'false' }}"