Documentation
¶
Overview ¶
Package computersetup applies, reports on and resets the workstation bootstrap configuration for the operating system allbctl is running on.
Index ¶
- func FilterOutSSHKeyRegistration(configs []model.IMachineConfiguration) []model.IMachineConfiguration
- type MachineIdentifier
- type MachineTweaker
- func (t MachineTweaker) ApplyConfiguration(ctx context.Context) ([]model.StepFailure, *bytes.Buffer)
- func (t MachineTweaker) ConfigurationStatus(ctx context.Context) ([]model.StepFailure, *bytes.Buffer)
- func (t MachineTweaker) ResetConfiguration(ctx context.Context) ([]model.StepFailure, *bytes.Buffer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterOutSSHKeyRegistration ¶ added in v0.0.22
func FilterOutSSHKeyRegistration(configs []model.IMachineConfiguration) []model.IMachineConfiguration
FilterOutSSHKeyRegistration removes SSH key registration from a configuration list: the whole "SSH Configuration" group, and the registration itself wherever else it appears. Groups left empty by the filter are dropped.
Types ¶
type MachineIdentifier ¶ added in v0.0.9
type MachineIdentifier struct{}
MachineIdentifier maps an operating system to its bootstrap configuration.
func (MachineIdentifier) ConfigurationProviderForOperatingSystem ¶ added in v0.0.9
func (m MachineIdentifier) ConfigurationProviderForOperatingSystem(os string) model.IMachineConfigurationProvider
ConfigurationProviderForOperatingSystem returns the provider for a runtime.GOOS value, or nil when the operating system is not supported.
func (MachineIdentifier) GetCurrentOperatingSystem ¶ added in v0.0.9
func (m MachineIdentifier) GetCurrentOperatingSystem() string
GetCurrentOperatingSystem returns runtime.GOOS.
type MachineTweaker ¶ added in v0.0.9
type MachineTweaker struct {
MachineConfiguration []model.IMachineConfiguration
}
MachineTweaker drives a list of machine configurations through their lifecycle and collects their output.
func NewMachineTweaker ¶ added in v0.0.9
func NewMachineTweaker(configs []model.IMachineConfiguration) *MachineTweaker
NewMachineTweaker returns a MachineTweaker for configs.
func (MachineTweaker) ApplyConfiguration ¶ added in v0.0.9
func (t MachineTweaker) ApplyConfiguration(ctx context.Context) ([]model.StepFailure, *bytes.Buffer)
ApplyConfiguration installs every configuration that does not already validate, in order. It returns the steps that failed to install (groups broken down to their members) and the combined output.
func (MachineTweaker) ConfigurationStatus ¶ added in v0.0.9
func (t MachineTweaker) ConfigurationStatus(ctx context.Context) ([]model.StepFailure, *bytes.Buffer)
ConfigurationStatus validates every configuration without changing anything. It returns the steps that are not in place and a report with one section per configuration.
func (MachineTweaker) ResetConfiguration ¶ added in v0.0.9
func (t MachineTweaker) ResetConfiguration(ctx context.Context) ([]model.StepFailure, *bytes.Buffer)
ResetConfiguration uninstalls every configuration in reverse order. It returns the steps that failed to uninstall and the combined output. A step refusing to delete user data (for example osagnostic.ErrDirectoryNotEmpty) is reported here too; callers decide whether that is a failure.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package dotfiles manages the user's dotfiles repository: cloning it, running its install script, and reporting on its health (uncommitted or unsynchronised changes, and files not symlinked into $HOME).
|
Package dotfiles manages the user's dotfiles repository: cloning it, running its install script, and reporting on its health (uncommitted or unsynchronised changes, and files not symlinked into $HOME). |
|
Package providers defines the bootstrap configuration for each supported operating system: the directories, tools, SSH registration and dotfiles a freshly set-up workstation is expected to have.
|
Package providers defines the bootstrap configuration for each supported operating system: the directories, tools, SSH registration and dotfiles a freshly set-up workstation is expected to have. |