[Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn't

2013-02-02 Thread Dave Ta
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}"}

[Puppet Users] Re: Puppet and Mcollective yaml file changing when it shouldn't

2013-02-02 Thread Dave Ta
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}"}