mirror of
https://github.com/rubenhensen/k8scd.git
synced 2026-09-18 18:42:56 +02:00
Ansible config for hetzner mailserver
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
---
|
||||
- name: Ensure directories exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ directory_to_create }}"
|
||||
state: "directory"
|
||||
owner: "{{ stalwart_system_user }}"
|
||||
group: "{{ stalwart_system_group }}"
|
||||
mode: "0750"
|
||||
loop:
|
||||
- "{{ stalwart_install_path }}"
|
||||
- "{{ stalwart_bin_path }}"
|
||||
- "{{ stalwart_config_path }}"
|
||||
- "{{ stalwart_logs_path }}"
|
||||
- "{{ stalwart_data_path }}"
|
||||
loop_control:
|
||||
loop_var: "directory_to_create"
|
||||
|
||||
- name: Download and extract Stalwart
|
||||
ansible.builtin.unarchive:
|
||||
src: "{{ stalwart_download_url }}"
|
||||
dest: "{{ stalwart_bin_path }}"
|
||||
owner: "{{ stalwart_system_user }}"
|
||||
group: "{{ stalwart_system_group }}"
|
||||
mode: "0750"
|
||||
remote_src: true
|
||||
notify: restart stalwart
|
||||
when: (not stalwart_exec.stat.exists) or (stalwart_current_version != stalwart_version)
|
||||
|
||||
- name: Install systemd service file
|
||||
ansible.builtin.template:
|
||||
src: "stalwart.service.j2"
|
||||
dest: "{{ stalwart_service_file_path }}"
|
||||
mode: "0644"
|
||||
notify:
|
||||
- reload systemd
|
||||
- restart stalwart
|
||||
Reference in New Issue
Block a user