Documentation
¶
Overview ¶
Package ansible provides functionality to run Ansible playbooks with configurable options. It supports building command line parameters, handling temporary files, and context-based execution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // General options Become bool BecomeMethod, BecomeUser string User string PrivateKey, PrivateKeyFile string AskBecomePass, AskPass bool Check, Diff, FlushCache, ForceHandlers bool SyntaxCheck bool ListHosts, ListTags, ListTasks bool Step bool Connection string Timeout, Forks int // SSH options SSHCommonArgs, SSHExtraArgs string SCPExtraArgs, SFTPExtraArgs string SSHTransferMethod string // Playbook options Inventories []string Playbooks []string Limit string ExtraVars []string StartAtTask, Tags, SkipTags string ModulePath []string ModuleName string Verbose int NoColor bool // Vault options VaultID, VaultPassword, VaultPasswordFile string AskVaultPass bool // Facts options FactPath string InvalidateCache bool FactCaching string FactCachingTimeout int // Galaxy options GalaxyFile string GalaxyAPIKey, GalaxyAPIServerURL string GalaxyCollectionsPath string GalaxyDisableGPGVerify bool GalaxyForce, GalaxyForceWithDeps bool GalaxyNoDeps, GalaxyIgnoreCerts bool GalaxyIgnoreSignatureStatusCodes []string GalaxyKeyring string GalaxyOffline, GalaxyPre bool GalaxyRequiredValidSignatureCount int GalaxyRequirementsFile string GalaxySignature string GalaxyTimeout int GalaxyUpgrade bool // Other options CallbackWhitelist string PollInterval int GatherSubset string GatherTimeout int StrategyPlugin string MaxFailPercentage int AnyErrorsFatal bool Requirements string ModuleDefaults map[string]string ConfigFile string MetadataExport string // Optional: directory for temporary files TempDir string }
Config contains configuration options for running Ansible playbooks.
type Playbook ¶ added in v1.0.0
type Playbook struct { Config Config Debug bool // Enables additional logging output // contains filtered or unexported fields }
Playbook represents an execution of an Ansible playbook run.
func NewPlaybook ¶ added in v1.0.0
func NewPlaybook() *Playbook
NewPlaybook returns a new instance of Playbook with default values.
Click to show internal directories.
Click to hide internal directories.