Zane Williamson
2012-Dec-14 01:06 UTC
[Puppet Users] Puppet and Mcollective yaml file changing when it shouldn''t
Has anyone else ran into this? debug: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: Executing ''diff -u /var/tmp/facts.yaml /tmp/puppet-file20121214-13448-933j3r-0'' notice: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: --- /var/tmp/facts.yaml 2012-12-14 00:53:20.000000000 +0000 +++ /tmp/puppet-file20121214-13448-933j3r-0 2012-12-14 00:55:35.000000000 +0000 @@ -93,13 +93,13 @@ architecture: *id002 processor14: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz - type: Rack Mount Chassis processor20: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz + type: Rack Mount Chassis domain: mochimedia.net timezone: UTC title: mcollective - diskdrives: sda + diskdrives: sda ipaddress_eth1: 10.0.8.71 processor8: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz processor11: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz When Puppet comparse the /var/tmp/facts.yaml file to the file in the Filebucket it adds some replaces some entries with an extra space. It appears to add a couple different entries each run. Here is the file resource -- "/var/tmp/facts.yaml": owner => root, group => root, mode => 400, loglevel => debug, content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s =~ /(uptime_seconds|uptime_hours|timestamp|free)/ }.to_yaml %>") Any thoughts or suggestions? Seems like an odd one to me. -Z -- 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/-/KWkrTqkvwXcJ. 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.
Zane Williamson
2012-Dec-14 01:27 UTC
[Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t
Running Ruby 1.8.7... I believe this issue started when I upgraded from 1.8.5, but I am not 100% positive. On Thursday, December 13, 2012 5:06:54 PM UTC-8, Zane Williamson wrote:> > Has anyone else ran into this? > > debug: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > Executing ''diff -u /var/tmp/facts.yaml > /tmp/puppet-file20121214-13448-933j3r-0'' > notice: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > --- /var/tmp/facts.yaml 2012-12-14 00:53:20.000000000 +0000 > +++ /tmp/puppet-file20121214-13448-933j3r-0 2012-12-14 00:55:35.000000000 > +0000 > @@ -93,13 +93,13 @@ > architecture: *id002 > processor14: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > - type: Rack Mount Chassis > processor20: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > + type: Rack Mount Chassis > domain: mochimedia.net > timezone: UTC > title: mcollective > - diskdrives: sda > + diskdrives: sda > ipaddress_eth1: 10.0.8.71 > processor8: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > processor11: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > > When Puppet comparse the /var/tmp/facts.yaml file to the file in the > Filebucket it adds some replaces some entries with an extra space. It > appears to add a couple different entries each run. > > Here is the file resource -- > > "/var/tmp/facts.yaml": > owner => root, > group => root, > mode => 400, > loglevel => debug, > content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s > =~ /(uptime_seconds|uptime_hours|timestamp|free)/ }.to_yaml %>") > > Any thoughts or suggestions? Seems like an odd one to me. > > -Z >-- 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/-/US1QA9X_VSoJ. 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.
Zane Williamson
2012-Dec-14 02:05 UTC
[Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t
Well I think I came up with a decent hack. content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s =~ /(uptime_seconds|uptime_hours|timestamp|free)/ }.to_yaml.sort { |a,b| b <=> a} %>") the sort and then inverse (to make sure the "---/n" is on top for the fact file format) seems to stop to_yaml from adding spaces. On Thursday, December 13, 2012 5:06:54 PM UTC-8, Zane Williamson wrote:> > Has anyone else ran into this? > > debug: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > Executing ''diff -u /var/tmp/facts.yaml > /tmp/puppet-file20121214-13448-933j3r-0'' > notice: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > --- /var/tmp/facts.yaml 2012-12-14 00:53:20.000000000 +0000 > +++ /tmp/puppet-file20121214-13448-933j3r-0 2012-12-14 00:55:35.000000000 > +0000 > @@ -93,13 +93,13 @@ > architecture: *id002 > processor14: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > - type: Rack Mount Chassis > processor20: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > + type: Rack Mount Chassis > domain: mochimedia.net > timezone: UTC > title: mcollective > - diskdrives: sda > + diskdrives: sda > ipaddress_eth1: 10.0.8.71 > processor8: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > processor11: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > > When Puppet comparse the /var/tmp/facts.yaml file to the file in the > Filebucket it adds some replaces some entries with an extra space. It > appears to add a couple different entries each run. > > Here is the file resource -- > > "/var/tmp/facts.yaml": > owner => root, > group => root, > mode => 400, > loglevel => debug, > content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s > =~ /(uptime_seconds|uptime_hours|timestamp|free)/ }.to_yaml %>") > > Any thoughts or suggestions? Seems like an odd one to me. > > -Z >-- 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/-/eE8sQojblMUJ. 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.
Zane Williamson
2012-Dec-14 03:02 UTC
[Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t
Actually, applying sort doesn''t work. It doesn''t sort the file properly and the spacing and line creation is incorrect. I looked at other similar posts and it appears to be an issues with Ruby with no direct solution besides stopping puppet from managing this file. On Thursday, December 13, 2012 5:06:54 PM UTC-8, Zane Williamson wrote:> > Has anyone else ran into this? > > debug: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > Executing ''diff -u /var/tmp/facts.yaml > /tmp/puppet-file20121214-13448-933j3r-0'' > notice: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > --- /var/tmp/facts.yaml 2012-12-14 00:53:20.000000000 +0000 > +++ /tmp/puppet-file20121214-13448-933j3r-0 2012-12-14 00:55:35.000000000 > +0000 > @@ -93,13 +93,13 @@ > architecture: *id002 > processor14: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > - type: Rack Mount Chassis > processor20: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > + type: Rack Mount Chassis > domain: mochimedia.net > timezone: UTC > title: mcollective > - diskdrives: sda > + diskdrives: sda > ipaddress_eth1: 10.0.8.71 > processor8: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > processor11: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > > When Puppet comparse the /var/tmp/facts.yaml file to the file in the > Filebucket it adds some replaces some entries with an extra space. It > appears to add a couple different entries each run. > > Here is the file resource -- > > "/var/tmp/facts.yaml": > owner => root, > group => root, > mode => 400, > loglevel => debug, > content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s > =~ /(uptime_seconds|uptime_hours|timestamp|free)/ }.to_yaml %>") > > Any thoughts or suggestions? Seems like an odd one to me. > > -Z >-- 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/-/-P8raaZkRKcJ. 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.
R.I.Pienaar
2012-Dec-14 09:25 UTC
Re: [Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t
----- Original Message -----> From: "Zane Williamson" <zane.williamson@gmail.com> > To: puppet-users@googlegroups.com > Sent: Friday, December 14, 2012 3:02:13 AM > Subject: [Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t > > Actually, applying sort doesn''t work. It doesn''t sort the file > properly and the spacing and line creation is incorrect. > > I looked at other similar posts and it appears to be an issues with > Ruby with no direct solution besides stopping puppet from managing > this file.yeah, ruby hashes does not have an order in older versions of ruby, this is quite a horrible hack but some have reported success: <% def sort_yaml(obj) arr = obj.sort out = "---\n" arr.each do |element| entry = {element[0] => element[1]} out += entry.to_yaml.to_a[1..-1].join + "\n" end out end sort_yaml(scope.to_hash.reject {|k,v| k.to_s =~ /^(uptime.*|rubysitedir|_timestamp|memoryfree|extlookup_precedence|extlookup_datadir|swapfree|title|name|caller_module_name|module_name)$/ }) %> -- 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.
Louis Coilliot
2012-Dec-14 09:34 UTC
Re: [Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t
This works also : content => inline_template("<%= Hash[scope.to_hash.reject { |k,v| k.to_s =~ /(uptime|timestamp|memory|free|swap)/ }.sort].to_yaml %>") It does not sort but keep the fact list in the same order. Louis Coilliot Le 14/12/2012 03:05, Zane Williamson a écrit :> Well I think I came up with a decent hack. > > content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s > =~ /(uptime_seconds|uptime_hours|timestamp|free)/ }.to_yaml.sort { > |a,b| b <=> a} %>") > > the sort and then inverse (to make sure the "---/n" is on top for the > fact file format) seems to stop to_yaml from adding spaces. > > On Thursday, December 13, 2012 5:06:54 PM UTC-8, Zane Williamson wrote: > > Has anyone else ran into this? > > debug: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > Executing ''diff -u /var/tmp/facts.yaml > /tmp/puppet-file20121214-13448-933j3r-0'' > notice: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > --- /var/tmp/facts.yaml2012-12-14 00:53:20.000000000 +0000 > +++ /tmp/puppet-file20121214-13448-933j3r-02012-12-14 > 00:55:35.000000000 +0000 > @@ -93,13 +93,13 @@ > architecture: *id002 > processor14: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > - type: Rack Mount Chassis > processor20: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > + type: Rack Mount Chassis > domain: mochimedia.net <http://mochimedia.net> > timezone: UTC > title: mcollective > - diskdrives: sda > + diskdrives: sda > ipaddress_eth1: 10.0.8.71 > processor8: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > processor11: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > > When Puppet comparse the /var/tmp/facts.yaml file to the file in > the Filebucket it adds some replaces some entries with an extra > space. It appears to add a couple different entries each run. > > Here is the file resource -- > > "/var/tmp/facts.yaml": > owner => root, > group => root, > mode => 400, > loglevel => debug, > content => inline_template("<%= scope.to_hash.reject { > |k,v| k.to_s =~ /(uptime_seconds|uptime_hours|timestamp|free)/ > }.to_yaml %>") > > Any thoughts or suggestions? Seems like an odd one to me. > > -Z > > -- > 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/-/eE8sQojblMUJ. > 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.-- 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.
phundisk
2012-Dec-14 14:43 UTC
[Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t
Thank you, I was having the same issue as you were. Puppet Dashboard was complaining that a node was changing every time because of this file that changed slightly. On Thursday, December 13, 2012 8:06:54 PM UTC-5, Zane Williamson wrote:> > Has anyone else ran into this? > > debug: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > Executing ''diff -u /var/tmp/facts.yaml > /tmp/puppet-file20121214-13448-933j3r-0'' > notice: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > --- /var/tmp/facts.yaml 2012-12-14 00:53:20.000000000 +0000 > +++ /tmp/puppet-file20121214-13448-933j3r-0 2012-12-14 00:55:35.000000000 > +0000 > @@ -93,13 +93,13 @@ > architecture: *id002 > processor14: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > - type: Rack Mount Chassis > processor20: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > + type: Rack Mount Chassis > domain: mochimedia.net > timezone: UTC > title: mcollective > - diskdrives: sda > + diskdrives: sda > ipaddress_eth1: 10.0.8.71 > processor8: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > processor11: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > > When Puppet comparse the /var/tmp/facts.yaml file to the file in the > Filebucket it adds some replaces some entries with an extra space. It > appears to add a couple different entries each run. > > Here is the file resource -- > > "/var/tmp/facts.yaml": > owner => root, > group => root, > mode => 400, > loglevel => debug, > content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s > =~ /(uptime_seconds|uptime_hours|timestamp|free)/ }.to_yaml %>") > > Any thoughts or suggestions? Seems like an odd one to me. > > -Z >-- _____________________________________________________ This email and any files transmitted with it are confidential and intended solely for the addressee. If you received this email in error, please do not disclose the contents to anyone; kindly notify the sender by return email and delete this email and any attachments from your system. © 2011 Currensee Inc. is a member of the National Futures Association (NFA) Member ID 0403251 | Over the counter retail foreign currency (Forex) trading may involve significant risk of loss. It is not suitable for all investors and you should make sure you understand the risks involved before trading and seek independent advice if necessary. Performance, strategies and charts shown are not necessarily predictive of any particular result and past performance is no indication of future results. Investor returns may vary from Trade Leader returns based on slippage, fees, broker spreads, volatility or other market conditions. Currensee Inc | 54 Canal St 4th Floor | Boston, MA 02114 | +1.617.624.3824 -- 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/-/87brXhfkthsJ. 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.
Zane Williamson
2012-Dec-18 06:34 UTC
[Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t
Thank you for the recommendations. I am going to give them a try and see how they work out in production. Thanks! Zane On Thursday, December 13, 2012 5:06:54 PM UTC-8, Zane Williamson wrote:> > Has anyone else ran into this? > > debug: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > Executing ''diff -u /var/tmp/facts.yaml > /tmp/puppet-file20121214-13448-933j3r-0'' > notice: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > --- /var/tmp/facts.yaml 2012-12-14 00:53:20.000000000 +0000 > +++ /tmp/puppet-file20121214-13448-933j3r-0 2012-12-14 00:55:35.000000000 > +0000 > @@ -93,13 +93,13 @@ > architecture: *id002 > processor14: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > - type: Rack Mount Chassis > processor20: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > + type: Rack Mount Chassis > domain: mochimedia.net > timezone: UTC > title: mcollective > - diskdrives: sda > + diskdrives: sda > ipaddress_eth1: 10.0.8.71 > processor8: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > processor11: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > > When Puppet comparse the /var/tmp/facts.yaml file to the file in the > Filebucket it adds some replaces some entries with an extra space. It > appears to add a couple different entries each run. > > Here is the file resource -- > > "/var/tmp/facts.yaml": > owner => root, > group => root, > mode => 400, > loglevel => debug, > content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s > =~ /(uptime_seconds|uptime_hours|timestamp|free)/ }.to_yaml %>") > > Any thoughts or suggestions? Seems like an odd one to me. > > -Z >-- 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/-/4EzP0Csc1rUJ. 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.
Dave Ta
2013-Feb-03 04:03 UTC
[Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t
Try using an erb template for your content. Its working well for me. 1. ## facts.erb 2. <% 3. yaml = ["---"] keys = scope.to_hash.keys.reject {|k| k.to_s =~ /(uptime_seconds|timestamp|free)/} 4. keys.sort.each {|k| yaml << "#{k}: #{scope.lookupvar(k).to_s}"} yaml.join("\n ") 5. %> 6. 7. ## manifest 8. file{"/etc/mcollective/facts.yaml": 9. content => template("mcollective/facts.yaml") 10. } 1. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Dave Ta
2013-Feb-03 05:53 UTC
[Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t
Try using an erb template for your facts.yaml file. Its working well for me so far. # facts.yaml.erb <% yaml = ["---"] keys = scope.to_hash.keys.reject {|k| k.to_s =~ /(uptime_seconds|uptime_hours|timestamp|free)/} keys.sort.each {|k| yaml << "#{k}: #{scope.lookupvar(k).to_s}"} yaml.join("\n ") %> # manifest file{"/etc/mcollective/facts.yaml": owner => root, group => root, mode => 400, loglevel => debug, content => template("mcollective/facts.yaml.erb"); } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
R.I.Pienaar
2013-Feb-03 06:14 UTC
Re: [Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t
----- Original Message -----> From: "Dave Ta" <davetakicksass@gmail.com> > To: puppet-users@googlegroups.com > Sent: Sunday, February 3, 2013 6:53:40 AM > Subject: [Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t > > Try using an erb template for your facts.yaml file. Its working well for > me so far. > > # facts.yaml.erb > <%> yaml = ["---"] > keys = scope.to_hash.keys.reject {|k| k.to_s =~ > /(uptime_seconds|uptime_hours|timestamp|free)/} > keys.sort.each {|k| yaml << "#{k}: #{scope.lookupvar(k).to_s}"} > yaml.join("\n ") > %>might have some quoting issues here with facts that have : in them etc, this one addresses that: <% facts = scope.to_hash.reject {|k,v| k.to_s =~ /^(uptime.*|rubysitedir|_timestamp|memoryfree)$/ } facts.keys.sort.map {|f| {f => facts[f]}.to_yaml.to_a[1..-1].join}.join("\n") %>> > # manifest > file{"/etc/mcollective/facts.yaml": > owner => root, > group => root, > mode => 400, > loglevel => debug, > content => template("mcollective/facts.yaml.erb"); > } > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Zane Williamson
2013-Feb-15 06:08 UTC
[Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn''t
Excellent, the erb template method is working great. Thank you for the information. On Thursday, December 13, 2012 5:06:54 PM UTC-8, Zane Williamson wrote:> > Has anyone else ran into this? > > debug: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > Executing ''diff -u /var/tmp/facts.yaml > /tmp/puppet-file20121214-13448-933j3r-0'' > notice: /Stage[main]/Mcollective/File[/var/tmp/facts.yaml]/content: > --- /var/tmp/facts.yaml 2012-12-14 00:53:20.000000000 +0000 > +++ /tmp/puppet-file20121214-13448-933j3r-0 2012-12-14 00:55:35.000000000 > +0000 > @@ -93,13 +93,13 @@ > architecture: *id002 > processor14: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > - type: Rack Mount Chassis > processor20: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > + type: Rack Mount Chassis > domain: mochimedia.net > timezone: UTC > title: mcollective > - diskdrives: sda > + diskdrives: sda > ipaddress_eth1: 10.0.8.71 > processor8: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > processor11: Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz > > When Puppet comparse the /var/tmp/facts.yaml file to the file in the > Filebucket it adds some replaces some entries with an extra space. It > appears to add a couple different entries each run. > > Here is the file resource -- > > "/var/tmp/facts.yaml": > owner => root, > group => root, > mode => 400, > loglevel => debug, > content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s > =~ /(uptime_seconds|uptime_hours|timestamp|free)/ }.to_yaml %>") > > Any thoughts or suggestions? Seems like an odd one to me. > > -Z >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.