On Thu, Jul 3, 2014 at 2:25 AM, David Schmitt <[email protected]> wrote:

> On 2014-07-02 20:15, Rob Reynolds wrote:
>
>> On Wed, Jul 2, 2014 at 7:49 AM, David Schmitt <[email protected] [13]>
>>
>> wrote:
>>
>>  Hi Rob,
>>>
>>> The alternative would be to provide many of the well-known paths on
>>> windows as facts.
>>>
>>> file { "${::systemdrive}/somepath/bob": ... }
>>>
>>> Not an obvious improvement.
>>>
>>> A different question: is %PROGRAMFILES% always on %SYSTEMDRIVE% and
>>> will people tend to write
>>>
>>> file { "/Program Files/...": }
>>> file { "/Windows/...": }
>>>
>>> expecting it to work?
>>>
>>
>> Its not and thats what this discussion is about. This is what makes it
>>
>> non-deterministic. And makes it possibly an undesirable change.
>>
>> The big question is how often do folks usually move things from the
>> default system drive with how often would those same folks fall into
>> the category of using /Program Files and expecting it to work?
>>
>
> After this reframe of the question, I can answer with my
> opinionated-module-author-hat on that abbreviating ${::systemdrive} to
> slash-at-the-beginning-of-a-path is a feature that I wouldn't touch with
> a long stick.
>
> Besides the implicit-magic argument, I posit this snippet from one of my
> (admittedly linux) modules:
>
>   https://github.com/DavidS/dasz-configuration/blob/
> master/modules/hosting/manifests/customer.pp#L122
>
> all paths there are based on some $base_dir which is a parameter to this
> type. This is a common pattern for me to reduce repetitiveness and enable
> reuse in different scenarios.
>
> Considering use cases:
>
>   * Many files on $systemdrive are within well-known directories. Those
> have their own envvar/fact that should be preferred.
>   * a "custom" installation of something. Can be DRY'ed[1] by using
> $base_dir and/or requires (external) parametrization anyways.
>   * fiddle in some "foreign"/third-party directory on $systemdrive.
> Already getting into thin-ice territory, arguments from previous point
> apply.
>
> but then I've yet to use puppet on windows for more than the most basic
> things, so I might be missing important use cases that just haven't
> surfaced over here yet.
>

No, I think you are onto something. For external modules it wouldn't be a
good idea. But interestingly enough, before reading this I sort of came to
the same conclusion.
https://tickets.puppetlabs.com/browse/PUP-855?focusedCommentId=79712&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-79712
so glad to see that it is already a pattern. :)

I'll update my comment to reflect your notes here.


