Hi,

thanks for building this.

I must admit, I find the prospect a little frightening. The logic that
picks the autorequire target makes sense, but I see quite some potential
for surprising the user with weird dependency cycles.

What I'd like to see instead would be for the user type to actually
spawn a file resource that manages the home directory when managehome =>
true is in use.

There would be some perks to such an approach:
1. This would be backwards compatible (manifests that contain the home
directory will keep the resource from being generated again)
2. You get the autorequire for free (from the very file resource)
3. If issues arise, the user is presented with a very clear message
about just what resource just blew up in their face.

The key would be the additional resources generator. I did something
similar to the naginator types a while ago.

Cheers,
Felix

On 02/26/2015 12:41 AM, Raphaël Pinson wrote:
> Hello,
> 
> 
> As per Kylo's comment in PR for PUP-4036
> <https://github.com/puppetlabs/puppet/pull/3645#issuecomment-76032829>,
> I'd like to discuss the possibility and implications of autorequiring
> parent directories of the home directory for user resources.
> 
> As stated in the PR, the idea came from stumbling upon a code like this one:
> 
> file { '/srv/home': ensure => directory }
> file { '/home': ensure => link, target => '/srv/home' } -> User <| |>
> 
> 
> where it made a lot of sense that all users should just autorequire the
> nearest parent directory to their home directory.
> 
> What are your thoughts on this feature?
> 
> 
> Cheers,
> 
> Raphaël

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/54F0A279.20006%40alumni.tu-berlin.de.
For more options, visit https://groups.google.com/d/optout.

Reply via email to