dnf

package
v0.0.0-...-f22496c Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeName    = "go2chef.step.install.linux.dnf"
	YumTypeName = "go2chef.step.install.linux.yum"
	RPMTypeName = "go2chef.step.install.linux.rpm"
)

TypeNames for the three variants of this step plugin

Variables

View Source
var (
	// DefaultPackageName is the default package name to use for Chef installation
	DefaultPackageName = "chef"
)

Functions

func LoaderForBinary

func LoaderForBinary(binary string) go2chef.StepLoader

LoaderForBinary provides an instantiation function for this step plugin specific to the passed binary

Types

type Step

type Step struct {
	StepName    string `mapstructure:"name"`
	DNFBinary   string `mapstructure:"dnf_binary"`
	RPMBinary   string `mapstructure:"rpm_binary"`
	PackageName string `mapstructure:"package_name"`

	Version string `mapstructure:"version"`

	RPMCheckTimeoutSeconds int `mapstructure:"rpm_check_timeout_seconds"`
	InstallTimeoutSeconds  int `mapstructure:"install_timeout_seconds"`
	// contains filtered or unexported fields
}

Step implements Chef installation via RHEL/Fedora DNF/YUM/RPM

If you provide a `source` config block, this plugin will download it and search for an RPM based on `package_name` (and, if specified, `version`).

Example config for a Chef install

{
	"type": "go2chef.step.install.linux.dnf",
	"name": "install chef",
	"package_name": "chef"
}

func (*Step) Download

func (s *Step) Download() error

Download fetches resources required for this step's execution

func (*Step) Execute

func (s *Step) Execute() error

Execute performs the installation

func (*Step) Name

func (s *Step) Name() string

Name gets the name of this step instance

func (*Step) SetName

func (s *Step) SetName(str string)

SetName sets the name of this step instance

func (*Step) String

func (s *Step) String() string

func (*Step) Type

func (s *Step) Type() string

Type returns the type of this step instance

Jump to

Keyboard shortcuts

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