feat: Adds generate-config as json file.
This commit is contained in:
@@ -3,7 +3,7 @@ import Foundation
|
||||
import ShellClient
|
||||
|
||||
/// Represents the configuration.
|
||||
public struct Configuration: Decodable {
|
||||
public struct Configuration: Codable {
|
||||
|
||||
public let playbookDir: String?
|
||||
public let inventoryPath: String?
|
||||
@@ -41,8 +41,21 @@ public struct Configuration: Decodable {
|
||||
return try decoder.decode(Configuration.self, from: data)
|
||||
}
|
||||
|
||||
static var mock: Self {
|
||||
.init(
|
||||
playbookDir: "/path/to/playbook",
|
||||
inventoryPath: "/path/to/inventory.ini",
|
||||
templateRepo: "https://git.example.com/consult-template.git",
|
||||
templateRepoVersion: "main",
|
||||
templateDir: "/path/to/local/template",
|
||||
defaultPlaybookArgs: "--vault-id=myId@$SCRIPTS/vault-gopass-client"
|
||||
)
|
||||
}
|
||||
|
||||
static var fileTemplate: String {
|
||||
"""
|
||||
# vi: ft=sh
|
||||
|
||||
# Example configuration, uncomment the lines and set the values appropriate for your
|
||||
# usage.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user