saslauthd: ansible-lint fixes

This commit is contained in:
Timo Makinen 2022-10-29 17:29:44 +00:00
parent 3a888cd926
commit 0ac9b825be
2 changed files with 22 additions and 23 deletions

View file

@ -1,6 +1,5 @@
--- ---
- name: Restart saslauthd
- name: restart saslauthd ansible.builtin.service:
service:
name: saslauthd name: saslauthd
state: restarted state: restarted

View file

@ -1,32 +1,32 @@
--- ---
- name: Install packages
- name: install packages ansible.builtin.package:
package:
name: "{{ item }}" name: "{{ item }}"
state: installed state: installed
with_items: with_items:
- cyrus-sasl - cyrus-sasl
- cyrus-sasl-plain - cyrus-sasl-plain
- block: - name: Set saslauthd to use LDAP
- name: set saslauthd to use ldap ansible.builtin.lineinfile:
lineinfile:
path: /etc/sysconfig/saslauthd path: /etc/sysconfig/saslauthd
line: MECH=ldap line: MECH=ldap
regexp: "^MECH=.*" regexp: "^MECH=.*"
notify: restart saslauthd notify: Restart saslauthd
- name: create saslauthd.conf when: saslauthd_mech == "ldap"
template:
- name: Create saslauthd.conf
ansible.builtin.template:
dest: /etc/saslauthd.conf dest: /etc/saslauthd.conf
src: saslauthd.conf.j2 src: saslauthd.conf.j2
mode: 0640 mode: 0640
owner: root owner: root
group: "{{ ansible_wheel }}" group: "{{ ansible_wheel }}"
notify: restart saslauthd notify: Restart saslauthd
when: saslauthd_mech == "ldap" when: saslauthd_mech == "ldap"
- name: enable saslauthd service - name: Enable saslauthd service
service: ansible.builtin.service:
name: saslauthd name: saslauthd
state: started state: started
enabled: true enabled: true