On Sat, Nov 24, 2012 at 8:28 AM, bluethundr <
dunp...@gmail.com> wrote:
> Is there a way using puppet to delete the home directories recursively of
> employees who have left the company?
Are your users managed by Puppet? If so, perhaps check out
`managehome` of the user type.
http://docs.puppetlabs.com/references/latest/type.html#user .
Depending on the capabilities of the provider for your system, setting
`managehome => true` will create/remove user home directories.
>
> So far I've tried:
>
> file { "/export/home/user":
> name => "$home_dir/user",
> ensure => 'absent'
> }
>
> I also tried
>
>
>
> file{'export/home/user':
> name => "$home_dir/user",
> purge => true,
> recurse => true,
> force => true,
> backup => false,
> }
>
> But neither worked. Is there a way to do this with puppet currently? All I
> could find in the googlesphere was how to create directories (and keep them
> clean) with puppet but not how to destroy them. Perhaps this would be TOO
> destructive a power for puppet to wield?
>
> Thanks
> Tim
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/puppet-users/-/ffzGcfykLHIJ.
> To post to this group, send email to
puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
>
puppet-users...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/puppet-users?hl=en.