puppetwrapper

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 8 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PuppetWrapper

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

PuppetWrapper provides ways to interact with Puppet and Facter

func New

func New() *PuppetWrapper

New creates a new wrapper

func (*PuppetWrapper) AIOCmd

func (p *PuppetWrapper) 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 (*PuppetWrapper) FacterCmd

func (p *PuppetWrapper) FacterCmd() string

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

func (*PuppetWrapper) FacterDomain

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

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

func (*PuppetWrapper) FacterFQDN

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

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

func (*PuppetWrapper) FacterStringFact

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

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

func (*PuppetWrapper) Setting

func (p *PuppetWrapper) 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
⌂ 换网址