{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Bolt Project",
  "description": "Bolt Project bolt-project.yaml Schema",
  "type": "object",
  "properties": {
    "analytics": {
      "$ref": "#/definitions/analytics"
    },
    "apply-settings": {
      "$ref": "#/definitions/apply-settings"
    },
    "color": {
      "$ref": "#/definitions/color"
    },
    "compile-concurrency": {
      "$ref": "#/definitions/compile-concurrency"
    },
    "concurrency": {
      "$ref": "#/definitions/concurrency"
    },
    "disable-warnings": {
      "$ref": "#/definitions/disable-warnings"
    },
    "format": {
      "$ref": "#/definitions/format"
    },
    "future": {
      "$ref": "#/definitions/future"
    },
    "hiera-config": {
      "$ref": "#/definitions/hiera-config"
    },
    "log": {
      "$ref": "#/definitions/log"
    },
    "modulepath": {
      "$ref": "#/definitions/modulepath"
    },
    "module-install": {
      "$ref": "#/definitions/module-install"
    },
    "modules": {
      "$ref": "#/definitions/modules"
    },
    "name": {
      "$ref": "#/definitions/name"
    },
    "plans": {
      "$ref": "#/definitions/plans"
    },
    "plugin-cache": {
      "$ref": "#/definitions/plugin-cache"
    },
    "plugin-hooks": {
      "$ref": "#/definitions/plugin-hooks"
    },
    "plugins": {
      "$ref": "#/definitions/plugins"
    },
    "policies": {
      "$ref": "#/definitions/policies"
    },
    "puppetdb": {
      "$ref": "#/definitions/puppetdb"
    },
    "puppetdb-instances": {
      "$ref": "#/definitions/puppetdb-instances"
    },
    "rerunfile": {
      "$ref": "#/definitions/rerunfile"
    },
    "save-rerun": {
      "$ref": "#/definitions/save-rerun"
    },
    "spinner": {
      "$ref": "#/definitions/spinner"
    },
    "stream": {
      "$ref": "#/definitions/stream"
    },
    "tasks": {
      "$ref": "#/definitions/tasks"
    },
    "trusted-external-command": {
      "$ref": "#/definitions/trusted-external-command"
    }
  },
  "definitions": {
    "analytics": {
      "description": "Whether to disable analytics. Setting this option to 'false' in the system-wide or user-level configuration will disable analytics for all projects, even if this option is set to 'true' at the project level.",
      "type": "boolean"
    },
    "apply-settings": {
      "description": "A map of Puppet settings to use when applying Puppet code using the `apply` plan function or the `bolt apply` command.",
      "type": "object",
      "properties": {
        "evaltrace": {
          "description": "Whether each resource should log when it is being evaluated. This allows you to interactively see exactly what is being done.",
          "type": "boolean"
        },
        "log_level": {
          "description": "The log level for logs in apply reports from Puppet. These can be seen in ApplyResults.",
          "type": "string",
          "enum": [
            "debug",
            "info",
            "notice",
            "warning",
            "err",
            "alert",
            "emerg",
            "crit"
          ]
        },
        "show_diff": {
          "description": "Whether to log and report a contextual diff.",
          "type": "boolean"
        },
        "trace": {
          "description": "Whether to print stack traces on some errors. Will print internal Ruby stack trace interleaved with Puppet function frames.",
          "type": "boolean"
        }
      }
    },
    "color": {
      "description": "Whether to use colored output when printing messages to the console.",
      "type": "boolean"
    },
    "compile-concurrency": {
      "description": "The maximum number of simultaneous manifest block compiles.",
      "type": "integer",
      "minimum": 1
    },
    "concurrency": {
      "description": "The number of threads to use when executing on remote targets.",
      "type": "integer",
      "minimum": 1
    },
    "disable-warnings": {
      "description": "An array of IDs of warnings to suppress. Warnings with a matching ID will not be logged by OpenBolt. If you are upgrading OpenBolt to a new major version, you should re-enable all warnings until you have finished upgrading.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "format": {
      "description": "The format to use when printing results.",
      "type": "string",
      "enum": [
        "human",
        "json",
        "rainbow"
      ]
    },
    "future": {
      "description": "Enable new OpenBolt features that may include breaking changes.",
      "type": "object",
      "properties": {
        "file_paths": {
          "description": "Load scripts from the `scripts/` directory of a module.",
          "type": "boolean"
        },
        "script_interpreter": {
          "description": "Use a target's [`interpreters` configuration](bolt_transports_reference.md#interpreters) when running a script.",
          "type": "boolean"
        }
      }
    },
    "hiera-config": {
      "description": "The path to the Hiera configuration file.",
      "type": "string"
    },
    "log": {
      "description": "A map of configuration for the logfile output. Under `log`, you can configure log options for `console` and add configuration for individual log files, such as `~/.puppetlabs/bolt/debug.log`. Individual log files must be valid filepaths. If the log file does not exist, then OpenBolt will create it before logging information. Set the value to `disable` to remove a log file defined at an earlier level of the config hierarchy. By default, OpenBolt logs to a bolt-debug.log file in the OpenBolt project directory.",
      "type": "object",
      "properties": {
        "console": {
          "description": "Configuration for logs output to the console.",
          "type": [
            "string",
            "object"
          ],
          "enum": [
            "disable"
          ],
          "properties": {
            "level": {
              "description": "The type of information to log.",
              "type": "string",
              "enum": [
                "trace",
                "debug",
                "error",
                "info",
                "warn",
                "fatal"
              ]
            }
          }
        }
      },
      "additionalProperties": {
        "description": "Configuration for the logfile output.",
        "type": [
          "string",
          "object"
        ],
        "enum": [
          "disable"
        ],
        "properties": {
          "append": {
            "description": "Whether to append output to an existing log file.",
            "type": "boolean"
          },
          "level": {
            "description": "The type of information to log.",
            "type": "string",
            "enum": [
              "trace",
              "debug",
              "error",
              "info",
              "warn",
              "fatal"
            ]
          }
        }
      }
    },
    "modulepath": {
      "description": "An array of directories that OpenBolt loads content such as plans and tasks from. Read more about modules in [Module structure](module_structure.md).",
      "type": [
        "array",
        "string"
      ],
      "items": {
        "type": "string"
      }
    },
    "module-install": {
      "description": "Options that configure where OpenBolt downloads modules from. This option is only used when installing modules using the `bolt module add|install` commands and `Add|Install-BoltModule` cmdlets.",
      "type": "object",
      "properties": {
        "forge": {
          "description": "A subsection for configuring connections to a Forge host.",
          "type": "object",
          "properties": {
            "authorization_token": {
              "description": "The token used to authorize requests to the Forge host. Must also specify `baseurl` when using this option.",
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/definitions/_plugin"
                }
              ]
            },
            "baseurl": {
              "description": "The URL to the Forge host.",
              "type": "string",
              "format": "uri"
            },
            "proxy": {
              "description": "The HTTP proxy to use for Forge operations.",
              "type": "string",
              "format": "uri"
            }
          }
        },
        "proxy": {
          "description": "The HTTP proxy to use for Git and Forge operations.",
          "type": "string",
          "format": "uri"
        }
      }
    },
    "modules": {
      "description": "A list of module dependencies for the project. Each dependency is a map of data specifying the module to install. To install the project's module dependencies, run the `bolt module install` command. For more information about specifying modules, see [the documentation](bolt_installing_modules.md#manually-specify-modules-in-a-bolt-project).",
      "type": "array",
      "items": {
        "type": [
          "object",
          "string"
        ],
        "oneOf": [
          {
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "description": "The name of the module.",
                "type": "String"
              },
              "resolve": {
                "description": "Whether to resolve the module's dependencies when installing modules.",
                "type": [
                  "TrueClass",
                  "FalseClass"
                ]
              },
              "version_requirement": {
                "description": "The version requirement for the module. Accepts a specific version (1.2.3), version shorthand (1.2.x), or a version range (>= 1.2.0).",
                "type": "String"
              }
            }
          },
          {
            "required": [
              "git",
              "ref"
            ],
            "properties": {
              "git": {
                "description": "The URL to the public git repository.",
                "type": "String"
              },
              "name": {
                "description": "The name of the module. Required when `resolve` is `false`.",
                "type": "String"
              },
              "ref": {
                "description": "The git reference to check out. Can be either a branch, tag, or commit SHA.",
                "type": "String"
              },
              "resolve": {
                "description": "Whether to resolve the module's dependencies when installing modules.",
                "type": [
                  "TrueClass",
                  "FalseClass"
                ]
              }
            }
          }
        ]
      }
    },
    "name": {
      "description": "The name of the OpenBolt project. When this option is configured, the project is considered an [OpenBolt project](projects.md), allowing OpenBolt to load content from the project directory as though it were a module.",
      "type": "string"
    },
    "plans": {
      "description": "A list of plan names and glob patterns to filter the project's plans by. This option is used to limit the visibility of plans for users of the project. For example, project authors might want to limit the visibility of plans that are bundled with OpenBolt or plans that should only be run as part of another plan. When this option is not configured, all plans are visible. This option does not prevent users from running plans that are not part of this list.",
      "type": "array"
    },
    "plugin-cache": {
      "description": "This feature is experimental. Enable plugin caching and set the time-to-live.",
      "type": "object",
      "required": [
        "ttl"
      ],
      "properties": {
        "ttl": {
          "description": "Time in seconds to keep the plugin cache.",
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "plugin-hooks": {
      "description": "A map of [plugin hooks](writing_plugins.md#plugin-hooks) and which plugins a hook should use. The only configurable plugin hook is `puppet_library`, which can use two possible plugins: [`openvox_bootstrap`](https://github.com/voxpupuli/puppet-openvox_bootstrap#openvox_boostrapinstall) and [`task`](supported_plugins.md#task).",
      "oneOf": [
        {
          "type": "object"
        },
        {
          "$ref": "#/definitions/_plugin"
        }
      ]
    },
    "plugins": {
      "description": "A map of plugins and their configuration data, where each key is the name of a plugin and its value is a map of configuration data. Configurable options are specified by the plugin. Read more about configuring plugins in [Using plugins](using_plugins.md#configuring-plugins).",
      "type": "object",
      "additionalProperties": {
        "oneOf": [
          {
            "type": "object"
          },
          {
            "$ref": "#/definitions/_plugin"
          }
        ]
      }
    },
    "policies": {
      "description": "A list of policy names and glob patterns to filter the project's policies by. This option is used to specify which policies are available to a project and can be applied to targets. When this option is not configured, policies are not available to the project and cannot be applied to targets.",
      "type": "array"
    },
    "puppetdb": {
      "description": "A map containing options for [configuring the OpenBolt PuppetDB client](bolt_connect_puppetdb.md).",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "cacert": {
              "description": "The path to the ca certificate for PuppetDB.",
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/definitions/_plugin"
                }
              ]
            },
            "cert": {
              "description": "The path to the client certificate file to use for authentication.",
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/definitions/_plugin"
                }
              ]
            },
            "connect_timeout": {
              "description": "How long to wait in seconds when establishing connections with PuppetDB.",
              "oneOf": [
                {
                  "type": "integer",
                  "minimum": 1
                },
                {
                  "$ref": "#/definitions/_plugin"
                }
              ]
            },
            "headers": {
              "description": "A map of HTTP headers to add to PuppetDB requests.",
              "oneOf": [
                {
                  "type": "object"
                },
                {
                  "$ref": "#/definitions/_plugin"
                }
              ]
            },
            "key": {
              "description": "The private key for the certificate.",
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/definitions/_plugin"
                }
              ]
            },
            "read_timeout": {
              "description": "How long to wait in seconds for a response from PuppetDB.",
              "oneOf": [
                {
                  "type": "integer",
                  "minimum": 1
                },
                {
                  "$ref": "#/definitions/_plugin"
                }
              ]
            },
            "server_urls": {
              "description": "An array containing the PuppetDB host to connect to. Include the protocol `https` and the port, which is usually `8081`. For example, `https://my-puppetdb-server.com:8081`.",
              "oneOf": [
                {
                  "type": "array"
                },
                {
                  "$ref": "#/definitions/_plugin"
                }
              ]
            },
            "token": {
              "description": "The path to the PE RBAC Token.",
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "#/definitions/_plugin"
                }
              ]
            }
          }
        },
        {
          "$ref": "#/definitions/_plugin"
        }
      ]
    },
    "puppetdb-instances": {
      "description": "A map of named PuppetDB instances and their configuration, where keys are the name of a PuppetDB instance and values are maps of configuration options. For more information, see [Connecting OpenBolt to OpenVoxDB](bolt_connect_puppetdb.md).",
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "cacert": {
                    "description": "The path to the ca certificate for PuppetDB.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/_plugin"
                      }
                    ]
                  },
                  "cert": {
                    "description": "The path to the client certificate file to use for authentication.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/_plugin"
                      }
                    ]
                  },
                  "connect_timeout": {
                    "description": "How long to wait in seconds when establishing connections with PuppetDB.",
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 1
                      },
                      {
                        "$ref": "#/definitions/_plugin"
                      }
                    ]
                  },
                  "headers": {
                    "description": "A map of HTTP headers to add to PuppetDB requests.",
                    "oneOf": [
                      {
                        "type": "object"
                      },
                      {
                        "$ref": "#/definitions/_plugin"
                      }
                    ]
                  },
                  "key": {
                    "description": "The private key for the certificate.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/_plugin"
                      }
                    ]
                  },
                  "read_timeout": {
                    "description": "How long to wait in seconds for a response from PuppetDB.",
                    "oneOf": [
                      {
                        "type": "integer",
                        "minimum": 1
                      },
                      {
                        "$ref": "#/definitions/_plugin"
                      }
                    ]
                  },
                  "server_urls": {
                    "description": "An array containing the PuppetDB host to connect to. Include the protocol `https` and the port, which is usually `8081`. For example, `https://my-puppetdb-server.com:8081`.",
                    "oneOf": [
                      {
                        "type": "array"
                      },
                      {
                        "$ref": "#/definitions/_plugin"
                      }
                    ]
                  },
                  "token": {
                    "description": "The path to the PE RBAC Token.",
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "$ref": "#/definitions/_plugin"
                      }
                    ]
                  }
                }
              },
              {
                "$ref": "#/definitions/_plugin"
              }
            ]
          }
        },
        {
          "$ref": "#/definitions/_plugin"
        }
      ]
    },
    "rerunfile": {
      "description": "The path to the project's rerun file. The rerun file is used to store information about targets from the most recent run. Expands relative to the project directory.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "#/definitions/_plugin"
        }
      ]
    },
    "save-rerun": {
      "description": "Whether to update `.rerun.json` in the OpenBolt project directory. If your target names include passwords, set this value to `false` to avoid writing passwords to disk.",
      "type": "boolean"
    },
    "spinner": {
      "description": "Whether to print a spinner to the console for long-running OpenBolt operations.",
      "type": "boolean"
    },
    "stream": {
      "description": "Whether to stream output from scripts and commands to the console. **This option is experimental**.",
      "type": "boolean"
    },
    "tasks": {
      "description": "A list of task names and glob patterns to filter the project's tasks by. This option is used to limit the visibility of tasks for users of the project. For example, project authors might want to limit the visibility of tasks that are bundled with OpenBolt or plans that should only be run as part of a larger workflow. When this option is not configured, all tasks are visible. This option does not prevent users from running tasks that are not part of this list.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "trusted-external-command": {
      "description": "The path to an executable on the OpenBolt controller that can produce external trusted facts. **External trusted facts are experimental in both Puppet and OpenBolt and this API might change or be removed.**",
      "type": "string"
    },
    "_plugin": {
      "description": "A plugin reference.",
      "type": "object",
      "required": [
        "_plugin"
      ],
      "properties": {
        "_plugin": {
          "description": "The name of the plugin.",
          "type": "string"
        },
        "_cache": {
          "description": "This feature is experimental. Enable plugin caching and set a time-to-live.",
          "type": "object",
          "required": [
            "ttl"
          ],
          "properties": {
            "ttl": {
              "description": "Time in seconds to keep the plugin cache.",
              "type": "integer",
              "minimum": 0
            }
          }
        }
      }
    }
  }
}