Puppet Class: freeipa::helpers::flushcache
- Defined in:
-
manifests/helpers/flushcache.pp
Summary
Flushcache sss for Debian and RedHat only
Overview
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
38
39
40
41
|
# File 'manifests/helpers/flushcache.pp', line 7
class freeipa::helpers::flushcache {
#TODO: nscd should be called on both platforms.
case $facts['os']['family'] {
'RedHat': {
$ipa_fluch_cache_cmd = "\
if [ -x /usr/sbin/sss_cache ]; then \
/usr/sbin/sss_cache -UGNA >/dev/null 2>&1 ; \
else \
/usr/bin/find /var/lib/sss/db -type f -exec rm -f \"{}\" ; ; \
fi"
}
'Debian': {
$ipa_fluch_cache_cmd = "\
if [ -x /usr/sbin/nscd ]; then \
/usr/sbin/nscd -i passwd -i group -i netgroup -i automount >/dev/null 2>&1 ; \
elif [ -x /usr/sbin/sss_cache ]; then \
/usr/sbin/sss_cache -UGNA >/dev/null 2>&1 ; \
else \
/usr/bin/find /var/lib/sss/db -type f -exec rm -f \"{}\" ; ; \
fi"
}
default: {
fail('The class freeipa::flushcache is only written for RedHat and Debian.')
}
}
exec { "ipa_flushcache_${freeipa::ipa_server_fqdn}":
command => "/bin/bash -c ${ipa_fluch_cache_cmd}",
returns => ['0','1','2'],
notify => Service['sssd'],
refreshonly => true,
}
}
|