linux

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package linux is implementing the interface github.com/colonel-byte/cargoship/types/os.Configurer for Linux based hosts

Index

Constants

View Source
const (
	// OSKindELAlma id
	OSKindELAlma = "almalinux"
	// OSKindELAmazon id
	OSKindELAmazon = "amzn"
	// OSKindELCent id
	OSKindELCent = "centos"
	// OSKindELFedora id
	OSKindELFedora = "fedora"
	// OSKindELOracle id
	OSKindELOracle = "ol"
	// OSKindELRedHat id
	OSKindELRedHat = "rhel"
	// OSKindELRocky id
	OSKindELRocky = "rocky"
)
View Source
const (
	// OSKindOpenSUSE id
	OSKindOpenSUSE = "opensuse"
	// OSKindOpenSUSEMicro id
	OSKindOpenSUSEMicro = "opensuse-microos"
)
View Source
const (
	// OSKindAlpine id
	OSKindAlpine = "alpine"
)
View Source
const (
	// OSKindArch id
	OSKindArch = "arch"
)
View Source
const (
	// OSKindCoreOS id
	OSKindCoreOS = "CoreOS"
)
View Source
const (
	// OSKindDebian id
	OSKindDebian = "debian"
)
View Source
const (
	// OSKindFlatcar id
	OSKindFlatcar = "flatcar"
)
View Source
const (
	// OSKindSLES id
	OSKindSLES = "sles"
)
View Source
const (
	// OSKindSlackware id
	OSKindSlackware = "slackware"
)
View Source
const (
	// OSKindUbuntu id
	OSKindUbuntu = "ubuntu"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alpine

type Alpine struct {
	BaseLinux
}

Alpine provides OS support for Alpine Linux

func (*Alpine) ApplySysctl

func (l *Alpine) ApplySysctl(h configurer.Host, path string) error

ApplySysctl loads the settings in the file at path. Alpine's sysctl is the busybox applet, which has no --system: it takes one or more files with -p and knows nothing about the /etc/sysctl.d load order the base implementation relies on. Only the file cargoship wrote is applied, so a setting another file overrides keeps whatever value that file gave it until the host next boots and reads them all in order.

func (*Alpine) InstallPackage

func (l *Alpine) InstallPackage(h configurer.Host, pkg ...string) error

InstallPackage installs packages via apk

func (*Alpine) Prepare

func (l *Alpine) Prepare(h configurer.Host) error

Prepare will install required packages

func (*Alpine) UninstallPackage

func (l *Alpine) UninstallPackage(h configurer.Host, pkg ...string) error

UninstallPackage installs packages via apk

type Archlinux

type Archlinux struct {
	configurer.Linux
}

Archlinux provides OS support for Archlinux systems

func (Archlinux) InstallPackage

func (c Archlinux) InstallPackage(h configurer.Host, s ...string) error

InstallPackage installs packages via pacman

func (Archlinux) UninstallPackage

func (c Archlinux) UninstallPackage(h configurer.Host, s ...string) error

UninstallPackage installs packages via pacman

type BaseLinux

type BaseLinux struct {
	configurer.Linux
}

BaseLinux for tricking go interfaces

type CoreOS

type CoreOS struct {
	BaseLinux
}

CoreOS provides OS support for ostree based Fedora & RHEL systems

func (*CoreOS) InstallPackage

func (l *CoreOS) InstallPackage(_ configurer.Host, _ ...string) error

InstallPackage installs packages but will throw an error

func (*CoreOS) UninstallPackage

func (l *CoreOS) UninstallPackage(_ configurer.Host, _ ...string) error

UninstallPackage uninstalls packages but will throw an error

type Debian

type Debian struct {
	configurer.Linux
}

Debian provides OS support for Debian systems

func (Debian) InstallPackage

func (c Debian) InstallPackage(h configurer.Host, s ...string) error

InstallPackage installs packages via apt-get

func (Debian) PreferredFirewall

func (c Debian) PreferredFirewall() string

PreferredFirewall reports that Debian ships ufw as its firewall front end. Ubuntu inherits it.

func (Debian) UninstallPackage

func (c Debian) UninstallPackage(h configurer.Host, s ...string) error

UninstallPackage uninstalls packages via apt-get

type EnterpriseLinux

type EnterpriseLinux struct {
	configurer.Linux
}

EnterpriseLinux is a base package for several RHEL-like enterprise linux distributions

func (*EnterpriseLinux) InstallPackage

func (c *EnterpriseLinux) InstallPackage(h configurer.Host, s ...string) error

InstallPackage installs packages via dnf

func (*EnterpriseLinux) UninstallPackage

func (c *EnterpriseLinux) UninstallPackage(h configurer.Host, s ...string) error

UninstallPackage uninstalls packages via dnf

type Flatcar

type Flatcar struct {
	BaseLinux
}

Flatcar provides OS support for Flatcar systems

func (*Flatcar) InstallPackage

func (l *Flatcar) InstallPackage(_ configurer.Host, _ ...string) error

InstallPackage installs packages but will throw an error

func (*Flatcar) UninstallPackage

func (l *Flatcar) UninstallPackage(_ configurer.Host, _ ...string) error

UninstallPackage installs packages but will throw an error

type OpenSUSE

type OpenSUSE struct {
	SLES
}

OpenSUSE provides OS support for OpenSUSE

type SLES

type SLES struct {
	BaseLinux
}

SLES provides OS support for Suse SUSE Linux Enterprise Server

func (SLES) InstallPackage

func (c SLES) InstallPackage(h configurer.Host, s ...string) error

InstallPackage installs packages via zypper

func (SLES) PreferredFirewall

func (c SLES) PreferredFirewall() string

PreferredFirewall reports that SLES ships firewalld as its firewall front end. OpenSUSE inherits it.

func (SLES) UninstallPackage

func (c SLES) UninstallPackage(h configurer.Host, s ...string) error

UninstallPackage uninstalls packages via zypper

type Slackware

type Slackware struct {
	BaseLinux
}

Slackware provides OS support for Slackware Linux

func (*Slackware) InstallPackage

func (l *Slackware) InstallPackage(h configurer.Host, pkg ...string) error

InstallPackage installs packages via slackpkg

func (*Slackware) UninstallPackage

func (l *Slackware) UninstallPackage(h configurer.Host, pkg ...string) error

UninstallPackage remove packages via slackpkg

type Ubuntu

type Ubuntu struct {
	Debian
}

Ubuntu provides OS support for Ubuntu systems

Directories

Path Synopsis
Package enterpriselinux is implementing the interface github.com/colonel-byte/cargoship/types/os.Configurer for Enterprise Linux hosts
Package enterpriselinux is implementing the interface github.com/colonel-byte/cargoship/types/os.Configurer for Enterprise Linux hosts

Jump to

Keyboard shortcuts

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