Interestingly, I ran into just this issue yesterday.

The scenario was using autofs.

Autofs home directories get installed in /export/home/$USER.
Autofs takes care of $USER.

However, puppet takes care of /export and /home.

So, if all resources are managed by Puppet, then User['foo'] should
autorequire at least /export/home which, in turn, will autorequire /export.
However, the actual /export/home/$USER directory is completely irrelevant
(and should not show up in Puppet anyway).

If, for some reason, /export/home was *not* controlled by Puppet, then I
would want User['foo'[ to autorequire /export as well as /export/home.

In this case, I would want the user's target directory +1 to be
autorequired and I would like to vote for that.

I couldn't come up with any scenarios that would push me past target +1.

Trevor

On Fri, Mar 6, 2015 at 5:50 AM, Felix Frank <[email protected]
> wrote:

> Since we're winding down :)
>
> As nobody seems to love generated resources as passionately as I do
> (it's OK, we still have each other), I would still ask for a compromise:
> Autorequire does make sense, but can we tone it down?
>
> As I understand it, the following resource
>
> user { 'foo': home => '/var/lib/vendor/toolset/vendor-tool' }
>
> will autorequire either
> File['/var/lib/vendor/toolset']
> File['/var/lib/vendor']
> File['/var/lib']
> or
> File['/var']
>
> which is a bit much for my taste. Autorequiring the immediate parent
> only would make more sense to me.
>
> Thanks,
> Felix
>
> On 03/03/2015 10:38 PM, Trevor Vaughan wrote:
> > Indeed, I too apologize for the complete tangent!
> >
> > And, as would be expected, I'm for the autorequires since it does what I
> > would expect it to do.
> >
> > Which, again, is counter to what John wants ;-). But, that's my answer
> > to the original question.
> >
> > Thanks,
> >
> > Trevor
> >
> > On Tue, Mar 3, 2015 at 3:37 PM, John Bollinger
> > <[email protected] <mailto:[email protected]>> wrote:
> >
> >
> >
> >     On Wednesday, February 25, 2015 at 5:41:19 PM UTC-6, 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?
> >
> >
> >
> >     My sincere apologies for my part in what I now recognize as taking
> >     this thread off on a tangent.  The lively discussion we had,
> >     however, did allow me to frame my general position on
> >     autorequirements, which is that they should be implemented only when
> >     they are directly indicated by the nature of the resource.  If User
> >     resources /can/ be applied without first applying the File resources
> >     representing their home directories, then there should be no
> >     autorequirement.
> >
> >
> >     John
> >
> >     --
> >     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 [email protected]
> >     <mailto:[email protected]>.
> >     To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/puppet-dev/b8d5e560-9357-4d8f-8234-3b593d9be246%40googlegroups.com
> >     <
> https://groups.google.com/d/msgid/puppet-dev/b8d5e560-9357-4d8f-8234-3b593d9be246%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
> >
> >     For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-dev/54F98667.5040505%40alumni.tu-berlin.de
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
[email protected]

-- This account not approved for unencrypted proprietary information --

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoV1y%2BGbkHCh8MccFgRuYAkjb2CTBzw07awZkDqLpZf0Wg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to