initial version of saslauthd role

This commit is contained in:
Timo Makinen 2019-05-27 21:04:07 +03:00
parent 33a70eacfd
commit 81a3becc55
4 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,29 @@
---
- name: install packages
package:
name: cyrus-sasl
state: installed
- block:
- name: set saslauthd to use ldap
lineinfile:
path: /etc/sysconfig/saslauthd
line: MECH=ldap
regexp: "^MECH=.*"
notify: restart saslauthd
- name: create saslauthd.conf
template:
dest: /etc/saslauthd.conf
src: saslauthd.conf.j2
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
notify: restart saslauthd
when: saslauthd_mech == "ldap"
- name: enable saslauthd service
service:
name: saslauthd
state: started
enabled: true