Documentation
¶
Overview ¶
Package ansible is a generic wrapper around ansible
Index ¶
Constants ¶
View Source
const (
AnsibleCallbackWhiteListVerbose = "profile_tasks"
)
Variables ¶
View Source
var ( PythonPath = os.Getenv("PYTHON_PATH") AnsiblePath = os.Getenv("ANSIBLE_PATH") )
View Source
var ErrPlaybookNotStarted = errors.New(
"playbook not started",
)
Functions ¶
Types ¶
type LoggerConfig ¶
type LoggerConfig struct { // Out is the stdout writer for the Ansible process Out io.Writer // ErrOut is the stderr writer for the Ansible process ErrOut io.Writer // Output also gets logged to a file Log io.Writer Verbosity int }
func NewLoggerConfig ¶
func NewLoggerConfig(writer io.Writer, verbosity int) *LoggerConfig
type OutputFormat ¶
type OutputFormat string
OutputFormat is used for controlling the STDOUT format of the Ansible runner.
type PlaybookOptions ¶
type Runner ¶
type Runner interface { // TODO files should be some io interface to falicitate testing // StartPlaybook runs the playbook asynchronously with the given inventory and extra vars. StartPlaybook(playbookFileName, inventory string, playbookOptions *PlaybookOptions) error // WaitPlaybook blocks until the execution of the playbook is complete. If an error occurred, // it is returned. Otherwise, returns nil to signal the completion of the playbook. WaitPlaybook() error }
Runner for running Ansible playbooks.
func NewRunner ¶
func NewRunner(runDir string, loggerConfig *LoggerConfig) Runner
NewRunner returns a new runner for running Ansible playbooks.
Click to show internal directories.
Click to hide internal directories.