sssd: ansible-lint fixes

This commit is contained in:
Timo Makinen 2022-10-29 18:53:25 +00:00
parent cc7060ee9d
commit f74922d46b
2 changed files with 19 additions and 14 deletions

View file

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

View file

@ -1,30 +1,36 @@
---
- name: install packages
package:
- name: Install packages
ansible.builtin.package:
name: sssd
state: installed
- name: create sssd config
template:
- name: Create sssd config
ansible.builtin.template:
dest: /etc/sssd/sssd.conf
src: sssd.conf.j2
mode: 0600
owner: root
group: "{{ ansible_wheel }}"
notify: restart sssd
notify: Restart sssd
- name: enable sssd service
service:
- name: Enable sssd service
ansible.builtin.service:
name: sssd
state: started
enabled: true
- name: get current state of authselect
shell: /usr/bin/authselect current --raw ; /bin/true
- name: Get current state of authselect
ansible.builtin.shell:
cmd: /usr/bin/authselect current --raw ; /bin/true
register: result
check_mode: false
changed_when: false
- name: switch authselect to use sssd
command: /usr/bin/authselect select sssd --force
- name: Switch authselect to use sssd
ansible.builtin.command:
argv:
- /usr/bin/authselect
- select
- sssd
- --force
when: result.stdout.split()[0] != "sssd"