Documentation ¶
Index ¶
- Variables
- func Lookup(path string) string
- func VerifyService(name string, results *types.VerifyResults) bool
- type AptPackageManager
- func (p AptPackageManager) AddRepo(uri string, channel string, versionCodeName string, name string, gpgKey string, ...) types.Commands
- func (p AptPackageManager) CleanupCaches() types.Commands
- func (p AptPackageManager) GetInstalledVersion(pkg string) string
- func (p AptPackageManager) Install(pkg ...string) types.Commands
- func (p AptPackageManager) ListInstalled() string
- func (p AptPackageManager) Mark(pkg ...string) types.Commands
- func (p AptPackageManager) Uninstall(pkg ...string) types.Commands
- func (p AptPackageManager) Update() types.Commands
- type DnfPackageManager
- func (p DnfPackageManager) AddRepo(url string, channel string, versionCodeName string, name string, gpgKey string, ...) types.Commands
- func (p DnfPackageManager) CleanupCaches() types.Commands
- func (p DnfPackageManager) GetInstalledVersion(pkg string) string
- func (p DnfPackageManager) Install(pkg ...string) types.Commands
- func (p DnfPackageManager) Mark(pkg ...string) types.Commands
- func (p DnfPackageManager) Uninstall(pkg ...string) types.Commands
- func (p DnfPackageManager) Update() types.Commands
- type OS
- type OperatingSystemList
- type YumPackageManager
- func (p YumPackageManager) AddRepo(url string, channel string, versionCodeName string, name string, gpgKey string, ...) types.Commands
- func (p YumPackageManager) CleanupCaches() types.Commands
- func (p YumPackageManager) GetInstalledVersion(pkg string) string
- func (p YumPackageManager) Install(pkg ...string) types.Commands
- func (p YumPackageManager) Mark(pkg ...string) types.Commands
- func (p YumPackageManager) Uninstall(pkg ...string) types.Commands
- func (p YumPackageManager) Update() types.Commands
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 AnsiblePhase types.Phase = ansible{}
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 types.AllPhases = command{}
View Source
var Containers types.Phase = containers{}
View Source
var Environment types.Phase = environment{}
View Source
var Files types.Phase = filesPhase{}
View Source
var OperatingSystems = map[string]OS{ "ubuntu": Ubuntu, "debian": Debian, "redhat": Redhat, "amazonLinux": AmazonLinux, "centos": Centos, "fedora": Fedora, }
View Source
var Packages types.AllPhases = packages{}
View Source
var Services types.Phase = services{}
View Source
var SupportedOperatingSystems = OperatingSystemList{ Debian, Redhat, Ubuntu, AmazonLinux, RedhatEnterprise, Centos, Fedora, }
SupportedOperatingSystems is a list of all supported OS's, used primarily for detecting runtime flags
View Source
var Sysctl types.Phase = sysctl{}
View Source
var TrustedCA types.Phase = trustedCA{}
View Source
var Users types.Phase = users{}
Functions ¶
func VerifyService ¶
func VerifyService(name string, results *types.VerifyResults) bool
VerifyService checks that the service is enabled and running
Types ¶
type AptPackageManager ¶
type AptPackageManager struct { }
func (AptPackageManager) CleanupCaches ¶
func (p AptPackageManager) CleanupCaches() types.Commands
func (AptPackageManager) GetInstalledVersion ¶
func (p AptPackageManager) GetInstalledVersion(pkg string) string
func (AptPackageManager) ListInstalled ¶
func (p AptPackageManager) ListInstalled() string
func (AptPackageManager) Uninstall ¶
func (p AptPackageManager) Uninstall(pkg ...string) types.Commands
func (AptPackageManager) Update ¶
func (p AptPackageManager) Update() types.Commands
type DnfPackageManager ¶
type DnfPackageManager struct{}
func (DnfPackageManager) CleanupCaches ¶
func (p DnfPackageManager) CleanupCaches() types.Commands
func (DnfPackageManager) GetInstalledVersion ¶
func (p DnfPackageManager) GetInstalledVersion(pkg string) string
func (DnfPackageManager) Uninstall ¶
func (p DnfPackageManager) Uninstall(pkg ...string) types.Commands
func (DnfPackageManager) Update ¶
func (p DnfPackageManager) Update() types.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() types.PackageManager //GetTags returns all the tags to which this OS applies GetTags() []types.Flag //DetectAtRuntime will detect if it is compatible with the current running OS DetectAtRuntime() bool }
OS provides an abstraction over different operating systems
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) CleanupCaches ¶
func (p YumPackageManager) CleanupCaches() types.Commands
func (YumPackageManager) GetInstalledVersion ¶
func (p YumPackageManager) GetInstalledVersion(pkg string) string
func (YumPackageManager) Uninstall ¶
func (p YumPackageManager) Uninstall(pkg ...string) types.Commands
func (YumPackageManager) Update ¶
func (p YumPackageManager) Update() types.Commands
Click to show internal directories.
Click to hide internal directories.