On Wed, 24 Nov 2010 07:22:11 -0800 (PST) jcbollinger jcbollinger wrote:
> On Nov 24, 6:17 am, Ohad Levy <[email protected]> wrote: Hi ! I'm getting a little crazy with this... I'll paste some code and see if you see what's happening... > > You probably have a File statement somewhere (like site.pp) which > > has a default source or target attributes. Nop, I'm not defining source/content default. > Right. And if you do then it is certainly wrong, because default > source or target just does not make sense. Not my case, but maybe someone want to ensure that every file defined at puppet has its content modified by source/content. So, I could define a source/content with "should be modified by puppet" in it... i go to client and I see some file with that contetn I know it's not controlled as desired... anyway, as I said not my case... My problem: node 'default' { include common_system_defaults } site.pp defines a default: # grep File site.pp File { ignore => ".svn" } My class its own default: class common_system_defaults { File { ensure => prsent, mode => 644, owner => root, group => root, } [ ... and my files ... ] file { 'default_dns': name => '/etc/resolv.conf', content => "search mydomain nameserver XXX.XXX.XXX.XXX"; 'default_ntp': name => '/etc/ntp.conf', content => 'server myserver.mydomain prefer server myotherserver.mydomain'; } # pwd /etc/puppet/manifests # grep -r content *|grep -v .svn modules/common_defaults/manifests/init.pp: content => "search mydomain nameserver XXX.XXX.XXX.XXX"; modules/common_defaults/manifests/init.pp: content => 'server myserver.mydomain prefer server myotherserver.mydomain'; In resume, I want to modify resolv.conf and ntp.conf. in my client: # puppetd --test --server $server info: Caching catalog for $client err: Could not run Puppet configuration client: You cannot specify more than one of content, source, target at /etc/puppet/manifests/modules/common_defaults/manifests/init.pp:36 Line 36 i "}" of the above code... where is content doubled? If I commment default_ntp, the problems des not disappear: file { 'default_dns': name => '/etc/resolv.conf', content => "search mydomain nameserver XXX.XXX.XXX.XXX"; # 'default_ntp': # name => '/etc/ntp.conf', # content => 'server myserver.mydomain prefer server myotherserver.mydomain'; } # puppetd --test --server $server info: Caching catalog for $client err: Could not run Puppet configuration client: You cannot specify more than one of content, source, target at /etc/puppet/manifests/modules/common_defaults/manifests/init.pp:36 > If that's not it, then make sure you're not including another File > resource with a different title but the same "name" property. If I comment content line, all works fine: file { 'default_dns': name => '/etc/resolv.conf', # content => "search pic.es nameserver 193.109.175.5 nameserver 193.109.172.144 nameserver 158.109.0.1 nameserver 84.88.0.5"; } info: Applying configuration version '1290614540' info: FileBucket adding /etc/resolv.conf as {md5}6607f03347a11c61819976c8e28483bf info: /Stage[main]/Common_system_defaults/File[default_dns]: Filebucketed /etc/resolv.conf to puppet with sum 6607f03347a11c61819976c8e28483bf notice: /Stage[main]/Common_system_defaults/File[default_dns]/ensure: ensure changed 'file' to 'link' notice: Finished catalog run in 0.37 seconds So seems to me that no doubled name property defined... Any help? I'm losing my patience with this > > John > 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 [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-users?hl=en.
