32 lines
809 B
YAML
32 lines
809 B
YAML
- name: Install server dependencies
|
|
ansible.builtin.apt:
|
|
pkg:
|
|
- python3-flask
|
|
- python3-defusedxml
|
|
- gunicorn
|
|
|
|
- name: Create directory for app
|
|
ansible.builtin.file:
|
|
path: /usr/local/lib/mail-autodiscover
|
|
state: directory
|
|
|
|
- name: Install app
|
|
ansible.builtin.copy:
|
|
src: app
|
|
dest: /usr/local/lib/mail-autodiscover/
|
|
notify: Restart mail-autodiscover.service
|
|
|
|
- name: Install config
|
|
ansible.builtin.copy:
|
|
content: '{{ mail_autodiscover|tojson }}'
|
|
dest: /etc/mail-autodiscover.json
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: Restart mail-autodiscover.service
|
|
|
|
- name: Install systemd units
|
|
ansible.builtin.copy:
|
|
src: mail-autodiscover.service
|
|
dest: /etc/systemd/system/mail-autodiscover.service
|
|
notify: Restart mail-autodiscover.service
|