/cfgen

Simple config files generator

Primary LanguagePython

CFGen

Config file format

JSON
{
  "profiles": {
    "_": {},
      "PROFILENAME_1": {},
      "PROFILENAME_N": {}
  },
  "templates": {
    "TEMPLATE_FILENAME": {
      "output": "OUTPUT_FILENAME",
      "profiles": {
        "_": {},
        "PROFILENAME_1": {},
        "PROFILENAME_N": {}
      }
    }
  }
}
YAML
profiles:
  _: {}
  PROFILENAME_1: {}
templates:
  TEMPLATE_FILENAME:
    output: OUTPUT_FILENAME
    profiles:
      _: {}
      PROFILENAME_1: {},
      PROFILENAME_N: {}

Value types

  • simple value name: value
  • environment variable $(ENV_VAR_NAME)
  • config value ${CONFIG_VALUE}

Templates

  • TEMPLATE_FILENAME is not neccessary.
  • "templates" can be wildcard string or list of filenames.