ansible

package
v0.0.0-...-73e0568 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Failure types
	NotInstalled = "ANSIBLE_NOT_INSTALLED"
	UndefError   = "UNDEFINED_ERROR"
)

Variables

This section is empty.

Functions

func MissingAttributeError

func MissingAttributeError(attribute string, metadata map[string]interface{}) error

Types

type Manager

type Manager struct {
	MappingRepository mapping.MappingRepository
	// contains filtered or unexported fields
}

Manager handle ansible playbook execution

func NewAnsibleManager

func NewAnsibleManager(
	configManager *cfg.Manager,
	dispatcherClient pb.DispatcherClient,
	configDir string,
	deviceId string,
	reg registration.RegistrationWrapper) (*Manager, error)

func (*Manager) AddToEventQueue

func (a *Manager) AddToEventQueue(event *models.EventInfo)

func (*Manager) Deregister

func (a *Manager) Deregister() error

func (*Manager) ExecutePendingPlaybooks

func (a *Manager) ExecutePendingPlaybooks() error

func (*Manager) GetPlaybookCommand

func (a *Manager) GetPlaybookCommand() playbook.AnsiblePlaybookCmd

func (*Manager) HandlePlaybook

func (a *Manager) HandlePlaybook(messageId string, metadataMap map[string]interface{}, peName string, playbookString string, playbookCmd playbook.AnsiblePlaybookCmd, timeout time.Duration) error

func (*Manager) HasStarted

func (a *Manager) HasStarted() bool

func (*Manager) Init

Init no-op due to we need to an update from the source of truth in this case(API)

func (*Manager) List

func (a *Manager) List() []api.PlaybookExecutionInfo

func (*Manager) PopEvents

func (a *Manager) PopEvents() []*models.EventInfo

PopEvents return copy of all the events stored in eventQueue

func (*Manager) Start

func (a *Manager) Start()

func (*Manager) String

func (a *Manager) String() string

func (*Manager) Update

func (a *Manager) Update(config models.DeviceConfigurationMessage) error

func (*Manager) WaitPlaybookCompletion

func (a *Manager) WaitPlaybookCompletion()

type RequiredFields

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

type YGGDResponse

type YGGDResponse struct {
	Metadata   map[string]string
	Body       json.RawMessage
	StatusCode int
}

func NewYGGDResponse

func NewYGGDResponse(response []byte) (*YGGDResponse, error)

Directories

Path Synopsis
Package mapping is a generated GoMock package.
Package mapping is a generated GoMock package.
model

Jump to

Keyboard shortcuts

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