nanocms_callers

package
v0.0.0-...-7574d5e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 6, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BINARY = iota + 1
	SCRIPT
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnsibleModule

type AnsibleModule struct {
	wzlib_logger.WzLogger
	// contains filtered or unexported fields
}

func NewAnsibleLocalModuleCaller

func NewAnsibleLocalModuleCaller(modulename string) *AnsibleModule

func (*AnsibleModule) AddArg

func (am *AnsibleModule) AddArg(key string, value interface{}) *AnsibleModule

AddArg adds an argument with key/value

func (*AnsibleModule) Call

func (am *AnsibleModule) Call() (map[string]interface{}, error)

Call Ansible module

func (*AnsibleModule) SetArgs

func (am *AnsibleModule) SetArgs(kwargs map[string]interface{}) *AnsibleModule

SetArgs sets the key/value arguments

func (*AnsibleModule) SetChroot

func (am *AnsibleModule) SetChroot(root string) *AnsibleModule

SetChroot sets another root where an Ansible module should be ran. Chrooted Ansible module is called via PCE (Python Chroot Executor) wrapper, which is embedded inside the binary of this wzd via wzcmslib. See wzcmslib/nanorunners/wrappers/pce.py for more details.

Default "/". In this case PCE is not used.

func (*AnsibleModule) SetPyInterpreter

func (am *AnsibleModule) SetPyInterpreter(pyexe string) *AnsibleModule

SetPyInterpreter path, such as "/usr/bin/python3" or "/usr/bin/env python" etc

func (*AnsibleModule) SetStateRoots

func (am *AnsibleModule) SetStateRoots(roots ...string) *AnsibleModule

SetStateRoots where module is going to be found. NOTE: if the same module is located in a various roots, then first win

type WzPyPce

type WzPyPce struct {
	// contains filtered or unexported fields
}

WzPyPce data container

func NewWzPyPce

func NewWzPyPce() *WzPyPce

NewWzPyPce creates a new instance of WzPyPce

func (*WzPyPce) Get

func (cnt *WzPyPce) Get(name string) []byte

Get file content

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL