puppet

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wrapper

type Wrapper struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Wrapper provides ways to interact with Puppet and Facter

func New

func New() *Wrapper

New creates a new wrapper

func (*Wrapper) AIOCmd

func (p *Wrapper) AIOCmd(command string, def string) string

AIOCmd looks up a command in the AIO paths, if it's not there it will try PATH and finally return a default if not in PATH

func (*Wrapper) FacterCmd

func (p *Wrapper) FacterCmd() string

FacterCmd finds the path to facter using first AIO path then a `which` like command

func (*Wrapper) FacterDomain

func (p *Wrapper) FacterDomain() (string, error)

FacterDomain determines the machines domain by querying facter. Returns "" when unknown

func (*Wrapper) FacterFQDN

func (p *Wrapper) FacterFQDN() (string, error)

FacterFQDN determines the machines fqdn by querying facter. Returns "" when unknown

func (*Wrapper) FacterStringFact

func (p *Wrapper) FacterStringFact(fact string) (string, error)

FacterStringFact looks up a facter fact, returns "" when unknown

func (*Wrapper) Setting

func (p *Wrapper) Setting(setting string) (string, error)

Setting retrieves a config setting by shelling out to puppet apply --configprint

Jump to

Keyboard shortcuts

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