phases

package
v0.4.14 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Ubuntu = ubuntu{}
	Debian = debian{}
)
View Source
var (
	Redhat           = redhat{}
	Centos           = centos{}
	Fedora           = fedora{}
	RedhatEnterprise = rhel{}
	AmazonLinux      = amazonLinux{}
)
View Source
var BaseOperatingSystems = OperatingSystemList{
	Debian,
	Redhat,
	Fedora,
}

BaseOperatingSystems is the list of base distributions that are supported, which is currently only debian and redhat

View Source
var CommandsPhase AllPhases = command{}
View Source
var Containers Phase = containers{}
View Source
var Context Phase = context{}
View Source
var Environment Phase = environment{}
View Source
var Files Phase = filesPhase{}
View Source
var Packages AllPhases = packages{}
View Source
var Services Phase = services{}

SupportedOperatingSystems is a list of all supported OS's, used primarily for detecting runtime flags

View Source
var Sysctl Phase = sysctl{}

Functions

func ConvertSyntaxFromJinjaToPongo

func ConvertSyntaxFromJinjaToPongo(template string) string

func Lookup

func Lookup(path string) string

func VerifyService

func VerifyService(name string, results *VerifyResults) bool

VerifyService checks that the service is enabled and running

Types

type AptPackageManager

type AptPackageManager struct {
}

func (AptPackageManager) AddRepo

func (p AptPackageManager) AddRepo(uri string, channel string, versionCodeName string, name string, gpgKey string) Commands

func (AptPackageManager) CleanupCaches

func (p AptPackageManager) CleanupCaches() Commands

func (AptPackageManager) GetInstalledVersion

func (p AptPackageManager) GetInstalledVersion(pkg string) string

func (AptPackageManager) Install

func (p AptPackageManager) Install(pkg ...string) Commands

func (AptPackageManager) ListInstalled

func (p AptPackageManager) ListInstalled() string

func (AptPackageManager) Mark

func (p AptPackageManager) Mark(pkg ...string) Commands

func (AptPackageManager) Uninstall

func (p AptPackageManager) Uninstall(pkg ...string) Commands

func (AptPackageManager) Update

func (p AptPackageManager) Update() Commands

type DnfPackageManager

type DnfPackageManager struct{}

func (DnfPackageManager) AddRepo

func (p DnfPackageManager) AddRepo(url string, channel string, versionCodeName string, name string, gpgKey string) Commands

func (DnfPackageManager) CleanupCaches

func (p DnfPackageManager) CleanupCaches() Commands

func (DnfPackageManager) GetInstalledVersion

func (p DnfPackageManager) GetInstalledVersion(pkg string) string

func (DnfPackageManager) Install

func (p DnfPackageManager) Install(pkg ...string) Commands

func (DnfPackageManager) Mark

func (p DnfPackageManager) Mark(pkg ...string) Commands

func (DnfPackageManager) Uninstall

func (p DnfPackageManager) Uninstall(pkg ...string) Commands

func (DnfPackageManager) Update

func (p DnfPackageManager) Update() Commands

type OS

type OS interface {

	// GetVersionCodeName returns the distributions version codename e.g. bionic, xenial, squeeze
	GetVersionCodeName() string

	//GetPackageManager returns the packagemanager used by the OS
	GetPackageManager() PackageManager

	//GetTags returns all the tags to which this OS applies
	GetTags() []Flag

	//DetectAtRuntime will detect if it is compatible with the current running OS
	DetectAtRuntime() bool
}

OS provides an abstraction over different operating systems

func GetOSForTag

func GetOSForTag(tags ...Flag) (OS, error)

type OperatingSystemList

type OperatingSystemList []OS

func (OperatingSystemList) Detect

func (l OperatingSystemList) Detect() []OS

Detect returns a list of all compatible operating systems at runtime

type YumPackageManager

type YumPackageManager struct{}

func (YumPackageManager) AddRepo

func (p YumPackageManager) AddRepo(url string, channel string, versionCodeName string, name string, gpgKey string) Commands

func (YumPackageManager) CleanupCaches

func (p YumPackageManager) CleanupCaches() Commands

func (YumPackageManager) GetInstalledVersion

func (p YumPackageManager) GetInstalledVersion(pkg string) string

func (YumPackageManager) Install

func (p YumPackageManager) Install(pkg ...string) Commands

func (YumPackageManager) Mark

func (p YumPackageManager) Mark(pkg ...string) Commands

func (YumPackageManager) Uninstall

func (p YumPackageManager) Uninstall(pkg ...string) Commands

func (YumPackageManager) Update

func (p YumPackageManager) Update() Commands

Jump to

Keyboard shortcuts

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