Excellent information there John. Thank you for taking time to explain so clearly.
Dave On Monday, November 26, 2012 2:38:39 PM UTC, jcbollinger wrote: > > > > On Wednesday, November 21, 2012 10:41:48 AM UTC-6, KomodoDave wrote: >> >> Actually this is interesting: the 'path' parameter has a default value of >> the title. So if you don't specify the path yet specify an array for the >> title, I wonder what the internal logic is? >> >> Intriguing... >> >> > You are missing an important subtlety: when you use an array as a resource > title, you are declaring not just one resource but several separate > resources -- one for each array element, with the corresponding element as > its title. Each resource gets the same values for the assigned parameters, > and default values for all others. Thus, this declaration > > file { [ '/tmp/one', '/tmp/two']: > ensure => 'file', > mode => 0644 > } > > is exactly equivalent to these two > > file { '/tmp/one': > ensure => 'file', > mode => 0644 > } > > file { '/tmp/two': > ensure => 'file', > mode => 0644 > } > > . The array-style declaration is strictly shorthand. The default 'path' > parameter for File['/tmp/one'] is '/tmp/one', and the default 'path' > parameter for File['/tmp/two'] is '/tmp/two', regardless of which form you > use to declare them. > > > John > > -- 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/-/Hbn43b2NsxsJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.