Hi all, from http://docs.puppetlabs.com/guides/language_tutorial.html this syntax should be ok: file { [ ''foo'', ''bar'', ''foobar'' ]: owner => root, group => root, mode => 600, } I''ve this in my code: file { [ ''/software/atlas'' , ''/software/cms'' , ''/software/lhcb'' , ''/software/magic'' , ''/software/at3'' , ''/software/paus'' , ''/software/mice'' , ''/software/ops.vo.ibergrid.eu'' , ''/software/supernemo.vo.eu-egee.org'' ]: require => File[''/software''] ; } And an error like: err: Could not parse for environment production: Syntax error at '':''; expected ''}'' at /etc/pup... I''m on 2.6.1, is it a bug? Anyone is using this syntax with no problems? Cheers, Arnau -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Wed, 15 Dec 2010 10:44:55 +0100 Arnau Bria wrote:> Hi all,Hi again, I said nothing.> file { [ ''/software/atlas'' , ''/software/cms'' , ''/software/lhcb'' , > ''/software/magic'' , ''/software/at3'' , ''/software/paus'' , > ''/software/mice'' , ''/software/ops.vo.ibergrid.eu'' , > ''/software/supernemo.vo.eu-egee.org'' ]: require => > File[''/software''] ; }the error was in the next line, in other array. sorry for the noise. Cheers, Arnau -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Peter Meier
2010-Dec-15 10:04 UTC
Re: [Puppet Users] Re: File type: no success using array
On 12/15/2010 10:48 AM, Arnau Bria wrote:> On Wed, 15 Dec 2010 10:44:55 +0100 > Arnau Bria wrote: > >> Hi all, > Hi again, > > I said nothing. > >> file { [ ''/software/atlas'' , ''/software/cms'' , ''/software/lhcb'' , >> ''/software/magic'' , ''/software/at3'' , ''/software/paus'' , >> ''/software/mice'' , ''/software/ops.vo.ibergrid.eu'' , >> ''/software/supernemo.vo.eu-egee.org'' ]: require => >> File[''/software''] ; }not that you don''t need this require, as puppet automagically orders file resources according to their path. So File[''/software/atlas''] automatically depends on File[''/software''] ~pete -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Wed, 15 Dec 2010 11:04:27 +0100 Peter Meier wrote: Hi Pete,> >> file { [ ''/software/atlas'' , ''/software/cms'' , ''/software/lhcb'' , > >> ''/software/magic'' , ''/software/at3'' , ''/software/paus'' , > >> ''/software/mice'' , ''/software/ops.vo.ibergrid.eu'' , > >> ''/software/supernemo.vo.eu-egee.org'' ]: require => > >> File[''/software''] ; } > > not that you don''t need this require, as puppet automagically orders > file resources according to their path. So File[''/software/atlas''] > automatically depends on File[''/software'']thanks! didn''t know.> ~peteCheers, Arnau PS: I love automagically word! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.