system-config/roles/exim/tasks/main.yaml
James E. Blair 3bc18bc705 Scope exim service name variable
This is used in a handler which may be run after intervening roles;
ensure it has a unique variable name.

Change-Id: I6a3d856d3252ff62220d9769232e31ea7c4f9080
2018-08-24 17:05:03 -07:00

41 lines
832 B
YAML

- name: Include OS-specific variables
include_vars: "{{ lookup('first_found', params) }}"
vars:
params:
files: "{{ distro_lookup_path }}"
paths:
- 'vars'
- name: Include OS-specific tasks
include_tasks: "{{ item }}"
vars:
params:
files: "{{ distro_lookup_path }}"
skip: true
loop: "{{ query('first_found', params) }}"
- name: Write Exim defaults file
template:
src: "{{ sysdefault_template }}"
dest: "{{ sysdefault_file }}"
mode: 0444
- name: Write /etc/aliases
template:
src: "aliases.j2"
dest: "/etc/aliases"
mode: 0444
- name: Write Exim config file
template:
src: "exim4.conf.j2"
dest: "{{ config_file }}"
mode: 0444
notify:
- Restart exim
- name: Enable exim
service:
name: "{{ exim_service_name }}"
enabled: true