Hi Guys,
I have a json configuration file on each Puppet Agent that I need to parse and return the values as custom facts. Each json file will contain an array of from 0 to n elements each of which will have needed configuration settings. I think what I need to write is an aggregate fact where the specific elements in the array will be represented as chunks. Here's a simplified example of the json file.
{
"Sites":
[
{
"WEB_ID": "0006",
"BACKUP_LIVE": "True",
"BACKUP_TEST": "False",
},
{
"WEB_ID": "0145",
"BACKUP_LIVE": "True",
"BACKUP_TEST": "False",
},
{
"WEB_ID": "0000",
"BACKUP_LIVE": "True",
"BACKUP_TEST": "False",
}
]
}
I don't think writing the fact would be too difficult but I don't know how to reference the facts from within a manifest on the Puppet Master. I would like to be able to access these settings using a custom fact from within a manifest. Something like:
value=Sites[2]["LIVE_DIR"]
If you have an aggregate fact, how to you use it in a manifest?
Is this possible?
Thanks.....