I have set up puppet to create a facts.yaml file for mcollective using the following line:
content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s =~ /(uptime.*|timestamp|.*free|macaddress.*|ipaddress)/ }.to_yaml %>"), However, it is creating a lot of unnecessary changes by reordering the facts in the yaml output as you can see in the diff output between to runs; --- facts.yaml 2012-12-03 10:25:15.389570751 +0000 +++ facts.yaml.copy 2012-12-03 10:24:31.982563969 +0000 @@ -5,14 +5,14 @@ clientcert: rhel6test.shef.ac.uk rubyversion: "1.8.7" lsbdistdescription: "Red Hat Enterprise Linux Server release 6.3 (Santiago)" - architecture: x86_64 boardmanufacturer: "Intel Corporation" + architecture: x86_64 type: Other serialnumber: "VMware-42 26 2c 7e 64 54 65 e5-bd 53 81 d7 56 02 2e e4" - processorthreadcount: "1" lsbmajdistrelease: "6" + processorthreadcount: "1" title: "mcollective::server" lsbdistcodename: Santiago mcollective_serverpackage: mcollective id: root At first I was thinking of just changing the template so that the the yaml output is sorted by key order (http://www.dzone.com/snippets/generating-yaml-hashes-sorted) but is this expected behaviour? Is there a better way to solve this problem? -- 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/-/6qtipfsFHt4J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.