Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ValidExecutionModes = []string{"parallel", "sequential"}
ValidExecutionModes contains the list of supported execution modes
var ValidExecutors = []string{"local", "temporal"}
var ValidOutputFormats = []string{"json", "yaml", "plain"}
ValidOutputFormats contains the list of supported output formats
Functions ¶
This section is empty.
Types ¶
type APIConfig ¶ added in v1.0.0
type APIConfig struct {
// Base URL for the Spage API HTTP server (used for bundles)
HTTPBase string `mapstructure:"http_base"`
}
APIConfig holds API-related configuration
type AnsibleVaultConfig ¶ added in v1.0.0
type AnsibleVaultConfig struct {
// Vault password file path
PasswordFile string `mapstructure:"password_file"`
// Vault identity list (colon-delimited paths to vault identity files)
Identity string `mapstructure:"identity"`
// Vault password prompt
PasswordPrompt string `mapstructure:"password_prompt"`
// Ask for vault password
AskVaultPass bool `mapstructure:"ask_vault_pass"`
// Ask for vault password when doing a diff
AskVaultPassOnDiff bool `mapstructure:"ask_vault_pass_on_diff"`
// Vault timeout in seconds
Timeout int `mapstructure:"timeout"`
// Vault retry count
RetryCount int `mapstructure:"retry_count"`
// Vault retry delay in seconds
RetryDelay int `mapstructure:"retry_delay"`
}
AnsibleVaultConfig holds Ansible vault configuration
type Config ¶
type Config struct {
Logging LoggingConfig `mapstructure:"logging"`
ExecutionMode string `mapstructure:"execution_mode"`
Executor string `mapstructure:"executor"` // "local" or "temporal"
Temporal TemporalConfig `mapstructure:"temporal"`
API APIConfig `mapstructure:"api"`
Daemon DaemonConfig `mapstructure:"daemon"`
Revert bool `mapstructure:"revert"`
Tags TagsConfig `mapstructure:"tags"`
Facts map[string]interface{} `mapstructure:"facts"`
HostKeyChecking bool `mapstructure:"host_key_checking"`
RolesPath string `mapstructure:"roles_path"` // Colon-delimited paths to search for roles
Inventory string `mapstructure:"inventory"` // Colon-delimited paths to search for inventory files
// Inventory plugins configuration (Ansible-like behaviour)
// Colon-delimited paths to search for inventory plugins (e.g. "./plugins/inventory:/usr/share/ansible/plugins/inventory")
InventoryPlugins string `mapstructure:"inventory_plugins"`
// List of enabled plugin names/patterns (e.g. ["host_list"])
EnablePlugins []string `mapstructure:"enable_plugins"`
PrivilegeEscalation PrivilegeEscalationConfig `mapstructure:"privilege_escalation"`
SSH SSHConfig `mapstructure:"ssh"`
// Connection type override (e.g., "local" to run tasks locally)
Connection string `mapstructure:"connection"`
// API bearer token for CLI auth against spage-api
ApiToken string `mapstructure:"api_token"`
// Host limit pattern for execution
Limit string `mapstructure:"limit"`
// Ansible vault password for decrypting encrypted variables in inventory
AnsibleVaultPassword string `mapstructure:"ansible_vault_password"`
// Ansible vault configuration
AnsibleVault AnsibleVaultConfig `mapstructure:"ansible_vault"`
// contains filtered or unexported fields
}
Config holds all configuration settings
func (*Config) GetDaemonReporting ¶ added in v1.0.0
func (c *Config) GetDaemonReporting() interface{}
GetDaemonReporting gets the daemon reporting instance
func (*Config) ResolveVaultPassword ¶ added in v1.0.0
ResolveVaultPassword resolves the vault password from various sources Priority: 1) Direct password, 2) Password file, 3) Identity files, 4) Interactive prompt
func (*Config) SetDaemonReporting ¶ added in v1.0.0
func (c *Config) SetDaemonReporting(reporting interface{})
SetDaemonReporting sets the daemon reporting instance
type DaemonConfig ¶ added in v1.0.0
type DaemonConfig struct {
Enabled bool `mapstructure:"enabled"`
Endpoint string `mapstructure:"endpoint"`
PlayID string `mapstructure:"play_id"`
Timeout time.Duration `mapstructure:"timeout"`
}
DaemonConfig holds daemon communication configuration
type LoggingConfig ¶
type LoggingConfig struct {
Level string `mapstructure:"level"`
File string `mapstructure:"file"`
Format string `mapstructure:"format"`
Timestamps bool `mapstructure:"timestamps"`
}
LoggingConfig holds logging-related configuration
type PrivilegeEscalationConfig ¶ added in v1.0.0
type PrivilegeEscalationConfig struct {
UseInteractive bool `mapstructure:"use_interactive"` // Use -Su (interactive) vs -u (non-interactive)
BecomeFlags string `mapstructure:"become_flags"` // Additional flags to pass to become
}
PrivilegeEscalationConfig holds privilege escalation configuration
type SSHAuthConfig ¶ added in v1.0.0
type SSHAuthConfig struct {
Methods []string `mapstructure:"methods"` // Ordered list of auth methods to try: "publickey", "password", "keyboard-interactive", "gssapi-with-mic", "none"
PublicKeys []string `mapstructure:"public_keys"` // Paths to specific public key files (if empty, uses SSH agent + default keys)
PasswordAuth bool `mapstructure:"password"` // Enable password authentication
KeyboardAuth bool `mapstructure:"keyboard"` // Enable keyboard-interactive authentication
NoneAuth bool `mapstructure:"none"` // Enable "none" authentication method
PreferredAuth string `mapstructure:"preferred"` // Preferred authentication method
IdentitiesOnly bool `mapstructure:"identities_only"` // Only use explicitly configured identities
PasswordPrompt string `mapstructure:"password_prompt"` // Custom password prompt
AgentForwarding bool `mapstructure:"agent_forwarding"` // Enable SSH agent forwarding
}
SSHAuthConfig holds SSH authentication method configuration
type SSHConfig ¶ added in v1.0.0
type SSHConfig struct {
JumpHost string `mapstructure:"jump_host"` // SSH jump host (ProxyJump equivalent), use "none" to disable
JumpUser string `mapstructure:"jump_user"` // Username for jump host
JumpPort int `mapstructure:"jump_port"` // Port for jump host (default 22)
// Authentication configuration
Auth SSHAuthConfig `mapstructure:"auth"`
// Advanced options (ssh_config style)
Options map[string]string `mapstructure:"options"`
}
SSHConfig holds SSH-related configuration
type TagsConfig ¶ added in v1.0.0
type TagsConfig struct {
Tags []string `mapstructure:"tags"` // Only run tasks with these tags
SkipTags []string `mapstructure:"skip_tags"` // Skip tasks with these tags
}
TagsConfig holds tag filtering configuration