feat: Adds generate-config command.

This commit is contained in:
2024-11-29 20:32:32 -05:00
parent 84b002c997
commit 505f7d8013
8 changed files with 143 additions and 30 deletions

View File

@@ -40,4 +40,27 @@ public struct Configuration: Decodable {
let data = try encoder.encode(env)
return try decoder.decode(Configuration.self, from: data)
}
static var fileTemplate: String {
"""
# Example configuration, uncomment the lines and set the values appropriate for your
# usage.
# Set this to the location of the ansible-hpa-playbook on your local machine.
#HPA_PLAYBOOK_DIR="/path/to/ansible-hpa-playbook"
# Set this to the location of a template repository, which is used to create new assessment projects.
#HPA_TEMPLATE_REPO="https://git.example.com/your/template.git"
# Specify a branch, version, or sha of the template repository.
#HPA_TEMPLATE_VERSION="main" # branch, version, or sha
# Set this to a location of a template directory to use to create new projects.
#HPA_TEMPLATE_DIR="/path/to/local/template"
# Extra arguments that get passed directly to the ansible-playbook command.
#HPA_DEFAULT_PLAYBOOK_ARGS="--vault-id=consults@$SCRIPTS/vault-gopass-client"
"""
}
}