We have a custom fact that parses the output of `/...
# puppet
d
We have a custom fact that parses the output of
/usr/bin/getent
to get membership info for all users and groups, a special
puppet_managed
group that is assigned to all users managed by puppet, and a loop at the end that locks/removes all users that are in the special
puppet_managed
group but not in the current list of actually managed users. This makes sure users that disappear from our LDAP are locked on all servers, if and only if they were added by puppet in the first place.