forked from ISTI-ansible-roles/ansible-roles
38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
---
|
|
|
|
- name: Include user creation tasks
|
|
include_tasks: user.yml
|
|
when: mailman_create_user
|
|
|
|
- name: Include group discovery tasks
|
|
import_tasks: group_discovery.yml
|
|
|
|
- name: Include installation tasks
|
|
import_tasks: "install_{{ mailman_install_method }}.yml"
|
|
|
|
- name: Include configuration tasks
|
|
import_tasks: config.yml
|
|
|
|
- name: Include Postfix map distribution tasks
|
|
include_tasks: distribute_maps.yml
|
|
when: mailman_distribute_maps is defined
|
|
|
|
# Perform whatever restarts are needed now, prevents double restart on first run
|
|
- name: Flush handlers
|
|
meta: flush_handlers
|
|
|
|
- name: Ensure Mailman Core is enabled and running
|
|
service:
|
|
name: "{{ mailman_core_service_name }}"
|
|
enabled: yes
|
|
state: started
|
|
when: mailman_process_manager != "supervisor"
|
|
|
|
- name: Ensure Mailman Web is enabled and running
|
|
service:
|
|
name: "{{ mailman_web_service_name }}{{ '@' if mailman_domains is defined else '' }}{{ item }}"
|
|
enabled: yes
|
|
state: started
|
|
loop: "{{ mailman_domains | default(['']) }}"
|
|
when: mailman_process_manager != "supervisor"
|