John Lyman
2010-Aug-27 14:07 UTC
[Puppet Users] can checksum be set to none on a file if content is defined?
On a file resource, if the content parameter is set and checksum is set to none, I am getting "Parameter content failed: Munging failed..." This appears to be a bug, but maybe I missed something in the documentation and it isn''t supposed to work. cat test.pp file { "/tmp/foo": checksum => none, content => "this is foo\n", } puppet test.pp --debug debug: Failed to load library ''selinux'' for feature ''selinux'' Parameter content failed: Munging failed for value "this is foo\n" in class content: undefined method `none'' for #<Puppet::Type::File::Content:0x90212d8> -- 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.
Patrick
2010-Aug-27 18:49 UTC
Re: [Puppet Users] can checksum be set to none on a file if content is defined?
On Aug 27, 2010, at 7:07 AM, John Lyman wrote:> On a file resource, if the content parameter is set and checksum is > set to none, I am getting "Parameter content failed: Munging > failed..." > > This appears to be a bug, but maybe I missed something in the > documentation and it isn''t supposed to work. > > cat test.pp > file { "/tmp/foo": > checksum => none, > content => "this is foo\n", > } > > puppet test.pp --debug > debug: Failed to load library ''selinux'' for feature ''selinux'' > Parameter content failed: Munging failed for value "this is foo\n" in > class content: undefined method `none'' for > #<Puppet::Type::File::Content:0x90212d8>What are you trying to do? You want it to create the file with that content if the file doesn''t exist, but not change the file if the file exists but doesn''t match? -- 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.
Dan Bode
2010-Aug-27 18:53 UTC
Re: [Puppet Users] can checksum be set to none on a file if content is defined?
On Fri, Aug 27, 2010 at 11:49 AM, Patrick <kc7zzv@gmail.com> wrote:> > On Aug 27, 2010, at 7:07 AM, John Lyman wrote: > > > On a file resource, if the content parameter is set and checksum is > > set to none, I am getting "Parameter content failed: Munging > > failed..." > > > > This appears to be a bug, but maybe I missed something in the > > documentation and it isn''t supposed to work. > > > > cat test.pp > > file { "/tmp/foo": > > checksum => none, > > content => "this is foo\n", > > } > > > > puppet test.pp --debug > > debug: Failed to load library ''selinux'' for feature ''selinux'' > > Parameter content failed: Munging failed for value "this is foo\n" in > > class content: undefined method `none'' for > > #<Puppet::Type::File::Content:0x90212d8> > > What are you trying to do? You want it to create the file with that > content if the file doesn''t exist, but not change the file if the file > exists but doesn''t match? >if this is the behavior you want, try replace => false> -- > 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<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- 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.
John Lyman
2010-Aug-27 20:43 UTC
[Puppet Users] Re: can checksum be set to none on a file if content is defined?
That is the behavior I want, and I am actually using "replace => false" (though I didn''t in my example). My only problem is that I have nodes that run in noop mode, and even though the file doesn''t change, they will complain that the checksum has changed eventually. I think puppet "forgets" the checksum after a while, because the nodes all start complaining at the same time. If the behavior I want is not possible, I will just turn off reporting for that resource. On Aug 27, 2:53 pm, Dan Bode <d...@puppetlabs.com> wrote:> On Fri, Aug 27, 2010 at 11:49 AM, Patrick <kc7...@gmail.com> wrote: > > > On Aug 27, 2010, at 7:07 AM, John Lyman wrote: > > > > On a file resource, if the content parameter is set and checksum is > > > set to none, I am getting "Parameter content failed: Munging > > > failed..." > > > > This appears to be a bug, but maybe I missed something in the > > > documentation and it isn''t supposed to work. > > > > cat test.pp > > > file { "/tmp/foo": > > > checksum => none, > > > content => "this is foo\n", > > > } > > > > puppet test.pp --debug > > > debug: Failed to load library ''selinux'' for feature ''selinux'' > > > Parameter content failed: Munging failed for value "this is foo\n" in > > > class content: undefined method `none'' for > > > #<Puppet::Type::File::Content:0x90212d8> > > > What are you trying to do? You want it to create the file with that > > content if the file doesn''t exist, but not change the file if the file > > exists but doesn''t match? > > if this is the behavior you want, try > > replace => false > > > -- > > 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<puppet-users%2Bunsubscribe@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/puppet-users?hl=en.-- 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.
John Warburton
2010-Sep-10 06:55 UTC
Re: [Puppet Users] Re: can checksum be set to none on a file if content is defined?
I''m getting this too on 0.25.5 when a file does not yet exist, and when I don''t care about about md5 changes *after* the file has been created by puppet Like John, I don''t particularly care when the checksum changes, and don''t want it to appear in my noop reports It is unclear from the 2.6.x release notes on how checksum has been reworked if this has been resolved. Anyone have some experience with this? Thanks John err: //ssl_keys/File[/local/puppet/etc/ssl/ca/inventory.txt]/ensure: change from absent to file failed: Could not set file on ensure: undefined method `none'' for #<Puppet::Type::File::Checksum:0x2ac6ca8> at /local/file-repo/lab/modules/puppet_server/manifests/ssl_keys.pp:66 file {"/local/puppet/etc/ssl/ca/inventory.txt": owner => puppet, group => puppet, mode => 644, # this is to only initialise the file if it doesn''t exist # Once it does, the CA will be updating the file replace => false, checksum => none, source => "puppet:///modules/puppet_server/local/puppet/etc/ssl/ca/inventory.txt", require => File[''/local/puppet/etc/ssl/ca''], } On 28 August 2010 06:43, John Lyman <jlyman2@gmail.com> wrote:> That is the behavior I want, and I am actually using "replace => > false" (though I didn''t in my example). My only problem is that I > have nodes that run in noop mode, and even though the file doesn''t > change, they will complain that the checksum has changed eventually. > I think puppet "forgets" the checksum after a while, because the nodes > all start complaining at the same time. If the behavior I want is not > possible, I will just turn off reporting for that resource. > > On Aug 27, 2:53 pm, Dan Bode <d...@puppetlabs.com> wrote: > > On Fri, Aug 27, 2010 at 11:49 AM, Patrick <kc7...@gmail.com> wrote: > > > > > On Aug 27, 2010, at 7:07 AM, John Lyman wrote: > > > > > > On a file resource, if the content parameter is set and checksum is > > > > set to none, I am getting "Parameter content failed: Munging > > > > failed..." > > > > > > This appears to be a bug, but maybe I missed something in the > > > > documentation and it isn''t supposed to work. > > > > > > cat test.pp > > > > file { "/tmp/foo": > > > > checksum => none, > > > > content => "this is foo\n", > > > > } > > > > > > puppet test.pp --debug > > > > debug: Failed to load library ''selinux'' for feature ''selinux'' > > > > Parameter content failed: Munging failed for value "this is foo\n" in > > > > class content: undefined method `none'' for > > > > #<Puppet::Type::File::Content:0x90212d8> > > > > > What are you trying to do? You want it to create the file with that > > > content if the file doesn''t exist, but not change the file if the file > > > exists but doesn''t match? > > > > if this is the behavior you want, try > > > > replace => false > > > > > -- > > > 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<puppet-users%2Bunsubscribe@googlegroups.com> > <puppet-users%2Bunsubscribe@googlegroups.com<puppet-users%252Bunsubscribe@googlegroups.com> > > > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/puppet-users?hl=en. > > -- > 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<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- John Warburton Ph: 0417 299 600 Email: jwarburton@gmail.com -- 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.