Managing json configuration files for each node

15 views
Skip to first unread message

Steve Harp

unread,
Feb 13, 2015, 10:36:18 AM2/13/15
to puppet...@googlegroups.com
Hi Guys,

I'm trying to figure out the best way to manage json configuration files on all of my nodes. The json files consist of from 1 to n sub-site configurations stored in a json array.  If each site only had 1 site configuration, it would be a simple matter of using a template.  The only option I can think of right now is to maintain a separate json file for each node on the Puppet Master.  Of course, that would make implementing across-the-board changes cumbersome.

What are my options?

Each node's json file would look something like this and could have any number of sites:
{
  "Sites": [
    {
      "ID": "0000",
      "IS_LIVE": "False",
      "MYSQL_USER": "mgmt",
      "MYSQL_PASS": "letmein",
      "LIVE_DIR": "/srv/www/0000.net",
      "BACKUP_LIVE": "True"
    }
  {
      "ID": "0001",
      "IS_LIVE": "False",
      "MYSQL_USER": "mgmt",
      "MYSQL_PASS": "letmein",
      "LIVE_DIR": "/srv/www/0001.net",
      "BACKUP_LIVE": "True"
    }
  {
      "ID": "0002",
      "IS_LIVE": "False",
      "MYSQL_USER": "mgmt",
      "MYSQL_PASS": "letmein",
      "LIVE_DIR": "/srv/www/0002.net",
      "BACKUP_LIVE": "True"
    } 
]
}

Thanks for any suggestions on the best way to manage these files.
 
Reply all
Reply to author
Forward
0 new messages