saslauthd: ansible-lint fixes
This commit is contained in:
parent
3a888cd926
commit
0ac9b825be
2 changed files with 22 additions and 23 deletions
|
@ -1,6 +1,5 @@
|
|||
---
|
||||
|
||||
- name: restart saslauthd
|
||||
service:
|
||||
- name: Restart saslauthd
|
||||
ansible.builtin.service:
|
||||
name: saslauthd
|
||||
state: restarted
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
---
|
||||
|
||||
- name: install packages
|
||||
package:
|
||||
- name: Install packages
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
state: installed
|
||||
with_items:
|
||||
- cyrus-sasl
|
||||
- cyrus-sasl-plain
|
||||
|
||||
- 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: 0640
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: restart saslauthd
|
||||
- name: Set saslauthd to use LDAP
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/sysconfig/saslauthd
|
||||
line: MECH=ldap
|
||||
regexp: "^MECH=.*"
|
||||
notify: Restart saslauthd
|
||||
when: saslauthd_mech == "ldap"
|
||||
|
||||
- name: enable saslauthd service
|
||||
service:
|
||||
- name: Create saslauthd.conf
|
||||
ansible.builtin.template:
|
||||
dest: /etc/saslauthd.conf
|
||||
src: saslauthd.conf.j2
|
||||
mode: 0640
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart saslauthd
|
||||
when: saslauthd_mech == "ldap"
|
||||
|
||||
- name: Enable saslauthd service
|
||||
ansible.builtin.service:
|
||||
name: saslauthd
|
||||
state: started
|
||||
enabled: true
|
||||
|
|
Loading…
Add table
Reference in a new issue