Jsonnet Support

Jsonnet is a data templating language for specifying configuration files, and it is a supported format for GeneSystem manifests.

This might be useful where step loops are useful.

local conf = {
  varibles: {
    pkg: {
      apts: [
        {
          "name": "docker.io"
        },
        {
          "name": "postgresql-client"
        }
      ]
    }
  }
}

{
  "name": "manifest",
  "version": "0.0.1",
  "metadata": {
    "gene_system": {
      "version": "0.3.1"
    }
  },
  "steps": [] + [
    // install apt packages
    {
      "name": "install " + apt.name,
      "exe": {
        "install": {
          "cmd": [
            "echo password | sudo -S apt-get install " + apt.name
          ]
        },
      },
      "tags": "install " + apt.name
    } for apt in conf.variables.pkg.apts
  ]
}