Add the possibility to flush the handlers to apply the new configuration.

Some of my role need a working sssd config, so with
`sssd_flush_handlers` parameter the new config can be apply before run
the next roles.
This commit is contained in:
Jeremy Gardais 2017-09-27 18:45:44 +02:00
parent c977c4ee4a
commit 3e6ca56057
4 changed files with 16 additions and 0 deletions

View File

@ -1,4 +1,9 @@
## v1.1.x
### Enhancement
* Add the possibility to flush the handlers to apply the new configuration.
## v1.1.3 ## v1.1.3
### Enhancement ### Enhancement

View File

@ -25,6 +25,7 @@ Highly inspired by [Lae's system_ldap role][lae sssd galaxy] with minors updates
* **sssd_home_path**: Path where home directories are stored [default: `/home`]. * **sssd_home_path**: Path where home directories are stored [default: `/home`].
* **sssd_sudoers_ldap**: If sudo must look to `sss` the list of sudoers [default: `false`]. * **sssd_sudoers_ldap**: If sudo must look to `sss` the list of sudoers [default: `false`].
* **sssd_service_name**: SSSD's service name [default: `sssd`]. * **sssd_service_name**: SSSD's service name [default: `sssd`].
* **sssd_flush_handlers**: If handlers need to be applied at the end of the role [default: `False`].
### OS Specific Variables ### OS Specific Variables
@ -55,6 +56,12 @@ sssd_bind_dn: 'cn=sssd_user,ou=apps,dc=domain,dc=tld'
* Then you also need to enter the `bind_dn_password` on the remote host (`/etc/sssd/conf.d/sssd_domain.conf`|`/etc/sssd/conf.d/dotld.conf`). If you want to define `bind_dn_password` in a playbook, please be sure to use [Vault][ansible vault] (or any other tool) to cipher your data! * Then you also need to enter the `bind_dn_password` on the remote host (`/etc/sssd/conf.d/sssd_domain.conf`|`/etc/sssd/conf.d/dotld.conf`). If you want to define `bind_dn_password` in a playbook, please be sure to use [Vault][ansible vault] (or any other tool) to cipher your data!
* If you have some other role that need a working sssd configuration, you may want to apply the new configuration:
``` yml
sssd_flush_handlers: True
```
## Configuration ## Configuration
This role will: This role will:

View File

@ -22,3 +22,4 @@ sssd_bind_password: ''
# Service # Service
sssd_service_name: 'sssd' sssd_service_name: 'sssd'
sssd_flush_handlers: False

View File

@ -66,3 +66,6 @@
line: "session required pam_mkhomedir.so umask=0022 skel=/etc/skel/ silent" line: "session required pam_mkhomedir.so umask=0022 skel=/etc/skel/ silent"
state: present state: present
when: sssd_mkhomedir when: sssd_mkhomedir
- meta: flush_handlers
when: sssd_flush_handlers