> From: puppet-users@googlegroups.com [mailto:puppet- > us...@googlegroups.com] On Behalf Of Peter Bukowinski > > Hi Edward, > > With puppet 3.7, all facts are "stringified" by default, meaning hashes are > flattened to strings. If you've got facter 2.0 or greater, you can change this > behavior do you can access hash keys individually.
Thanks very much for the help. Unfortunately, I'm learning, and working, in an environment with several hundred machines in production using puppet. I can't really expect to upgrade or reconfigure the environment. All I'm trying to do is ensure some ssh files exist in a particular user's home directory, so I thought I would use $facts to determine if the user exists, and get their home directory path, and create the files in there. Is there a way to parse the $os string into a hash, so I can access its members? (Besides wanting to access users' home directories, it would also be useful to just get the OS major number, for a different purpose.) I tried parsejson(), but it doesn't like the => instead of :, and it didn't seem right to substitute : for =>. I figured there *should* be a way to parse the string the right way. If not via $facts, how else would puppet put some files into a user's home directory? -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/BY1PR0401MB1255B6B060E898E3A5B23A8DDC570%40BY1PR0401MB1255.namprd04.prod.outlook.com. For more options, visit https://groups.google.com/d/optout.