>
>
> Regards, David
>
> [1] http://c2.com/cgi/wiki?DontRepeatYourself
>
>  So Im leaning more on the side of requiring explicit paths and
>>>
>>> against magic.
>>>
>>> Regards, David
>>>
>>> On 2014-07-01 21:28, Rob Reynolds wrote:
>>>
>>>  Context,
>>>> Awhile ago I thought it might be a good idea to allow for some
>>>> more
>>>> consistency in manifests where you would not need to specify the
>>>> drive
>>>> letter if you were going to the system drive on windows (usually
>>>> c: as
>>>> in c:/).
>>>>
>>>> This is encapsulated in PUP-855[1].
>>>>
>>>> This would allow for the ability to specify paths in somewhat the
>>>> same
>>>> way as they are specified on other systems, with the knowledge
>>>> that on
>>>> Windows, the "/" on the front of the path ("/somepath/bob") would
>>>> actually be translated to SYSTEMDRIVE, most times c:/
>>>> ("c:/somepath/bob").
>>>>
>>>> There is concern that this is non-deterministic and could
>>>> possibly be
>>>> a problem, but this could potentially be useful for most folks.
>>>>
>>>> Thoughts? Feedback?
>>>>
>>>> [1] https://tickets.puppetlabs.com/browse/PUP-855 [1] [1]
>>>>
>>>>
>>>> --
>>>>
>>>> Rob Reynolds
>>>>
>>>> Developer, Puppet Labs
>>>>
>>>> JOIN US AT , SEPTEMBER 20-24 IN SAN FRANCISCO
>>>>
>>>> _Register by July 31st to take advantage of the Early Bird
>>>> discount
>>>> [2] __--__save $249!_
>>>>
>>>> --
>>>> 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] [2] [3].
>>>>
>>>>
>>>> To view this discussion on the web visit
>>>>
>>>>
>>>>
>>>
>> https://groups.google.com/d/msgid/puppet-dev/CAMJiBK6YGz42hFL3JJ%2B%
>> 3D4nXriZ69ZcPYo1dQA6znpfxCU%2BRG5w%40mail.gmail.com
>>
>>> [3]
>>>> [4].
>>>> For more options, visit https://groups.google.com/d/optout [4]
>>>> [5].
>>>>
>>>> Links:
>>>> ------
>>>> [1] https://tickets.puppetlabs.com/browse/PUP-855 [5]
>>>> [2] https://puppetconf2014.eventbrite.com/?discount=EarlyBird [6]
>>>> [3] mailto:[email protected] [7]
>>>> [4]
>>>>
>>>>
>>>>
>>>
>> https://groups.google.com/d/msgid/puppet-dev/CAMJiBK6YGz42hFL3JJ%2B%
>> 3D4nXriZ69ZcPYo1dQA6znpfxCU%2BRG5w%40mail.gmail.com?utm_
>> medium=email&utm_source=footer
>>
>>> [8]
>>>> [5] https://groups.google.com/d/optout [9]
>>>>
>>>
>>> --
>>> 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] [10].
>>>
>>> To view this discussion on the web visit
>>>
>>>
>> https://groups.google.com/d/msgid/puppet-dev/
>> 4f489b7dd0e881b2c7ccf00f02cf04dd%40hosting.edv-bus.at
>>
>>> [11].
>>>
>>> For more options, visit https://groups.google.com/d/optout [12].
>>>
>>
>> --
>>
>> Rob Reynolds
>>
>> Developer, Puppet Labs
>>
>> JOIN US AT , SEPTEMBER 20-24 IN SAN FRANCISCO
>>
>> _Register by July 31st to take advantage of the Early Bird discount
>> [14] __--__save $249!_
>>
>>
>>  --
>>  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] [15].
>>
>>  To view this discussion on the web visit
>>
>> https://groups.google.com/d/msgid/puppet-dev/CAMJiBK4X-Abbg6CD%
>> 2BJ5CoTcWzQomLaO19wmwrMtxWgf%2BXqwMSQ%40mail.gmail.com
>> [16].
>>  For more options, visit https://groups.google.com/d/optout [17].
>>
>>
>>
>> Links:
>> ------
>> [1] https://tickets.puppetlabs.com/browse/PUP-855
>> [2] mailto:puppet-dev%[email protected]
>> [3]
>>
>> https://groups.google.com/d/msgid/puppet-dev/CAMJiBK6YGz42hFL3JJ%2B%
>> 3D4nXriZ69ZcPYo1dQA6znpfxCU%2BRG5w%40mail.gmail.com
>> [4] https://groups.google.com/d/optout
>> [5] https://tickets.puppetlabs.com/browse/PUP-855
>> [6] https://puppetconf2014.eventbrite.com/?discount=EarlyBird
>> [7] mailto:puppet-dev%[email protected]
>> [8]
>>
>> https://groups.google.com/d/msgid/puppet-dev/CAMJiBK6YGz42hFL3JJ%2B%
>> 3D4nXriZ69ZcPYo1dQA6znpfxCU%2BRG5w%40mail.gmail.com?utm_
>> medium=email&amp;utm_source=footer
>> <https://groups.google.com/d/msgid/puppet-dev/CAMJiBK6YGz42hFL3JJ%2B%3D4nXriZ69ZcPYo1dQA6znpfxCU%2BRG5w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> [9] https://groups.google.com/d/optout
>> [10] mailto:puppet-dev%[email protected]
>> [11]
>>
>> https://groups.google.com/d/msgid/puppet-dev/
>> 4f489b7dd0e881b2c7ccf00f02cf04dd%40hosting.edv-bus.at
>> [12] https://groups.google.com/d/optout
>> [13] mailto:[email protected]
>> [14] https://puppetconf2014.eventbrite.com/?discount=EarlyBird
>> [15] mailto:[email protected]
>> [16]
>>
>> https://groups.google.com/d/msgid/puppet-dev/CAMJiBK4X-Abbg6CD%
>> 2BJ5CoTcWzQomLaO19wmwrMtxWgf%2BXqwMSQ%40mail.gmail.com?utm_
>> medium=email&utm_source=footer
>> [17] 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/0df064f971a02c17659a1881a4713144%40hosting.edv-bus.at.
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Rob Reynolds
Developer, Puppet Labs

*Join us at PuppetConf 2014 <http://www.puppetconf.com/>, September
20-24 in San Francisco*
*Register by July 31st to take advantage of the Early Bird discount
<https://puppetconf2014.eventbrite.com/?discount=EarlyBird> **--**save $249!*

-- 
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/CAMJiBK4DVmKAFCQ-rHjwjCnHNV9SYaRs3cwu2nZZsbBbW7GZyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to