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) GetKernelPackageNames(version string) (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) GetKernelPackageNames(version string) (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 GrubConfManager
- type GrubConfigManager
- type GrubbyManager
- type OS
- type OperatingSystemList
- type TdnfPackageManager
- func (p TdnfPackageManager) AddRepo(url string, channel string, versionCodeName string, name string, gpgKey string, ...) types.Commands
- func (p TdnfPackageManager) CleanupCaches() types.Commands
- func (p TdnfPackageManager) GetInstalledVersion(pkg string) string
- func (p TdnfPackageManager) GetKernelPackageNames(version string) (string, string)
- func (p TdnfPackageManager) Install(pkg ...string) types.Commands
- func (p TdnfPackageManager) Mark(pkg ...string) types.Commands
- func (p TdnfPackageManager) Uninstall(pkg ...string) types.Commands
- func (p TdnfPackageManager) Update() types.Commands
- 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) GetKernelPackageNames(version string) (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, Photon, }
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 Kernel types.AllPhases = kernel{}
View Source
var OperatingSystems = map[string]OS{ "ubuntu": Ubuntu, "debian": Debian, "redhat": Redhat, "amazonLinux": AmazonLinux, "centos": Centos, "fedora": Fedora, "photon": Photon, }
View Source
var Packages types.AllPhases = packages{}
View Source
var Photon = photon{}
View Source
var Services types.Phase = services{}
View Source
var SupportedOperatingSystems = OperatingSystemList{ Debian, Redhat, Ubuntu, AmazonLinux, RedhatEnterprise, Centos, Fedora, Photon, }
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) GetKernelPackageNames ¶ added in v0.10.0
func (p AptPackageManager) GetKernelPackageNames(version string) (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) GetKernelPackageNames ¶ added in v0.10.0
func (p DnfPackageManager) GetKernelPackageNames(version string) (string, string)
func (DnfPackageManager) Uninstall ¶
func (p DnfPackageManager) Uninstall(pkg ...string) types.Commands
func (DnfPackageManager) Update ¶
func (p DnfPackageManager) Update() types.Commands
type GrubConfManager ¶ added in v0.10.0
type GrubConfManager struct{}
Generally used by apt systems
func (GrubConfManager) ReadDefaultKernel ¶ added in v0.10.0
func (p GrubConfManager) ReadDefaultKernel() (string, bool)
func (GrubConfManager) UpdateDefaultKernel ¶ added in v0.10.0
func (p GrubConfManager) UpdateDefaultKernel(version string) types.Commands
type GrubConfigManager ¶ added in v0.10.0
type GrubConfigManager interface { ReadDefaultKernel() (string, bool) UpdateDefaultKernel(version string) types.Commands }
Interface and corresponding structs for reading/writing grub config with grub.conf or grubby
type GrubbyManager ¶ added in v0.10.0
type GrubbyManager struct{}
Generally used by yum systems
func (GrubbyManager) ReadDefaultKernel ¶ added in v0.10.0
func (p GrubbyManager) ReadDefaultKernel() (string, bool)
func (GrubbyManager) UpdateDefaultKernel ¶ added in v0.10.0
func (p GrubbyManager) UpdateDefaultKernel(version string) 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 GetName() string //DetectAtRuntime will detect if it is compatible with the current running OS DetectAtRuntime() bool // Returns the names of the kernel and kernel header packages GetKernelPackageNames(version string) (string, string) // Calls the version specific grub config logic UpdateDefaultKernel(version string) types.Commands // Check whether defaul kernel matches specific version ReadDefaultKernel() string }
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 TdnfPackageManager ¶ added in v0.10.0
type TdnfPackageManager struct{}
func (TdnfPackageManager) CleanupCaches ¶ added in v0.10.0
func (p TdnfPackageManager) CleanupCaches() types.Commands
func (TdnfPackageManager) GetInstalledVersion ¶ added in v0.10.0
func (p TdnfPackageManager) GetInstalledVersion(pkg string) string
func (TdnfPackageManager) GetKernelPackageNames ¶ added in v0.10.0
func (p TdnfPackageManager) GetKernelPackageNames(version string) (string, string)
func (TdnfPackageManager) Install ¶ added in v0.10.0
func (p TdnfPackageManager) Install(pkg ...string) types.Commands
func (TdnfPackageManager) Mark ¶ added in v0.10.0
func (p TdnfPackageManager) Mark(pkg ...string) types.Commands
func (TdnfPackageManager) Uninstall ¶ added in v0.10.0
func (p TdnfPackageManager) Uninstall(pkg ...string) types.Commands
func (TdnfPackageManager) Update ¶ added in v0.10.0
func (p TdnfPackageManager) Update() types.Commands
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) GetKernelPackageNames ¶ added in v0.10.0
func (p YumPackageManager) GetKernelPackageNames(version string) (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.