On Mon, 06 Sep 2010 10:19:31 +0200, Peter Meier <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > >>>> I was thinking a function could work for the people who really want >>>> this feature and that way we're not creating issues with the way the >>>> file type actually works. >>>> >>>> $mypath = "/usr/local/foo/bin" >>>> >>>> file { path_components($mypath): >>>> ensure => directiory, >>>> } >>>> >>>> and path_components just returns an array: >>>> >>>> ['/usr', '/usr/local', '/usr/local/foo', '/usr/local/bin'] >>> >>> +1 Sweet! >>> >>> >> The only problem I see with this solution is what to do about duplicate >> declarations? >> >> The second time you use this method somewhere, File["/"] and likely >> File["/usr"] will exist in the catalog multiple times. > > good catch. This will likely very fast cause problems and people will > start coming with "bug"-reports. My 2cents regarding this "feature" as a > built-in function.
So, this would kind of work for what I'm looking for, however the redefinition stuff is definitely a major problem. You can't re-alias things either because then you just end up with duplicate aliases. I tried doing a virtual resource in this method, but that doesn't seem to work either - any ideas why? -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
