1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
# platform = Red Hat Virtualization 4,multi_platform_fedora,multi_platform_ol,multi_platform_rhel,multi_platform_sle,multi_platform_slmicro,multi_platform_almalinux
# reboot = false
# strategy = unknown
# complexity = low
# disruption = medium
{{{ ansible_instantiate_variables("var_sssd_memcache_timeout") }}}
- name: "Test for domain group"
ansible.builtin.command: grep '\s*\[domain\/[^]]*]' /etc/sssd/sssd.conf
register: test_grep_domain
failed_when: false
changed_when: False
check_mode: no
- name: "Add default domain group (if no domain there)"
community.general.ini_file:
path: /etc/sssd/sssd.conf
section: "{{ item.section }}"
option: "{{ item.option }}"
value: "{{ item.value }}"
create: yes
mode: 0600
with_items:
- { section: sssd, option: domains, value: default}
- { section: domain/default, option: id_provider, value: files }
when:
- test_grep_domain.stdout is defined
- test_grep_domain.stdout | length < 1
- name: "Configure SSSD's Memory Cache to Expire"
community.general.ini_file:
dest: /etc/sssd/sssd.conf
section: nss
option: memcache_timeout
value: "{{ var_sssd_memcache_timeout }}"
create: yes
mode: 0600
|