]> git.somenet.org - root/pub/somesible.git/blob - roles/server/mail/saslauthd/tasks/main.yml
[roles/server/mail/saslauthd] setup saslauthd
[root/pub/somesible.git] / roles / server / mail / saslauthd / tasks / main.yml
1 #####################################
2 ### someone's ansible provisioner ###
3 #####################################
4 # Part of: https://git.somenet.org/root/pub/somesible.git
5 # 2017-2025 by someone <someone@somenet.org>
6 #
7 ---
8 - name: install saslauthd
9   apt:
10     pkg:
11     - sasl2-bin
12     state: present
13     policy_rc_d: 101
14   tags: "online"
15   ignore_errors: "{{ignore_online_errors | bool}}"
16
17
18 - name: copy saslauthd defaults
19   copy:
20     src: "{{item}}"
21     dest: "/etc/default/saslauthd"
22     mode: 0644
23     owner: "root"
24     group: "root"
25   with_first_found:
26     - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/saslauthd.defaults"
27     - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/saslauthd.defaults"
28     - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/saslauthd.defaults"
29     - "default/saslauthd.defaults"
30   notify: restart saslauthd.service
31
32
33 - name: copy saslauthd.conf
34   copy:
35     src: "{{item}}"
36     dest: "/etc/saslauthd.conf"
37     mode: 0644
38     owner: "root"
39     group: "root"
40   with_first_found:
41     - "{{lookup('env','PWD')}}/host_files/{{inventory_hostname}}/{{role_name}}/saslauthd.conf"
42     - "{{lookup('env','PWD')}}/group_files/{{group_files_group}}/{{role_name}}/saslauthd.conf"
43     - "{{lookup('env','PWD')}}/group_files/all/{{role_name}}/saslauthd.conf"
44     - "default/saslauthd.conf"
45   notify: restart saslauthd.service
46
47
48 - name: enable and start saslauthd.service
49   include_role: name="base/systemd/enable-and-start"
50   vars:
51     service_name: saslauthd.service