Documentation
¶
Overview ¶
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Code generated by ./hack/generate-ansible-types.py DO NOT EDIT
Index ¶
- Constants
- type AclEtype
- type AclParameters
- type AclRecalculateMask
- type AclReturn
- type AclState
- type AlternativesParameters
- type AlternativesReturn
- type AlternativesState
- type AndroidSdkChannel
- type AndroidSdkParameters
- type AndroidSdkReturn
- type AndroidSdkState
- type AnsibleCommonReturns
- type AnsibleGalaxyInstallParameters
- type AnsibleGalaxyInstallReturn
- type AnsibleGalaxyInstallState
- type AnsibleGalaxyInstallType
- type ApkParameters
- type ApkReturn
- type ApkState
- type AptKeyParameters
- type AptKeyReturn
- type AptKeyState
- type AptParameters
- type AptRepoParameters
- type AptRepoReturn
- type AptRepoState
- type AptRepositoryParameters
- type AptRepositoryReturn
- type AptRepositoryState
- type AptReturn
- type AptRpmParameters
- type AptRpmReturn
- type AptRpmState
- type AptState
- type AptUpgrade
- type AssembleParameters
- type AssembleReturn
- type AtParameters
- type AtReturn
- type AtState
- type AtUnits
- type AuthorizedKeyParameters
- type AuthorizedKeyReturn
- type AuthorizedKeyState
- type AwallParameters
- type AwallReturn
- type AwallState
- type BeadmParameters
- type BeadmReturn
- type BeadmState
- type BlockinfileParameters
- type BlockinfileReturn
- type BlockinfileState
- type BootcManageParameters
- type BootcManageReturn
- type BootcManageState
- type BowerParameters
- type BowerReturn
- type BowerState
- type BzrParameters
- type BzrReturn
- type CapabilitiesParameters
- type CapabilitiesReturn
- type CapabilitiesState
- type CargoParameters
- type CargoReturn
- type CargoState
- type CommandParameters
- type CommandReturn
- type CopyParameters
- type CopyReturn
- type CronParameters
- type CronReturn
- type CronSpecialTime
- type CronState
- type CrypttabParameters
- type CrypttabReturn
- type CrypttabState
- type Deb822RepositoryParameters
- type Deb822RepositoryReturn
- type Deb822RepositoryState
- type Deb822RepositoryTypes
- type DebconfParameters
- type DebconfReturn
- type DebconfVtype
- type DeployHelperParameters
- type DeployHelperReturn
- type DeployHelperState
- type DjangoCheckFailLevel
- type DjangoCheckParameters
- type DjangoCheckReturn
- type DjangoCheckVerbosity
- type DjangoCommandParameters
- type DjangoCommandReturn
- type DjangoCommandVerbosity
- type DjangoCreatecachetableParameters
- type DjangoCreatecachetableReturn
- type DjangoCreatecachetableVerbosity
- type DjangoManageParameters
- type DjangoManageReturn
- type Dnf5Parameters
- type Dnf5Return
- type Dnf5State
- type DnfConfigManagerParameters
- type DnfConfigManagerReturn
- type DnfConfigManagerState
- type DnfParameters
- type DnfReturn
- type DnfState
- type DnfUseBackend
- type DnfVersionlockParameters
- type DnfVersionlockReturn
- type DnfVersionlockState
- type DockerComposeV2Build
- type DockerComposeV2ExecParameters
- type DockerComposeV2ExecReturn
- type DockerComposeV2Parameters
- type DockerComposeV2Pull
- type DockerComposeV2PullParameters
- type DockerComposeV2PullPolicy
- type DockerComposeV2PullReturn
- type DockerComposeV2Recreate
- type DockerComposeV2RemoveImages
- type DockerComposeV2Return
- type DockerComposeV2RunParameters
- type DockerComposeV2RunReturn
- type DockerComposeV2State
- type DockerConfigParameters
- type DockerConfigReturn
- type DockerConfigState
- type DockerConfigTemplateDriver
- type DockerContainerCgroupnsMode
- type DockerContainerCommandHandling
- type DockerContainerContainerDefaultBehavior
- type DockerContainerCopyIntoModeParse
- type DockerContainerCopyIntoParameters
- type DockerContainerCopyIntoReturn
- type DockerContainerExecParameters
- type DockerContainerExecReturn
- type DockerContainerImageComparison
- type DockerContainerImageLabelMismatch
- type DockerContainerImageNameMismatch
- type DockerContainerInfoParameters
- type DockerContainerInfoReturn
- type DockerContainerParameters
- type DockerContainerPullCheckModeBehavior
- type DockerContainerRestartPolicy
- type DockerContainerReturn
- type DockerContainerState
- type DockerContextInfoParameters
- type DockerContextInfoReturn
- type DockerHostInfoParameters
- type DockerHostInfoReturn
- type DockerImageBuildParameters
- type DockerImageBuildRebuild
- type DockerImageBuildReturn
- type DockerImageExportParameters
- type DockerImageExportReturn
- type DockerImageInfoParameters
- type DockerImageInfoReturn
- type DockerImageLoadParameters
- type DockerImageLoadReturn
- type DockerImageParameters
- type DockerImagePullParameters
- type DockerImagePullPull
- type DockerImagePullReturn
- type DockerImagePushParameters
- type DockerImagePushReturn
- type DockerImageRemoveParameters
- type DockerImageRemoveReturn
- type DockerImageReturn
- type DockerImageSource
- type DockerImageState
- type DockerImageTagExistingImages
- type DockerImageTagParameters
- type DockerImageTagReturn
- type DockerLoginParameters
- type DockerLoginReturn
- type DockerLoginState
- type DockerNetworkInfoParameters
- type DockerNetworkInfoReturn
- type DockerNetworkParameters
- type DockerNetworkReturn
- type DockerNetworkScope
- type DockerNetworkState
- type DockerNodeAvailability
- type DockerNodeInfoParameters
- type DockerNodeInfoReturn
- type DockerNodeLabelsState
- type DockerNodeParameters
- type DockerNodeReturn
- type DockerNodeRole
- type DockerPluginParameters
- type DockerPluginReturn
- type DockerPluginState
- type DockerPruneParameters
- type DockerPruneReturn
- type DockerSecretParameters
- type DockerSecretReturn
- type DockerSecretState
- type DockerStackInfoParameters
- type DockerStackInfoReturn
- type DockerStackParameters
- type DockerStackResolveImage
- type DockerStackReturn
- type DockerStackState
- type DockerStackTaskInfoParameters
- type DockerStackTaskInfoReturn
- type DockerSwarmInfoParameters
- type DockerSwarmInfoReturn
- type DockerSwarmParameters
- type DockerSwarmReturn
- type DockerSwarmServiceEndpointMode
- type DockerSwarmServiceInfoParameters
- type DockerSwarmServiceInfoReturn
- type DockerSwarmServiceMode
- type DockerSwarmServiceParameters
- type DockerSwarmServiceReturn
- type DockerSwarmServiceState
- type DockerSwarmState
- type DockerVolumeInfoParameters
- type DockerVolumeInfoReturn
- type DockerVolumeParameters
- type DockerVolumeRecreate
- type DockerVolumeReturn
- type DockerVolumeState
- type DpkgDivertParameters
- type DpkgDivertReturn
- type DpkgDivertState
- type DpkgSelectionsParameters
- type DpkgSelectionsReturn
- type DpkgSelectionsSelection
- type ExpectParameters
- type ExpectReturn
- type FacterFactsParameters
- type FacterFactsReturn
- type FacterParameters
- type FacterReturn
- type FileParameters
- type FileReturn
- type FileState
- type FilesizeParameters
- type FilesizeReturn
- type FilesystemFstype
- type FilesystemParameters
- type FilesystemReturn
- type FilesystemState
- type FindAgeStamp
- type FindFileType
- type FindParameters
- type FindReturn
- type FirewalldInfoParameters
- type FirewalldInfoReturn
- type FirewalldParameters
- type FirewalldReturn
- type FirewalldState
- type FirewalldTarget
- type FlatpakMethod
- type FlatpakParameters
- type FlatpakReturn
- type FlatpakState
- type Gconftool2InfoParameters
- type Gconftool2InfoReturn
- type Gconftool2Parameters
- type Gconftool2Return
- type Gconftool2State
- type Gconftool2ValueType
- type GemParameters
- type GemReturn
- type GemState
- type GetUrlParameters
- type GetUrlReturn
- type GetentParameters
- type GetentReturn
- type GitConfigAddMode
- type GitConfigInfoParameters
- type GitConfigInfoReturn
- type GitConfigInfoScope
- type GitConfigParameters
- type GitConfigReturn
- type GitConfigScope
- type GitConfigState
- type GitParameters
- type GitReturn
- type GroupParameters
- type GroupReturn
- type GroupState
- type GunicornParameters
- type GunicornReturn
- type GunicornWorker
- type HomebrewCaskParameters
- type HomebrewCaskReturn
- type HomebrewCaskState
- type HomebrewParameters
- type HomebrewReturn
- type HomebrewServicesParameters
- type HomebrewServicesReturn
- type HomebrewServicesState
- type HomebrewState
- type HomebrewTapParameters
- type HomebrewTapReturn
- type HomebrewTapState
- type HomectlParameters
- type HomectlReturn
- type HomectlState
- type HomectlStorage
- type HostnameParameters
- type HostnameReturn
- type HostnameUse
- type HponcfgParameters
- type HponcfgReturn
- type IniFileParameters
- type IniFileReturn
- type IniFileState
- type InstallpParameters
- type InstallpReturn
- type InstallpState
- type InterfacesFileParameters
- type InterfacesFileReturn
- type InterfacesFileState
- type IpNetnsParameters
- type IpNetnsReturn
- type IpNetnsState
- type IpmiBootBootdev
- type IpmiBootParameters
- type IpmiBootReturn
- type IpmiBootState
- type IpmiPowerParameters
- type IpmiPowerReturn
- type IpmiPowerState
- type IptablesAction
- type IptablesIpVersion
- type IptablesLogLevel
- type IptablesMatchSetFlags
- type IptablesParameters
- type IptablesPolicy
- type IptablesReturn
- type IptablesState
- type IptablesSyn
- type IptablesTable
- type IsoCreateInterchangeLevel
- type IsoCreateJoliet
- type IsoCreateParameters
- type IsoCreateReturn
- type IsoCreateRockRidge
- type IsoCustomizeParameters
- type IsoCustomizeReturn
- type IsoExtractParameters
- type IsoExtractReturn
- type JbossParameters
- type JbossReturn
- type JbossState
- type KdeconfigParameters
- type KdeconfigReturn
- type KernelBlacklistParameters
- type KernelBlacklistReturn
- type KernelBlacklistState
- type KeyringInfoParameters
- type KeyringInfoReturn
- type KibanaPluginParameters
- type KibanaPluginReturn
- type KibanaPluginState
- type KnownHostsParameters
- type KnownHostsReturn
- type KnownHostsState
- type LbuParameters
- type LbuReturn
- type LineinfileParameters
- type LineinfileReturn
- type LineinfileState
- type ListenPortsFactsCommand
- type ListenPortsFactsParameters
- type ListenPortsFactsReturn
- type LldpParameters
- type LldpReturn
- type LocaleGenParameters
- type LocaleGenReturn
- type LocaleGenState
- type LogentriesParameters
- type LogentriesReturn
- type LogentriesState
- type LvgParameters
- type LvgRenameParameters
- type LvgRenameReturn
- type LvgReturn
- type LvgState
- type MacportsParameters
- type MacportsReturn
- type MacportsState
- type MakeParameters
- type MakeReturn
- type MasParameters
- type MasReturn
- type MasState
- type ModprobeParameters
- type ModprobePersistent
- type ModprobeReturn
- type ModprobeState
- type MountFactsOnTimeout
- type MountFactsParameters
- type MountFactsReturn
- type MountParameters
- type MountReturn
- type MountState
- type NictagadmParameters
- type NictagadmReturn
- type NictagadmState
- type NmcliAddrGenMode6
- type NmcliFailOverMac
- type NmcliIpPrivacy6
- type NmcliMethod4
- type NmcliMethod6
- type NmcliMode
- type NmcliParameters
- type NmcliReturn
- type NmcliRunner
- type NmcliRunnerHwaddrPolicy
- type NmcliSlaveType
- type NmcliState
- type NmcliTransportMode
- type NmcliType
- type NpmParameters
- type NpmReturn
- type NpmState
- type NsupdateKeyAlgorithm
- type NsupdateParameters
- type NsupdateProtocol
- type NsupdateReturn
- type NsupdateState
- type OpkgForce
- type OpkgParameters
- type OpkgReturn
- type OpkgState
- type PackageFactsManager
- type PackageFactsParameters
- type PackageFactsReturn
- type PackageFactsStrategy
- type PackageParameters
- type PackageReturn
- type PacmanParameters
- type PacmanReason
- type PacmanReasonFor
- type PacmanReturn
- type PacmanState
- type PamLimitsLimitItem
- type PamLimitsLimitType
- type PamLimitsParameters
- type PamLimitsReturn
- type PamdNewType
- type PamdParameters
- type PamdReturn
- type PamdState
- type PamdType
- type PartedAlign
- type PartedLabel
- type PartedParameters
- type PartedPartType
- type PartedReturn
- type PartedState
- type PartedUnit
- type PatchParameters
- type PatchReturn
- type PatchState
- type PearParameters
- type PearReturn
- type PearState
- type PidsParameters
- type PidsReturn
- type PingParameters
- type PingReturn
- type PipPackageInfoParameters
- type PipPackageInfoReturn
- type PipParameters
- type PipReturn
- type PipState
- type PipxInfoParameters
- type PipxInfoReturn
- type PipxParameters
- type PipxReturn
- type PipxState
- type Pkg5Parameters
- type Pkg5PublisherParameters
- type Pkg5PublisherReturn
- type Pkg5PublisherState
- type Pkg5Return
- type Pkg5State
- type PkginParameters
- type PkginReturn
- type PkginState
- type PkgngParameters
- type PkgngReturn
- type PkgngState
- type PkgutilParameters
- type PkgutilReturn
- type PkgutilState
- type PmemParameters
- type PmemReturn
- type PnpmParameters
- type PnpmReturn
- type PnpmState
- type PortageParameters
- type PortageReturn
- type PortageState
- type PortageSync
- type PortinstallParameters
- type PortinstallReturn
- type PortinstallState
- type ReplaceParameters
- type ReplaceReturn
- type RhelFactsParameters
- type RhelFactsReturn
- type RhelRpmOstreeParameters
- type RhelRpmOstreeReturn
- type RhelRpmOstreeState
- type RhsmReleaseParameters
- type RhsmReleaseReturn
- type RhsmRepositoryParameters
- type RhsmRepositoryReturn
- type RhsmRepositoryState
- type RpmKeyParameters
- type RpmKeyReturn
- type RpmKeyState
- type RpmOstreePkgParameters
- type RpmOstreePkgReturn
- type RpmOstreePkgState
- type RpmOstreeUpgradeParameters
- type RpmOstreeUpgradeReturn
- type SebooleanParameters
- type SebooleanReturn
- type SelinuxParameters
- type SelinuxPermissiveParameters
- type SelinuxPermissiveReturn
- type SelinuxReturn
- type SelinuxState
- type SeportParameters
- type SeportProto
- type SeportReturn
- type SeportState
- type ServiceParameters
- type ServiceReturn
- type ServiceState
- type SetupParameters
- type SetupReturn
- type ShutdownParameters
- type ShutdownReturn
- type SlackpkgParameters
- type SlackpkgReturn
- type SlackpkgState
- type SlurpParameters
- type SlurpReturn
- type SmartosImageInfoParameters
- type SmartosImageInfoReturn
- type SnapAliasParameters
- type SnapAliasReturn
- type SnapAliasState
- type SorceryParameters
- type SorceryReturn
- type SorceryState
- type StatChecksumAlgorithm
- type StatParameters
- type StatReturn
- type SubversionParameters
- type SubversionReturn
- type Svr4pkgParameters
- type Svr4pkgReturn
- type Svr4pkgState
- type Svr4pkgZone
- type SwdepotParameters
- type SwdepotReturn
- type SwdepotState
- type SwupdParameters
- type SwupdReturn
- type SwupdState
- type SynchronizeMode
- type SynchronizeParameters
- type SynchronizeReturn
- type SysctlParameters
- type SysctlReturn
- type SysctlState
- type SyspatchParameters
- type SyspatchReturn
- type SyspatchRevert
- type SysrcParameters
- type SysrcReturn
- type SysrcState
- type SystemdCredsDecryptParameters
- type SystemdCredsDecryptReturn
- type SystemdCredsDecryptTranscode
- type SystemdCredsEncryptParameters
- type SystemdCredsEncryptReturn
- type SystemdInfoParameters
- type SystemdInfoReturn
- type SystemdServiceParameters
- type SystemdServiceReturn
- type SystemdServiceScope
- type SystemdServiceState
- type SysvinitParameters
- type SysvinitReturn
- type SysvinitState
- type TempfileParameters
- type TempfileReturn
- type TempfileState
- type TimezoneHwclock
- type TimezoneParameters
- type TimezoneReturn
- type UnarchiveParameters
- type UnarchiveReturn
- type UriBodyFormat
- type UriFollowRedirects
- type UriParameters
- type UriReturn
- type UrpmiParameters
- type UrpmiReturn
- type UrpmiState
- type UsbFactsParameters
- type UsbFactsReturn
- type UserParameters
- type UserReturn
- type UserState
- type UserUpdatePassword
- type VdoCompression
- type VdoDeduplication
- type VdoIndexmode
- type VdoParameters
- type VdoReadcache
- type VdoReturn
- type VdoState
- type VdoWritepolicy
- type WaitForParameters
- type WaitForReturn
- type WaitForState
- type XattrParameters
- type XattrReturn
- type XattrState
- type XbpsParameters
- type XbpsReturn
- type XbpsState
- type XdgMimeParameters
- type XdgMimeReturn
- type XfconfInfoParameters
- type XfconfInfoReturn
- type XfconfParameters
- type XfconfReturn
- type XfconfState
- type XfconfValueType
- type XfsQuotaParameters
- type XfsQuotaReturn
- type XfsQuotaState
- type XfsQuotaType
- type XmlContent
- type XmlInputType
- type XmlParameters
- type XmlReturn
- type XmlState
- type YarnParameters
- type YarnReturn
- type YarnState
- type YumRepositoryFailovermethod
- type YumRepositoryHttpCaching
- type YumRepositoryIpResolve
- type YumRepositoryKeepcache
- type YumRepositoryMetadataExpireFilter
- type YumRepositoryParameters
- type YumRepositoryReturn
- type YumRepositoryState
- type YumVersionlockParameters
- type YumVersionlockReturn
- type YumVersionlockState
- type ZfsDelegateAdminParameters
- type ZfsDelegateAdminReturn
- type ZfsDelegateAdminState
- type ZfsFactsParameters
- type ZfsFactsReturn
- type ZfsFactsType
- type ZfsParameters
- type ZfsReturn
- type ZfsState
- type ZpoolFactsParameters
- type ZpoolFactsReturn
- type ZypperParameters
- type ZypperReturn
- type ZypperState
- type ZypperType
Constants ¶
const AclName = "acl"
Set and retrieve file ACL information.
const AlternativesName = "alternatives"
Manages symbolic links using the `update-alternatives` tool. Useful when multiple programs are installed but provide similar functionality (for example, different editors).
const AndroidSdkName = "android_sdk"
Manages Android SDK packages. Allows installation from different channels (stable, beta, dev, canary). Allows installation of packages to a non-default SDK root directory.
const AnsibleGalaxyInstallName = "ansible_galaxy_install"
This module allows the installation of Ansible collections or roles using `ansible-galaxy`.
const ApkName = "apk"
Manages `apk` packages for Alpine Linux.
const AptKeyName = "apt_key"
Add or remove an `apt` key, optionally downloading it.
const AptName = "apt"
Manages `apt` packages (such as for Debian/Ubuntu).
const AptRepoName = "apt_repo"
Manages APT repositories using `apt-repo` tool. See `https://www.altlinux.org/Apt-repo` for details about `apt-repo`.
const AptRepositoryName = "apt_repository"
Add or remove an APT repositories in Ubuntu and Debian.
const AptRpmName = "apt_rpm"
Manages packages with `apt-rpm`. Both low-level (`rpm`) and high-level (`apt- get`) package manager binaries required.
const AssembleName = "assemble"
Assembles a configuration file from fragments. Often a particular program will take a single configuration file and does not support a `conf.d` style structure where it is easy to build up the configuration from multiple sources. `ansible.builtin.assemble` will take a directory of files that can be local or have already been transferred to the system, and concatenate them together to produce a destination file. Files are assembled in string sorting order. Puppet calls this idea `fragments`.
const AtName = "at"
Use this module to schedule a command or script file to run once in the future. All jobs are executed in the 'a' queue.
const AuthorizedKeyName = "authorized_key"
Adds or removes SSH authorized keys for particular user accounts.
const AwallName = "awall"
This modules allows for enable/disable/activate of `awall` policies. Alpine Wall (`awall`) generates a firewall configuration from the enabled policy files and activates the configuration on the system.
const BeadmName = "beadm"
Create, delete or activate ZFS boot environments. Mount and unmount ZFS boot environments.
const BlockinfileName = "blockinfile"
This module will insert/update/remove a block of multi-line text surrounded by customizable marker lines.
const BootcManageName = "bootc_manage"
This module manages the switching and upgrading of `bootc`.
const BowerName = "bower"
Manage bower packages with `bower`.
const BzrName = "bzr"
Manage `bzr` branches to deploy files or software.
const CapabilitiesName = "capabilities"
This module manipulates files privileges using the Linux capabilities(7) system.
const CargoName = "cargo"
Manage Rust packages with cargo.
const CommandName = "command"
The `ansible.builtin.command` module takes the command name followed by a list of space-delimited arguments. The given command will be executed on all selected nodes. The command(s) will not be processed through the shell, so operations like `"*"`, `"<"`, `">"`, `"|"`, `";"` and `"&"` will not work. Also, environment variables are resolved via Python, not shell, see `expand_argument_vars` and are left unchanged if not matched. Use the `ansible.builtin.shell` module if you need these features. To create `command` tasks that are easier to read than the ones using space- delimited arguments, pass parameters using the `args` `task keyword,https://d ocs.ansible.com/ansible/latest/reference_appendices/playbooks_keywords.html#t ask` or use `cmd` parameter. Either a free form command or `cmd` parameter is required, see the examples. For Windows targets, use the `ansible.windows.win_command` module instead.
const CopyName = "copy"
The `ansible.builtin.copy` module copies a file or a directory structure from the local or remote machine to a location on the remote machine. File system meta-information (permissions, ownership, etc.) may be set, even when the file or directory already exists on the target system. Some meta-information may be copied on request. Get meta-information with the `ansible.builtin.stat` module. Set meta-information with the `ansible.builtin.file` module. Use the `ansible.builtin.fetch` module to copy files from remote locations to the local box. If you need variable interpolation in copied files, use the `ansible.builtin.template` module. Using a variable with the `content` parameter produces unpredictable results. For Windows targets, use the `ansible.windows.win_copy` module instead.
const CronName = "cron"
Use this module to manage crontab and environment variables entries. This module allows you to create environment variables and named crontab entries, update, or delete them. When crontab jobs are managed: the module includes one line with the description of the crontab entry `"#Ansible: <name>"` corresponding to the `name` passed to the module, which is used by future ansible/module calls to find/check the state. The `name` parameter should be unique, and changing the `name` value will result in a new cron task being created (or a different one being removed). When environment variables are managed, no comment line is added, but, when the module needs to find/check the state, it uses the `name` parameter to find the environment variable definition line. When using symbols such as `%`, they must be properly escaped.
const CrypttabName = "crypttab"
Control Linux encrypted block devices that are set up during system boot in `/etc/crypttab`.
const Deb822RepositoryName = "deb822_repository"
Add and remove deb822 formatted repositories in Debian based distributions.
const DebconfName = "debconf"
Configure a .deb package using debconf-set-selections. Or just query existing selections.
const DeployHelperName = "deploy_helper"
The Deploy Helper manages some of the steps common in deploying software. It creates a folder structure, manages a symlink for the current release and cleans up old releases. Running it with the `state=query` or `state=present` will return the `deploy_helper` fact. `project_path`, whatever you set in the `path` parameter, `current_path`, the path to the symlink that points to the active release, `releases_path`, the path to the folder to keep releases in, `shared_path`, the path to the folder to keep shared resources in, `unfinished_filename`, the file to check for to recognize unfinished builds, `previous_release`, the release the 'current' symlink is pointing to, `previous_release_path`, the full path to the 'current' symlink target, `new_release`, either the `release` parameter or a generated timestamp, `new_release_path`, the path to the new release folder (not created by the module).
const DjangoCheckName = "django_check"
This module is a wrapper for the execution of `django-admin check`.
const DjangoCommandName = "django_command"
This module allows the execution of arbitrary Django admin commands.
const DjangoCreatecachetableName = "django_createcachetable"
This module is a wrapper for the execution of `django-admin createcachetable`.
const DjangoManageName = "django_manage"
Manages a Django application using the `manage.py` application frontend to `django-admin`. With the `virtualenv` parameter, all management commands will be executed by the given `virtualenv` installation.
const Dnf5Name = "dnf5"
Installs, upgrade, removes, and lists packages and groups with the `dnf5` package manager. WARNING: The `dnf5` package manager is still under development and not all features that the existing `ansible.builtin.dnf` module provides are implemented in `ansible.builtin.dnf5`, please consult specific options for more information.
const DnfConfigManagerName = "dnf_config_manager"
This module enables or disables repositories using the `dnf config-manager` sub-command.
const DnfName = "dnf"
Installs, upgrade, removes, and lists packages and groups with the `dnf` package manager.
const DnfVersionlockName = "dnf_versionlock"
Locks package versions using the `versionlock` plugin in `dnf` based systems. This plugin takes a set of name and versions for packages and excludes all other versions of those packages. This allows you to for example protect packages from being updated by newer versions. The state of the plugin that reflects locking of packages is the `locklist`.
const DockerComposeV2ExecName = "docker_compose_v2_exec"
Uses Docker Compose to run a command in a service's container. This can be used to run one-off commands in an existing service's container, and encapsulates `docker compose exec`.
const DockerComposeV2Name = "docker_compose_v2"
Uses Docker Compose to start or shutdown services.
const DockerComposeV2PullName = "docker_compose_v2_pull"
Uses Docker Compose to pull images for a project.
const DockerComposeV2RunName = "docker_compose_v2_run"
Uses Docker Compose to run a command in a new container for a service. This encapsulates `docker compose run`.
const DockerConfigName = "docker_config"
Create and remove Docker configs in a Swarm environment. Similar to `docker config create` and `docker config rm`. Adds to the metadata of new configs `ansible_key`, an encrypted hash representation of the data, which is then used in future runs to test if a config has changed. If `ansible_key` is not present, then a config will not be updated unless the `force` option is set. Updates to configs are performed by removing the config and creating it again.
const DockerContainerCopyIntoName = "docker_container_copy_into"
Copy a file into a Docker container. Similar to `docker cp`. To copy files in a non-running container, you must provide the `owner_id` and `group_id` options. This is also necessary if the container does not contain a `/bin/sh` shell with an `id` tool.
const DockerContainerExecName = "docker_container_exec"
Executes a command in a Docker container.
const DockerContainerInfoName = "docker_container_info"
Retrieves facts about a docker container. Essentially returns the output of `docker inspect <name>`, similar to what `community.docker.docker_container` returns for a non-absent container.
const DockerContainerName = "docker_container"
Manage the life cycle of Docker containers. Supports check mode. Run with `--check` and `--diff` to view config difference and list of actions to be taken.
const DockerContextInfoName = "docker_context_info"
Return information on Docker contexts. This includes some generic information, as well as a R`contexts[].config` dictionary that can be used for module defaults for all community.docker modules that use the `community.docker.docker` module defaults group.
const DockerHostInfoName = "docker_host_info"
Retrieves facts about a docker host. Essentially returns the output of `docker system info`. The module also allows to list object names for containers, images, networks and volumes. It also allows to query information on disk usage. The output differs depending on API version of the docker daemon. If the docker daemon cannot be contacted or does not meet the API version requirements, the module will fail.
const DockerImageBuildName = "docker_image_build"
This module allows you to build Docker images using Docker's buildx plugin (BuildKit). Note that the module is `not idempotent` in the sense of classical Ansible modules. The only idempotence check is whether the built image already exists. This check can be disabled with the `rebuild` option.
const DockerImageExportName = "docker_image_export"
Creates an archive (tarball) from one or more Docker images. This can be copied to another machine and loaded with `community.docker.docker_image_load`.
const DockerImageInfoName = "docker_image_info"
Provide one or more image names, and the module will inspect each, returning an array of inspection results. If an image does not exist locally, it will not appear in the results. If you want to check whether an image exists locally, you can call the module with the image name, then check whether the result list is empty (image does not exist) or has one element (the image exists locally). The module will not attempt to pull images from registries. Use `community.docker.docker_image` with `community.docker.docker_image#module:source=pull` to ensure an image is pulled.
const DockerImageLoadName = "docker_image_load"
Load one or multiple Docker images from a `.tar` archive, and return information on the loaded image(s).
const DockerImageName = "docker_image"
Build, load or pull an image, making the image available for creating containers. Also supports tagging an image, pushing an image, and archiving an image to a `.tar` file. We recommend to use the individual modules `community.docker.docker_image_build`, `community.docker.docker_image_export`, `community.docker.docker_image_load`, `community.docker.docker_image_pull`, `community.docker.docker_image_push`, `community.docker.docker_image_remove`, and `community.docker.docker_image_tag` instead of this module.
const DockerImagePullName = "docker_image_pull"
Pulls a Docker image from a registry.
const DockerImagePushName = "docker_image_push"
Pushes a Docker image to a registry.
const DockerImageRemoveName = "docker_image_remove"
Remove Docker images from the Docker daemon.
const DockerImageTagName = "docker_image_tag"
This module allows to tag Docker images with new names and/or tags.
const DockerLoginName = "docker_login"
Provides functionality similar to the `docker login` command. Authenticate with a docker registry and add the credentials to your local Docker config file respectively the credentials store associated to the registry. Adding the credentials to the config files resp. the credential store allows future connections to the registry using tools such as Ansible's Docker modules, the Docker CLI and Docker SDK for Python without needing to provide credentials. Running in check mode will perform the authentication without updating the config file.
const DockerNetworkInfoName = "docker_network_info"
Retrieves facts about a docker network. Essentially returns the output of `docker network inspect <name>`, similar to what `community.docker.docker_network` returns for a non-absent network.
const DockerNetworkName = "docker_network"
Create/remove Docker networks and connect containers to them. Performs largely the same function as the `docker network` CLI subcommand.
const DockerNodeInfoName = "docker_node_info"
Retrieves facts about a docker node. Essentially returns the output of `docker node inspect <name>`. Must be executed on a host running as Swarm Manager, otherwise the module will fail.
const DockerNodeName = "docker_node"
Manages the Docker nodes through a Swarm Manager. This module allows to change the node's role, its availability, and to modify, add or remove node labels.
const DockerPluginName = "docker_plugin"
This module allows to install, delete, enable and disable Docker plugins. Performs largely the same function as the `docker plugin` CLI subcommand.
const DockerPruneName = "docker_prune"
Allows to run `docker container prune`, `docker image prune`, `docker network prune` and `docker volume prune` through the Docker API.
const DockerSecretName = "docker_secret"
Create and remove Docker secrets in a Swarm environment. Similar to `docker secret create` and `docker secret rm`. Adds to the metadata of new secrets `ansible_key`, an encrypted hash representation of the data, which is then used in future runs to test if a secret has changed. If `ansible_key` is not present, then a secret will not be updated unless the `force` option is set. Updates to secrets are performed by removing the secret and creating it again.
const DockerStackInfoName = "docker_stack_info"
Retrieve information on docker stacks using the `docker stack` command on the target node (see examples).
const DockerStackName = "docker_stack"
Manage docker stacks using the `docker stack` command on the target node (see examples).
const DockerStackTaskInfoName = "docker_stack_task_info"
Retrieve information on docker stacks tasks using the `docker stack` command on the target node (see examples).
const DockerSwarmInfoName = "docker_swarm_info"
Retrieves facts about a Docker Swarm. Returns lists of swarm objects names for the services - nodes, services, tasks. The output differs depending on API version available on docker host. Must be run on Swarm Manager node; otherwise module fails with error message. It does return boolean flags in on both error and success which indicate whether the docker daemon can be communicated with, whether it is in Swarm mode, and whether it is a Swarm Manager node.
const DockerSwarmName = "docker_swarm"
Create a new Swarm cluster. Add/Remove nodes or managers to an existing cluster.
const DockerSwarmServiceInfoName = "docker_swarm_service_info"
Retrieves information about a docker service. Essentially returns the output of `docker service inspect <name>`. Must be executed on a host running as Swarm Manager, otherwise the module will fail.
const DockerSwarmServiceName = "docker_swarm_service"
Manages docker services through a swarm manager node. This modules does not support updating services in a stack.
const DockerVolumeInfoName = "docker_volume_info"
Performs largely the same function as the `docker volume inspect` CLI subcommand.
const DockerVolumeName = "docker_volume"
Create/remove Docker volumes. Performs largely the same function as the `docker volume` CLI subcommand.
const DpkgDivertName = "dpkg_divert"
A diversion is for `dpkg` the knowledge that only a given package (or the local administrator) is allowed to install a file at a given location. Other packages shipping their own version of this file will be forced to `divert` it, that is to install it at another location. It allows one to keep changes in a file provided by a debian package by preventing it being overwritten on package upgrade. This module manages diversions of debian packages files using the `dpkg- divert` commandline tool. It can either create or remove a diversion for a given file, but also update an existing diversion to modify its `holder` and/or its `divert` location.
const DpkgSelectionsName = "dpkg_selections"
Change dpkg package selection state via `--get-selections` and `--set- selections`.
const ExpectName = "expect"
The `ansible.builtin.expect` module executes a command and responds to prompts. The given command will be executed on all selected nodes. It will not be processed through the shell, so variables like `$HOME` and operations like `"<"`, `">"`, `"|"`, and `"&"` will not work.
const FacterFactsName = "facter_facts"
Runs the `facter` discovery program (`https://github.com/puppetlabs/facter`) on the remote system, returning Ansible facts from the JSON data that can be useful for inventory purposes.
const FacterName = "facter"
Runs the `facter` discovery program (`https://github.com/puppetlabs/facter`) on the remote system, returning JSON data that can be useful for inventory purposes.
const FileName = "file"
Set attributes of files, directories, or symlinks and their targets. Alternatively, remove files, symlinks or directories. Many other modules support the same options as the `ansible.builtin.file` module - including `ansible.builtin.copy`, `ansible.builtin.template`, and `ansible.builtin.assemble`. For Windows targets, use the `ansible.windows.win_file` module instead.
const FilesizeName = "filesize"
This module is a simple wrapper around `dd` to create, extend or truncate a file, given its size. It can be used to manage swap files (that require contiguous blocks) or alternatively, huge sparse files.
const FilesystemName = "filesystem"
This module creates a filesystem.
const FindName = "find"
Return a list of files based on specific criteria. Multiple criteria are AND'd together. For Windows targets, use the `ansible.windows.win_find` module instead. This module does not use the `find` command, it is a much simpler and slower Python implementation. It is intended for small and simple uses. Those that need the extra power or speed and have expertise with the UNIX command, should use it directly.
const FirewalldInfoName = "firewalld_info"
This module gathers information about firewalld rules.
const FirewalldName = "firewalld"
This module allows for addition or deletion of services and ports (either TCP or UDP) in either running or permanent firewalld rules.
const FlatpakName = "flatpak"
Allows users to add or remove flatpaks. See the `community.general.flatpak_remote` module for managing flatpak remotes.
const Gconftool2InfoName = "gconftool2_info"
This module allows retrieving application preferences from the GConf database, with the help of `gconftool-2`.
const Gconftool2Name = "gconftool2"
This module allows for the manipulation of GNOME 2 Configuration using `gconftool-2`. Please see the gconftool-2(1) man pages for more details.
const GemName = "gem"
Manage installation and uninstallation of Ruby gems.
const GetUrlName = "get_url"
Downloads files from HTTP, HTTPS, or FTP to the remote server. The remote server `must` have direct access to the remote resource. By default, if an environment variable `<protocol>_proxy` is set on the target host, requests will be sent through that proxy. This behaviour can be overridden by setting a variable for this task (see `setting the environment,playbooks_environment`), or by using the use_proxy option. HTTP redirects can redirect from HTTP to HTTPS so you should be sure that your proxy environment for both protocols is correct. From Ansible 2.4 when run with `--check`, it will do a HEAD request to validate the URL but will not download the entire file or verify it against hashes and will report incorrect changed status. For Windows targets, use the `ansible.windows.win_get_url` module instead.
const GetentName = "getent"
Runs getent against one of its various databases and returns information into the host's facts, in a `getent_<database>` prefixed variable.
const GitConfigInfoName = "git_config_info"
The `community.general.git_config_info` module reads the git configuration by invoking `git config`.
const GitConfigName = "git_config"
The `community.general.git_config` module changes git configuration by invoking `git config`. This is needed if you do not want to use `ansible.builtin.template` for the entire git config file (for example because you need to change just `user.email` in `/etc/.git/config`). Solutions involving `ansible.builtin.command` are cumbersome or do not work correctly in check mode.
const GitName = "git"
Manage `git` checkouts of repositories to deploy files or software.
const GroupName = "group"
Manage presence of groups on a host. For Windows targets, use the `ansible.windows.win_group` module instead.
const GunicornName = "gunicorn"
Starts gunicorn with the parameters specified. Common settings for gunicorn configuration are supported. For additional configuration use a config file See `https://gunicorn-docs.readthedocs.io/en/latest/settings.html` for more options. It's recommended to always use the chdir option to avoid problems with the location of the app.
const HomebrewCaskName = "homebrew_cask"
Manages Homebrew casks.
const HomebrewName = "homebrew"
Manages Homebrew packages.
const HomebrewServicesName = "homebrew_services"
Manages daemons and services using Homebrew.
const HomebrewTapName = "homebrew_tap"
Tap external Homebrew repositories.
const HomectlName = "homectl"
Manages a user's home directory managed by systemd-homed.
const HostnameName = "hostname"
Set system's hostname. Supports most OSs/Distributions including those using `systemd`. Windows, HP-UX, and AIX are not currently supported.
const HponcfgName = "hponcfg"
This modules configures the HP iLO interface using `hponcfg`.
const IniFileName = "ini_file"
Manage (add, remove, change) individual settings in an INI-style file without having to manage the file as a whole with, say, `ansible.builtin.template` or `ansible.builtin.assemble`. Adds missing sections if they do not exist. This module adds missing ending newlines to files to keep in line with the POSIX standard, even when no other modifications need to be applied.
const InstallpName = "installp"
Manage packages using 'installp' on AIX.
const InterfacesFileName = "interfaces_file"
Manage (add, remove, change) individual interface options in an interfaces- style file without having to manage the file as a whole with, say, `ansible.builtin.template` or `ansible.builtin.assemble`. Interface has to be presented in a file. Read information about interfaces from interfaces-styled files.
const IpNetnsName = "ip_netns"
Create or delete network namespaces using the `ip` command.
const IpmiBootName = "ipmi_boot"
Use this module to manage order of boot devices.
const IpmiPowerName = "ipmi_power"
Use this module for power management.
const IptablesName = "iptables"
`ansible.builtin.iptables` is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. This module does not handle the saving and/or loading of rules, but rather only manipulates the current rules that are present in memory. This is the same as the behaviour of the `iptables` and `ip6tables` command which this module uses internally.
const IsoCreateName = "iso_create"
This module is used to generate ISO file with specified path of files.
const IsoCustomizeName = "iso_customize"
This module is used to add/remove/change files in ISO file. The file inside ISO will be overwritten if it exists by option `add_files`.
const IsoExtractName = "iso_extract"
This module has two possible ways of operation. If 7zip is installed on the system, this module extracts files from an ISO into a temporary directory and copies files to a given destination, if needed. If the user has mount-capabilities (CAP_SYS_ADMIN on Linux) this module mounts the ISO image to a temporary location, and copies files to a given destination, if needed.
const JbossName = "jboss"
Deploy applications to JBoss standalone using the filesystem.
const KdeconfigName = "kdeconfig"
Add or change individual settings in KDE configuration files. It uses `kwriteconfig` under the hood.
const KernelBlacklistName = "kernel_blacklist"
Add or remove kernel modules from blacklist.
const KeyringInfoName = "keyring_info"
This module uses the `keyring Python library, https://pypi.org/project/keyring/` to retrieve passphrases for a given service and username from the OS' native keyring.
const KibanaPluginName = "kibana_plugin"
This module can be used to manage Kibana plugins.
const KnownHostsName = "known_hosts"
The `ansible.builtin.known_hosts` module lets you add or remove host keys from the `known_hosts` file. Starting at Ansible 2.2, multiple entries per host are allowed, but only one for each key type supported by ssh. This is useful if you're going to want to use the `ansible.builtin.git` module over ssh, for example. If you have a very large number of host keys to manage, you will find the `ansible.builtin.template` module more useful.
const LbuName = "lbu"
Manage Local Backup Utility of Alpine Linux in run-from-RAM mode.
const LineinfileName = "lineinfile"
This module ensures a particular line is in a file, or replace an existing line using a back-referenced regular expression. This is primarily useful when you want to change a single line in a file only. See the `ansible.builtin.replace` module if you want to change multiple, similar lines or check `ansible.builtin.blockinfile` if you want to insert/update/remove a block of lines in a file. For other cases, see the `ansible.builtin.copy` or `ansible.builtin.template` modules.
const ListenPortsFactsName = "listen_ports_facts"
Gather facts on processes listening on TCP and UDP ports using the `netstat` or `ss` commands. This module currently supports Linux only.
const LldpName = "lldp"
Reads data out of `lldpctl`.
const LocaleGenName = "locale_gen"
Manages locales in Debian and Ubuntu systems.
const LogentriesName = "logentries"
Sends logs to LogEntries in realtime.
const LvgName = "lvg"
This module creates, removes or resizes volume groups.
const LvgRenameName = "lvg_rename"
This module renames volume groups using the `vgchange` command.
const MacportsName = "macports"
Manages MacPorts packages (ports).
const MakeName = "make"
Run targets in a Makefile.
const MasName = "mas"
Installs, uninstalls and updates macOS applications from the Mac App Store using the `mas-cli`.
const ModprobeName = "modprobe"
Load or unload kernel modules.
const MountFactsName = "mount_facts"
Retrieve information about mounts from preferred sources and filter the results based on the filesystem type and device.
const MountName = "mount"
This module controls active and configured mount points in `/etc/fstab`.
const NictagadmName = "nictagadm"
Create or delete nic tags on SmartOS systems.
const NmcliName = "nmcli"
Manage the network devices. Create, modify and manage various connection and device type, for example `ethernet`, `team`, `bond`, `vlan` and so on. On CentOS 8 and Fedora >=29 like systems, the requirements can be met by installing the following packages: NetworkManager. On CentOS 7 and Fedora <=28 like systems, the requirements can be met by installing the following packages: NetworkManager-tui. On Ubuntu and Debian like systems, the requirements can be met by installing the following packages: network-manager. On openSUSE, the requirements can be met by installing the following packages: NetworkManager.
const NpmName = "npm"
Manage node.js packages with Node Package Manager (npm).
const NsupdateName = "nsupdate"
Create, update and remove DNS records using DDNS updates.
const OpkgName = "opkg"
Manages ipk packages for OpenWrt and Openembedded/Yocto based Linux distributions.
const PackageFactsName = "package_facts"
Return information about installed packages as facts.
const PackageName = "package"
This modules manages packages on a target without specifying a package manager module (like `ansible.builtin.dnf`, `ansible.builtin.apt`, ...). It is convenient to use in an heterogeneous environment of machines without having to create a specific task for each package manager. `ansible.builtin.package` calls behind the module for the package manager used by the operating system discovered by the module `ansible.builtin.setup`. If `ansible.builtin.setup` was not yet run, `ansible.builtin.package` will run it. This module acts as a proxy to the underlying package manager module. While all arguments will be passed to the underlying module, not all modules support the same arguments. This documentation only covers the minimum intersection of module arguments that all packaging modules support. For Windows targets, use the `ansible.windows.win_package` module instead.
const PacmanName = "pacman"
Manage packages with the `pacman` package manager, which is used by Arch Linux and its variants.
const PamLimitsName = "pam_limits"
The `community.general.pam_limits` module modifies PAM limits. The default file is `/etc/security/limits.conf`. For the full documentation, see `man 5 limits.conf`.
const PamdName = "pamd"
Edit PAM service's type, control, module path and module arguments. In order for a PAM rule to be modified, the type, control and module_path must match an existing rule. See man(5) pam.d for details.
const PartedName = "parted"
This module allows configuring block device partition using the `parted` command line tool. For a full description of the fields and the options check the GNU parted manual.
const PatchName = "patch"
Apply patch files using the GNU patch tool.
const PearName = "pear"
Manage PHP packages with the pear package manager.
const PidsName = "pids"
Retrieves a list of PIDs of given process name in Ansible controller/controlled machines. Returns an empty list if no process in that name exists.
const PingName = "ping"
A trivial test module, this module always returns `pong` on successful contact. It does not make sense in playbooks, but it is useful from `/usr/bin/ansible` to verify the ability to login and that a usable Python is configured. This is NOT ICMP ping, this is just a trivial test module that requires Python on the remote-node. For Windows targets, use the `ansible.windows.win_ping` module instead. For Network targets, use the `ansible.netcommon.net_ping` module instead.
const PipName = "pip"
Manage Python library dependencies. To use this module, one of the following keys is required: `name` or `requirements`.
const PipPackageInfoName = "pip_package_info"
Return information about installed pip packages.
const PipxInfoName = "pipx_info"
Retrieve details about Python applications installed in isolated virtualenvs using pipx.
const PipxName = "pipx"
Manage Python applications installed in isolated virtualenvs using pipx.
const Pkg5Name = "pkg5"
IPS packages are the native packages in Solaris 11 and higher.
const Pkg5PublisherName = "pkg5_publisher"
IPS packages are the native packages in Solaris 11 and higher. This modules will configure which publishers a client will download IPS packages from.
const PkginName = "pkgin"
The standard package manager for SmartOS, but also usable on NetBSD or any OS that uses `pkgsrc`. (Home: `http://pkgin.net/`).
const PkgngName = "pkgng"
Manage binary packages for FreeBSD using `pkgng` which is available in versions after 9.0.
const PkgutilName = "pkgutil"
This module installs, updates and removes packages from the OpenCSW project for Solaris. Unlike the `community.general.svr4pkg` module, it will resolve and download dependencies. See `https://www.opencsw.org/` for more information about the project.
const PmemName = "pmem"
This module allows Configuring Intel Optane Persistent Memory modules (PMem) using `ipmctl` and `ndctl` command line tools.
const PnpmName = "pnpm"
Manage Node.js packages with the `pnpm package manager, https://pnpm.io/`.
const PortageName = "portage"
Manages Gentoo packages.
const PortinstallName = "portinstall"
Manage packages for FreeBSD using `portinstall`.
const ReplaceName = "replace"
This module will replace all instances of a pattern within a file. It is up to the user to maintain idempotence by ensuring that the same pattern would never match any replacements made.
const RhelFactsName = "rhel_facts"
Compatibility layer for using the `ansible.builtin.package` module for rpm- ostree based systems via setting the `pkg_mgr` fact correctly.
const RhelRpmOstreeName = "rhel_rpm_ostree"
Compatibility layer for using the "package" module for RHEL for Edge systems utilizing the RHEL System Roles.
const RhsmReleaseName = "rhsm_release"
Sets or unsets the release version used by RHSM repositories.
const RhsmRepositoryName = "rhsm_repository"
Manage (Enable/Disable) RHSM repositories to the Red Hat Subscription Management entitlement platform using the `subscription-manager` command.
const RpmKeyName = "rpm_key"
Adds or removes `rpm --import` a gpg key to your rpm database.
const RpmOstreePkgName = "rpm_ostree_pkg"
Install or uninstall overlay additional packages using `rpm-ostree` command.
const RpmOstreeUpgradeName = "rpm_ostree_upgrade"
Manage an rpm-ostree upgrade transactions.
const SebooleanName = "seboolean"
Toggles SELinux booleans.
const SelinuxName = "selinux"
Configures the SELinux mode and policy. A reboot may be required after usage. Ansible will not issue this reboot but will let you know when it is required.
const SelinuxPermissiveName = "selinux_permissive"
Add and remove a domain from the list of permissive domains.
const SeportName = "seport"
Manages SELinux network port type definitions.
const ServiceName = "service"
Controls services on remote hosts. Supported init systems include BSD init, OpenRC, SysV, Solaris SMF, systemd, upstart. This module acts as a proxy to the underlying service manager module. While all arguments will be passed to the underlying module, not all modules support the same arguments. This documentation only covers the minimum intersection of module arguments that all service manager modules support. This module is a proxy for multiple more specific service manager modules (such as `ansible.builtin.systemd` and `ansible.builtin.sysvinit`). This allows management of a heterogeneous environment of machines without creating a specific task for each service manager. The module to be executed is determined by the `use` option, which defaults to the service manager discovered by `ansible.builtin.setup`. If `ansible.builtin.setup` was not yet run, this module may run it. For Windows targets, use the `ansible.windows.win_service` module instead.
const SetupName = "setup"
This module is automatically called by playbooks to gather useful variables about remote hosts that can be used in playbooks. It can also be executed directly by `/usr/bin/ansible` to check what variables are available to a host. Ansible provides many `facts` about the system, automatically. This module is also supported for Windows targets.
const ShutdownName = "shutdown"
Shut downs a machine.
const SlackpkgName = "slackpkg"
Manage binary packages for Slackware using `slackpkg` which is available in versions after 12.2.
const SlurpName = "slurp"
This module works like `ansible.builtin.fetch`. It is used for fetching a base64- encoded blob containing the data in a remote file. This module is also supported for Windows targets.
const SmartosImageInfoName = "smartos_image_info"
Retrieve information about all installed images on SmartOS.
const SnapAliasName = "snap_alias"
Manages snaps aliases.
const SorceryName = "sorcery"
Manages "spells" on Source Mage GNU/Linux using `sorcery` toolchain.
const StatName = "stat"
Retrieves facts for a file similar to the Linux/Unix `stat` command. For Windows targets, use the `ansible.windows.win_stat` module instead.
const SubversionName = "subversion"
Deploy given repository URL / revision to dest. If dest exists, update to the specified revision, otherwise perform a checkout.
const Svr4pkgName = "svr4pkg"
Manages SVR4 packages on Solaris 10 and 11. These were the native packages on Solaris <= 10 and are available as a legacy feature in Solaris 11. Note that this is a very basic packaging system. It will not enforce dependencies on install or remove.
const SwdepotName = "swdepot"
Will install, upgrade and remove packages with swdepot package manager (HP- UX).
const SwupdName = "swupd"
Manages updates and bundles with the swupd bundle manager, which is used by the Clear Linux Project for Intel Architecture.
const SynchronizeName = "synchronize"
`ansible.posix.synchronize` is a wrapper around `rsync` to make common tasks in your playbooks quick and easy. It is run and originates on the local host where Ansible is being run. Of course, you could just use the `ansible.builtin.command` action to call `rsync` yourself, but you also have to add a fair number of boilerplate options and host facts. This module is not intended to provide access to the full power of `rsync`, but does make the most common invocations easier to implement. You `still` may need to call `rsync` directly via `ansible.builtin.command` or `ansible.builtin.shell` depending on your use case.
const SysctlName = "sysctl"
This module manipulates sysctl entries and optionally performs a `/sbin/sysctl -p` after changing them.
const SyspatchName = "syspatch"
Manage OpenBSD system patches using syspatch.
const SysrcName = "sysrc"
Manages `/etc/rc.conf` for FreeBSD.
const SystemdCredsDecryptName = "systemd_creds_decrypt"
This module decrypts input using `systemd`'s `systemd-creds decrypt`.
const SystemdCredsEncryptName = "systemd_creds_encrypt"
This module encrypts input using `systemd`'s `systemd-creds encrypt`.
const SystemdInfoName = "systemd_info"
This module gathers info about systemd units (services, targets, sockets, mounts, timers). Timer units are supported since community.general 10.5.0. It runs `systemctl list-units` (or processes selected units) and collects properties for each unit using `systemctl show`. In case a unit has multiple properties with the same name, only the value of the first one will be collected. Even if a unit has a R`units.loadstate` of `not-found` or `masked`, it is returned, but only with the minimal properties (R`units.name`, R`units.loadstate`, R`units.activestate`, R`units.substate`). When `unitname` and `extra_properties` are used, the module first checks if the unit exists, then check if properties exist. If not, the module fails. When `unitname` is used with wildcard expressions, the module checks for units that match the indicated expressions, if units are not present for all the indicated expressions, the module fails.
const SystemdServiceName = "systemd_service"
Controls systemd units (services, timers, and so on) on remote hosts. `ansible.builtin.systemd` is renamed to `ansible.builtin.systemd_service` to better reflect the scope of the module. `ansible.builtin.systemd` is kept as an alias for backward compatibility.
const SysvinitName = "sysvinit"
Controls services on target hosts that use the SysV init system.
const TempfileName = "tempfile"
The `ansible.builtin.tempfile` module creates temporary files and directories. `mktemp` command takes different parameters on various systems, this module helps to avoid troubles related to that. Files/directories created by module are accessible only by creator. In case you need to make them world-accessible you need to use `ansible.builtin.file` module. For Windows targets, use the `ansible.windows.win_tempfile` module instead.
const TimezoneName = "timezone"
This module configures the timezone setting, both of the system clock and of the hardware clock. If you want to set up the NTP, use `ansible.builtin.service` module. It is recommended to restart `crond` after changing the timezone, otherwise the jobs may run at the wrong time. Several different tools are used depending on the OS/Distribution involved. For Linux it can use `timedatectl` or edit `/etc/sysconfig/clock` or `/etc/timezone` and `hwclock`. On SmartOS, `sm-set-timezone`, for macOS, `systemsetup`, for BSD, `/etc/localtime` is modified. On AIX, `chtz` is used. Make sure that the zoneinfo files are installed with the appropriate OS package, like `tzdata` (usually always installed, when not using a minimal installation like Alpine Linux). Windows and HPUX are not supported, please let us know if you find any other OS/distro in which this fails.
const UnarchiveName = "unarchive"
The `ansible.builtin.unarchive` module unpacks an archive. It will not unpack a compressed file that does not contain an archive. By default, it will copy the source file from the local system to the target before unpacking. Set `remote_src=yes` to unpack an archive which already exists on the target. If checksum validation is desired, use `ansible.builtin.get_url` or `ansible.builtin.uri` instead to fetch the file and set `remote_src=yes`. For Windows targets, use the `community.windows.win_unzip` module instead.
const UriName = "uri"
Interacts with HTTP and HTTPS web services and supports Digest, Basic and WSSE HTTP authentication mechanisms. For Windows targets, use the `ansible.windows.win_uri` module instead.
const UrpmiName = "urpmi"
Manages packages with `urpmi` (such as for Mageia or Mandriva).
const UsbFactsName = "usb_facts"
Allows retrieving information about available USB devices through `lsusb`.
const UserName = "user"
Manage user accounts and user attributes. For Windows targets, use the `ansible.windows.win_user` module instead.
const VdoName = "vdo"
This module controls the VDO dedupe and compression device. VDO, or Virtual Data Optimizer, is a device-mapper target that provides inline block-level deduplication, compression, and thin provisioning capabilities to primary storage.
const WaitForName = "wait_for"
You can wait for a set amount of time `timeout`, this is the default if nothing is specified or just `timeout` is specified. This does not produce an error. Waiting for a port to become available is useful for when services are not immediately available after their init scripts return which is true of certain Java application servers. It is also useful when starting guests with the `community.libvirt.virt` module and needing to pause until they are ready. This module can also be used to wait for a regex match a string to be present in a file. In Ansible 1.6 and later, this module can also be used to wait for a file to be available or absent on the filesystem. In Ansible 1.8 and later, this module can also be used to wait for active connections to be closed before continuing, useful if a node is being rotated out of a load balancer pool. For Windows targets, use the `ansible.windows.win_wait_for` module instead.
const XattrName = "xattr"
Manages filesystem user defined extended attributes. Requires that extended attributes are enabled on the target filesystem and that the `setfattr`/`getfattr` utilities are present.
const XbpsName = "xbps"
Manage packages with the XBPS package manager.
const XdgMimeName = "xdg_mime"
This module allows configuring the default handler for specific MIME types when you use applications that rely on XDG.
const XfconfInfoName = "xfconf_info"
This module allows retrieving Xfce 4 configurations with the help of `xfconf- query`.
const XfconfName = "xfconf"
This module allows for the manipulation of Xfce 4 Configuration with the help of `xfconf-query`.
const XfsQuotaName = "xfs_quota"
Configure quotas on XFS filesystems. Before using this module /etc/projects and /etc/projid need to be configured.
const XmlName = "xml"
A CRUD-like interface to managing bits of XML files.
const YarnName = "yarn"
Manage Node.js packages with the Yarn package manager `https://yarnpkg.com/`. Note that at the moment, this module `only works with Yarn Classic`.
const YumRepositoryName = "yum_repository"
Add or remove YUM repositories in RPM-based Linux distributions. If you wish to update an existing repository definition use `community.general.ini_file` instead.
const YumVersionlockName = "yum_versionlock"
This module adds installed packages to yum versionlock to prevent the package(s) from being updated.
const ZfsDelegateAdminName = "zfs_delegate_admin"
Manages ZFS file system delegated administration permissions, which allow unprivileged users to perform ZFS operations normally restricted to the superuser. See the `zfs allow` section of `zfs(1M\`) for detailed explanations of options. This module attempts to adhere to the behavior of the command line tool as much as possible.
const ZfsFactsName = "zfs_facts"
Gather facts from ZFS dataset properties.
const ZfsName = "zfs"
Manages ZFS file systems, volumes, clones and snapshots.
const ZpoolFactsName = "zpool_facts"
Gather facts from ZFS pool properties.
const ZypperName = "zypper"
Manage packages on SUSE and openSUSE using the zypper and rpm tools. Also supports transactional updates, by running zypper inside `/sbin/transactional-update --continue --drop-if-no-change --quiet run`.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AclEtype ¶ added in v0.0.7
type AclEtype string
The entity type of the ACL to apply, see `setfacl` documentation for more info.
type AclParameters ¶ added in v0.0.7
type AclParameters struct {
// The full path of the file or object.
Path string `json:"path"`
// Define whether the ACL should be present or not.
// The `query` state gets the current ACL without changing it, for use in
// `register` operations.
// default: AclStateQuery
State *AclState `json:"state,omitempty"`
// Whether to follow symlinks on the path if a symlink is encountered.
// default: true
Follow *bool `json:"follow,omitempty"`
// If `path` is a directory, setting this to `true` will make it the default
// ACL for entities created inside the directory.
// Setting `default=true` causes an error if `path` is a file.
// default: false
Default *bool `json:"default,omitempty"`
// The actual user or group that the ACL applies to when matching entity types
// user or group are selected.
// default: ""
Entity *string `json:"entity,omitempty"`
// The entity type of the ACL to apply, see `setfacl` documentation for more
// info.
Etype *AclEtype `json:"etype,omitempty"`
// The permissions to apply/remove can be any combination of `r`, `w`, `x`
// (read, write and execute respectively), and `X` (execute permission if the
// file is a directory or already has execute permission for some user)
Permissions *string `json:"permissions,omitempty"`
// DEPRECATED.
// The ACL to set or remove.
// This must always be quoted in the form of `<etype>:<qualifier>:<perms>`.
// The qualifier may be empty for some types, but the type and perms are always
// required.
// `-` can be used as placeholder when you do not care about permissions.
// This is now superseded by entity, type and permissions fields.
Entry *string `json:"entry,omitempty"`
// Recursively sets the specified ACL.
// Incompatible with `state=query`.
// Alias `recurse` added in version 1.3.0.
// default: false
Recursive *bool `json:"recursive,omitempty"`
// Use NFSv4 ACLs instead of POSIX ACLs.
// This feature uses `nfs4_setfacl` and `nfs4_getfacl`. The behavior depends on
// those implementation. And currently it only supports `A` in ACE, so `D` must
// be replaced with the appropriate `A`.
// Permission is set as optimised ACLs by the system. You can check the actual
// ACLs that has been set using the return value.
// More info `man nfs4_setfacl`
// default: false
UseNfsv4Acls *bool `json:"use_nfsv4_acls,omitempty"`
// Select if and when to recalculate the effective right masks of the files.
// See `setfacl` documentation for more info.
// Incompatible with `state=query`.
// default: AclRecalculateMaskDefault
RecalculateMask *AclRecalculateMask `json:"recalculate_mask,omitempty"`
}
Parameters for the `acl` Ansible module.
func (AclParameters) ToRPCCall ¶ added in v0.0.7
func (p AclParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AclParameters into an `rpc.RPCCall`.
type AclRecalculateMask ¶ added in v0.0.7
type AclRecalculateMask string
Select if and when to recalculate the effective right masks of the files. See `setfacl` documentation for more info. Incompatible with `state=query`.
const ( AclRecalculateMaskDefault AclRecalculateMask = "default" AclRecalculateMaskMask AclRecalculateMask = "mask" AclRecalculateMaskNoMask AclRecalculateMask = "no_mask" )
func OptionalAclRecalculateMask ¶ added in v0.0.7
func OptionalAclRecalculateMask[T interface {
*AclRecalculateMask | AclRecalculateMask | *string | string
}](s T) *AclRecalculateMask
Convert a supported type to an optional (pointer) AclRecalculateMask
type AclReturn ¶ added in v0.0.7
type AclReturn struct {
AnsibleCommonReturns
// Current ACL on provided path (after changes, if any)
Acl *[]any `json:"acl,omitempty"`
}
Return values for the `acl` Ansible module.
func AclReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `AclReturn`
type AclState ¶ added in v0.0.7
type AclState string
Define whether the ACL should be present or not. The `query` state gets the current ACL without changing it, for use in `register` operations.
type AlternativesParameters ¶ added in v0.0.7
type AlternativesParameters struct {
// The generic name of the link.
Name string `json:"name"`
// The path to the real executable that the link should point to.
Path *string `json:"path,omitempty"`
// The family groups similar alternatives. This option is available only on
// RHEL-based distributions.
Family *string `json:"family,omitempty"`
// The path to the symbolic link that should point to the real executable.
// This option is always required on RHEL-based distributions. On Debian-based
// distributions this option is required when the alternative `name` is unknown
// to the system.
Link *string `json:"link,omitempty"`
// The priority of the alternative. If no priority is given for creation `50`
// is used as a fallback.
Priority *int `json:"priority,omitempty"`
// `present` - install the alternative (if not already installed), but do not
// set it as the currently selected alternative for the group.
// `selected` - install the alternative (if not already installed), and set it
// as the currently selected alternative for the group.
// `auto` - install the alternative (if not already installed), and set the
// group to auto mode. Added in community.general 5.1.0.
// `absent` - removes the alternative. Added in community.general 5.1.0.
// default: AlternativesStateSelected
State *AlternativesState `json:"state,omitempty"`
// A list of subcommands.
// Each subcommand needs a name, a link and a path parameter.
// Subcommands are also named `slaves` or `followers`, depending on the version
// of `alternatives`.
Subcommands *struct {
Name string `json:"name"`
Path string `json:"path"`
Link string `json:"link"`
} `json:"subcommands,omitempty"`
}
Parameters for the `alternatives` Ansible module.
func (AlternativesParameters) ToRPCCall ¶ added in v0.0.7
func (p AlternativesParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AlternativesParameters into an `rpc.RPCCall`.
type AlternativesReturn ¶ added in v0.0.7
type AlternativesReturn struct {
AnsibleCommonReturns
}
Return values for the `alternatives` Ansible module.
func AlternativesReturnFromRPCResult ¶ added in v0.0.7
func AlternativesReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (AlternativesReturn, error)
Unwrap the `rpc.RPCResult` into an `AlternativesReturn`
type AlternativesState ¶ added in v0.0.7
type AlternativesState string
`present` - install the alternative (if not already installed), but do not set it as the currently selected alternative for the group. `selected` - install the alternative (if not already installed), and set it as the currently selected alternative for the group. `auto` - install the alternative (if not already installed), and set the group to auto mode. Added in community.general 5.1.0. `absent` - removes the alternative. Added in community.general 5.1.0.
const ( AlternativesStatePresent AlternativesState = "present" AlternativesStateSelected AlternativesState = "selected" AlternativesStateAuto AlternativesState = "auto" AlternativesStateAbsent AlternativesState = "absent" )
func OptionalAlternativesState ¶ added in v0.0.7
func OptionalAlternativesState[T interface {
*AlternativesState | AlternativesState | *string | string
}](s T) *AlternativesState
Convert a supported type to an optional (pointer) AlternativesState
type AndroidSdkChannel ¶ added in v0.0.7
type AndroidSdkChannel string
Indicates what channel must `sdkmanager` use for installation of packages.
const ( AndroidSdkChannelStable AndroidSdkChannel = "stable" AndroidSdkChannelBeta AndroidSdkChannel = "beta" AndroidSdkChannelDev AndroidSdkChannel = "dev" AndroidSdkChannelCanary AndroidSdkChannel = "canary" )
func OptionalAndroidSdkChannel ¶ added in v0.0.7
func OptionalAndroidSdkChannel[T interface {
*AndroidSdkChannel | AndroidSdkChannel | *string | string
}](s T) *AndroidSdkChannel
Convert a supported type to an optional (pointer) AndroidSdkChannel
type AndroidSdkParameters ¶ added in v0.0.7
type AndroidSdkParameters struct {
// If this is set to `true`, the module will try to accept license prompts
// generated by `sdkmanager` during package installation. Otherwise, every
// license prompt will be rejected.
// default: false
AcceptLicenses *bool `json:"accept_licenses,omitempty"`
// A name of an Android SDK package (for instance, `build-tools;34.0.0`).
Name *[]string `json:"name,omitempty"`
// Indicates the desired package(s) state.
// `present` ensures that package(s) is/are present.
// `absent` ensures that package(s) is/are absent.
// `latest` ensures that package(s) is/are installed and updated to the latest
// version(s).
// default: AndroidSdkStatePresent
State *AndroidSdkState `json:"state,omitempty"`
// Provides path for an alternative directory to install Android SDK packages
// to. By default, all packages are installed to the directory where
// `sdkmanager` is installed.
SdkRoot *string `json:"sdk_root,omitempty"`
// Indicates what channel must `sdkmanager` use for installation of packages.
// default: AndroidSdkChannelStable
Channel *AndroidSdkChannel `json:"channel,omitempty"`
}
Parameters for the `android_sdk` Ansible module.
func (AndroidSdkParameters) ToRPCCall ¶ added in v0.0.7
func (p AndroidSdkParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AndroidSdkParameters into an `rpc.RPCCall`.
type AndroidSdkReturn ¶ added in v0.0.7
type AndroidSdkReturn struct {
AnsibleCommonReturns
// A list of packages that have been installed.
Installed *[]any `json:"installed,omitempty"`
// A list of packages that have been removed.
Removed *[]any `json:"removed,omitempty"`
}
Return values for the `android_sdk` Ansible module.
func AndroidSdkReturnFromRPCResult ¶ added in v0.0.7
func AndroidSdkReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (AndroidSdkReturn, error)
Unwrap the `rpc.RPCResult` into an `AndroidSdkReturn`
type AndroidSdkState ¶ added in v0.0.7
type AndroidSdkState string
Indicates the desired package(s) state. `present` ensures that package(s) is/are present. `absent` ensures that package(s) is/are absent. `latest` ensures that package(s) is/are installed and updated to the latest version(s).
const ( AndroidSdkStatePresent AndroidSdkState = "present" AndroidSdkStateAbsent AndroidSdkState = "absent" AndroidSdkStateLatest AndroidSdkState = "latest" )
func OptionalAndroidSdkState ¶ added in v0.0.7
func OptionalAndroidSdkState[T interface {
*AndroidSdkState | AndroidSdkState | *string | string
}](s T) *AndroidSdkState
Convert a supported type to an optional (pointer) AndroidSdkState
type AnsibleCommonReturns ¶
type AnsibleCommonReturns struct {
Changed bool `json:"changed"`
Failed bool `json:"failed"`
Msg *string `json:"msg,omitempty"`
Diff *any `json:"diff,omitempty"`
}
These should always be returned by any module
func (AnsibleCommonReturns) GetMsg ¶ added in v0.0.7
func (returns AnsibleCommonReturns) GetMsg() string
Returns "msg" if set, empty string if not
func (AnsibleCommonReturns) IsChanged ¶
func (returns AnsibleCommonReturns) IsChanged() bool
Returns true if Changed, false otherwise.
type AnsibleGalaxyInstallParameters ¶ added in v0.0.7
type AnsibleGalaxyInstallParameters struct {
// If `state=present` then the collection or role will be installed. Note that
// the collections and roles are not updated with this option.
// Currently the `state=latest` is ignored unless `type=collection`, and it
// will ensure the collection is installed and updated to the latest available
// version.
// Please note that `force=true` can be used to perform upgrade regardless of
// `type`.
// default: AnsibleGalaxyInstallStatePresent
State *AnsibleGalaxyInstallState `json:"state,omitempty"`
// The type of installation performed by `ansible-galaxy`.
// If `type=both`, then `requirements_file` must be passed and it may contain
// both roles and collections.
// Note however that the opposite is not true: if using a `requirements_file`,
// then `type` can be any of the three choices.
Type AnsibleGalaxyInstallType `json:"type"`
// Name of the collection or role being installed.
// Versions can be specified with `ansible-galaxy` usual formats. For example,
// the collection `community.docker:1.6.1` or the role
// `ansistrano.deploy,3.8.0`.
// `name` and `requirements_file` are mutually exclusive.
Name *string `json:"name,omitempty"`
// Path to a file containing a list of requirements to be installed.
// It works for `type` equals to `collection` and `role`.
// `name` and `requirements_file` are mutually exclusive.
RequirementsFile *string `json:"requirements_file,omitempty"`
// The path to the directory containing your collections or roles, according to
// the value of `type`.
// Please notice that `ansible-galaxy` will not install collections with
// `type=both`, when `requirements_file` contains both roles and collections
// and `dest` is specified.
Dest *string `json:"dest,omitempty"`
// Refrain from installing dependencies.
// default: false
NoDeps *bool `json:"no_deps,omitempty"`
// Force overwriting existing roles and/or collections.
// It can be used for upgrading, but the module output will always report
// `changed=true`.
// Using `force=true` is mandatory when downgrading.
// default: false
Force *bool `json:"force,omitempty"`
}
Parameters for the `ansible_galaxy_install` Ansible module.
func (AnsibleGalaxyInstallParameters) ToRPCCall ¶ added in v0.0.7
func (p AnsibleGalaxyInstallParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AnsibleGalaxyInstallParameters into an `rpc.RPCCall`.
type AnsibleGalaxyInstallReturn ¶ added in v0.0.7
type AnsibleGalaxyInstallReturn struct {
AnsibleCommonReturns
// The value of the `type` parameter.
Type *string `json:"type,omitempty"`
// The value of the `name` parameter.
Name *string `json:"name,omitempty"`
// The value of the `dest` parameter.
Dest *string `json:"dest,omitempty"`
// The value of the `requirements_file` parameter.
RequirementsFile *string `json:"requirements_file,omitempty"`
// The value of the `force` parameter.
Force *bool `json:"force,omitempty"`
// If `requirements_file` is specified instead, returns dictionary with all the
// roles installed per path.
// If `name` is specified, returns that role name and the version installed per
// path.
InstalledRoles *map[string]any `json:"installed_roles,omitempty"`
// If `requirements_file` is specified instead, returns dictionary with all the
// collections installed per path.
// If `name` is specified, returns that collection name and the version
// installed per path.
InstalledCollections *map[string]any `json:"installed_collections,omitempty"`
// New collections installed by this module.
NewCollections *map[string]any `json:"new_collections,omitempty"`
// New roles installed by this module.
NewRoles *map[string]any `json:"new_roles,omitempty"`
// Version of ansible-core for ansible-galaxy.
Version *string `json:"version,omitempty"`
}
Return values for the `ansible_galaxy_install` Ansible module.
func AnsibleGalaxyInstallReturnFromRPCResult ¶ added in v0.0.7
func AnsibleGalaxyInstallReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (AnsibleGalaxyInstallReturn, error)
Unwrap the `rpc.RPCResult` into an `AnsibleGalaxyInstallReturn`
type AnsibleGalaxyInstallState ¶ added in v0.0.7
type AnsibleGalaxyInstallState string
If `state=present` then the collection or role will be installed. Note that the collections and roles are not updated with this option. Currently the `state=latest` is ignored unless `type=collection`, and it will ensure the collection is installed and updated to the latest available version. Please note that `force=true` can be used to perform upgrade regardless of `type`.
const ( AnsibleGalaxyInstallStatePresent AnsibleGalaxyInstallState = "present" AnsibleGalaxyInstallStateLatest AnsibleGalaxyInstallState = "latest" )
func OptionalAnsibleGalaxyInstallState ¶ added in v0.0.7
func OptionalAnsibleGalaxyInstallState[T interface {
*AnsibleGalaxyInstallState | AnsibleGalaxyInstallState | *string | string
}](s T) *AnsibleGalaxyInstallState
Convert a supported type to an optional (pointer) AnsibleGalaxyInstallState
type AnsibleGalaxyInstallType ¶ added in v0.0.7
type AnsibleGalaxyInstallType string
The type of installation performed by `ansible-galaxy`. If `type=both`, then `requirements_file` must be passed and it may contain both roles and collections. Note however that the opposite is not true: if using a `requirements_file`, then `type` can be any of the three choices.
const ( AnsibleGalaxyInstallTypeCollection AnsibleGalaxyInstallType = "collection" AnsibleGalaxyInstallTypeRole AnsibleGalaxyInstallType = "role" AnsibleGalaxyInstallTypeBoth AnsibleGalaxyInstallType = "both" )
type ApkParameters ¶ added in v0.0.7
type ApkParameters struct {
// During upgrade, reset versioned world dependencies and change logic to
// prefer replacing or downgrading packages (instead of holding them) if the
// currently installed package is no longer available from any repository.
// default: false
Available *bool `json:"available,omitempty"`
// A package name, like `foo`, or multiple packages, like `foo,bar`.
// Do not include additional whitespace when specifying multiple packages as a
// string. Prefer YAML lists over comma-separating multiple package names.
Name *[]string `json:"name,omitempty"`
// Do not use any local cache path.
// default: false
NoCache *bool `json:"no_cache,omitempty"`
// A package repository or multiple repositories. Unlike with the underlying
// apk command, this list will override the system repositories rather than
// supplement them.
Repository *[]string `json:"repository,omitempty"`
// Indicates the desired package(s) state.
// `present` ensures the package(s) is/are present. `installed` can be used as
// an alias.
// `absent` ensures the package(s) is/are absent. `removed` can be used as an
// alias.
// `latest` ensures the package(s) is/are present and the latest version(s).
// default: ApkStatePresent
State *ApkState `json:"state,omitempty"`
// Update repository indexes. Can be run with other steps or on its own.
// default: false
UpdateCache *bool `json:"update_cache,omitempty"`
// Upgrade all installed packages to their latest version.
// default: false
Upgrade *bool `json:"upgrade,omitempty"`
// Use a custom world file when checking for explicitly installed packages. The
// file is used only when a value is provided for `name`, and `state` is set to
// `present` or `latest`.
// default: "/etc/apk/world"
World *string `json:"world,omitempty"`
}
Parameters for the `apk` Ansible module.
func (ApkParameters) ToRPCCall ¶ added in v0.0.7
func (p ApkParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ApkParameters into an `rpc.RPCCall`.
type ApkReturn ¶ added in v0.0.7
type ApkReturn struct {
AnsibleCommonReturns
// A list of packages that have been changed.
Packages *[]any `json:"packages,omitempty"`
}
Return values for the `apk` Ansible module.
func ApkReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `ApkReturn`
type ApkState ¶ added in v0.0.7
type ApkState string
Indicates the desired package(s) state. `present` ensures the package(s) is/are present. `installed` can be used as an alias. `absent` ensures the package(s) is/are absent. `removed` can be used as an alias. `latest` ensures the package(s) is/are present and the latest version(s).
type AptKeyParameters ¶
type AptKeyParameters struct {
// The identifier of the key.
// Including this allows check mode to correctly report the changed state.
// If specifying a subkey's id be aware that apt-key does not understand how to
// remove keys via a subkey id. Specify the primary key's id instead.
// This parameter is required when `state` is set to `absent`.
Id *string `json:"id,omitempty"`
// The keyfile contents to add to the keyring.
Data *string `json:"data,omitempty"`
// The path to a keyfile on the remote server to add to the keyring.
File *string `json:"file,omitempty"`
// The full path to specific keyring file in `/etc/apt/trusted.gpg.d/`.
Keyring *string `json:"keyring,omitempty"`
// The URL to retrieve key from.
Url *string `json:"url,omitempty"`
// The keyserver to retrieve key from.
Keyserver *string `json:"keyserver,omitempty"`
// Ensures that the key is present (added) or absent (revoked).
// default: AptKeyStatePresent
State *AptKeyState `json:"state,omitempty"`
// If `false`, SSL certificates for the target url will not be validated. This
// should only be used on personally controlled sites using self-signed
// certificates.
// default: "yes"
ValidateCerts *bool `json:"validate_certs,omitempty"`
}
Parameters for the `apt_key` Ansible module.
func (AptKeyParameters) ToRPCCall ¶
func (p AptKeyParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AptKeyParameters into an `rpc.RPCCall`.
type AptKeyReturn ¶
type AptKeyReturn struct {
AnsibleCommonReturns
// List of apt key ids or fingerprints after any modification
After *[]any `json:"after,omitempty"`
// List of apt key ids or fingprints before any modifications
Before *[]any `json:"before,omitempty"`
// Fingerprint of the key to import
Fp *string `json:"fp,omitempty"`
// key id from source
Id *string `json:"id,omitempty"`
// calculated key id, it should be same as 'id', but can be different
KeyId *string `json:"key_id,omitempty"`
// calculated short key id
ShortId *string `json:"short_id,omitempty"`
}
Return values for the `apt_key` Ansible module.
func AptKeyReturnFromRPCResult ¶
func AptKeyReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (AptKeyReturn, error)
Unwrap the `rpc.RPCResult` into an `AptKeyReturn`
type AptKeyState ¶ added in v0.0.7
type AptKeyState string
Ensures that the key is present (added) or absent (revoked).
const ( AptKeyStateAbsent AptKeyState = "absent" AptKeyStatePresent AptKeyState = "present" )
func OptionalAptKeyState ¶ added in v0.0.7
func OptionalAptKeyState[T interface {
*AptKeyState | AptKeyState | *string | string
}](s T) *AptKeyState
Convert a supported type to an optional (pointer) AptKeyState
type AptParameters ¶
type AptParameters struct {
// A list of package names, like `foo`, or package specifier with version, like
// `foo=1.0` or `foo>=1.0`. Name wildcards (fnmatch) like `apt*` and version
// wildcards like `foo=1.0*` are also supported.
// Do not use single or double quotes around the version when referring to the
// package name with a specific version, such as `foo=1.0` or `foo>=1.0`.
Name *[]string `json:"name,omitempty"`
// Indicates the desired package state. `latest` ensures that the latest
// version is installed. `build-dep` ensures the package build dependencies are
// installed. `fixed` attempt to correct a system with broken dependencies in
// place.
// default: AptStatePresent
State *AptState `json:"state,omitempty"`
// Run the equivalent of `apt-get update` before the operation. Can be run as
// part of the package installation or as a separate step.
// Default is not to update the cache.
UpdateCache *bool `json:"update_cache,omitempty"`
// Amount of retries if the cache update fails. Also see
// `update_cache_retry_max_delay`.
// default: 5
UpdateCacheRetries *int `json:"update_cache_retries,omitempty"`
// Use an exponential backoff delay for each retry (see `update_cache_retries`)
// up to this max delay in seconds.
// default: 12
UpdateCacheRetryMaxDelay *int `json:"update_cache_retry_max_delay,omitempty"`
// Update the apt cache if it is older than the `cache_valid_time`. This option
// is set in seconds.
// As of Ansible 2.4, if explicitly set, this sets `update_cache=yes`.
// default: 0
CacheValidTime *int `json:"cache_valid_time,omitempty"`
// Will force purging of configuration files if `state=absent` or
// `autoremove=yes`.
// default: "no"
Purge *bool `json:"purge,omitempty"`
// Corresponds to the `-t` option for `apt` and sets pin priorities.
DefaultRelease *string `json:"default_release,omitempty"`
// Corresponds to the `--no-install-recommends` option for `apt`. `true`
// installs recommended packages. `false` does not install recommended
// packages. By default, Ansible will use the same defaults as the operating
// system. Suggested packages are never installed.
InstallRecommends *bool `json:"install_recommends,omitempty"`
// Corresponds to the `--force-yes` to `apt-get` and implies
// `allow_unauthenticated=yes` and `allow_downgrade=yes`.
// This option will disable checking both the packages' signatures and the
// certificates of the web servers they are downloaded from.
// This option *is not* the equivalent of passing the `-f` flag to `apt-get` on
// the command line.
// **This is a destructive operation with the potential to destroy your system,
// and it should almost never be used.** Please also see `man apt-get` for more
// information.
// default: "no"
Force *bool `json:"force,omitempty"`
// Run the equivalent of `apt-get clean` to clear out the local repository of
// retrieved package files. It removes everything but the lock file from
// `/var/cache/apt/archives/` and `/var/cache/apt/archives/partial/`.
// Can be run as part of the package installation (clean runs before install)
// or as a separate step.
// default: "no"
Clean *bool `json:"clean,omitempty"`
// Ignore if packages cannot be authenticated. This is useful for bootstrapping
// environments that manage their own apt-key setup.
// `allow_unauthenticated` is only supported with `state`: `install`/`present`.
// default: "no"
AllowUnauthenticated *bool `json:"allow_unauthenticated,omitempty"`
// Corresponds to the `--allow-downgrades` option for `apt`.
// This option enables the named package and version to replace an already
// installed higher version of that package.
// Note that setting `allow_downgrade=true` can make this module behave in a
// non-idempotent way.
// (The task could end up with a set of packages that does not match the
// complete list of specified packages to install).
// `allow_downgrade` is only supported by `apt` and will be ignored if
// `aptitude` is detected or specified.
// default: "no"
AllowDowngrade *bool `json:"allow_downgrade,omitempty"`
// Allows changing the version of a package which is on the apt hold list.
// default: "no"
AllowChangeHeldPackages *bool `json:"allow_change_held_packages,omitempty"`
// If yes or safe, performs an aptitude safe-upgrade.
// If full, performs an aptitude full-upgrade.
// If dist, performs an apt-get dist-upgrade.
// Note: This does not upgrade a specific package, use state=latest for that.
// Note: Since 2.4, apt-get is used as a fall-back if aptitude is not present.
// default: AptUpgradeNo
Upgrade *AptUpgrade `json:"upgrade,omitempty"`
// Add `dpkg` options to `apt` command. Defaults to `-o
// "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"`.
// Options should be supplied as comma separated list.
// default: "force-confdef,force-confold"
DpkgOptions *string `json:"dpkg_options,omitempty"`
// Path to a .deb package on the remote machine.
// If `://` in the path, ansible will attempt to download deb before
// installing. (Version added 2.1)
// Requires the `xz-utils` package to extract the control file of the deb
// package to install.
Deb *string `json:"deb,omitempty"`
// If `true`, remove unused dependency packages for all module states except
// `build-dep`. It can also be used as the only option.
// Previous to version 2.4, `autoclean` was also an alias for `autoremove`, now
// it is its own separate command. See documentation for further information.
// default: "no"
Autoremove *bool `json:"autoremove,omitempty"`
// If `true`, cleans the local repository of retrieved package files that can
// no longer be downloaded.
// default: "no"
Autoclean *bool `json:"autoclean,omitempty"`
// Force the exit code of `/usr/sbin/policy-rc.d`.
// For example, if `policy_rc_d=101` the installed package will not trigger a
// service start.
// If `/usr/sbin/policy-rc.d` already exists, it is backed up and restored
// after the package installation.
// If `null`, the `/usr/sbin/policy-rc.d` is not created/changed.
// default: nil
PolicyRcD *int `json:"policy_rc_d,omitempty"`
// Only upgrade a package if it is already installed.
// default: "no"
OnlyUpgrade *bool `json:"only_upgrade,omitempty"`
// Corresponds to the `--no-remove` option for `apt`.
// If `true`, it is ensured that no packages will be removed or the task will
// fail.
// `fail_on_autoremove` is only supported with `state` except `absent`.
// `fail_on_autoremove` is only supported by `apt` and will be ignored if
// `aptitude` is detected or specified.
// default: "no"
FailOnAutoremove *bool `json:"fail_on_autoremove,omitempty"`
// Force usage of apt-get instead of aptitude.
// default: "no"
ForceAptGet *bool `json:"force_apt_get,omitempty"`
// How many seconds will this action wait to acquire a lock on the apt db.
// Sometimes there is a transitory lock and this will retry at least until
// timeout is hit.
// default: 60
LockTimeout *int `json:"lock_timeout,omitempty"`
}
Parameters for the `apt` Ansible module.
func (AptParameters) ToRPCCall ¶
func (p AptParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AptParameters into an `rpc.RPCCall`.
type AptRepoParameters ¶ added in v0.0.7
type AptRepoParameters struct {
// Name of the repository to add or remove.
Repo string `json:"repo"`
// Indicates the desired repository state.
// default: AptRepoStatePresent
State *AptRepoState `json:"state,omitempty"`
// Remove other then added repositories.
// Used if `state=present`.
// default: false
RemoveOthers *bool `json:"remove_others,omitempty"`
// Update the package database after changing repositories.
// default: false
Update *bool `json:"update,omitempty"`
}
Parameters for the `apt_repo` Ansible module.
func (AptRepoParameters) ToRPCCall ¶ added in v0.0.7
func (p AptRepoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AptRepoParameters into an `rpc.RPCCall`.
type AptRepoReturn ¶ added in v0.0.7
type AptRepoReturn struct {
AnsibleCommonReturns
}
Return values for the `apt_repo` Ansible module.
func AptRepoReturnFromRPCResult ¶ added in v0.0.7
func AptRepoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (AptRepoReturn, error)
Unwrap the `rpc.RPCResult` into an `AptRepoReturn`
type AptRepoState ¶ added in v0.0.7
type AptRepoState string
Indicates the desired repository state.
const ( AptRepoStateAbsent AptRepoState = "absent" AptRepoStatePresent AptRepoState = "present" )
func OptionalAptRepoState ¶ added in v0.0.7
func OptionalAptRepoState[T interface {
*AptRepoState | AptRepoState | *string | string
}](s T) *AptRepoState
Convert a supported type to an optional (pointer) AptRepoState
type AptRepositoryParameters ¶
type AptRepositoryParameters struct {
// A source string for the repository.
Repo string `json:"repo"`
// A source string state.
// default: AptRepositoryStatePresent
State *AptRepositoryState `json:"state,omitempty"`
// The octal mode for newly created files in `sources.list.d`.
// Default is what system uses (probably 0644).
Mode *any `json:"mode,omitempty"`
// Run the equivalent of `apt-get update` when a change occurs. Cache updates
// are run after making changes.
// default: "yes"
UpdateCache *bool `json:"update_cache,omitempty"`
// Amount of retries if the cache update fails. Also see
// `update_cache_retry_max_delay`.
// default: 5
UpdateCacheRetries *int `json:"update_cache_retries,omitempty"`
// Use an exponential backoff delay for each retry (see `update_cache_retries`)
// up to this max delay in seconds.
// default: 12
UpdateCacheRetryMaxDelay *int `json:"update_cache_retry_max_delay,omitempty"`
// If `false`, SSL certificates for the target repo will not be validated. This
// should only be used on personally controlled sites using self-signed
// certificates.
// default: "yes"
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Sets the name of the source list file in `sources.list.d`. Defaults to a
// file name based on the repository source url. The `.list` extension will be
// automatically added.
Filename *string `json:"filename,omitempty"`
// Override the distribution codename to use for PPA repositories. Should
// usually only be set when working with a PPA on a non-Ubuntu target (for
// example, Debian or Mint).
Codename *string `json:"codename,omitempty"`
// Whether to automatically try to install the Python apt library or not, if it
// is not already installed. Without this library, the module does not work.
// Runs `apt-get install python-apt` for Python 2, and `apt-get install
// python3-apt` for Python 3.
// Only works with the system Python 2 or Python 3. If you are using a Python
// on the remote that is not the system Python, set `install_python_apt=false`
// and ensure that the Python apt library for your Python version is installed
// some other way.
// default: true
InstallPythonApt *bool `json:"install_python_apt,omitempty"`
}
Parameters for the `apt_repository` Ansible module.
func (AptRepositoryParameters) ToRPCCall ¶
func (p AptRepositoryParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AptRepositoryParameters into an `rpc.RPCCall`.
type AptRepositoryReturn ¶
type AptRepositoryReturn struct {
AnsibleCommonReturns
// A source string for the repository
Repo *string `json:"repo,omitempty"`
// List of sources added
SourcesAdded *[]any `json:"sources_added,omitempty"`
// List of sources removed
SourcesRemoved *[]any `json:"sources_removed,omitempty"`
}
Return values for the `apt_repository` Ansible module.
func AptRepositoryReturnFromRPCResult ¶
func AptRepositoryReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (AptRepositoryReturn, error)
Unwrap the `rpc.RPCResult` into an `AptRepositoryReturn`
type AptRepositoryState ¶ added in v0.0.7
type AptRepositoryState string
A source string state.
const ( AptRepositoryStateAbsent AptRepositoryState = "absent" AptRepositoryStatePresent AptRepositoryState = "present" )
func OptionalAptRepositoryState ¶ added in v0.0.7
func OptionalAptRepositoryState[T interface {
*AptRepositoryState | AptRepositoryState | *string | string
}](s T) *AptRepositoryState
Convert a supported type to an optional (pointer) AptRepositoryState
type AptReturn ¶
type AptReturn struct {
AnsibleCommonReturns
// list of packages tracked by this task
PackagesTracked *[]string `json:"packages_tracked,omitempty"`
// if the cache was updated or not
CacheUpdated *bool `json:"cache_updated,omitempty"`
// time of the last cache update (0 if unknown)
CacheUpdateTime *int `json:"cache_update_time,omitempty"`
// output from apt
Stdout *string `json:"stdout,omitempty"`
// error output from apt
Stderr *string `json:"stderr,omitempty"`
}
Return values for the `apt` Ansible module.
func AptReturnFromRPCResult ¶
Unwrap the `rpc.RPCResult` into an `AptReturn`
type AptRpmParameters ¶ added in v0.0.7
type AptRpmParameters struct {
// List of packages to install, upgrade, or remove.
// Since community.general 8.0.0, may include paths to local `.rpm` files if
// `state=installed` or `state=present`, requires `rpm` Python module.
Package *[]string `json:"package,omitempty"`
// Indicates the desired package state.
// The states `latest` and `present_not_latest` have been added in
// community.general 8.6.0.
// Please note before community.general 11.0.0, `present` and `installed` were
// equivalent to `latest`. This changed in community.general 11.0.0. Now they
// are equivalent to `present_not_latest`.
// default: AptRpmStatePresent
State *AptRpmState `json:"state,omitempty"`
// Run the equivalent of `apt-get update` before the operation. Can be run as
// part of the package installation or as a separate step.
// Default is not to update the cache.
// default: false
UpdateCache *bool `json:"update_cache,omitempty"`
// Run the equivalent of `apt-get clean` to clear out the local repository of
// retrieved package files. It removes everything but the lock file from
// `/var/cache/apt/archives/` and `/var/cache/apt/archives/partial/`.
// Can be run as part of the package installation (clean runs before install)
// or as a separate step.
// default: false
Clean *bool `json:"clean,omitempty"`
// If true performs an `apt-get dist-upgrade` to upgrade system.
// default: false
DistUpgrade *bool `json:"dist_upgrade,omitempty"`
// If true performs an `update-kernel` to upgrade kernel packages.
// default: false
UpdateKernel *bool `json:"update_kernel,omitempty"`
}
Parameters for the `apt_rpm` Ansible module.
func (AptRpmParameters) ToRPCCall ¶ added in v0.0.7
func (p AptRpmParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AptRpmParameters into an `rpc.RPCCall`.
type AptRpmReturn ¶ added in v0.0.7
type AptRpmReturn struct {
AnsibleCommonReturns
}
Return values for the `apt_rpm` Ansible module.
func AptRpmReturnFromRPCResult ¶ added in v0.0.7
func AptRpmReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (AptRpmReturn, error)
Unwrap the `rpc.RPCResult` into an `AptRpmReturn`
type AptRpmState ¶ added in v0.0.7
type AptRpmState string
Indicates the desired package state. The states `latest` and `present_not_latest` have been added in community.general 8.6.0. Please note before community.general 11.0.0, `present` and `installed` were equivalent to `latest`. This changed in community.general 11.0.0. Now they are equivalent to `present_not_latest`.
const ( AptRpmStateAbsent AptRpmState = "absent" AptRpmStatePresent AptRpmState = "present" AptRpmStatePresentNotLatest AptRpmState = "present_not_latest" AptRpmStateInstalled AptRpmState = "installed" AptRpmStateRemoved AptRpmState = "removed" AptRpmStateLatest AptRpmState = "latest" )
func OptionalAptRpmState ¶ added in v0.0.7
func OptionalAptRpmState[T interface {
*AptRpmState | AptRpmState | *string | string
}](s T) *AptRpmState
Convert a supported type to an optional (pointer) AptRpmState
type AptState ¶ added in v0.0.7
type AptState string
Indicates the desired package state. `latest` ensures that the latest version is installed. `build-dep` ensures the package build dependencies are installed. `fixed` attempt to correct a system with broken dependencies in place.
type AptUpgrade ¶ added in v0.0.7
type AptUpgrade string
If yes or safe, performs an aptitude safe-upgrade. If full, performs an aptitude full-upgrade. If dist, performs an apt-get dist-upgrade. Note: This does not upgrade a specific package, use state=latest for that. Note: Since 2.4, apt-get is used as a fall-back if aptitude is not present.
const ( AptUpgradeDist AptUpgrade = "dist" AptUpgradeFull AptUpgrade = "full" AptUpgradeNo AptUpgrade = "no" AptUpgradeSafe AptUpgrade = "safe" AptUpgradeYes AptUpgrade = "yes" )
func OptionalAptUpgrade ¶ added in v0.0.7
func OptionalAptUpgrade[T interface {
*AptUpgrade | AptUpgrade | *string | string
}](s T) *AptUpgrade
Convert a supported type to an optional (pointer) AptUpgrade
type AssembleParameters ¶
type AssembleParameters struct {
// An already existing directory full of source files.
Src string `json:"src"`
// A file to create using the concatenation of all of the source files.
Dest string `json:"dest"`
// Create a backup file (if `true`), including the timestamp information so you
// can get the original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
// A delimiter to separate the file contents.
Delimiter *string `json:"delimiter,omitempty"`
// If `false`, it will search for src at originating/master machine.
// If `true`, it will go to the remote/target machine for the src.
// default: true
RemoteSrc *bool `json:"remote_src,omitempty"`
// Assemble files only if the given regular expression matches the filename.
// If not set, all files are assembled.
// Every `\\` (backslash) must be escaped as `\\\\` to comply to YAML syntax.
// Uses `Python regular expressions,https://docs.python.org/3/library/re.html`.
Regexp *string `json:"regexp,omitempty"`
// A boolean that controls if files that start with a `.` will be included or
// not.
// default: false
IgnoreHidden *bool `json:"ignore_hidden,omitempty"`
// The validation command to run before copying into place.
// The path to the file to validate is passed in by `%s` which must be present
// as in the sshd example below.
// The command is passed securely so shell features like expansion and pipes
// won't work.
Validate *string `json:"validate,omitempty"`
// This option controls the auto-decryption of source files using vault.
// default: true
Decrypt *bool `json:"decrypt,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
}
Parameters for the `assemble` Ansible module.
func (AssembleParameters) ToRPCCall ¶
func (p AssembleParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AssembleParameters into an `rpc.RPCCall`.
type AssembleReturn ¶
type AssembleReturn struct {
AnsibleCommonReturns
}
Return values for the `assemble` Ansible module.
func AssembleReturnFromRPCResult ¶
func AssembleReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (AssembleReturn, error)
Unwrap the `rpc.RPCResult` into an `AssembleReturn`
type AtParameters ¶ added in v0.0.7
type AtParameters struct {
// A command to be executed in the future.
Command *string `json:"command,omitempty"`
// An existing script file to be executed in the future.
ScriptFile *string `json:"script_file,omitempty"`
// The count of units in the future to execute the command or script file.
Count *int `json:"count,omitempty"`
// The type of units in the future to execute the command or script file.
Units *AtUnits `json:"units,omitempty"`
// The state dictates if the command or script file should be evaluated as
// `present` (added) or `absent` (deleted).
// default: AtStatePresent
State *AtState `json:"state,omitempty"`
// If a matching job is present a new job will not be added.
// default: false
Unique *bool `json:"unique,omitempty"`
}
Parameters for the `at` Ansible module.
func (AtParameters) ToRPCCall ¶ added in v0.0.7
func (p AtParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AtParameters into an `rpc.RPCCall`.
type AtReturn ¶ added in v0.0.7
type AtReturn struct {
AnsibleCommonReturns
}
Return values for the `at` Ansible module.
func AtReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `AtReturn`
type AtState ¶ added in v0.0.7
type AtState string
The state dictates if the command or script file should be evaluated as `present` (added) or `absent` (deleted).
type AtUnits ¶ added in v0.0.7
type AtUnits string
The type of units in the future to execute the command or script file.
type AuthorizedKeyParameters ¶ added in v0.0.7
type AuthorizedKeyParameters struct {
// The username on the remote host whose authorized_keys file will be modified.
User string `json:"user"`
// The SSH public key(s), as a string or (since Ansible 1.9) url
// (https://github.com/username.keys).
// You can also use `file://` prefix to search remote for a file with SSH
// key(s).
Key string `json:"key"`
// Alternative path to the authorized_keys file.
// The default value is the `.ssh/authorized_keys` of the home of the user
// specified in the `user` parameter.
// Most of the time, it is not necessary to set this key.
// Use the path to your target authorized_keys if you need to explicitly point
// on it.
Path *string `json:"path,omitempty"`
// Whether this module should manage the directory of the authorized key file.
// If set to `true`, the module will create the directory, as well as set the
// owner and permissions of an existing directory.
// Be sure to set `manage_dir=false` if you are using an alternate directory
// for authorized_keys, as set with `path`, since you could lock yourself out
// of SSH access.
// See the example below.
// default: true
ManageDir *bool `json:"manage_dir,omitempty"`
// Whether the given key (with the given key_options) should or should not be
// in the file.
// default: AuthorizedKeyStatePresent
State *AuthorizedKeyState `json:"state,omitempty"`
// A string of ssh key options to be prepended to the key in the
// authorized_keys file.
KeyOptions *string `json:"key_options,omitempty"`
// Whether to remove all other non-specified keys from the authorized_keys
// file.
// Multiple keys can be specified in a single `key` string value by separating
// them by newlines.
// This option is not loop aware, so if you use `with_` , it will be exclusive
// per iteration of the loop.
// If you want multiple keys in the file you need to pass them all to `key` in
// a single batch as mentioned above.
// default: false
Exclusive *bool `json:"exclusive,omitempty"`
// This only applies if using a https url as the source of the keys.
// If set to `false`, the SSL certificates will not be validated.
// This should only set to `false` used on personally controlled sites using
// self-signed certificates as it avoids verifying the source site.
// Prior to 2.1 the code worked as if this was set to `true`.
// default: true
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Change the comment on the public key.
// Rewriting the comment is useful in cases such as fetching it from GitHub or
// GitLab.
// If no comment is specified, the existing comment will be kept.
Comment *string `json:"comment,omitempty"`
// Follow path symlink instead of replacing it.
// default: false
Follow *bool `json:"follow,omitempty"`
}
Parameters for the `authorized_key` Ansible module.
func (AuthorizedKeyParameters) ToRPCCall ¶ added in v0.0.7
func (p AuthorizedKeyParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AuthorizedKeyParameters into an `rpc.RPCCall`.
type AuthorizedKeyReturn ¶ added in v0.0.7
type AuthorizedKeyReturn struct {
AnsibleCommonReturns
// If the key has been forced to be exclusive or not.
Exclusive *bool `json:"exclusive,omitempty"`
// The key that the module was running against.
Key *string `json:"key,omitempty"`
// Key options related to the key.
KeyOption *string `json:"key_option,omitempty"`
// Path for authorized key file.
Keyfile *string `json:"keyfile,omitempty"`
// Whether this module managed the directory of the authorized key file.
ManageDir *bool `json:"manage_dir,omitempty"`
// Alternate path to the authorized_keys file
Path *string `json:"path,omitempty"`
// Whether the given key (with the given key_options) should or should not be
// in the file
State *string `json:"state,omitempty"`
// Whether the key is unique
Unique *bool `json:"unique,omitempty"`
// The username on the remote host whose authorized_keys file will be modified
User *string `json:"user,omitempty"`
// This only applies if using a https url as the source of the keys. If set to
// `false`, the SSL certificates will not be validated.
ValidateCerts *bool `json:"validate_certs,omitempty"`
}
Return values for the `authorized_key` Ansible module.
func AuthorizedKeyReturnFromRPCResult ¶ added in v0.0.7
func AuthorizedKeyReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (AuthorizedKeyReturn, error)
Unwrap the `rpc.RPCResult` into an `AuthorizedKeyReturn`
type AuthorizedKeyState ¶ added in v0.0.7
type AuthorizedKeyState string
Whether the given key (with the given key_options) should or should not be in the file.
const ( AuthorizedKeyStateAbsent AuthorizedKeyState = "absent" AuthorizedKeyStatePresent AuthorizedKeyState = "present" )
func OptionalAuthorizedKeyState ¶ added in v0.0.7
func OptionalAuthorizedKeyState[T interface {
*AuthorizedKeyState | AuthorizedKeyState | *string | string
}](s T) *AuthorizedKeyState
Convert a supported type to an optional (pointer) AuthorizedKeyState
type AwallParameters ¶ added in v0.0.7
type AwallParameters struct {
// One or more policy names.
Name *[]string `json:"name,omitempty"`
// Whether the policies should be enabled or disabled.
// default: AwallStateEnabled
State *AwallState `json:"state,omitempty"`
// Activate the new firewall rules.
// Can be run with other steps or on its own.
// Idempotency is affected if `activate=true`, as the module will always report
// a changed state.
// default: false
Activate *bool `json:"activate,omitempty"`
}
Parameters for the `awall` Ansible module.
func (AwallParameters) ToRPCCall ¶ added in v0.0.7
func (p AwallParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `AwallParameters into an `rpc.RPCCall`.
type AwallReturn ¶ added in v0.0.7
type AwallReturn struct {
AnsibleCommonReturns
}
Return values for the `awall` Ansible module.
func AwallReturnFromRPCResult ¶ added in v0.0.7
func AwallReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (AwallReturn, error)
Unwrap the `rpc.RPCResult` into an `AwallReturn`
type AwallState ¶ added in v0.0.7
type AwallState string
Whether the policies should be enabled or disabled.
const ( AwallStateDisabled AwallState = "disabled" AwallStateEnabled AwallState = "enabled" )
func OptionalAwallState ¶ added in v0.0.7
func OptionalAwallState[T interface {
*AwallState | AwallState | *string | string
}](s T) *AwallState
Convert a supported type to an optional (pointer) AwallState
type BeadmParameters ¶ added in v0.0.7
type BeadmParameters struct {
// ZFS boot environment name.
Name string `json:"name"`
// If specified, the new boot environment will be cloned from the given
// snapshot or inactive boot environment.
Snapshot *string `json:"snapshot,omitempty"`
// Associate a description with a new boot environment. This option is
// available only on Solarish platforms.
Description *string `json:"description,omitempty"`
// Create the datasets for new BE with specific ZFS properties.
// Multiple options can be specified.
// This option is available only on Solarish platforms.
Options *string `json:"options,omitempty"`
// Path where to mount the ZFS boot environment.
Mountpoint *string `json:"mountpoint,omitempty"`
// Create or delete ZFS boot environment.
// default: BeadmStatePresent
State *BeadmState `json:"state,omitempty"`
// Specifies if the unmount should be forced.
// default: false
Force *bool `json:"force,omitempty"`
}
Parameters for the `beadm` Ansible module.
func (BeadmParameters) ToRPCCall ¶ added in v0.0.7
func (p BeadmParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `BeadmParameters into an `rpc.RPCCall`.
type BeadmReturn ¶ added in v0.0.7
type BeadmReturn struct {
AnsibleCommonReturns
// BE name.
Name *string `json:"name,omitempty"`
// ZFS snapshot to create BE from.
Snapshot *string `json:"snapshot,omitempty"`
// BE description.
Description *string `json:"description,omitempty"`
// BE additional options.
Options *string `json:"options,omitempty"`
// BE mountpoint.
Mountpoint *string `json:"mountpoint,omitempty"`
// State of the target.
State *string `json:"state,omitempty"`
// If forced action is wanted.
Force *bool `json:"force,omitempty"`
}
Return values for the `beadm` Ansible module.
func BeadmReturnFromRPCResult ¶ added in v0.0.7
func BeadmReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (BeadmReturn, error)
Unwrap the `rpc.RPCResult` into an `BeadmReturn`
type BeadmState ¶ added in v0.0.7
type BeadmState string
Create or delete ZFS boot environment.
const ( BeadmStateAbsent BeadmState = "absent" BeadmStateActivated BeadmState = "activated" BeadmStateMounted BeadmState = "mounted" BeadmStatePresent BeadmState = "present" BeadmStateUnmounted BeadmState = "unmounted" )
func OptionalBeadmState ¶ added in v0.0.7
func OptionalBeadmState[T interface {
*BeadmState | BeadmState | *string | string
}](s T) *BeadmState
Convert a supported type to an optional (pointer) BeadmState
type BlockinfileParameters ¶
type BlockinfileParameters struct {
// The file to modify.
// Before Ansible 2.3 this option was only usable as `dest`, `destfile` and
// `name`.
Path string `json:"path"`
// Whether the block should be there or not.
// default: BlockinfileStatePresent
State *BlockinfileState `json:"state,omitempty"`
// The marker line template.
// `{mark}` will be replaced with the values in `marker_begin`
// (default=`BEGIN`) and `marker_end` (default=`END`).
// Using a custom marker without the `{mark}` variable may result in the block
// being repeatedly inserted on subsequent playbook runs.
// Multi-line markers are not supported and will result in the block being
// repeatedly inserted on subsequent playbook runs.
// A newline is automatically appended by the module to `marker_begin` and
// `marker_end`.
// default: "# {mark} ANSIBLE MANAGED BLOCK"
Marker *string `json:"marker,omitempty"`
// The text to insert inside the marker lines.
// If it is missing or an empty string, the block will be removed as if `state`
// were specified to `absent`.
// default: ""
Block *string `json:"block,omitempty"`
// If specified and no begin/ending `marker` lines are found, the block will be
// inserted after the last match of specified regular expression.
// A special value is available; `EOF` for inserting the block at the end of
// the file.
// If specified regular expression has no matches or no value is passed, `EOF`
// will be used instead.
// The presence of the multiline flag (?m) in the regular expression controls
// whether the match is done line by line or with multiple lines. This
// behaviour was added in ansible-core 2.14.
Insertafter *string `json:"insertafter,omitempty"`
// If specified and no begin/ending `marker` lines are found, the block will be
// inserted before the last match of specified regular expression.
// A special value is available; `BOF` for inserting the block at the beginning
// of the file.
// If specified regular expression has no matches, the block will be inserted
// at the end of the file.
// The presence of the multiline flag (?m) in the regular expression controls
// whether the match is done line by line or with multiple lines. This
// behaviour was added in ansible-core 2.14.
Insertbefore *string `json:"insertbefore,omitempty"`
// Create a new file if it does not exist.
// default: false
Create *bool `json:"create,omitempty"`
// Create a backup file including the timestamp information so you can get the
// original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
// This will be inserted at `{mark}` in the opening ansible block `marker`.
// default: "BEGIN"
MarkerBegin *string `json:"marker_begin,omitempty"`
// This will be inserted at `{mark}` in the closing ansible block `marker`.
// default: "END"
MarkerEnd *string `json:"marker_end,omitempty"`
// Append a blank line to the inserted block, if this does not appear at the
// end of the file.
// Note that this attribute is not considered when `state` is set to `absent`
// default: false
AppendNewline *bool `json:"append_newline,omitempty"`
// Prepend a blank line to the inserted block, if this does not appear at the
// beginning of the file.
// Note that this attribute is not considered when `state` is set to `absent`
// default: false
PrependNewline *bool `json:"prepend_newline,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
// The validation command to run before copying the updated file into the final
// destination.
// A temporary file path is used to validate, passed in through `%s` which must
// be present as in the examples below.
// Also, the command is passed securely so shell features such as expansion and
// pipes will not work.
// For an example on how to handle more complex validation than what this
// option provides, see `handling complex
// validation,complex_configuration_validation`.
Validate *string `json:"validate,omitempty"`
}
Parameters for the `blockinfile` Ansible module.
func (BlockinfileParameters) ToRPCCall ¶
func (p BlockinfileParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `BlockinfileParameters into an `rpc.RPCCall`.
type BlockinfileReturn ¶
type BlockinfileReturn struct {
AnsibleCommonReturns
}
Return values for the `blockinfile` Ansible module.
func BlockinfileReturnFromRPCResult ¶
func BlockinfileReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (BlockinfileReturn, error)
Unwrap the `rpc.RPCResult` into an `BlockinfileReturn`
type BlockinfileState ¶ added in v0.0.7
type BlockinfileState string
Whether the block should be there or not.
const ( BlockinfileStateAbsent BlockinfileState = "absent" BlockinfileStatePresent BlockinfileState = "present" )
func OptionalBlockinfileState ¶ added in v0.0.7
func OptionalBlockinfileState[T interface {
*BlockinfileState | BlockinfileState | *string | string
}](s T) *BlockinfileState
Convert a supported type to an optional (pointer) BlockinfileState
type BootcManageParameters ¶ added in v0.0.7
type BootcManageParameters struct {
// Control whether to apply the latest image or switch the image.
// `Note:` This will not reboot the system.
// Please use `ansible.builtin.reboot` to reboot the system.
State BootcManageState `json:"state"`
// The image to switch to.
// This is required when `state=switch`.
Image *string `json:"image,omitempty"`
}
Parameters for the `bootc_manage` Ansible module.
func (BootcManageParameters) ToRPCCall ¶ added in v0.0.7
func (p BootcManageParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `BootcManageParameters into an `rpc.RPCCall`.
type BootcManageReturn ¶ added in v0.0.7
type BootcManageReturn struct {
AnsibleCommonReturns
}
Return values for the `bootc_manage` Ansible module.
func BootcManageReturnFromRPCResult ¶ added in v0.0.7
func BootcManageReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (BootcManageReturn, error)
Unwrap the `rpc.RPCResult` into an `BootcManageReturn`
type BootcManageState ¶ added in v0.0.7
type BootcManageState string
Control whether to apply the latest image or switch the image. `Note:` This will not reboot the system. Please use `ansible.builtin.reboot` to reboot the system.
const ( BootcManageStateSwitch BootcManageState = "switch" BootcManageStateLatest BootcManageState = "latest" )
type BowerParameters ¶ added in v0.0.7
type BowerParameters struct {
// The name of a bower package to install.
Name *string `json:"name,omitempty"`
// Install packages from local cache, if the packages were installed before.
// default: false
Offline *bool `json:"offline,omitempty"`
// Install with `--production` flag.
// default: false
Production *bool `json:"production,omitempty"`
// The base path where to install the bower packages.
Path string `json:"path"`
// Relative path to bower executable from install path.
RelativeExecpath *string `json:"relative_execpath,omitempty"`
// The state of the bower package.
// default: BowerStatePresent
State *BowerState `json:"state,omitempty"`
// The version to be installed.
Version *string `json:"version,omitempty"`
}
Parameters for the `bower` Ansible module.
func (BowerParameters) ToRPCCall ¶ added in v0.0.7
func (p BowerParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `BowerParameters into an `rpc.RPCCall`.
type BowerReturn ¶ added in v0.0.7
type BowerReturn struct {
AnsibleCommonReturns
}
Return values for the `bower` Ansible module.
func BowerReturnFromRPCResult ¶ added in v0.0.7
func BowerReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (BowerReturn, error)
Unwrap the `rpc.RPCResult` into an `BowerReturn`
type BowerState ¶ added in v0.0.7
type BowerState string
The state of the bower package.
const ( BowerStatePresent BowerState = "present" BowerStateAbsent BowerState = "absent" BowerStateLatest BowerState = "latest" )
func OptionalBowerState ¶ added in v0.0.7
func OptionalBowerState[T interface {
*BowerState | BowerState | *string | string
}](s T) *BowerState
Convert a supported type to an optional (pointer) BowerState
type BzrParameters ¶ added in v0.0.7
type BzrParameters struct {
// SSH or HTTP protocol address of the parent branch.
Name string `json:"name"`
// Absolute path of where the branch should be cloned to.
Dest string `json:"dest"`
// What version of the branch to clone. This can be the bzr revno or revid.
// default: "head"
Version *string `json:"version,omitempty"`
// If `true`, any modified files in the working tree will be discarded.
// default: false
Force *bool `json:"force,omitempty"`
// Path to bzr executable to use. If not supplied, the normal mechanism for
// resolving binary paths will be used.
Executable *string `json:"executable,omitempty"`
}
Parameters for the `bzr` Ansible module.
func (BzrParameters) ToRPCCall ¶ added in v0.0.7
func (p BzrParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `BzrParameters into an `rpc.RPCCall`.
type BzrReturn ¶ added in v0.0.7
type BzrReturn struct {
AnsibleCommonReturns
}
Return values for the `bzr` Ansible module.
func BzrReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `BzrReturn`
type CapabilitiesParameters ¶ added in v0.0.7
type CapabilitiesParameters struct {
// Specifies the path to the file to be managed.
Path string `json:"path"`
// Desired capability to set (with operator and flags, if `state=present`) or
// remove (if `state=absent`).
Capability string `json:"capability"`
// Whether the entry should be present or absent in the file's capabilities.
// default: CapabilitiesStatePresent
State *CapabilitiesState `json:"state,omitempty"`
}
Parameters for the `capabilities` Ansible module.
func (CapabilitiesParameters) ToRPCCall ¶ added in v0.0.7
func (p CapabilitiesParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `CapabilitiesParameters into an `rpc.RPCCall`.
type CapabilitiesReturn ¶ added in v0.0.7
type CapabilitiesReturn struct {
AnsibleCommonReturns
}
Return values for the `capabilities` Ansible module.
func CapabilitiesReturnFromRPCResult ¶ added in v0.0.7
func CapabilitiesReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (CapabilitiesReturn, error)
Unwrap the `rpc.RPCResult` into an `CapabilitiesReturn`
type CapabilitiesState ¶ added in v0.0.7
type CapabilitiesState string
Whether the entry should be present or absent in the file's capabilities.
const ( CapabilitiesStateAbsent CapabilitiesState = "absent" CapabilitiesStatePresent CapabilitiesState = "present" )
func OptionalCapabilitiesState ¶ added in v0.0.7
func OptionalCapabilitiesState[T interface {
*CapabilitiesState | CapabilitiesState | *string | string
}](s T) *CapabilitiesState
Convert a supported type to an optional (pointer) CapabilitiesState
type CargoParameters ¶ added in v0.0.7
type CargoParameters struct {
// Path to the `cargo` installed in the system.
// If not specified, the module will look `cargo` in `PATH`.
Executable *string `json:"executable,omitempty"`
// The name of a Rust package to install.
Name []string `json:"name"`
// The base path where to install the Rust packages. Cargo automatically
// appends `/bin`. In other words, `/usr/local` will become `/usr/local/bin`.
Path *string `json:"path,omitempty"`
// The version to install. If `name` contains multiple values, the module will
// try to install all of them in this version.
Version *string `json:"version,omitempty"`
// Install with locked dependencies.
// This is only used when installing packages.
// default: false
Locked *bool `json:"locked,omitempty"`
// The state of the Rust package.
// default: CargoStatePresent
State *CargoState `json:"state,omitempty"`
// Path to the source directory to install the Rust package from.
// This is only used when installing packages.
Directory *string `json:"directory,omitempty"`
}
Parameters for the `cargo` Ansible module.
func (CargoParameters) ToRPCCall ¶ added in v0.0.7
func (p CargoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `CargoParameters into an `rpc.RPCCall`.
type CargoReturn ¶ added in v0.0.7
type CargoReturn struct {
AnsibleCommonReturns
}
Return values for the `cargo` Ansible module.
func CargoReturnFromRPCResult ¶ added in v0.0.7
func CargoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (CargoReturn, error)
Unwrap the `rpc.RPCResult` into an `CargoReturn`
type CargoState ¶ added in v0.0.7
type CargoState string
The state of the Rust package.
const ( CargoStatePresent CargoState = "present" CargoStateAbsent CargoState = "absent" CargoStateLatest CargoState = "latest" )
func OptionalCargoState ¶ added in v0.0.7
func OptionalCargoState[T interface {
*CargoState | CargoState | *string | string
}](s T) *CargoState
Convert a supported type to an optional (pointer) CargoState
type CommandParameters ¶
type CommandParameters struct {
// Expands the arguments that are variables, for example `$HOME` will be
// expanded before being passed to the command to run.
// If a variable is not matched, it is left unchanged, unlike shell
// substitution which would remove it.
// Set to `false` to disable expansion and treat the value as a literal
// argument.
// default: true
ExpandArgumentVars *bool `json:"expand_argument_vars,omitempty"`
// The command module takes a free form string as a command to run.
// There is no actual parameter named `free_form`.
FreeForm *string `json:"free_form,omitempty"`
// The command to run.
Cmd *string `json:"cmd,omitempty"`
// Passes the command as a list rather than a string.
// Use `argv` to avoid quoting values that would otherwise be interpreted
// incorrectly (for example "user name").
// Only the string (free form) or the list (argv) form can be provided, not
// both. One or the other must be provided.
Argv *[]string `json:"argv,omitempty"`
// A filename or (since 2.0) glob pattern. If a matching file already exists,
// this step `will not` be run.
// This is checked before `removes` is checked.
Creates *string `json:"creates,omitempty"`
// A filename or (since 2.0) glob pattern. If a matching file exists, this step
// `will` be run.
// This is checked after `creates` is checked.
Removes *string `json:"removes,omitempty"`
// Change into this directory before running the command.
Chdir *string `json:"chdir,omitempty"`
// Set the stdin of the command directly to the specified value.
Stdin *string `json:"stdin,omitempty"`
// If set to `true`, append a newline to stdin data.
// default: true
StdinAddNewline *bool `json:"stdin_add_newline,omitempty"`
// Strip empty lines from the end of stdout/stderr in result.
// default: true
StripEmptyEnds *bool `json:"strip_empty_ends,omitempty"`
}
Parameters for the `command` Ansible module.
func (CommandParameters) ToRPCCall ¶
func (p CommandParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `CommandParameters into an `rpc.RPCCall`.
type CommandReturn ¶
type CommandReturn struct {
AnsibleCommonReturns
// changed
Msg *string `json:"msg,omitempty"`
// The command execution start time.
Start *string `json:"start,omitempty"`
// The command execution end time.
End *string `json:"end,omitempty"`
// The command execution delta time.
Delta *string `json:"delta,omitempty"`
// The command standard output.
Stdout *string `json:"stdout,omitempty"`
// The command standard error.
Stderr *string `json:"stderr,omitempty"`
// The command executed by the task.
Cmd *[]any `json:"cmd,omitempty"`
// The command return code (0 means success).
Rc *int `json:"rc,omitempty"`
// The command standard output split in lines.
StdoutLines *[]any `json:"stdout_lines,omitempty"`
// The command standard error split in lines.
StderrLines *[]any `json:"stderr_lines,omitempty"`
}
Return values for the `command` Ansible module.
func CommandReturnFromRPCResult ¶
func CommandReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (CommandReturn, error)
Unwrap the `rpc.RPCResult` into an `CommandReturn`
type CopyParameters ¶
type CopyParameters struct {
// Local path to a file to copy to the remote server.
// This can be absolute or relative.
// If path is a directory, it is copied recursively. In this case, if path ends
// with `/`, only inside contents of that directory are copied to destination.
// Otherwise, if it does not end with `/`, the directory itself with all
// contents is copied. This behavior is similar to the `rsync` command line
// tool.
Src *string `json:"src,omitempty"`
// When used instead of `src`, sets the contents of a file directly to the
// specified value.
// Works only when `dest` is a file. Creates the file if it does not exist.
// For advanced formatting or if `content` contains a variable, use the
// `ansible.builtin.template` module.
Content *string `json:"content,omitempty"`
// Remote absolute path where the file should be copied to.
// If `src` is a directory, this must be a directory too.
// If `dest` is a non-existent path and if either `dest` ends with `/` or `src`
// is a directory, `dest` is created.
// If `dest` is a relative path, the starting directory is determined by the
// remote host.
// If `src` and `dest` are files, the parent directory of `dest` is not created
// and the task fails if it does not already exist.
Dest string `json:"dest"`
// Create a backup file including the timestamp information so you can get the
// original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
// Influence whether the remote file must always be replaced.
// If `true`, the remote file will be replaced when contents are different than
// the source.
// If `false`, the file will only be transferred if the destination does not
// exist.
// default: true
Force *bool `json:"force,omitempty"`
// The permissions of the destination file or directory.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must either add a leading zero so that Ansible's YAML parser
// knows it is an octal number (like `0644` or `01777`) or quote it (like
// `'644'` or `'1777'`) so Ansible receives a string and can do its own
// conversion from string into number. Giving Ansible a number without
// following one of these rules will end up with a decimal number which will
// have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// As of Ansible 2.3, the mode may also be the special string `preserve`.
// `preserve` means that the file will be given the same permissions as the
// source file.
// When doing a recursive copy, see also `directory_mode`.
// If `mode` is not specified and the destination file `does not` exist, the
// default `umask` on the system will be used when setting the mode for the
// newly created file.
// If `mode` is not specified and the destination file `does` exist, the mode
// of the existing file will be used.
// Specifying `mode` is the best way to ensure files are created with the
// correct permissions. See CVE-2020-1736 for further details.
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Set the access permissions of newly created directories to the given mode.
// Permissions on existing directories do not change.
// See `mode` for the syntax of accepted values.
// The target system's defaults determine permissions when this parameter is
// not set.
DirectoryMode *any `json:"directory_mode,omitempty"`
// Influence whether `src` needs to be transferred or already is present
// remotely.
// If `false`, it will search for `src` on the controller node.
// If `true`, it will search for `src` on the managed (remote) node.
// `remote_src` supports recursive copying as of version 2.8.
// `remote_src` only works with `mode=preserve` as of version 2.6.
// Auto-decryption of files does not work when `remote_src=yes`.
// default: false
RemoteSrc *bool `json:"remote_src,omitempty"`
// This flag indicates that filesystem links in the destination, if they exist,
// should be followed.
// default: false
Follow *bool `json:"follow,omitempty"`
// This flag indicates that filesystem links in the source tree, if they exist,
// should be followed.
// default: true
LocalFollow *bool `json:"local_follow,omitempty"`
// SHA1 checksum of the file being transferred.
// Used to validate that the copy of the file was successful.
// If this is not provided, ansible will use the local calculated checksum of
// the src file.
Checksum *string `json:"checksum,omitempty"`
// This option controls the auto-decryption of source files using vault.
// default: true
Decrypt *bool `json:"decrypt,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
// The validation command to run before copying the updated file into the final
// destination.
// A temporary file path is used to validate, passed in through `%s` which must
// be present as in the examples below.
// Also, the command is passed securely so shell features such as expansion and
// pipes will not work.
// For an example on how to handle more complex validation than what this
// option provides, see `handling complex
// validation,complex_configuration_validation`.
Validate *string `json:"validate,omitempty"`
}
Parameters for the `copy` Ansible module.
func (CopyParameters) ToRPCCall ¶
func (p CopyParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `CopyParameters into an `rpc.RPCCall`.
type CopyReturn ¶
type CopyReturn struct {
AnsibleCommonReturns
// Destination file/path.
Dest *string `json:"dest,omitempty"`
// Source file used for the copy on the target machine.
Src *string `json:"src,omitempty"`
// MD5 checksum of the file after running copy.
Md5sum *string `json:"md5sum,omitempty"`
// SHA1 checksum of the file after running copy.
Checksum *string `json:"checksum,omitempty"`
// Name of backup file created.
BackupFile *string `json:"backup_file,omitempty"`
// Group id of the file, after execution.
Gid *int `json:"gid,omitempty"`
// Group of the file, after execution.
Group *string `json:"group,omitempty"`
// Owner of the file, after execution.
Owner *string `json:"owner,omitempty"`
// Owner id of the file, after execution.
Uid *int `json:"uid,omitempty"`
// Permissions of the target, after execution.
Mode *string `json:"mode,omitempty"`
// Size of the target, after execution.
Size *int `json:"size,omitempty"`
// State of the target, after execution.
State *string `json:"state,omitempty"`
}
Return values for the `copy` Ansible module.
func CopyReturnFromRPCResult ¶
func CopyReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (CopyReturn, error)
Unwrap the `rpc.RPCResult` into an `CopyReturn`
type CronParameters ¶
type CronParameters struct {
// Description of a crontab entry or, if `env` is set, the name of environment
// variable.
// This parameter is always required as of ansible-core 2.12.
Name string `json:"name"`
// The specific user whose crontab should be modified.
// When unset, this parameter defaults to the current user.
User *string `json:"user,omitempty"`
// The command to execute or, if `env` is set, the value of environment
// variable.
// The command should not contain line breaks.
// Required if `state=present`.
Job *string `json:"job,omitempty"`
// Whether to ensure the job or environment variable is present or absent.
// default: CronStatePresent
State *CronState `json:"state,omitempty"`
// If specified, uses this file instead of an individual user's crontab. The
// assumption is that this file is exclusively managed by the module, do not
// use if the file contains multiple entries, NEVER use for /etc/crontab.
// If this is a relative path, it is interpreted with respect to `/etc/cron.d`.
// Many Linux distros expect (and some require) the filename portion to consist
// solely of upper- and lower-case letters, digits, underscores, and hyphens.
// Using this parameter requires you to specify the `user` as well, unless
// `state=absent`.
// Either this parameter or `name` is required.
CronFile *string `json:"cron_file,omitempty"`
// If set, create a backup of the crontab before it is modified. The location
// of the backup is returned in the R`ignore:backup_file` variable by this
// module.
// default: false
Backup *bool `json:"backup,omitempty"`
// Minute when the job should run (`0-59`, `*`, `*/2`, and so on).
// default: "*"
Minute *string `json:"minute,omitempty"`
// Hour when the job should run (`0-23`, `*`, `*/2`, and so on).
// default: "*"
Hour *string `json:"hour,omitempty"`
// Day of the month the job should run (`1-31`, `*`, `*/2`, and so on).
// default: "*"
Day *string `json:"day,omitempty"`
// Month of the year the job should run (`1-12`, `*`, `*/2`, and so on).
// default: "*"
Month *string `json:"month,omitempty"`
// Day of the week that the job should run (`0-6` for Sunday-Saturday, `*`, and
// so on).
// default: "*"
Weekday *string `json:"weekday,omitempty"`
// Special time specification nickname.
SpecialTime *CronSpecialTime `json:"special_time,omitempty"`
// If the job should be disabled (commented out) in the crontab.
// Only has effect if `state=present`.
// default: false
Disabled *bool `json:"disabled,omitempty"`
// If set, manages a crontab's environment variable.
// New variables are added on top of crontab.
// `name` and `value` parameters are the name and the value of environment
// variable.
// default: false
Env *bool `json:"env,omitempty"`
// Used with `state=present` and `env`.
// If specified, the environment variable will be inserted after the
// declaration of specified environment variable.
Insertafter *string `json:"insertafter,omitempty"`
// Used with `state=present` and `env`.
// If specified, the environment variable will be inserted before the
// declaration of specified environment variable.
Insertbefore *string `json:"insertbefore,omitempty"`
}
Parameters for the `cron` Ansible module.
func (CronParameters) ToRPCCall ¶
func (p CronParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `CronParameters into an `rpc.RPCCall`.
type CronReturn ¶
type CronReturn struct {
AnsibleCommonReturns
}
Return values for the `cron` Ansible module.
func CronReturnFromRPCResult ¶
func CronReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (CronReturn, error)
Unwrap the `rpc.RPCResult` into an `CronReturn`
type CronSpecialTime ¶ added in v0.0.7
type CronSpecialTime string
Special time specification nickname.
const ( CronSpecialTimeAnnually CronSpecialTime = "annually" CronSpecialTimeDaily CronSpecialTime = "daily" CronSpecialTimeHourly CronSpecialTime = "hourly" CronSpecialTimeMonthly CronSpecialTime = "monthly" CronSpecialTimeReboot CronSpecialTime = "reboot" CronSpecialTimeWeekly CronSpecialTime = "weekly" CronSpecialTimeYearly CronSpecialTime = "yearly" )
func OptionalCronSpecialTime ¶ added in v0.0.7
func OptionalCronSpecialTime[T interface {
*CronSpecialTime | CronSpecialTime | *string | string
}](s T) *CronSpecialTime
Convert a supported type to an optional (pointer) CronSpecialTime
type CronState ¶ added in v0.0.7
type CronState string
Whether to ensure the job or environment variable is present or absent.
type CrypttabParameters ¶ added in v0.0.7
type CrypttabParameters struct {
// Name of the encrypted block device as it appears in the `/etc/crypttab`
// file, or optionally prefixed with `/dev/mapper/`, as it appears in the
// filesystem. `/dev/mapper/` will be stripped from `name`.
Name string `json:"name"`
// Use `present` to add a line to `/etc/crypttab` or update its definition if
// already present.
// Use `absent` to remove a line with matching `name`.
// Use `opts_present` to add options to those already present; options with
// different values will be updated.
// Use `opts_absent` to remove options from the existing set.
State CrypttabState `json:"state"`
// Path to the underlying block device or file, or the UUID of a block-device
// prefixed with `UUID=`.
BackingDevice *string `json:"backing_device,omitempty"`
// Encryption password, the path to a file containing the password, or `-` or
// unset if the password should be entered at boot.
Password *string `json:"password,omitempty"`
// A comma-delimited list of options. See `crypttab(5\`) for details.
Opts *string `json:"opts,omitempty"`
// Path to file to use instead of `/etc/crypttab`.
// This might be useful in a chroot environment.
// default: "/etc/crypttab"
Path *string `json:"path,omitempty"`
}
Parameters for the `crypttab` Ansible module.
func (CrypttabParameters) ToRPCCall ¶ added in v0.0.7
func (p CrypttabParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `CrypttabParameters into an `rpc.RPCCall`.
type CrypttabReturn ¶ added in v0.0.7
type CrypttabReturn struct {
AnsibleCommonReturns
}
Return values for the `crypttab` Ansible module.
func CrypttabReturnFromRPCResult ¶ added in v0.0.7
func CrypttabReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (CrypttabReturn, error)
Unwrap the `rpc.RPCResult` into an `CrypttabReturn`
type CrypttabState ¶ added in v0.0.7
type CrypttabState string
Use `present` to add a line to `/etc/crypttab` or update its definition if already present. Use `absent` to remove a line with matching `name`. Use `opts_present` to add options to those already present; options with different values will be updated. Use `opts_absent` to remove options from the existing set.
const ( CrypttabStateAbsent CrypttabState = "absent" CrypttabStateOptsAbsent CrypttabState = "opts_absent" CrypttabStateOptsPresent CrypttabState = "opts_present" CrypttabStatePresent CrypttabState = "present" )
type Deb822RepositoryParameters ¶
type Deb822RepositoryParameters struct {
// Allow downgrading a package that was previously authenticated but is no
// longer authenticated.
AllowDowngradeToInsecure *bool `json:"allow_downgrade_to_insecure,omitempty"`
// Allow insecure repositories.
AllowInsecure *bool `json:"allow_insecure,omitempty"`
// Allow repositories signed with a key using a weak digest algorithm.
AllowWeak *bool `json:"allow_weak,omitempty"`
// Architectures to search within repository.
Architectures *[]string `json:"architectures,omitempty"`
// Controls if APT should try to acquire indexes via a URI constructed from a
// hashsum of the expected file instead of using the well-known stable filename
// of the index.
ByHash *bool `json:"by_hash,omitempty"`
// Controls if APT should consider the machine's time correct and hence perform
// time related checks, such as verifying that a Release file is not from the
// future.
CheckDate *bool `json:"check_date,omitempty"`
// Controls if APT should try to detect replay attacks.
CheckValidUntil *bool `json:"check_valid_until,omitempty"`
// Components specify different sections of one distribution version present in
// a `Suite`.
Components *[]string `json:"components,omitempty"`
// Controls how far from the future a repository may be.
DateMaxFuture *int `json:"date_max_future,omitempty"`
// Tells APT whether the source is enabled or not.
Enabled *bool `json:"enabled,omitempty"`
// Determines the path to the `InRelease` file, relative to the normal position
// of an `InRelease` file.
InreleasePath *string `json:"inrelease_path,omitempty"`
// Defines which languages information such as translated package descriptions
// should be downloaded.
Languages *[]string `json:"languages,omitempty"`
// Name of the repo. Specifically used for `X-Repolib-Name` and in naming the
// repository and signing key files.
Name string `json:"name"`
// Controls if APT should try to use `PDiffs` to update old indexes instead of
// downloading the new indexes entirely.
Pdiffs *bool `json:"pdiffs,omitempty"`
// Either a URL to a GPG key, absolute path to a keyring file, one or more
// fingerprints of keys either in the `trusted.gpg` keyring or in the keyrings
// in the `trusted.gpg.d/` directory, or an ASCII armored GPG public key block.
SignedBy *string `json:"signed_by,omitempty"`
// Suite can specify an exact path in relation to the UR`s` provided, in which
// case the Components: must be omitted and suite must end with a slash (`/`).
// Alternatively, it may take the form of a distribution version (for example a
// version codename like `disco` or `artful`). If the suite does not specify a
// path, at least one component must be present.
Suites *[]string `json:"suites,omitempty"`
// Defines which download targets apt will try to acquire from this source.
Targets *[]string `json:"targets,omitempty"`
// Decides if a source is considered trusted or if warnings should be raised
// before, for example packages are installed from this source.
Trusted *bool `json:"trusted,omitempty"`
// Which types of packages to look for from a given source; either binary `deb`
// or source code `deb-src`.
// default: []Deb822RepositoryTypes{Deb822RepositoryTypesDeb}
Types *Deb822RepositoryTypes `json:"types,omitempty"`
// The URIs must specify the base of the Debian distribution archive, from
// which APT finds the information it needs.
Uris *[]string `json:"uris,omitempty"`
// The octal mode for newly created files in `sources.list.d`.
// default: "0644"
Mode *any `json:"mode,omitempty"`
// A source string state.
// default: Deb822RepositoryStatePresent
State *Deb822RepositoryState `json:"state,omitempty"`
}
Parameters for the `deb822_repository` Ansible module.
func (Deb822RepositoryParameters) ToRPCCall ¶
func (p Deb822RepositoryParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `Deb822RepositoryParameters into an `rpc.RPCCall`.
type Deb822RepositoryReturn ¶
type Deb822RepositoryReturn struct {
AnsibleCommonReturns
// A source string for the repository
Repo *string `json:"repo,omitempty"`
// Path to the repository file
Dest *string `json:"dest,omitempty"`
// Path to the signed_by key file
KeyFilename *string `json:"key_filename,omitempty"`
}
Return values for the `deb822_repository` Ansible module.
func Deb822RepositoryReturnFromRPCResult ¶
func Deb822RepositoryReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (Deb822RepositoryReturn, error)
Unwrap the `rpc.RPCResult` into an `Deb822RepositoryReturn`
type Deb822RepositoryState ¶ added in v0.0.7
type Deb822RepositoryState string
A source string state.
const ( Deb822RepositoryStateAbsent Deb822RepositoryState = "absent" Deb822RepositoryStatePresent Deb822RepositoryState = "present" )
func OptionalDeb822RepositoryState ¶ added in v0.0.7
func OptionalDeb822RepositoryState[T interface {
*Deb822RepositoryState | Deb822RepositoryState | *string | string
}](s T) *Deb822RepositoryState
Convert a supported type to an optional (pointer) Deb822RepositoryState
type Deb822RepositoryTypes ¶ added in v0.0.7
type Deb822RepositoryTypes string
Which types of packages to look for from a given source; either binary `deb` or source code `deb-src`.
const ( Deb822RepositoryTypesDeb Deb822RepositoryTypes = "deb" Deb822RepositoryTypesDebSrc Deb822RepositoryTypes = "deb-src" )
func OptionalDeb822RepositoryTypes ¶ added in v0.0.7
func OptionalDeb822RepositoryTypes[T interface {
*Deb822RepositoryTypes | Deb822RepositoryTypes | *string | string
}](s T) *Deb822RepositoryTypes
Convert a supported type to an optional (pointer) Deb822RepositoryTypes
type DebconfParameters ¶
type DebconfParameters struct {
// Name of package to configure.
Name string `json:"name"`
// A debconf configuration setting.
Question *string `json:"question,omitempty"`
// The type of the value supplied.
// It is highly recommended to add `no_log=True` to task while specifying
// `vtype=password`.
// `seen` was added in Ansible 2.2.
// After Ansible 2.17, user can specify `value` as a list, if `vtype` is set as
// `multiselect`.
Vtype *DebconfVtype `json:"vtype,omitempty"`
// Value to set the configuration to.
// After Ansible 2.17, `value` is of type `raw`.
Value *any `json:"value,omitempty"`
// Do not set `seen` flag when pre-seeding.
// default: false
Unseen *bool `json:"unseen,omitempty"`
}
Parameters for the `debconf` Ansible module.
func (DebconfParameters) ToRPCCall ¶
func (p DebconfParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DebconfParameters into an `rpc.RPCCall`.
type DebconfReturn ¶
type DebconfReturn struct {
AnsibleCommonReturns
}
Return values for the `debconf` Ansible module.
func DebconfReturnFromRPCResult ¶
func DebconfReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DebconfReturn, error)
Unwrap the `rpc.RPCResult` into an `DebconfReturn`
type DebconfVtype ¶ added in v0.0.7
type DebconfVtype string
The type of the value supplied. It is highly recommended to add `no_log=True` to task while specifying `vtype=password`. `seen` was added in Ansible 2.2. After Ansible 2.17, user can specify `value` as a list, if `vtype` is set as `multiselect`.
const ( DebconfVtypeBoolean DebconfVtype = "boolean" DebconfVtypeError DebconfVtype = "error" DebconfVtypeMultiselect DebconfVtype = "multiselect" DebconfVtypeNote DebconfVtype = "note" DebconfVtypePassword DebconfVtype = "password" DebconfVtypeSeen DebconfVtype = "seen" DebconfVtypeSelect DebconfVtype = "select" DebconfVtypeString DebconfVtype = "string" DebconfVtypeText DebconfVtype = "text" DebconfVtypeTitle DebconfVtype = "title" )
func OptionalDebconfVtype ¶ added in v0.0.7
func OptionalDebconfVtype[T interface {
*DebconfVtype | DebconfVtype | *string | string
}](s T) *DebconfVtype
Convert a supported type to an optional (pointer) DebconfVtype
type DeployHelperParameters ¶ added in v0.0.7
type DeployHelperParameters struct {
// The root path of the project. Returned in the `deploy_helper.project_path`
// fact.
Path string `json:"path"`
// The state of the project.
// `query` will only gather facts.
// `present` will create the project `root` folder, and in it the `releases`
// and `shared` folders.
// `finalize` will remove the unfinished_filename file, create a symlink to the
// newly deployed release and optionally clean old releases.
// `clean` will remove failed & old releases.
// `absent` will remove the project folder (synonymous to the
// `ansible.builtin.file` module with `state=absent`).
// default: DeployHelperStatePresent
State *DeployHelperState `json:"state,omitempty"`
// The release version that is being deployed. Defaults to a timestamp format
// `%Y%m%d%H%M%S` (for example `20141119223359`). This parameter is optional
// during `state=present`, but needs to be set explicitly for `state=finalize`.
// You can use the generated fact `release={{ deploy_helper.new_release }}`.
Release *string `json:"release,omitempty"`
// The name of the folder that will hold the releases. This can be relative to
// `path` or absolute. Returned in the `deploy_helper.releases_path` fact.
// default: "releases"
ReleasesPath *string `json:"releases_path,omitempty"`
// relative to `path` or absolute. If this is set to an empty string, no shared
// folder will be created. Returned in the `deploy_helper.shared_path` fact.
// default: "shared"
SharedPath *string `json:"shared_path,omitempty"`
// The name of the symlink that is created when the deploy is finalized. Used
// in `state=finalize` and `state=clean`. Returned in the
// `deploy_helper.current_path` fact.
// default: "current"
CurrentPath *string `json:"current_path,omitempty"`
// The name of the file that indicates a deploy has not finished. All folders
// in the `releases_path` that contain this file will be deleted on
// `state=finalize` with `clean=true`, or `state=clean`. This file is
// automatically deleted from the `new_release_path` during `state=finalize`.
// default: "DEPLOY_UNFINISHED"
UnfinishedFilename *string `json:"unfinished_filename,omitempty"`
// Whether to run the clean procedure in case of `state=finalize`.
// default: true
Clean *bool `json:"clean,omitempty"`
// The number of old releases to keep when cleaning. Used in `state=finalize`
// and `state=clean`. Any unfinished builds will be deleted first, so only
// correct releases will count. The current version will not count.
// default: 5
KeepReleases *int `json:"keep_releases,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
}
Parameters for the `deploy_helper` Ansible module.
func (DeployHelperParameters) ToRPCCall ¶ added in v0.0.7
func (p DeployHelperParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DeployHelperParameters into an `rpc.RPCCall`.
type DeployHelperReturn ¶ added in v0.0.7
type DeployHelperReturn struct {
AnsibleCommonReturns
}
Return values for the `deploy_helper` Ansible module.
func DeployHelperReturnFromRPCResult ¶ added in v0.0.7
func DeployHelperReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DeployHelperReturn, error)
Unwrap the `rpc.RPCResult` into an `DeployHelperReturn`
type DeployHelperState ¶ added in v0.0.7
type DeployHelperState string
The state of the project. `query` will only gather facts. `present` will create the project `root` folder, and in it the `releases` and `shared` folders. `finalize` will remove the unfinished_filename file, create a symlink to the newly deployed release and optionally clean old releases. `clean` will remove failed & old releases. `absent` will remove the project folder (synonymous to the `ansible.builtin.file` module with `state=absent`).
const ( DeployHelperStatePresent DeployHelperState = "present" DeployHelperStateFinalize DeployHelperState = "finalize" DeployHelperStateAbsent DeployHelperState = "absent" DeployHelperStateClean DeployHelperState = "clean" DeployHelperStateQuery DeployHelperState = "query" )
func OptionalDeployHelperState ¶ added in v0.0.7
func OptionalDeployHelperState[T interface {
*DeployHelperState | DeployHelperState | *string | string
}](s T) *DeployHelperState
Convert a supported type to an optional (pointer) DeployHelperState
type DjangoCheckFailLevel ¶ added in v0.0.7
type DjangoCheckFailLevel string
Message level that will trigger failure. Default is the Django default value. Check the documentation for the version being used.
const ( DjangoCheckFailLevelCritical DjangoCheckFailLevel = "CRITICAL" DjangoCheckFailLevelError DjangoCheckFailLevel = "ERROR" DjangoCheckFailLevelWarning DjangoCheckFailLevel = "WARNING" DjangoCheckFailLevelInfo DjangoCheckFailLevel = "INFO" DjangoCheckFailLevelDebug DjangoCheckFailLevel = "DEBUG" )
func OptionalDjangoCheckFailLevel ¶ added in v0.0.7
func OptionalDjangoCheckFailLevel[T interface {
*DjangoCheckFailLevel | DjangoCheckFailLevel | *string | string
}](s T) *DjangoCheckFailLevel
Convert a supported type to an optional (pointer) DjangoCheckFailLevel
type DjangoCheckParameters ¶ added in v0.0.7
type DjangoCheckParameters struct {
// Specify databases to run checks against.
// If not specified, Django will not run database tests.
Database *[]string `json:"database,omitempty"`
// Include additional checks relevant in a deployment setting.
// default: false
Deploy *bool `json:"deploy,omitempty"`
// Message level that will trigger failure.
// Default is the Django default value. Check the documentation for the version
// being used.
FailLevel *DjangoCheckFailLevel `json:"fail_level,omitempty"`
// Restrict checks to specific tags.
Tags *[]string `json:"tags,omitempty"`
// Restrict checks to specific applications.
// Default is to check all applications.
Apps *[]string `json:"apps,omitempty"`
// Use the the Python interpreter from this virtual environment.
// Pass the path to the root of the virtualenv, not the `bin/` directory nor
// the `python` executable.
Venv *string `json:"venv,omitempty"`
// Specifies the settings module to use.
// The value will be passed as is to the `--settings` argument in `django-
// admin`.
Settings string `json:"settings"`
// Adds the given filesystem path to the Python import search path.
// The value will be passed as is to the `--pythonpath` argument in `django-
// admin`.
Pythonpath *string `json:"pythonpath,omitempty"`
// Provides a full stack trace in the output when a `CommandError` is raised.
Traceback *bool `json:"traceback,omitempty"`
// Specifies the amount of notification and debug information in the output of
// `django-admin`.
Verbosity *DjangoCheckVerbosity `json:"verbosity,omitempty"`
// Skips running system checks prior to running the command.
SkipChecks *bool `json:"skip_checks,omitempty"`
}
Parameters for the `django_check` Ansible module.
func (DjangoCheckParameters) ToRPCCall ¶ added in v0.0.7
func (p DjangoCheckParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DjangoCheckParameters into an `rpc.RPCCall`.
type DjangoCheckReturn ¶ added in v0.0.7
type DjangoCheckReturn struct {
AnsibleCommonReturns
// Command-line execution information.
RunInfo *map[string]any `json:"run_info,omitempty"`
// Version of Django.
Version *string `json:"version,omitempty"`
}
Return values for the `django_check` Ansible module.
func DjangoCheckReturnFromRPCResult ¶ added in v0.0.7
func DjangoCheckReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DjangoCheckReturn, error)
Unwrap the `rpc.RPCResult` into an `DjangoCheckReturn`
type DjangoCheckVerbosity ¶ added in v0.0.7
type DjangoCheckVerbosity int
Specifies the amount of notification and debug information in the output of `django-admin`.
const ( DjangoCheckVerbosity0 DjangoCheckVerbosity = 0 DjangoCheckVerbosity1 DjangoCheckVerbosity = 1 DjangoCheckVerbosity2 DjangoCheckVerbosity = 2 DjangoCheckVerbosity3 DjangoCheckVerbosity = 3 )
func OptionalDjangoCheckVerbosity ¶ added in v0.0.7
func OptionalDjangoCheckVerbosity[T interface {
*DjangoCheckVerbosity | DjangoCheckVerbosity | *int | int
}](s T) *DjangoCheckVerbosity
Convert a supported type to an optional (pointer) DjangoCheckVerbosity
type DjangoCommandParameters ¶ added in v0.0.7
type DjangoCommandParameters struct {
// Django admin command. It must be a valid command accepted by `python -m
// django` at the target system.
Command string `json:"command"`
// List of extra arguments passed to the django admin command.
ExtraArgs *[]string `json:"extra_args,omitempty"`
// Use the the Python interpreter from this virtual environment.
// Pass the path to the root of the virtualenv, not the `bin/` directory nor
// the `python` executable.
Venv *string `json:"venv,omitempty"`
// Specifies the settings module to use.
// The value will be passed as is to the `--settings` argument in `django-
// admin`.
Settings string `json:"settings"`
// Adds the given filesystem path to the Python import search path.
// The value will be passed as is to the `--pythonpath` argument in `django-
// admin`.
Pythonpath *string `json:"pythonpath,omitempty"`
// Provides a full stack trace in the output when a `CommandError` is raised.
Traceback *bool `json:"traceback,omitempty"`
// Specifies the amount of notification and debug information in the output of
// `django-admin`.
Verbosity *DjangoCommandVerbosity `json:"verbosity,omitempty"`
// Skips running system checks prior to running the command.
SkipChecks *bool `json:"skip_checks,omitempty"`
}
Parameters for the `django_command` Ansible module.
func (DjangoCommandParameters) ToRPCCall ¶ added in v0.0.7
func (p DjangoCommandParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DjangoCommandParameters into an `rpc.RPCCall`.
type DjangoCommandReturn ¶ added in v0.0.7
type DjangoCommandReturn struct {
AnsibleCommonReturns
// Command-line execution information.
RunInfo *map[string]any `json:"run_info,omitempty"`
// Version of Django.
Version *string `json:"version,omitempty"`
}
Return values for the `django_command` Ansible module.
func DjangoCommandReturnFromRPCResult ¶ added in v0.0.7
func DjangoCommandReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DjangoCommandReturn, error)
Unwrap the `rpc.RPCResult` into an `DjangoCommandReturn`
type DjangoCommandVerbosity ¶ added in v0.0.7
type DjangoCommandVerbosity int
Specifies the amount of notification and debug information in the output of `django-admin`.
const ( DjangoCommandVerbosity0 DjangoCommandVerbosity = 0 DjangoCommandVerbosity1 DjangoCommandVerbosity = 1 DjangoCommandVerbosity2 DjangoCommandVerbosity = 2 DjangoCommandVerbosity3 DjangoCommandVerbosity = 3 )
func OptionalDjangoCommandVerbosity ¶ added in v0.0.7
func OptionalDjangoCommandVerbosity[T interface {
*DjangoCommandVerbosity | DjangoCommandVerbosity | *int | int
}](s T) *DjangoCommandVerbosity
Convert a supported type to an optional (pointer) DjangoCommandVerbosity
type DjangoCreatecachetableParameters ¶ added in v0.0.7
type DjangoCreatecachetableParameters struct {
// Use the the Python interpreter from this virtual environment.
// Pass the path to the root of the virtualenv, not the `bin/` directory nor
// the `python` executable.
Venv *string `json:"venv,omitempty"`
// Specifies the settings module to use.
// The value will be passed as is to the `--settings` argument in `django-
// admin`.
Settings string `json:"settings"`
// Adds the given filesystem path to the Python import search path.
// The value will be passed as is to the `--pythonpath` argument in `django-
// admin`.
Pythonpath *string `json:"pythonpath,omitempty"`
// Provides a full stack trace in the output when a `CommandError` is raised.
Traceback *bool `json:"traceback,omitempty"`
// Specifies the amount of notification and debug information in the output of
// `django-admin`.
Verbosity *DjangoCreatecachetableVerbosity `json:"verbosity,omitempty"`
// Skips running system checks prior to running the command.
SkipChecks *bool `json:"skip_checks,omitempty"`
// Specify the database to be used.
// default: "default"
Database *string `json:"database,omitempty"`
}
Parameters for the `django_createcachetable` Ansible module.
func (DjangoCreatecachetableParameters) ToRPCCall ¶ added in v0.0.7
func (p DjangoCreatecachetableParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DjangoCreatecachetableParameters into an `rpc.RPCCall`.
type DjangoCreatecachetableReturn ¶ added in v0.0.7
type DjangoCreatecachetableReturn struct {
AnsibleCommonReturns
// Command-line execution information.
RunInfo *map[string]any `json:"run_info,omitempty"`
// Version of Django.
Version *string `json:"version,omitempty"`
}
Return values for the `django_createcachetable` Ansible module.
func DjangoCreatecachetableReturnFromRPCResult ¶ added in v0.0.7
func DjangoCreatecachetableReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DjangoCreatecachetableReturn, error)
Unwrap the `rpc.RPCResult` into an `DjangoCreatecachetableReturn`
type DjangoCreatecachetableVerbosity ¶ added in v0.0.7
type DjangoCreatecachetableVerbosity int
Specifies the amount of notification and debug information in the output of `django-admin`.
const ( DjangoCreatecachetableVerbosity0 DjangoCreatecachetableVerbosity = 0 DjangoCreatecachetableVerbosity1 DjangoCreatecachetableVerbosity = 1 DjangoCreatecachetableVerbosity2 DjangoCreatecachetableVerbosity = 2 DjangoCreatecachetableVerbosity3 DjangoCreatecachetableVerbosity = 3 )
func OptionalDjangoCreatecachetableVerbosity ¶ added in v0.0.7
func OptionalDjangoCreatecachetableVerbosity[T interface {
*DjangoCreatecachetableVerbosity | DjangoCreatecachetableVerbosity | *int | int
}](s T) *DjangoCreatecachetableVerbosity
Convert a supported type to an optional (pointer) DjangoCreatecachetableVerbosity
type DjangoManageParameters ¶ added in v0.0.7
type DjangoManageParameters struct {
// The name of the Django management command to run. The commands listed below
// are built in this module and have some basic parameter validation.
// `collectstatic` - Collects the static files into `STATIC_ROOT`.
// `createcachetable` - Creates the cache tables for use with the database
// cache backend.
// `flush` - Removes all data from the database.
// `loaddata` - Searches for and loads the contents of the named `fixtures`
// into the database.
// `migrate` - Synchronizes the database state with models and migrations.
// `test` - Runs tests for all installed apps.
// Other commands can be entered, but will fail if they are unknown to Django.
// Other commands that may prompt for user input should be run with the
// `--noinput` flag.
// Support for the values `cleanup`, `syncdb`, `validate` was removed in
// community.general 9.0.0. See note about supported versions of Django.
Command string `json:"command"`
// The path to the root of the Django application where `manage.py` lives.
ProjectPath string `json:"project_path"`
// The Python path to the application's settings module, such as
// `myapp.settings`.
Settings *string `json:"settings,omitempty"`
// A directory to add to the Python path. Typically used to include the
// settings module if it is located external to the application directory.
// This would be equivalent to adding `pythonpath`'s value to the `PYTHONPATH`
// environment variable.
Pythonpath *string `json:"pythonpath,omitempty"`
// An optional path to a `virtualenv` installation to use while running the
// manage application.
// The virtual environment must exist, otherwise the module will fail.
Virtualenv *string `json:"virtualenv,omitempty"`
// A list of space-delimited apps to target. Used by the `test` command.
Apps *string `json:"apps,omitempty"`
// The name of the table used for database-backed caching. Used by the
// `createcachetable` command.
CacheTable *string `json:"cache_table,omitempty"`
// Clear the existing files before trying to copy or link the original file.
// Used only with the `collectstatic` command. The `--noinput` argument will be
// added automatically.
// default: false
Clear *bool `json:"clear,omitempty"`
// The database to target. Used by the `createcachetable`, `flush`, `loaddata`,
// `syncdb`, and `migrate` commands.
Database *string `json:"database,omitempty"`
// Fail the command immediately if a test fails. Used by the `test` command.
// default: false
Failfast *bool `json:"failfast,omitempty"`
// A space-delimited list of fixture file names to load in the database.
// `Required` by the `loaddata` command.
Fixtures *string `json:"fixtures,omitempty"`
// Will skip over out-of-order missing migrations, you can only use this
// parameter with `migrate` command.
Skip *bool `json:"skip,omitempty"`
// Will run out-of-order or missing migrations as they are not rollback
// migrations, you can only use this parameter with `migrate` command.
Merge *bool `json:"merge,omitempty"`
// Will create links to the files instead of copying them, you can only use
// this parameter with `collectstatic` command.
Link *bool `json:"link,omitempty"`
// Controls the test runner class that is used to execute tests.
// This parameter is passed as-is to `manage.py`.
Testrunner *string `json:"testrunner,omitempty"`
}
Parameters for the `django_manage` Ansible module.
func (DjangoManageParameters) ToRPCCall ¶ added in v0.0.7
func (p DjangoManageParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DjangoManageParameters into an `rpc.RPCCall`.
type DjangoManageReturn ¶ added in v0.0.7
type DjangoManageReturn struct {
AnsibleCommonReturns
}
Return values for the `django_manage` Ansible module.
func DjangoManageReturnFromRPCResult ¶ added in v0.0.7
func DjangoManageReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DjangoManageReturn, error)
Unwrap the `rpc.RPCResult` into an `DjangoManageReturn`
type Dnf5Parameters ¶
type Dnf5Parameters struct {
// A package name or package specifier with version, like `name-1.0`. When
// using `state=latest`, this can be `*` which means run: `dnf -y update`. You
// can also pass a url or a local path to an rpm file. To operate on several
// packages this can accept a comma separated string of packages or a list of
// packages.
// Comparison operators for package version are valid here `>`, `<`, `>=`,
// `<=`. Example - `name >= 1.0`. Spaces around the operator are required.
// You can also pass an absolute path for a binary which is provided by the
// package to install. See examples for more information.
// default: []
Name *[]string `json:"name,omitempty"`
// Various (non-idempotent) commands for usage with `/usr/bin/ansible` and
// `not` playbooks. Use `ansible.builtin.package_facts` instead of the `list`
// argument as a best practice.
List *string `json:"list,omitempty"`
// Whether to install (`present`, `latest`), or remove (`absent`) a package.
// Default is `None`, however in effect the default action is `present` unless
// the `autoremove=true`, then `absent` is inferred.
State *Dnf5State `json:"state,omitempty"`
// `Repoid` of repositories to enable for the install/update operation. These
// repos will not persist beyond the transaction. When specifying multiple
// repos, separate them with a `,`.
// default: []
Enablerepo *[]string `json:"enablerepo,omitempty"`
// `Repoid` of repositories to disable for the install/update operation. These
// repos will not persist beyond the transaction. When specifying multiple
// repos, separate them with a `,`.
// default: []
Disablerepo *[]string `json:"disablerepo,omitempty"`
// The remote dnf configuration file to use for the transaction.
ConfFile *string `json:"conf_file,omitempty"`
// Whether to disable the GPG checking of signatures of packages being
// installed. Has an effect only if `state` is `present` or `latest`.
// This setting affects packages installed from a repository as well as "local"
// packages installed from the filesystem or a URL.
// default: "no"
DisableGpgCheck *bool `json:"disable_gpg_check,omitempty"`
// Specifies an alternative installroot, relative to which all packages will be
// installed.
// default: "/"
Installroot *string `json:"installroot,omitempty"`
// Specifies an alternative release from which all packages will be installed.
Releasever *string `json:"releasever,omitempty"`
// If `true`, removes all "leaf" packages from the system that were originally
// installed as dependencies of user-installed packages but which are no longer
// required by any such package. Should be used alone or when `state=absent`.
// default: "no"
Autoremove *bool `json:"autoremove,omitempty"`
// Package name(s) to exclude when `state=present` or `state=latest`. This can
// be a list or a comma separated string.
// default: []
Exclude *[]string `json:"exclude,omitempty"`
// Skip all unavailable packages or packages with broken dependencies without
// raising an error. Equivalent to passing the `--skip-broken` option.
// default: "no"
SkipBroken *bool `json:"skip_broken,omitempty"`
// Force dnf to check if cache is out of date and redownload if needed. Has an
// effect only if `state=present` or `state=latest`.
// default: "no"
UpdateCache *bool `json:"update_cache,omitempty"`
// When using latest, only update installed packages. Do not install packages.
// Has an effect only if `state=present` or `state=latest`.
// default: "no"
UpdateOnly *bool `json:"update_only,omitempty"`
// If set to `true`, and `state=latest` then only installs updates that have
// been marked security related.
// Note that, similar to `dnf upgrade-minimal`, this filter applies to
// dependencies as well.
// default: "no"
Security *bool `json:"security,omitempty"`
// If set to `true`, and `state=latest` then only installs updates that have
// been marked bugfix related.
// Note that, similar to `dnf upgrade-minimal`, this filter applies to
// dependencies as well.
// default: "no"
Bugfix *bool `json:"bugfix,omitempty"`
// `Plugin` name to enable for the install/update operation. The enabled plugin
// will not persist beyond the transaction.
// `disable_plugin` takes precedence in case a plugin is listed in both
// `enable_plugin` and `disable_plugin`.
// Requires python3-libdnf5 5.2.0.0+.
// default: []
EnablePlugin *[]string `json:"enable_plugin,omitempty"`
// `Plugin` name to disable for the install/update operation. The disabled
// plugins will not persist beyond the transaction.
// `disable_plugin` takes precedence in case a plugin is listed in both
// `enable_plugin` and `disable_plugin`.
// Requires python3-libdnf5 5.2.0.0+.
// default: []
DisablePlugin *[]string `json:"disable_plugin,omitempty"`
// Disable the excludes defined in DNF config files.
// If set to `all`, disables all excludes.
// If set to `main`, disable excludes defined in `[main]` in `dnf.conf`.
// If set to `repoid`, disable excludes defined for given repo id.
DisableExcludes *string `json:"disable_excludes,omitempty"`
// This is effectively a no-op in the dnf5 module as dnf5 itself handles
// downloading a https url as the source of the rpm, but is an accepted
// parameter for feature parity/compatibility with the `ansible.builtin.dnf`
// module.
// default: "yes"
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Disables SSL validation of the repository server for this transaction.
// This should be set to `false` if one of the configured repositories is using
// an untrusted or self-signed certificate.
// default: "yes"
Sslverify *bool `json:"sslverify,omitempty"`
// Specify if the named package and version is allowed to downgrade a maybe
// already installed higher version of that package. Note that setting
// `allow_downgrade=true` can make this module behave in a non-idempotent way.
// The task could end up with a set of packages that does not match the
// complete list of specified packages to install (because dependencies between
// the downgraded package and others can cause changes to the packages which
// were in the earlier transaction).
// default: "no"
AllowDowngrade *bool `json:"allow_downgrade,omitempty"`
// This is effectively a no-op in DNF as it is not needed with DNF.
// This option is deprecated and will be removed in ansible-core 2.20.
// default: "yes"
InstallRepoquery *bool `json:"install_repoquery,omitempty"`
// Only download the packages, do not install them.
// default: "no"
DownloadOnly *bool `json:"download_only,omitempty"`
// This is currently a no-op as dnf5 does not provide an option to configure
// it.
// Amount of time to wait for the dnf lockfile to be freed.
// default: 30
LockTimeout *int `json:"lock_timeout,omitempty"`
// Will also install all packages linked by a weak dependency relation.
// default: "yes"
InstallWeakDeps *bool `json:"install_weak_deps,omitempty"`
// Specifies an alternate directory to store packages.
// Has an effect only if `download_only` is specified.
DownloadDir *string `json:"download_dir,omitempty"`
// If `true` it allows erasing of installed packages to resolve
// dependencies.
// default: "no"
Allowerasing *bool `json:"allowerasing,omitempty"`
// This is the opposite of the `best` option kept for backwards compatibility.
// Since ansible-core 2.17 the default value is set by the operating system
// distribution.
Nobest *bool `json:"nobest,omitempty"`
// When set to `true`, either use a package with the highest version available
// or fail.
// When set to `false`, if the latest version cannot be installed go with the
// lower version.
// Default is set by the operating system distribution.
Best *bool `json:"best,omitempty"`
// Tells dnf to run entirely from system cache; does not download or update
// metadata.
// default: "no"
Cacheonly *bool `json:"cacheonly,omitempty"`
}
Parameters for the `dnf5` Ansible module.
func (Dnf5Parameters) ToRPCCall ¶
func (p Dnf5Parameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `Dnf5Parameters into an `rpc.RPCCall`.
type Dnf5Return ¶
type Dnf5Return struct {
AnsibleCommonReturns
// Additional information about the result
Msg *string `json:"msg,omitempty"`
// A list of the dnf transaction results
Results *[]any `json:"results,omitempty"`
// A list of the dnf transaction failures
Failures *[]any `json:"failures,omitempty"`
// For compatibility, 0 for success, 1 for failure
Rc *int `json:"rc,omitempty"`
}
Return values for the `dnf5` Ansible module.
func Dnf5ReturnFromRPCResult ¶
func Dnf5ReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (Dnf5Return, error)
Unwrap the `rpc.RPCResult` into an `Dnf5Return`
type Dnf5State ¶ added in v0.0.7
type Dnf5State string
Whether to install (`present`, `latest`), or remove (`absent`) a package. Default is `None`, however in effect the default action is `present` unless the `autoremove=true`, then `absent` is inferred.
type DnfConfigManagerParameters ¶ added in v0.0.7
type DnfConfigManagerParameters struct {
// Repository ID, for example `crb`.
// default: []
Name *[]string `json:"name,omitempty"`
// Whether the repositories should be `enabled` or `disabled`.
// default: DnfConfigManagerStateEnabled
State *DnfConfigManagerState `json:"state,omitempty"`
}
Parameters for the `dnf_config_manager` Ansible module.
func (DnfConfigManagerParameters) ToRPCCall ¶ added in v0.0.7
func (p DnfConfigManagerParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DnfConfigManagerParameters into an `rpc.RPCCall`.
type DnfConfigManagerReturn ¶ added in v0.0.7
type DnfConfigManagerReturn struct {
AnsibleCommonReturns
// Repo IDs before action taken.
RepoStatesPre *map[string]any `json:"repo_states_pre,omitempty"`
// Repository states after action taken.
RepoStatesPost *map[string]any `json:"repo_states_post,omitempty"`
// Repositories changed.
ChangedRepos *[]string `json:"changed_repos,omitempty"`
}
Return values for the `dnf_config_manager` Ansible module.
func DnfConfigManagerReturnFromRPCResult ¶ added in v0.0.7
func DnfConfigManagerReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DnfConfigManagerReturn, error)
Unwrap the `rpc.RPCResult` into an `DnfConfigManagerReturn`
type DnfConfigManagerState ¶ added in v0.0.7
type DnfConfigManagerState string
Whether the repositories should be `enabled` or `disabled`.
const ( DnfConfigManagerStateEnabled DnfConfigManagerState = "enabled" DnfConfigManagerStateDisabled DnfConfigManagerState = "disabled" )
func OptionalDnfConfigManagerState ¶ added in v0.0.7
func OptionalDnfConfigManagerState[T interface {
*DnfConfigManagerState | DnfConfigManagerState | *string | string
}](s T) *DnfConfigManagerState
Convert a supported type to an optional (pointer) DnfConfigManagerState
type DnfParameters ¶
type DnfParameters struct {
// Backend module to use.
// default: DnfUseBackendAuto
UseBackend *DnfUseBackend `json:"use_backend,omitempty"`
// A package name or package specifier with version, like `name-1.0`. When
// using state=latest, this can be '*' which means run: dnf -y update. You can
// also pass a url or a local path to an rpm file. To operate on several
// packages this can accept a comma separated string of packages or a list of
// packages.
// Comparison operators for package version are valid here `>`, `<`, `>=`,
// `<=`. Example - `name >= 1.0`. Spaces around the operator are required.
// You can also pass an absolute path for a binary which is provided by the
// package to install. See examples for more information.
// default: []
Name *[]string `json:"name,omitempty"`
// Various (non-idempotent) commands for usage with `/usr/bin/ansible` and
// `not` playbooks. Use `ansible.builtin.package_facts` instead of the `list`
// argument as a best practice.
List *string `json:"list,omitempty"`
// Whether to install (`present`, `latest`), or remove (`absent`) a package.
// Default is `None`, however in effect the default action is `present` unless
// the `autoremove=true`, then `absent` is inferred.
State *DnfState `json:"state,omitempty"`
// `Repoid` of repositories to enable for the install/update operation. These
// repos will not persist beyond the transaction. When specifying multiple
// repos, separate them with a ",".
// default: []
Enablerepo *[]string `json:"enablerepo,omitempty"`
// `Repoid` of repositories to disable for the install/update operation. These
// repos will not persist beyond the transaction. When specifying multiple
// repos, separate them with a `,`.
// default: []
Disablerepo *[]string `json:"disablerepo,omitempty"`
// The remote dnf configuration file to use for the transaction.
ConfFile *string `json:"conf_file,omitempty"`
// Whether to disable the GPG checking of signatures of packages being
// installed. Has an effect only if `state=present` or `state=latest`.
// This setting affects packages installed from a repository as well as "local"
// packages installed from the filesystem or a URL.
// default: "no"
DisableGpgCheck *bool `json:"disable_gpg_check,omitempty"`
// Specifies an alternative installroot, relative to which all packages will be
// installed.
// default: "/"
Installroot *string `json:"installroot,omitempty"`
// Specifies an alternative release from which all packages will be installed.
Releasever *string `json:"releasever,omitempty"`
// If `true`, removes all "leaf" packages from the system that were originally
// installed as dependencies of user-installed packages but which are no longer
// required by any such package. Should be used alone or when `state=absent`.
// default: "no"
Autoremove *bool `json:"autoremove,omitempty"`
// Package name(s) to exclude when `state=present`, or latest. This can be a
// list or a comma separated string.
// default: []
Exclude *[]string `json:"exclude,omitempty"`
// Skip all unavailable packages or packages with broken dependencies without
// raising an error. Equivalent to passing the `--skip-broken` option.
// default: "no"
SkipBroken *bool `json:"skip_broken,omitempty"`
// Force dnf to check if cache is out of date and redownload if needed. Has an
// effect only if `state=present` or `state=latest`.
// default: "no"
UpdateCache *bool `json:"update_cache,omitempty"`
// When using latest, only update installed packages. Do not install packages.
// Has an effect only if `state=present` or `state=latest`.
// default: "no"
UpdateOnly *bool `json:"update_only,omitempty"`
// If set to `true`, and `state=latest` then only installs updates that have
// been marked security related.
// Note that, similar to `dnf upgrade-minimal`, this filter applies to
// dependencies as well.
// default: "no"
Security *bool `json:"security,omitempty"`
// If set to `true`, and `state=latest` then only installs updates that have
// been marked bugfix related.
// Note that, similar to `dnf upgrade-minimal`, this filter applies to
// dependencies as well.
// default: "no"
Bugfix *bool `json:"bugfix,omitempty"`
// `Plugin` name to enable for the install/update operation. The enabled plugin
// will not persist beyond the transaction.
// default: []
EnablePlugin *[]string `json:"enable_plugin,omitempty"`
// `Plugin` name to disable for the install/update operation. The disabled
// plugins will not persist beyond the transaction.
// default: []
DisablePlugin *[]string `json:"disable_plugin,omitempty"`
// Disable the excludes defined in DNF config files.
// If set to `all`, disables all excludes.
// If set to `main`, disable excludes defined in `[main]` in `dnf.conf`.
// If set to `repoid`, disable excludes defined for given repo id.
DisableExcludes *string `json:"disable_excludes,omitempty"`
// This only applies if using a https url as the source of the rpm. For
// example, for localinstall. If set to `false`, the SSL certificates will not
// be validated.
// This should only set to `false` used on personally controlled sites using
// self-signed certificates as it avoids verifying the source site.
// default: "yes"
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Disables SSL validation of the repository server for this transaction.
// This should be set to `false` if one of the configured repositories is using
// an untrusted or self-signed certificate.
// default: "yes"
Sslverify *bool `json:"sslverify,omitempty"`
// Specify if the named package and version is allowed to downgrade a maybe
// already installed higher version of that package. Note that setting
// `allow_downgrade=true` can make this module behave in a non-idempotent way.
// The task could end up with a set of packages that does not match the
// complete list of specified packages to install (because dependencies between
// the downgraded package and others can cause changes to the packages which
// were in the earlier transaction).
// default: "no"
AllowDowngrade *bool `json:"allow_downgrade,omitempty"`
// This is effectively a no-op in DNF as it is not needed with DNF.
// This option is deprecated and will be removed in ansible-core 2.20.
// default: "yes"
InstallRepoquery *bool `json:"install_repoquery,omitempty"`
// Only download the packages, do not install them.
// default: "no"
DownloadOnly *bool `json:"download_only,omitempty"`
// Amount of time to wait for the dnf lockfile to be freed.
// default: 30
LockTimeout *int `json:"lock_timeout,omitempty"`
// Will also install all packages linked by a weak dependency relation.
// default: "yes"
InstallWeakDeps *bool `json:"install_weak_deps,omitempty"`
// Specifies an alternate directory to store packages.
// Has an effect only if `download_only` is specified.
DownloadDir *string `json:"download_dir,omitempty"`
// If `true` it allows erasing of installed packages to resolve dependencies.
// default: "no"
Allowerasing *bool `json:"allowerasing,omitempty"`
// This is the opposite of the `best` option kept for backwards compatibility.
// Since ansible-core 2.17 the default value is set by the operating system
// distribution.
Nobest *bool `json:"nobest,omitempty"`
// When set to `true`, either use a package with the highest version available
// or fail.
// When set to `false`, if the latest version cannot be installed go with the
// lower version.
// Default is set by the operating system distribution.
Best *bool `json:"best,omitempty"`
// Tells dnf to run entirely from system cache; does not download or update
// metadata.
// default: "no"
Cacheonly *bool `json:"cacheonly,omitempty"`
}
Parameters for the `dnf` Ansible module.
func (DnfParameters) ToRPCCall ¶
func (p DnfParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DnfParameters into an `rpc.RPCCall`.
type DnfReturn ¶
type DnfReturn struct {
AnsibleCommonReturns
}
Return values for the `dnf` Ansible module.
func DnfReturnFromRPCResult ¶
Unwrap the `rpc.RPCResult` into an `DnfReturn`
type DnfState ¶ added in v0.0.7
type DnfState string
Whether to install (`present`, `latest`), or remove (`absent`) a package. Default is `None`, however in effect the default action is `present` unless the `autoremove=true`, then `absent` is inferred.
type DnfUseBackend ¶ added in v0.0.7
type DnfUseBackend string
Backend module to use.
const ( // Automatically select the backend based on the `ansible_facts.pkg_mgr` fact. DnfUseBackendAuto DnfUseBackend = "auto" // Alias for `auto` (see Notes) DnfUseBackendYum DnfUseBackend = "yum" // `ansible.builtin.dnf` DnfUseBackendDnf DnfUseBackend = "dnf" // Alias for `dnf` DnfUseBackendYum4 DnfUseBackend = "yum4" // Alias for `dnf` DnfUseBackendDnf4 DnfUseBackend = "dnf4" // `ansible.builtin.dnf5` DnfUseBackendDnf5 DnfUseBackend = "dnf5" )
func OptionalDnfUseBackend ¶ added in v0.0.7
func OptionalDnfUseBackend[T interface {
*DnfUseBackend | DnfUseBackend | *string | string
}](s T) *DnfUseBackend
Convert a supported type to an optional (pointer) DnfUseBackend
type DnfVersionlockParameters ¶ added in v0.0.7
type DnfVersionlockParameters struct {
// Package name spec to add or exclude to or delete from the `locklist` using
// the format expected by the `dnf repoquery` command.
// This parameter is mutually exclusive with `state=clean`.
// default: []
Name *[]string `json:"name,omitempty"`
// Do not resolve package name specs to NEVRAs to find specific version to lock
// to. Instead the package name specs are used as they are. This enables
// locking to not yet available versions of the package.
// default: false
Raw *bool `json:"raw,omitempty"`
// Whether to add (`present` or `excluded`) to or remove (`absent` or `clean`)
// from the `locklist`.
// `present` will add a package name spec to the `locklist`. If there is a
// installed package that matches, then only that version will be added.
// Otherwise, all available package versions will be added.
// `excluded` will add a package name spec as excluded to the `locklist`. It
// means that packages represented by the package name spec will be excluded
// from transaction operations. All available package versions will be added.
// `absent` will delete entries in the `locklist` that match the package name
// spec.
// `clean` will delete all entries in the `locklist`. This option is mutually
// exclusive with `name`.
// default: DnfVersionlockStatePresent
State *DnfVersionlockState `json:"state,omitempty"`
}
Parameters for the `dnf_versionlock` Ansible module.
func (DnfVersionlockParameters) ToRPCCall ¶ added in v0.0.7
func (p DnfVersionlockParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DnfVersionlockParameters into an `rpc.RPCCall`.
type DnfVersionlockReturn ¶ added in v0.0.7
type DnfVersionlockReturn struct {
AnsibleCommonReturns
// Locklist before module execution.
LocklistPre *[]string `json:"locklist_pre,omitempty"`
// Locklist after module execution.
LocklistPost *[]string `json:"locklist_post,omitempty"`
// Package name specs meant to be added by versionlock.
SpecsToadd *[]string `json:"specs_toadd,omitempty"`
// Package name specs meant to be deleted by versionlock.
SpecsTodelete *[]string `json:"specs_todelete,omitempty"`
}
Return values for the `dnf_versionlock` Ansible module.
func DnfVersionlockReturnFromRPCResult ¶ added in v0.0.7
func DnfVersionlockReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DnfVersionlockReturn, error)
Unwrap the `rpc.RPCResult` into an `DnfVersionlockReturn`
type DnfVersionlockState ¶ added in v0.0.7
type DnfVersionlockState string
Whether to add (`present` or `excluded`) to or remove (`absent` or `clean`) from the `locklist`. `present` will add a package name spec to the `locklist`. If there is a installed package that matches, then only that version will be added. Otherwise, all available package versions will be added. `excluded` will add a package name spec as excluded to the `locklist`. It means that packages represented by the package name spec will be excluded from transaction operations. All available package versions will be added. `absent` will delete entries in the `locklist` that match the package name spec. `clean` will delete all entries in the `locklist`. This option is mutually exclusive with `name`.
const ( DnfVersionlockStateAbsent DnfVersionlockState = "absent" DnfVersionlockStateClean DnfVersionlockState = "clean" DnfVersionlockStateExcluded DnfVersionlockState = "excluded" DnfVersionlockStatePresent DnfVersionlockState = "present" )
func OptionalDnfVersionlockState ¶ added in v0.0.7
func OptionalDnfVersionlockState[T interface {
*DnfVersionlockState | DnfVersionlockState | *string | string
}](s T) *DnfVersionlockState
Convert a supported type to an optional (pointer) DnfVersionlockState
type DockerComposeV2Build ¶ added in v0.0.12
type DockerComposeV2Build string
Whether to build images before starting containers. This is used when `docker compose up` is run. `always` always builds before starting containers. This is equivalent to the `--build` option of `docker compose up`. `never` never builds before starting containers. This is equivalent to the `--no-build` option of `docker compose up`. `policy` uses the policy as defined in the Compose file.
const ( DockerComposeV2BuildAlways DockerComposeV2Build = "always" DockerComposeV2BuildNever DockerComposeV2Build = "never" DockerComposeV2BuildPolicy DockerComposeV2Build = "policy" )
func OptionalDockerComposeV2Build ¶ added in v0.0.12
func OptionalDockerComposeV2Build[T interface {
*DockerComposeV2Build | DockerComposeV2Build | *string | string
}](s T) *DockerComposeV2Build
Convert a supported type to an optional (pointer) DockerComposeV2Build
type DockerComposeV2ExecParameters ¶ added in v0.0.12
type DockerComposeV2ExecParameters struct {
// The service to run the command in.
Service string `json:"service"`
// The index of the container to run the command in if the service has multiple
// replicas.
Index *int `json:"index,omitempty"`
// The command to execute.
// Since this is a list of arguments, no quoting is needed.
// Exactly one of `argv` or `command` must be specified.
Argv *[]string `json:"argv,omitempty"`
// The command to execute.
// Exactly one of `argv` or `command` must be specified.
Command *string `json:"command,omitempty"`
// The directory to run the command in.
Chdir *string `json:"chdir,omitempty"`
// Whether to run the command synchronously (`detach=false`, default) or
// asynchronously (`detach=true`).
// If set to `true`, `stdin` cannot be provided, and the return values
// R`stdout`, R`stderr`, and R`rc` are not returned.
// default: false
Detach *bool `json:"detach,omitempty"`
// If specified, the user to execute this command with.
User *string `json:"user,omitempty"`
// Set the stdin of the command directly to the specified value.
// Can only be used if `detach=false`.
Stdin *string `json:"stdin,omitempty"`
// If set to `true`, appends a newline to `stdin`.
// default: true
StdinAddNewline *bool `json:"stdin_add_newline,omitempty"`
// Strip empty lines from the end of stdout/stderr in result.
// default: true
StripEmptyEnds *bool `json:"strip_empty_ends,omitempty"`
// Whether to give extended privileges to the process.
// default: false
Privileged *bool `json:"privileged,omitempty"`
// Whether to allocate a TTY.
// default: true
Tty *bool `json:"tty,omitempty"`
// Dictionary of environment variables with their respective values to be
// passed to the command ran inside the container.
// Values which might be parsed as numbers, booleans or other types by the YAML
// parser must be quoted (for example `"true"`) in order to avoid data loss.
// Please note that if you are passing values in with Jinja2 templates, like
// `"{{ value }}"`, you need to add `| string` to prevent Ansible to convert
// strings such as `"true"` back to booleans. The correct way is to use `"{{
// value | string }}"`.
Env *map[string]any `json:"env,omitempty"`
// Path to a directory containing a Compose file (`compose.yml`,
// `compose.yaml`, `docker-compose.yml`, or `docker-compose.yaml`).
// If `files` is provided, will look for these files in this directory instead.
// Mutually exclusive with `definition`. One of `project_src` and `definition`
// must be provided.
ProjectSrc *string `json:"project_src,omitempty"`
// Provide a project name. If not provided, the project name is taken from the
// basename of `project_src`.
// Required when `definition` is provided.
ProjectName *string `json:"project_name,omitempty"`
// List of Compose file names relative to `project_src` to be used instead of
// the main Compose file (`compose.yml`, `compose.yaml`, `docker-compose.yml`,
// or `docker-compose.yaml`).
// Files are loaded and merged in the order given.
// Mutually exclusive with `definition`.
Files *[]string `json:"files,omitempty"`
// Compose file describing one or more services, networks and volumes.
// Mutually exclusive with `project_src` and `files`. One of `project_src` and
// `definition` must be provided.
// If provided, PyYAML must be available to this module, and `project_name`
// must be specified.
// Note that a temporary directory will be created and deleted afterwards when
// using this option.
Definition *map[string]any `json:"definition,omitempty"`
// By default environment files are loaded from a `.env` file located directly
// under the `project_src` directory.
// `env_files` can be used to specify the path of one or multiple custom
// environment files instead.
// The path is relative to the `project_src` directory.
EnvFiles *[]string `json:"env_files,omitempty"`
// List of profiles to enable when starting services.
// Equivalent to `docker compose --profile`.
Profiles *[]string `json:"profiles,omitempty"`
// If set to `false`, the module will not check whether one of the files
// `compose.yaml`, `compose.yml`, `docker-compose.yaml`, or `docker-
// compose.yml` exists in `project_src` if `files` is not provided.
// This can be useful if environment files with `COMPOSE_FILE` are used to
// configure a different filename. The module currently does not check for
// `COMPOSE_FILE` in environment files or the current environment.
// default: true
CheckFilesExisting *bool `json:"check_files_existing,omitempty"`
// Path to the Docker CLI. If not provided, will search for Docker CLI on the
// `PATH`.
DockerCli *string `json:"docker_cli,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// Mutually exclusive with `cli_context`. If neither `docker_host` nor
// `cli_context` are provided, the value `unix:///var/run/docker.sock` is used.
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// The Docker CLI context to use.
// Mutually exclusive with `docker_host`.
CliContext *string `json:"cli_context,omitempty"`
}
Parameters for the `docker_compose_v2_exec` Ansible module.
func (DockerComposeV2ExecParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerComposeV2ExecParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerComposeV2ExecParameters into an `rpc.RPCCall`.
type DockerComposeV2ExecReturn ¶ added in v0.0.12
type DockerComposeV2ExecReturn struct {
AnsibleCommonReturns
// The standard output of the container command.
Stdout *string `json:"stdout,omitempty"`
// The standard error output of the container command.
Stderr *string `json:"stderr,omitempty"`
// The exit code of the command.
Rc *int `json:"rc,omitempty"`
}
Return values for the `docker_compose_v2_exec` Ansible module.
func DockerComposeV2ExecReturnFromRPCResult ¶ added in v0.0.12
func DockerComposeV2ExecReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerComposeV2ExecReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerComposeV2ExecReturn`
type DockerComposeV2Parameters ¶ added in v0.0.12
type DockerComposeV2Parameters struct {
// Desired state of the project.
// `present` is equivalent to running `docker compose up`.
// `stopped` is equivalent to running `docker compose stop`.
// `absent` is equivalent to running `docker compose down`.
// `restarted` is equivalent to running `docker compose restart`.
// default: DockerComposeV2StatePresent
State *DockerComposeV2State `json:"state,omitempty"`
// Whether to pull images before running. This is used when `docker compose up`
// is run.
// `always` ensures that the images are always pulled, even when already
// present on the Docker daemon.
// `missing` only pulls them when they are not present on the Docker daemon.
// `never` never pulls images. If they are not present, the module will fail
// when trying to create the containers that need them.
// `policy` use the Compose file's `pull_policy` defined for the service to
// figure out what to do.
// default: DockerComposeV2PullPolicy
Pull *DockerComposeV2Pull `json:"pull,omitempty"`
// Whether to build images before starting containers. This is used when
// `docker compose up` is run.
// `always` always builds before starting containers. This is equivalent to the
// `--build` option of `docker compose up`.
// `never` never builds before starting containers. This is equivalent to the
// `--no-build` option of `docker compose up`.
// `policy` uses the policy as defined in the Compose file.
// default: DockerComposeV2BuildPolicy
Build *DockerComposeV2Build `json:"build,omitempty"`
// When `state` is `present` or `restarted`, specify whether or not to include
// linked services.
// default: true
Dependencies *bool `json:"dependencies,omitempty"`
// Ignores image building events for change detection.
// If `state=present` and `ignore_build_events=true` and `build=always`, a
// rebuild that does not trigger a container restart no longer results in
// R`ignore:changed=true`.
// Note that Docker Compose 2.31.0 is the first Compose 2.x version to emit
// build events. For older versions, the behavior is always as if
// `ignore_build_events=true`.
// default: true
IgnoreBuildEvents *bool `json:"ignore_build_events,omitempty"`
// By default containers will be recreated when their configuration differs
// from the service definition.
// Setting to `never` ignores configuration differences and leaves existing
// containers unchanged.
// Setting to `always` forces recreation of all existing containers.
// default: DockerComposeV2RecreateAuto
Recreate *DockerComposeV2Recreate `json:"recreate,omitempty"`
// Whether to recreate instead of reuse anonymous volumes from previous
// containers.
// `true` is equivalent to the `--renew-anon-volumes` option of `docker compose
// up`.
// default: false
RenewAnonVolumes *bool `json:"renew_anon_volumes,omitempty"`
// Use with `state=absent` to remove all images or only local images.
RemoveImages *DockerComposeV2RemoveImages `json:"remove_images,omitempty"`
// Use with `state=absent` to remove data volumes.
// default: false
RemoveVolumes *bool `json:"remove_volumes,omitempty"`
// Remove containers for services not defined in the Compose file.
// default: false
RemoveOrphans *bool `json:"remove_orphans,omitempty"`
// Timeout in seconds for container shutdown when attached or when containers
// are already running.
Timeout *int `json:"timeout,omitempty"`
// Specifies a subset of services to be targeted.
Services *[]string `json:"services,omitempty"`
// Define how to scale services when running `docker compose up`.
// Provide a dictionary of key/value pairs where the key is the name of the
// service and the value is an integer count for the number of containers.
Scale *map[string]any `json:"scale,omitempty"`
// When running `docker compose up`, pass `--wait` to wait for services to be
// running/healthy.
// A timeout can be set with the `wait_timeout` option.
// default: false
Wait *bool `json:"wait,omitempty"`
// When `wait=true`, wait at most this amount of seconds.
WaitTimeout *int `json:"wait_timeout,omitempty"`
// When `assume_yes=true`, pass `-y`/`--yes` to assume "yes" as answer to all
// prompts and run non-interactively.
// Right now a prompt is asked whenever a non-matching volume should be re-
// created. `assume_yes=false` results in the question being answered by "no",
// which will simply re-use the existing volume.
// This option is only available on Docker Compose 2.32.0 or newer.
// default: false
AssumeYes *bool `json:"assume_yes,omitempty"`
// Path to a directory containing a Compose file (`compose.yml`,
// `compose.yaml`, `docker-compose.yml`, or `docker-compose.yaml`).
// If `files` is provided, will look for these files in this directory instead.
// Mutually exclusive with `definition`. One of `project_src` and `definition`
// must be provided.
ProjectSrc *string `json:"project_src,omitempty"`
// Provide a project name. If not provided, the project name is taken from the
// basename of `project_src`.
// Required when `definition` is provided.
ProjectName *string `json:"project_name,omitempty"`
// List of Compose file names relative to `project_src` to be used instead of
// the main Compose file (`compose.yml`, `compose.yaml`, `docker-compose.yml`,
// or `docker-compose.yaml`).
// Files are loaded and merged in the order given.
// Mutually exclusive with `definition`.
Files *[]string `json:"files,omitempty"`
// Compose file describing one or more services, networks and volumes.
// Mutually exclusive with `project_src` and `files`. One of `project_src` and
// `definition` must be provided.
// If provided, PyYAML must be available to this module, and `project_name`
// must be specified.
// Note that a temporary directory will be created and deleted afterwards when
// using this option.
Definition *map[string]any `json:"definition,omitempty"`
// By default environment files are loaded from a `.env` file located directly
// under the `project_src` directory.
// `env_files` can be used to specify the path of one or multiple custom
// environment files instead.
// The path is relative to the `project_src` directory.
EnvFiles *[]string `json:"env_files,omitempty"`
// List of profiles to enable when starting services.
// Equivalent to `docker compose --profile`.
Profiles *[]string `json:"profiles,omitempty"`
// If set to `false`, the module will not check whether one of the files
// `compose.yaml`, `compose.yml`, `docker-compose.yaml`, or `docker-
// compose.yml` exists in `project_src` if `files` is not provided.
// This can be useful if environment files with `COMPOSE_FILE` are used to
// configure a different filename. The module currently does not check for
// `COMPOSE_FILE` in environment files or the current environment.
// default: true
CheckFilesExisting *bool `json:"check_files_existing,omitempty"`
// Path to the Docker CLI. If not provided, will search for Docker CLI on the
// `PATH`.
DockerCli *string `json:"docker_cli,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// Mutually exclusive with `cli_context`. If neither `docker_host` nor
// `cli_context` are provided, the value `unix:///var/run/docker.sock` is used.
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// The Docker CLI context to use.
// Mutually exclusive with `docker_host`.
CliContext *string `json:"cli_context,omitempty"`
}
Parameters for the `docker_compose_v2` Ansible module.
func (DockerComposeV2Parameters) ToRPCCall ¶ added in v0.0.12
func (p DockerComposeV2Parameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerComposeV2Parameters into an `rpc.RPCCall`.
type DockerComposeV2Pull ¶ added in v0.0.12
type DockerComposeV2Pull string
Whether to pull images before running. This is used when `docker compose up` is run. `always` ensures that the images are always pulled, even when already present on the Docker daemon. `missing` only pulls them when they are not present on the Docker daemon. `never` never pulls images. If they are not present, the module will fail when trying to create the containers that need them. `policy` use the Compose file's `pull_policy` defined for the service to figure out what to do.
const ( DockerComposeV2PullAlways DockerComposeV2Pull = "always" DockerComposeV2PullMissing DockerComposeV2Pull = "missing" DockerComposeV2PullNever DockerComposeV2Pull = "never" DockerComposeV2PullPullPolicy DockerComposeV2Pull = "policy" )
func OptionalDockerComposeV2Pull ¶ added in v0.0.12
func OptionalDockerComposeV2Pull[T interface {
*DockerComposeV2Pull | DockerComposeV2Pull | *string | string
}](s T) *DockerComposeV2Pull
Convert a supported type to an optional (pointer) DockerComposeV2Pull
type DockerComposeV2PullParameters ¶ added in v0.0.12
type DockerComposeV2PullParameters struct {
// Whether to pull images before running. This is used when `docker compose up`
// is ran.
// `always` ensures that the images are always pulled, even when already
// present on the Docker daemon.
// `missing` only pulls them when they are not present on the Docker daemon.
// This is only supported since Docker Compose 2.22.0.
// default: DockerComposeV2PullPolicyAlways
Policy *DockerComposeV2PullPolicy `json:"policy,omitempty"`
// If set to `true`, will not pull images that can be built.
// default: false
IgnoreBuildable *bool `json:"ignore_buildable,omitempty"`
// If set to `true`, also pull services that are declared as dependencies.
// This only makes sense if `services` is used.
// default: false
IncludeDeps *bool `json:"include_deps,omitempty"`
// Specifies a subset of services to be targeted.
Services *[]string `json:"services,omitempty"`
// Path to a directory containing a Compose file (`compose.yml`,
// `compose.yaml`, `docker-compose.yml`, or `docker-compose.yaml`).
// If `files` is provided, will look for these files in this directory instead.
// Mutually exclusive with `definition`. One of `project_src` and `definition`
// must be provided.
ProjectSrc *string `json:"project_src,omitempty"`
// Provide a project name. If not provided, the project name is taken from the
// basename of `project_src`.
// Required when `definition` is provided.
ProjectName *string `json:"project_name,omitempty"`
// List of Compose file names relative to `project_src` to be used instead of
// the main Compose file (`compose.yml`, `compose.yaml`, `docker-compose.yml`,
// or `docker-compose.yaml`).
// Files are loaded and merged in the order given.
// Mutually exclusive with `definition`.
Files *[]string `json:"files,omitempty"`
// Compose file describing one or more services, networks and volumes.
// Mutually exclusive with `project_src` and `files`. One of `project_src` and
// `definition` must be provided.
// If provided, PyYAML must be available to this module, and `project_name`
// must be specified.
// Note that a temporary directory will be created and deleted afterwards when
// using this option.
Definition *map[string]any `json:"definition,omitempty"`
// By default environment files are loaded from a `.env` file located directly
// under the `project_src` directory.
// `env_files` can be used to specify the path of one or multiple custom
// environment files instead.
// The path is relative to the `project_src` directory.
EnvFiles *[]string `json:"env_files,omitempty"`
// List of profiles to enable when starting services.
// Equivalent to `docker compose --profile`.
Profiles *[]string `json:"profiles,omitempty"`
// If set to `false`, the module will not check whether one of the files
// `compose.yaml`, `compose.yml`, `docker-compose.yaml`, or `docker-
// compose.yml` exists in `project_src` if `files` is not provided.
// This can be useful if environment files with `COMPOSE_FILE` are used to
// configure a different filename. The module currently does not check for
// `COMPOSE_FILE` in environment files or the current environment.
// default: true
CheckFilesExisting *bool `json:"check_files_existing,omitempty"`
// Path to the Docker CLI. If not provided, will search for Docker CLI on the
// `PATH`.
DockerCli *string `json:"docker_cli,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// Mutually exclusive with `cli_context`. If neither `docker_host` nor
// `cli_context` are provided, the value `unix:///var/run/docker.sock` is used.
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// The Docker CLI context to use.
// Mutually exclusive with `docker_host`.
CliContext *string `json:"cli_context,omitempty"`
}
Parameters for the `docker_compose_v2_pull` Ansible module.
func (DockerComposeV2PullParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerComposeV2PullParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerComposeV2PullParameters into an `rpc.RPCCall`.
type DockerComposeV2PullPolicy ¶ added in v0.0.12
type DockerComposeV2PullPolicy string
Whether to pull images before running. This is used when `docker compose up` is ran. `always` ensures that the images are always pulled, even when already present on the Docker daemon. `missing` only pulls them when they are not present on the Docker daemon. This is only supported since Docker Compose 2.22.0.
const ( DockerComposeV2PullPolicyAlways DockerComposeV2PullPolicy = "always" DockerComposeV2PullPolicyMissing DockerComposeV2PullPolicy = "missing" )
func OptionalDockerComposeV2PullPolicy ¶ added in v0.0.12
func OptionalDockerComposeV2PullPolicy[T interface {
*DockerComposeV2PullPolicy | DockerComposeV2PullPolicy | *string | string
}](s T) *DockerComposeV2PullPolicy
Convert a supported type to an optional (pointer) DockerComposeV2PullPolicy
type DockerComposeV2PullReturn ¶ added in v0.0.12
type DockerComposeV2PullReturn struct {
AnsibleCommonReturns
// A list of actions that have been applied.
Actions *map[string]any `json:"actions,omitempty"`
}
Return values for the `docker_compose_v2_pull` Ansible module.
func DockerComposeV2PullReturnFromRPCResult ¶ added in v0.0.12
func DockerComposeV2PullReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerComposeV2PullReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerComposeV2PullReturn`
type DockerComposeV2Recreate ¶ added in v0.0.12
type DockerComposeV2Recreate string
By default containers will be recreated when their configuration differs from the service definition. Setting to `never` ignores configuration differences and leaves existing containers unchanged. Setting to `always` forces recreation of all existing containers.
const ( DockerComposeV2RecreateAlways DockerComposeV2Recreate = "always" DockerComposeV2RecreateNever DockerComposeV2Recreate = "never" DockerComposeV2RecreateAuto DockerComposeV2Recreate = "auto" )
func OptionalDockerComposeV2Recreate ¶ added in v0.0.12
func OptionalDockerComposeV2Recreate[T interface {
*DockerComposeV2Recreate | DockerComposeV2Recreate | *string | string
}](s T) *DockerComposeV2Recreate
Convert a supported type to an optional (pointer) DockerComposeV2Recreate
type DockerComposeV2RemoveImages ¶ added in v0.0.12
type DockerComposeV2RemoveImages string
Use with `state=absent` to remove all images or only local images.
const ( DockerComposeV2RemoveImagesAll DockerComposeV2RemoveImages = "all" DockerComposeV2RemoveImagesLocal DockerComposeV2RemoveImages = "local" )
func OptionalDockerComposeV2RemoveImages ¶ added in v0.0.12
func OptionalDockerComposeV2RemoveImages[T interface {
*DockerComposeV2RemoveImages | DockerComposeV2RemoveImages | *string | string
}](s T) *DockerComposeV2RemoveImages
Convert a supported type to an optional (pointer) DockerComposeV2RemoveImages
type DockerComposeV2Return ¶ added in v0.0.12
type DockerComposeV2Return struct {
AnsibleCommonReturns
// A list of containers associated to the service.
Containers *map[string]any `json:"containers,omitempty"`
// A list of images associated to the service.
Images *map[string]any `json:"images,omitempty"`
// A list of actions that have been applied.
Actions *map[string]any `json:"actions,omitempty"`
}
Return values for the `docker_compose_v2` Ansible module.
func DockerComposeV2ReturnFromRPCResult ¶ added in v0.0.12
func DockerComposeV2ReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerComposeV2Return, error)
Unwrap the `rpc.RPCResult` into an `DockerComposeV2Return`
type DockerComposeV2RunParameters ¶ added in v0.0.12
type DockerComposeV2RunParameters struct {
// The service to run the command in.
Service string `json:"service"`
// The command to execute.
// Since this is a list of arguments, no quoting is needed.
// `argv` or `command` are mutually exclusive.
Argv *[]string `json:"argv,omitempty"`
// The command to execute.
// `argv` or `command` are mutually exclusive.
Command *string `json:"command,omitempty"`
// Build image before starting container.
// Note that building can insert information into R`stdout` or R`stderr`.
// default: false
Build *bool `json:"build,omitempty"`
// Linux capabilities to add to the container.
CapAdd *[]string `json:"cap_add,omitempty"`
// Linux capabilities to drop from the container.
CapDrop *[]string `json:"cap_drop,omitempty"`
// Override the entrypoint of the container image.
Entrypoint *string `json:"entrypoint,omitempty"`
// Whether to keep STDIN open even if not attached.
// default: true
Interactive *bool `json:"interactive,omitempty"`
// Add or override labels to the container.
Labels *[]string `json:"labels,omitempty"`
// Assign a name to the container.
Name *string `json:"name,omitempty"`
// Do not start linked services.
// default: false
NoDeps *bool `json:"no_deps,omitempty"`
// Publish a container's port(s) to the host.
Publish *[]string `json:"publish,omitempty"`
// Pull without printing progress information.
// Note that pulling can insert information into R`stdout` or R`stderr`.
// default: false
QuietPull *bool `json:"quiet_pull,omitempty"`
// Remove containers for services not defined in the Compose file.
// default: false
RemoveOrphans *bool `json:"remove_orphans,omitempty"`
// Automatically remove th econtainer when it exits.
// Corresponds to the `--rm` option of `docker compose run`.
// default: false
Cleanup *bool `json:"cleanup,omitempty"`
// Run command with all service's ports enabled and mapped to the host.
// default: false
ServicePorts *bool `json:"service_ports,omitempty"`
// Use the service's network `useAliases` in the network(s) the container
// connects to.
// default: false
UseAliases *bool `json:"use_aliases,omitempty"`
// Bind mount one or more volumes.
Volumes *[]string `json:"volumes,omitempty"`
// The directory to run the command in.
Chdir *string `json:"chdir,omitempty"`
// Whether to run the command synchronously (`detach=false`, default) or
// asynchronously (`detach=true`).
// If set to `true`, `stdin` cannot be provided, and the return values
// R`stdout`, R`stderr`, and R`rc` are not returned. Instead, the return value
// R`container_id` is provided.
// default: false
Detach *bool `json:"detach,omitempty"`
// If specified, the user to execute this command with.
User *string `json:"user,omitempty"`
// Set the stdin of the command directly to the specified value.
// Can only be used if `detach=false`.
Stdin *string `json:"stdin,omitempty"`
// If set to `true`, appends a newline to `stdin`.
// default: true
StdinAddNewline *bool `json:"stdin_add_newline,omitempty"`
// Strip empty lines from the end of stdout/stderr in result.
// default: true
StripEmptyEnds *bool `json:"strip_empty_ends,omitempty"`
// Whether to allocate a TTY.
// default: true
Tty *bool `json:"tty,omitempty"`
// Dictionary of environment variables with their respective values to be
// passed to the command ran inside the container.
// Values which might be parsed as numbers, booleans or other types by the YAML
// parser must be quoted (for example `"true"`) in order to avoid data loss.
// Please note that if you are passing values in with Jinja2 templates, like
// `"{{ value }}"`, you need to add `| string` to prevent Ansible to convert
// strings such as `"true"` back to booleans. The correct way is to use `"{{
// value | string }}"`.
Env *map[string]any `json:"env,omitempty"`
// Path to a directory containing a Compose file (`compose.yml`,
// `compose.yaml`, `docker-compose.yml`, or `docker-compose.yaml`).
// If `files` is provided, will look for these files in this directory instead.
// Mutually exclusive with `definition`. One of `project_src` and `definition`
// must be provided.
ProjectSrc *string `json:"project_src,omitempty"`
// Provide a project name. If not provided, the project name is taken from the
// basename of `project_src`.
// Required when `definition` is provided.
ProjectName *string `json:"project_name,omitempty"`
// List of Compose file names relative to `project_src` to be used instead of
// the main Compose file (`compose.yml`, `compose.yaml`, `docker-compose.yml`,
// or `docker-compose.yaml`).
// Files are loaded and merged in the order given.
// Mutually exclusive with `definition`.
Files *[]string `json:"files,omitempty"`
// Compose file describing one or more services, networks and volumes.
// Mutually exclusive with `project_src` and `files`. One of `project_src` and
// `definition` must be provided.
// If provided, PyYAML must be available to this module, and `project_name`
// must be specified.
// Note that a temporary directory will be created and deleted afterwards when
// using this option.
Definition *map[string]any `json:"definition,omitempty"`
// By default environment files are loaded from a `.env` file located directly
// under the `project_src` directory.
// `env_files` can be used to specify the path of one or multiple custom
// environment files instead.
// The path is relative to the `project_src` directory.
EnvFiles *[]string `json:"env_files,omitempty"`
// List of profiles to enable when starting services.
// Equivalent to `docker compose --profile`.
Profiles *[]string `json:"profiles,omitempty"`
// If set to `false`, the module will not check whether one of the files
// `compose.yaml`, `compose.yml`, `docker-compose.yaml`, or `docker-
// compose.yml` exists in `project_src` if `files` is not provided.
// This can be useful if environment files with `COMPOSE_FILE` are used to
// configure a different filename. The module currently does not check for
// `COMPOSE_FILE` in environment files or the current environment.
// default: true
CheckFilesExisting *bool `json:"check_files_existing,omitempty"`
// Path to the Docker CLI. If not provided, will search for Docker CLI on the
// `PATH`.
DockerCli *string `json:"docker_cli,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// Mutually exclusive with `cli_context`. If neither `docker_host` nor
// `cli_context` are provided, the value `unix:///var/run/docker.sock` is used.
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// The Docker CLI context to use.
// Mutually exclusive with `docker_host`.
CliContext *string `json:"cli_context,omitempty"`
}
Parameters for the `docker_compose_v2_run` Ansible module.
func (DockerComposeV2RunParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerComposeV2RunParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerComposeV2RunParameters into an `rpc.RPCCall`.
type DockerComposeV2RunReturn ¶ added in v0.0.12
type DockerComposeV2RunReturn struct {
AnsibleCommonReturns
// The ID of the created container.
ContainerId *string `json:"container_id,omitempty"`
// The standard output of the container command.
Stdout *string `json:"stdout,omitempty"`
// The standard error output of the container command.
Stderr *string `json:"stderr,omitempty"`
// The exit code of the command.
Rc *int `json:"rc,omitempty"`
}
Return values for the `docker_compose_v2_run` Ansible module.
func DockerComposeV2RunReturnFromRPCResult ¶ added in v0.0.12
func DockerComposeV2RunReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerComposeV2RunReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerComposeV2RunReturn`
type DockerComposeV2State ¶ added in v0.0.12
type DockerComposeV2State string
Desired state of the project. `present` is equivalent to running `docker compose up`. `stopped` is equivalent to running `docker compose stop`. `absent` is equivalent to running `docker compose down`. `restarted` is equivalent to running `docker compose restart`.
const ( DockerComposeV2StateAbsent DockerComposeV2State = "absent" DockerComposeV2StateStopped DockerComposeV2State = "stopped" DockerComposeV2StateRestarted DockerComposeV2State = "restarted" DockerComposeV2StatePresent DockerComposeV2State = "present" )
func OptionalDockerComposeV2State ¶ added in v0.0.12
func OptionalDockerComposeV2State[T interface {
*DockerComposeV2State | DockerComposeV2State | *string | string
}](s T) *DockerComposeV2State
Convert a supported type to an optional (pointer) DockerComposeV2State
type DockerConfigParameters ¶ added in v0.0.12
type DockerConfigParameters struct {
// The value of the config.
// Mutually exclusive with `data_src`. One of `data` and `data_src` is required
// if `state=present`.
Data *string `json:"data,omitempty"`
// If set to `true`, the data is assumed to be Base64 encoded and will be
// decoded before being used.
// To use binary `data`, it is better to keep it Base64 encoded and let it be
// decoded by this option.
// default: false
DataIsB64 *bool `json:"data_is_b64,omitempty"`
// The file on the target from which to read the config.
// Mutually exclusive with `data`. One of `data` and `data_src` is required if
// `state=present`.
DataSrc *string `json:"data_src,omitempty"`
// A map of key:value meta data, where both the `key` and `value` are expected
// to be a string.
// If new meta data is provided, or existing meta data is modified, the config
// will be updated by removing it and creating it again.
Labels *map[string]any `json:"labels,omitempty"`
// Use with `state=present` to always remove and recreate an existing config.
// If `true`, an existing config will be replaced, even if it has not been
// changed.
// default: false
Force *bool `json:"force,omitempty"`
// If set to `true`, configs are created with an increasing version number
// appended to their name.
// Adds a label containing the version number to the managed configs with the
// name `ansible_version`.
// default: false
RollingVersions *bool `json:"rolling_versions,omitempty"`
// When using `rolling_versions`, the number of old versions of the config to
// keep.
// Extraneous old configs are deleted after the new one is created.
// Set to `-1` to keep everything or `0` or `1` to keep only the current one.
// default: 5
VersionsToKeep *int `json:"versions_to_keep,omitempty"`
// The name of the config.
Name string `json:"name"`
// Set to `present`, if the config should exist, and `absent`, if it should
// not.
// default: DockerConfigStatePresent
State *DockerConfigState `json:"state,omitempty"`
// Set to `golang` to use a Go template in `data` or a Go template file in
// `data_src`.
TemplateDriver *DockerConfigTemplateDriver `json:"template_driver,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
// `Note:` this option is no longer supported for Docker SDK for Python 7.0.0+.
// Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an
// error.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by Docker SDK for Python
// and the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// Requires Docker SDK for Python 4.4.0 or newer.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode.
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_config` Ansible module.
func (DockerConfigParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerConfigParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerConfigParameters into an `rpc.RPCCall`.
type DockerConfigReturn ¶ added in v0.0.12
type DockerConfigReturn struct {
AnsibleCommonReturns
// The ID assigned by Docker to the config object.
ConfigId *string `json:"config_id,omitempty"`
// The name of the created config object.
ConfigName *string `json:"config_name,omitempty"`
}
Return values for the `docker_config` Ansible module.
func DockerConfigReturnFromRPCResult ¶ added in v0.0.12
func DockerConfigReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerConfigReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerConfigReturn`
type DockerConfigState ¶ added in v0.0.12
type DockerConfigState string
Set to `present`, if the config should exist, and `absent`, if it should not.
const ( DockerConfigStateAbsent DockerConfigState = "absent" DockerConfigStatePresent DockerConfigState = "present" )
func OptionalDockerConfigState ¶ added in v0.0.12
func OptionalDockerConfigState[T interface {
*DockerConfigState | DockerConfigState | *string | string
}](s T) *DockerConfigState
Convert a supported type to an optional (pointer) DockerConfigState
type DockerConfigTemplateDriver ¶ added in v0.0.12
type DockerConfigTemplateDriver string
Set to `golang` to use a Go template in `data` or a Go template file in `data_src`.
const (
DockerConfigTemplateDriverGolang DockerConfigTemplateDriver = "golang"
)
func OptionalDockerConfigTemplateDriver ¶ added in v0.0.12
func OptionalDockerConfigTemplateDriver[T interface {
*DockerConfigTemplateDriver | DockerConfigTemplateDriver | *string | string
}](s T) *DockerConfigTemplateDriver
Convert a supported type to an optional (pointer) DockerConfigTemplateDriver
type DockerContainerCgroupnsMode ¶ added in v0.0.12
type DockerContainerCgroupnsMode string
Specify the cgroup namespace mode for the container. The Docker CLI calls this simply `cgroupns`.
const ( DockerContainerCgroupnsModeHost DockerContainerCgroupnsMode = "host" DockerContainerCgroupnsModePrivate DockerContainerCgroupnsMode = "private" )
func OptionalDockerContainerCgroupnsMode ¶ added in v0.0.12
func OptionalDockerContainerCgroupnsMode[T interface {
*DockerContainerCgroupnsMode | DockerContainerCgroupnsMode | *string | string
}](s T) *DockerContainerCgroupnsMode
Convert a supported type to an optional (pointer) DockerContainerCgroupnsMode
type DockerContainerCommandHandling ¶ added in v0.0.12
type DockerContainerCommandHandling string
The default behavior for `command` (when provided as a list) and `entrypoint` is to convert them to strings without considering shell quoting rules. (For comparing idempotency, the resulting string is split considering shell quoting rules). Also, setting `command` to an empty list of string, and setting `entrypoint` to an empty list will be handled as if these options are not specified. This is different from idempotency handling for other container-config related options. When this is set to `compatibility`, which was the default until community.docker 3.0.0, the current behavior will be kept. When this is set to `correct`, these options are kept as lists, and an empty value or empty list will be handled correctly for idempotency checks. This has been the default since community.docker 3.0.0.
const ( DockerContainerCommandHandlingCompatibility DockerContainerCommandHandling = "compatibility" DockerContainerCommandHandlingCorrect DockerContainerCommandHandling = "correct" )
func OptionalDockerContainerCommandHandling ¶ added in v0.0.12
func OptionalDockerContainerCommandHandling[T interface {
*DockerContainerCommandHandling | DockerContainerCommandHandling | *string | string
}](s T) *DockerContainerCommandHandling
Convert a supported type to an optional (pointer) DockerContainerCommandHandling
type DockerContainerContainerDefaultBehavior ¶ added in v0.0.12
type DockerContainerContainerDefaultBehavior string
In older versions of this module, various module options used to have default values. This caused problems with containers which use different values for these options. The default value is now `no_defaults`. To restore the old behavior, set it to `compatibility`, which will ensure that the default values are used when the values are not explicitly specified by the user. This affects the `auto_remove`, `detach`, `init`, `interactive`, `memory`, `paused`, `privileged`, `read_only`, and `tty` options.
const ( DockerContainerContainerDefaultBehaviorCompatibility DockerContainerContainerDefaultBehavior = "compatibility" DockerContainerContainerDefaultBehaviorNoDefaults DockerContainerContainerDefaultBehavior = "no_defaults" )
func OptionalDockerContainerContainerDefaultBehavior ¶ added in v0.0.12
func OptionalDockerContainerContainerDefaultBehavior[T interface {
*DockerContainerContainerDefaultBehavior | DockerContainerContainerDefaultBehavior | *string | string
}](s T) *DockerContainerContainerDefaultBehavior
Convert a supported type to an optional (pointer) DockerContainerContainerDefaultBehavior
type DockerContainerCopyIntoModeParse ¶ added in v0.0.12
type DockerContainerCopyIntoModeParse string
Determines how to parse the `mode` parameter.
const ( // Parses the value of `mode` as an integer. // Note that if you provide an octal number as a string to `mode`, it will be // parsed as a `decimal` number. If you provide an octal integer directly, // though, it will work as expected. // This has been the default behavior of the module since it was added to // community.docker. DockerContainerCopyIntoModeParseLegacy DockerContainerCopyIntoModeParse = "legacy" // Parses the value of `mode` as an octal string, or takes the integer value if // an integer has been provided. // This is how `ansible.builtin.copy` treats its // `ansible.builtin.copy#module:mode` option. DockerContainerCopyIntoModeParseModern DockerContainerCopyIntoModeParse = "modern" // Rejects everything that is not a string that can be parsed as an octal // number. // Use this value to ensure that no accidental conversion to integers happen. DockerContainerCopyIntoModeParseOctalStringOnly DockerContainerCopyIntoModeParse = "octal_string_only" )
func OptionalDockerContainerCopyIntoModeParse ¶ added in v0.0.12
func OptionalDockerContainerCopyIntoModeParse[T interface {
*DockerContainerCopyIntoModeParse | DockerContainerCopyIntoModeParse | *string | string
}](s T) *DockerContainerCopyIntoModeParse
Convert a supported type to an optional (pointer) DockerContainerCopyIntoModeParse
type DockerContainerCopyIntoParameters ¶ added in v0.0.12
type DockerContainerCopyIntoParameters struct {
// The name of the container to copy files to.
Container string `json:"container"`
// Path to a file on the managed node.
// Mutually exclusive with `content`. One of `content` and `path` is required.
Path *string `json:"path,omitempty"`
// The file's content.
// If you plan to provide binary data, provide it pre-encoded to base64, and
// set `content_is_b64=true`.
// Mutually exclusive with `path`. One of `content` and `path` is required.
Content *string `json:"content,omitempty"`
// If set to `true`, the content in `content` is assumed to be Base64 encoded
// and will be decoded before being used.
// To use binary `content`, it is better to keep it Base64 encoded and let it
// be decoded by this option. Otherwise you risk the data to be interpreted as
// UTF-8 and corrupted.
// default: false
ContentIsB64 *bool `json:"content_is_b64,omitempty"`
// Path to a file inside the Docker container.
// Must be an absolute path.
ContainerPath string `json:"container_path"`
// This flag indicates that filesystem links in the Docker container, if they
// exist, should be followed.
// default: false
Follow *bool `json:"follow,omitempty"`
// This flag indicates that filesystem links in the source tree (where the
// module is executed), if they exist, should be followed.
// default: true
LocalFollow *bool `json:"local_follow,omitempty"`
// The owner ID to use when writing the file to disk.
// If provided, `group_id` must also be provided.
// If not provided, the module will try to determine the user and group ID for
// the current user in the container. This will only work if `/bin/sh` is
// present in the container and the `id` binary or shell builtin is available.
// Also the container must be running.
OwnerId *int `json:"owner_id,omitempty"`
// The group ID to use when writing the file to disk.
// If provided, `owner_id` must also be provided.
// If not provided, the module will try to determine the user and group ID for
// the current user in the container. This will only work if `/bin/sh` is
// present in the container and the `id` binary or shell builtin is available.
// Also the container must be running.
GroupId *int `json:"group_id,omitempty"`
// The file mode to use when writing the file to disk.
// Will use the file's mode from the source system if this option is not
// provided.
// This option is parsed depending on how `mode_parse` is set.
Mode *any `json:"mode,omitempty"`
// Determines how to parse the `mode` parameter.
// default: DockerContainerCopyIntoModeParseLegacy
ModeParse *DockerContainerCopyIntoModeParse `json:"mode_parse,omitempty"`
// If set to `true`, force writing the file (without performing any idempotency
// checks).
// If set to `false`, only write the file if it does not exist on the target.
// If a filesystem object exists at the destination, the module will not do any
// change.
// If this option is not specified, the module will be idempotent. To verify
// idempotency, it will try to get information on the filesystem object in the
// container, and if everything seems to match will download the file from the
// container to compare it to the file to upload.
Force *bool `json:"force,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_container_copy_into` Ansible module.
func (DockerContainerCopyIntoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerContainerCopyIntoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerContainerCopyIntoParameters into an `rpc.RPCCall`.
type DockerContainerCopyIntoReturn ¶ added in v0.0.12
type DockerContainerCopyIntoReturn struct {
AnsibleCommonReturns
// The actual path in the container.
// Can only be different from `container_path` when `follow=true`.
ContainerPath *string `json:"container_path,omitempty"`
}
Return values for the `docker_container_copy_into` Ansible module.
func DockerContainerCopyIntoReturnFromRPCResult ¶ added in v0.0.12
func DockerContainerCopyIntoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerContainerCopyIntoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerContainerCopyIntoReturn`
type DockerContainerExecParameters ¶ added in v0.0.12
type DockerContainerExecParameters struct {
// The name of the container to execute the command in.
Container string `json:"container"`
// The command to execute.
// Since this is a list of arguments, no quoting is needed.
// Exactly one of `argv` or `command` must be specified.
Argv *[]string `json:"argv,omitempty"`
// The command to execute.
// Exactly one of `argv` or `command` must be specified.
Command *string `json:"command,omitempty"`
// The directory to run the command in.
Chdir *string `json:"chdir,omitempty"`
// Whether to run the command synchronously (`detach=false`, default) or
// asynchronously (`detach=true`).
// If set to `true`, `stdin` cannot be provided, and the return values
// R`stdout`, R`stderr`, and R`rc` are not returned.
// default: false
Detach *bool `json:"detach,omitempty"`
// If specified, the user to execute this command with.
User *string `json:"user,omitempty"`
// Set the stdin of the command directly to the specified value.
// Can only be used if `detach=false`.
Stdin *string `json:"stdin,omitempty"`
// If set to `true`, appends a newline to `stdin`.
// default: true
StdinAddNewline *bool `json:"stdin_add_newline,omitempty"`
// Strip empty lines from the end of stdout/stderr in result.
// default: true
StripEmptyEnds *bool `json:"strip_empty_ends,omitempty"`
// Whether to allocate a TTY.
// default: false
Tty *bool `json:"tty,omitempty"`
// Dictionary of environment variables with their respective values to be
// passed to the command ran inside the container.
// Values which might be parsed as numbers, booleans or other types by the YAML
// parser must be quoted (for example `"true"`) in order to avoid data loss.
// Please note that if you are passing values in with Jinja2 templates, like
// `"{{ value }}"`, you need to add `| string` to prevent Ansible to convert
// strings such as `"true"` back to booleans. The correct way is to use `"{{
// value | string }}"`.
Env *map[string]any `json:"env,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_container_exec` Ansible module.
func (DockerContainerExecParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerContainerExecParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerContainerExecParameters into an `rpc.RPCCall`.
type DockerContainerExecReturn ¶ added in v0.0.12
type DockerContainerExecReturn struct {
AnsibleCommonReturns
// The standard output of the container command.
Stdout *string `json:"stdout,omitempty"`
// The standard error output of the container command.
Stderr *string `json:"stderr,omitempty"`
// The exit code of the command.
Rc *int `json:"rc,omitempty"`
// The execution ID of the command.
ExecId *string `json:"exec_id,omitempty"`
}
Return values for the `docker_container_exec` Ansible module.
func DockerContainerExecReturnFromRPCResult ¶ added in v0.0.12
func DockerContainerExecReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerContainerExecReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerContainerExecReturn`
type DockerContainerImageComparison ¶ added in v0.0.12
type DockerContainerImageComparison string
Determines which image to use for idempotency checks that depend on image parameters. The default, `desired-image`, will use the image that is provided to the module with the `image` parameter. `current-image` will use the image that the container is currently using, if the container exists. It falls back to the image that is provided in case the container does not yet exist. This affects the `env`, `env_file`, `exposed_ports`, `labels`, and `volumes` options.
const ( DockerContainerImageComparisonDesiredImage DockerContainerImageComparison = "desired-image" DockerContainerImageComparisonCurrentImage DockerContainerImageComparison = "current-image" )
func OptionalDockerContainerImageComparison ¶ added in v0.0.12
func OptionalDockerContainerImageComparison[T interface {
*DockerContainerImageComparison | DockerContainerImageComparison | *string | string
}](s T) *DockerContainerImageComparison
Convert a supported type to an optional (pointer) DockerContainerImageComparison
type DockerContainerImageLabelMismatch ¶ added in v0.0.12
type DockerContainerImageLabelMismatch string
How to handle labels inherited from the image that are not set explicitly. When `ignore`, labels that are present in the image but not specified in `labels` will be ignored. This is useful to avoid having to specify the image labels in `labels` while keeping labels `comparisons` `strict`. When `fail`, if there are labels present in the image which are not set from `labels`, the module will fail. This prevents introducing unexpected labels from the base image. `Warning:` This option is ignored unless `labels: strict` or `*: strict` is specified in the `comparisons` option.
const ( DockerContainerImageLabelMismatchIgnore DockerContainerImageLabelMismatch = "ignore" DockerContainerImageLabelMismatchFail DockerContainerImageLabelMismatch = "fail" )
func OptionalDockerContainerImageLabelMismatch ¶ added in v0.0.12
func OptionalDockerContainerImageLabelMismatch[T interface {
*DockerContainerImageLabelMismatch | DockerContainerImageLabelMismatch | *string | string
}](s T) *DockerContainerImageLabelMismatch
Convert a supported type to an optional (pointer) DockerContainerImageLabelMismatch
type DockerContainerImageNameMismatch ¶ added in v0.0.12
type DockerContainerImageNameMismatch string
Determines what the module does if the image matches, but the image name in the container's configuration does not match the image name provided to the module. This is ignored if `image: ignore` is set in `comparisons`. If set to `recreate` (default) the container will be recreated. If set to `ignore` the container will not be recreated because of this. It might still get recreated for other reasons. This has been the default behavior of the module for a long time, but might not be what users expect. The default changed from `ignore` to `recreate` in community.docker 4.0.0.
const ( DockerContainerImageNameMismatchRecreate DockerContainerImageNameMismatch = "recreate" DockerContainerImageNameMismatchIgnore DockerContainerImageNameMismatch = "ignore" )
func OptionalDockerContainerImageNameMismatch ¶ added in v0.0.12
func OptionalDockerContainerImageNameMismatch[T interface {
*DockerContainerImageNameMismatch | DockerContainerImageNameMismatch | *string | string
}](s T) *DockerContainerImageNameMismatch
Convert a supported type to an optional (pointer) DockerContainerImageNameMismatch
type DockerContainerInfoParameters ¶ added in v0.0.12
type DockerContainerInfoParameters struct {
// The name of the container to inspect.
// When identifying an existing container name may be a name or a long or short
// container ID.
Name string `json:"name"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_container_info` Ansible module.
func (DockerContainerInfoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerContainerInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerContainerInfoParameters into an `rpc.RPCCall`.
type DockerContainerInfoReturn ¶ added in v0.0.12
type DockerContainerInfoReturn struct {
AnsibleCommonReturns
// Returns whether the container exists.
Exists *bool `json:"exists,omitempty"`
// Facts representing the current state of the container. Matches the docker
// inspection output.
// Will be `none` if container does not exist.
Container *map[string]any `json:"container,omitempty"`
}
Return values for the `docker_container_info` Ansible module.
func DockerContainerInfoReturnFromRPCResult ¶ added in v0.0.12
func DockerContainerInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerContainerInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerContainerInfoReturn`
type DockerContainerParameters ¶ added in v0.0.12
type DockerContainerParameters struct {
// Enable auto-removal of the container on daemon side when the container's
// process exits.
// If `container_default_behavior=compatibility`, this option has a default of
// `false`.
AutoRemove *bool `json:"auto_remove,omitempty"`
// Block IO (relative weight), between 10 and 1000.
BlkioWeight *int `json:"blkio_weight,omitempty"`
// List of capabilities to add to the container.
// This is equivalent to `docker run --cap-add`, or the docker-compose option
// `cap_add`.
Capabilities *[]string `json:"capabilities,omitempty"`
// List of capabilities to drop from the container.
CapDrop *[]string `json:"cap_drop,omitempty"`
// Specify the cgroup namespace mode for the container.
// The Docker CLI calls this simply `cgroupns`.
CgroupnsMode *DockerContainerCgroupnsMode `json:"cgroupns_mode,omitempty"`
// Specify the parent cgroup for the container.
CgroupParent *string `json:"cgroup_parent,omitempty"`
// Use with `detach=false` to remove the container after successful execution.
// default: false
Cleanup *bool `json:"cleanup,omitempty"`
// Command to execute when the container starts. A command may be either a
// string or a list.
// Prior to version 2.4, strings were split on commas.
// See `command_handling` for differences in how strings and lists are handled.
Command *any `json:"command,omitempty"`
// Allows to specify how properties of existing containers are compared with
// module options to decide whether the container should be recreated / updated
// or not.
// Only options which correspond to the state of a container as handled by the
// Docker daemon can be specified, as well as `networks`.
// Must be a dictionary specifying for an option one of the keys `strict`,
// `ignore` and `allow_more_present`.
// If `strict` is specified, values are tested for equality, and changes always
// result in updating or restarting. If `ignore` is specified, changes are
// ignored.
// `allow_more_present` is allowed only for lists, sets and dicts. If it is
// specified for lists or sets, the container will only be updated or restarted
// if the module option contains a value which is not present in the
// container's options. If the option is specified for a dict, the container
// will only be updated or restarted if the module option contains a key which
// is not present in the container's option, or if the value of a key present
// differs.
// The wildcard option `*` can be used to set one of the default values
// `strict` or `ignore` to `all` comparisons which are not explicitly set to
// other values.
// See the examples for details.
Comparisons *map[string]any `json:"comparisons,omitempty"`
// In older versions of this module, various module options used to have
// default values. This caused problems with containers which use different
// values for these options.
// The default value is now `no_defaults`. To restore the old behavior, set it
// to `compatibility`, which will ensure that the default values are used when
// the values are not explicitly specified by the user.
// This affects the `auto_remove`, `detach`, `init`, `interactive`, `memory`,
// `paused`, `privileged`, `read_only`, and `tty` options.
// default: DockerContainerContainerDefaultBehaviorNoDefaults
ContainerDefaultBehavior *DockerContainerContainerDefaultBehavior `json:"container_default_behavior,omitempty"`
// The default behavior for `command` (when provided as a list) and
// `entrypoint` is to convert them to strings without considering shell quoting
// rules. (For comparing idempotency, the resulting string is split considering
// shell quoting rules).
// Also, setting `command` to an empty list of string, and setting `entrypoint`
// to an empty list will be handled as if these options are not specified. This
// is different from idempotency handling for other container-config related
// options.
// When this is set to `compatibility`, which was the default until
// community.docker 3.0.0, the current behavior will be kept.
// When this is set to `correct`, these options are kept as lists, and an empty
// value or empty list will be handled correctly for idempotency checks. This
// has been the default since community.docker 3.0.0.
// default: DockerContainerCommandHandlingCorrect
CommandHandling *DockerContainerCommandHandling `json:"command_handling,omitempty"`
// Limit CPU CFS (Completely Fair Scheduler) period.
// See `cpus` for an easier to use alternative.
CpuPeriod *int `json:"cpu_period,omitempty"`
// Limit CPU CFS (Completely Fair Scheduler) quota.
// See `cpus` for an easier to use alternative.
CpuQuota *int `json:"cpu_quota,omitempty"`
// Specify how much of the available CPU resources a container can use.
// A value of `1.5` means that at most one and a half CPU (core) will be used.
Cpus *float64 `json:"cpus,omitempty"`
// CPUs in which to allow execution.
// For example `1,3` or `1-3`.
CpusetCpus *string `json:"cpuset_cpus,omitempty"`
// Memory nodes (MEMs) in which to allow execution `0-3` or `0,1`.
CpusetMems *string `json:"cpuset_mems,omitempty"`
CpuShares *int `json:"cpu_shares,omitempty"`
// Define the default host IP to use.
// Must be an empty string, an IPv4 address, or an IPv6 address.
// With Docker 20.10.2 or newer, this should be set to an empty string (`""`)
// to avoid the port bindings without an explicit IP address to only bind to
// IPv4. See `https://github.com/ansible-
// collections/community.docker/issues/70` for details.
// By default, the module will try to auto-detect this value from the `bridge`
// network's `com.docker.network.bridge.host_binding_ipv4` option. If it cannot
// auto-detect it, it will fall back to `0.0.0.0`.
DefaultHostIp *string `json:"default_host_ip,omitempty"`
// Enable detached mode to leave the container running in background.
// If disabled, the task will reflect the status of the container run (failed
// if the command failed).
// If `container_default_behavior=compatibility`, this option has a default of
// `true`.
Detach *bool `json:"detach,omitempty"`
// List of host device bindings to add to the container.
// Each binding is a mapping expressed in the format
// `<path_on_host>:<path_in_container>:<cgroup_permissions>`.
Devices *[]string `json:"devices,omitempty"`
// List of device path and read rate (bytes per second) from device.
DeviceReadBps *struct {
Path string `json:"path"`
Rate string `json:"rate"`
} `json:"device_read_bps,omitempty"`
// List of device and write rate (bytes per second) to device.
DeviceWriteBps *struct {
Path string `json:"path"`
Rate string `json:"rate"`
} `json:"device_write_bps,omitempty"`
// List of device and read rate (IO per second) from device.
DeviceReadIops *struct {
Path string `json:"path"`
Rate int `json:"rate"`
} `json:"device_read_iops,omitempty"`
// List of device and write rate (IO per second) to device.
DeviceWriteIops *struct {
Path string `json:"path"`
Rate int `json:"rate"`
} `json:"device_write_iops,omitempty"`
// Allows to request additional resources, such as GPUs.
DeviceRequests *struct {
Capabilities *[][]any `json:"capabilities,omitempty"`
Count *int `json:"count,omitempty"`
DeviceIds *[]string `json:"device_ids,omitempty"`
Driver *string `json:"driver,omitempty"`
Options *map[string]any `json:"options,omitempty"`
} `json:"device_requests,omitempty"`
// List of cgroup rules to apply to the container.
DeviceCgroupRules *[]string `json:"device_cgroup_rules,omitempty"`
// List of DNS options.
DnsOpts *[]string `json:"dns_opts,omitempty"`
// List of custom DNS servers.
DnsServers *[]string `json:"dns_servers,omitempty"`
// List of custom DNS search domains.
DnsSearchDomains *[]string `json:"dns_search_domains,omitempty"`
// Container domainname.
Domainname *string `json:"domainname,omitempty"`
// Dictionary of key,value pairs.
// Values which might be parsed as numbers, booleans or other types by the YAML
// parser must be quoted (for example `"true"`) in order to avoid data loss.
// Please note that if you are passing values in with Jinja2 templates, like
// `"{{ value }}"`, you need to add `| string` to prevent Ansible to convert
// strings such as `"true"` back to booleans. The correct way is to use `"{{
// value | string }}"`.
Env *map[string]any `json:"env,omitempty"`
// Path to a file, present on the target, containing environment variables
// `FOO=BAR`.
// If variable also present in `env`, then the `env` value will override.
EnvFile *string `json:"env_file,omitempty"`
// Command that overwrites the default `ENTRYPOINT` of the image.
// See `command_handling` for differences in how strings and lists are handled.
Entrypoint *[]string `json:"entrypoint,omitempty"`
// Dict of host-to-IP mappings, where each host name is a key in the
// dictionary. Each host name will be added to the container's `/etc/hosts`
// file.
// Instead of an IP address, the special value `host-gateway` can also be used,
// which resolves to the host's gateway IP and allows containers to connect to
// services running on the host.
EtcHosts *map[string]any `json:"etc_hosts,omitempty"`
// List of additional container ports which informs Docker that the container
// listens on the specified network ports at runtime.
// If the port is already exposed using `EXPOSE` in a Dockerfile, it does not
// need to be exposed again.
ExposedPorts *[]string `json:"exposed_ports,omitempty"`
// Use the kill command when stopping a running container.
// default: false
ForceKill *bool `json:"force_kill,omitempty"`
// List of additional group names and/or IDs that the container process will
// run as.
Groups *[]string `json:"groups,omitempty"`
// Configure a check that is run to determine whether or not containers for
// this service are "healthy".
// See the docs for the `HEALTHCHECK Dockerfile
// instruction,https://docs.docker.com/engine/reference/builder/#healthcheck`
// for details on how healthchecks work.
// `healthcheck.interval`, `healthcheck.timeout`, `healthcheck.start_period`,
// and `healthcheck.start_interval` are specified as durations. They accept
// duration as a string in a format that look like: `5h34m56s`, `1m30s`, and so
// on. The supported units are `us`, `ms`, `s`, `m` and `h`.
// See also `state=healthy`.
Healthcheck *struct {
Test *any `json:"test,omitempty"`
TestCliCompatible *bool `json:"test_cli_compatible,omitempty"`
Interval *string `json:"interval,omitempty"`
Timeout *string `json:"timeout,omitempty"`
Retries *int `json:"retries,omitempty"`
StartPeriod *string `json:"start_period,omitempty"`
StartInterval *string `json:"start_interval,omitempty"`
} `json:"healthcheck,omitempty"`
// The container's hostname.
Hostname *string `json:"hostname,omitempty"`
// Repository path and tag used to create the container. If an image is not
// found or pull is true, the image will be pulled from the registry. If no tag
// is included, `latest` will be used.
// Can also be an image ID. If this is the case, the image is assumed to be
// available locally. The `pull` option is ignored for this case.
Image *string `json:"image,omitempty"`
// Determines which image to use for idempotency checks that depend on image
// parameters.
// The default, `desired-image`, will use the image that is provided to the
// module with the `image` parameter.
// `current-image` will use the image that the container is currently using, if
// the container exists. It falls back to the image that is provided in case
// the container does not yet exist.
// This affects the `env`, `env_file`, `exposed_ports`, `labels`, and `volumes`
// options.
// default: DockerContainerImageComparisonDesiredImage
ImageComparison *DockerContainerImageComparison `json:"image_comparison,omitempty"`
// How to handle labels inherited from the image that are not set explicitly.
// When `ignore`, labels that are present in the image but not specified in
// `labels` will be ignored. This is useful to avoid having to specify the
// image labels in `labels` while keeping labels `comparisons` `strict`.
// When `fail`, if there are labels present in the image which are not set from
// `labels`, the module will fail. This prevents introducing unexpected labels
// from the base image.
// `Warning:` This option is ignored unless `labels: strict` or `*: strict` is
// specified in the `comparisons` option.
// default: DockerContainerImageLabelMismatchIgnore
ImageLabelMismatch *DockerContainerImageLabelMismatch `json:"image_label_mismatch,omitempty"`
// Determines what the module does if the image matches, but the image name in
// the container's configuration does not match the image name provided to the
// module.
// This is ignored if `image: ignore` is set in `comparisons`.
// If set to `recreate` (default) the container will be recreated.
// If set to `ignore` the container will not be recreated because of this. It
// might still get recreated for other reasons. This has been the default
// behavior of the module for a long time, but might not be what users expect.
// The default changed from `ignore` to `recreate` in community.docker 4.0.0.
// default: DockerContainerImageNameMismatchRecreate
ImageNameMismatch *DockerContainerImageNameMismatch `json:"image_name_mismatch,omitempty"`
// Run an init inside the container that forwards signals and reaps processes.
// If `container_default_behavior=compatibility`, this option has a default of
// `false`.
Init *bool `json:"init,omitempty"`
// Keep stdin open after a container is launched, even if not attached.
// If `container_default_behavior=compatibility`, this option has a default of
// `false`.
Interactive *bool `json:"interactive,omitempty"`
// Set the IPC mode for the container.
// Can be one of `container:<name|id>` to reuse another container's IPC
// namespace or `host` to use the host's IPC namespace within the container.
IpcMode *string `json:"ipc_mode,omitempty"`
// Retain anonymous volumes associated with a removed container.
// default: true
KeepVolumes *bool `json:"keep_volumes,omitempty"`
// Override default signal used to kill a running container.
KillSignal *string `json:"kill_signal,omitempty"`
// Kernel memory limit in format `<number>[<unit>]`. Number is a positive
// integer. Unit can be `B` (byte), `K` (kibibyte, 1024B), `M` (mebibyte), `G`
// (gibibyte), `T` (tebibyte), or `P` (pebibyte). Minimum is `4M`.
// Omitting the unit defaults to bytes.
KernelMemory *string `json:"kernel_memory,omitempty"`
// Dictionary of key value pairs.
Labels *map[string]any `json:"labels,omitempty"`
// List of name aliases for linked containers in the format
// `container_name:alias`.
// Setting this will force container to be restarted.
Links *[]string `json:"links,omitempty"`
// Specify the logging driver. Docker uses `json-file` by default.
// See `the Docker logging configuration
// documentation,https://docs.docker.com/config/containers/logging/configure/`
// for possible choices.
LogDriver *string `json:"log_driver,omitempty"`
// Dictionary of options specific to the chosen `log_driver`.
// See `https://docs.docker.com/engine/admin/logging/overview/` for details.
// `log_driver` needs to be specified for `log_options` to take effect, even if
// using the default `json-file` driver.
LogOptions *map[string]any `json:"log_options,omitempty"`
// Container MAC address (for example, `92:d0:c6:0a:29:33`).
// Note that the global container-wide MAC address is deprecated and no longer
// used since Docker API version 1.44.
// Use `networks[].mac_address` instead.
MacAddress *string `json:"mac_address,omitempty"`
// Memory limit in format `<number>[<unit>]`. Number is a positive integer.
// Unit can be `B` (byte), `K` (kibibyte, 1024B), `M` (mebibyte), `G`
// (gibibyte), `T` (tebibyte), or `P` (pebibyte).
// Omitting the unit defaults to bytes.
// If `container_default_behavior=compatibility`, this option has a default of
// `"0"`.
Memory *string `json:"memory,omitempty"`
// Memory soft limit in format `<number>[<unit>]`. Number is a positive
// integer. Unit can be `B` (byte), `K` (kibibyte, 1024B), `M` (mebibyte), `G`
// (gibibyte), `T` (tebibyte), or `P` (pebibyte).
// Omitting the unit defaults to bytes.
MemoryReservation *string `json:"memory_reservation,omitempty"`
// Total memory limit (memory + swap) in format `<number>[<unit>]`, or the
// special values `unlimited` or `-1` for unlimited swap usage. Number is a
// positive integer. Unit can be `B` (byte), `K` (kibibyte, 1024B), `M`
// (mebibyte), `G` (gibibyte), `T` (tebibyte), or `P` (pebibyte).
// Omitting the unit defaults to bytes.
MemorySwap *string `json:"memory_swap,omitempty"`
// Tune a container's memory swappiness behavior. Accepts an integer between 0
// and 100.
// If not set, the value will be remain the same if container exists and will
// be inherited from the host machine if it is (re-)created.
MemorySwappiness *int `json:"memory_swappiness,omitempty"`
// Specification for mounts to be added to the container. More powerful
// alternative to `volumes`.
Mounts *struct {
Target string `json:"target"`
Source *string `json:"source,omitempty"`
Type *string `json:"type,omitempty"`
ReadOnly *bool `json:"read_only,omitempty"`
Consistency *string `json:"consistency,omitempty"`
Propagation *string `json:"propagation,omitempty"`
NoCopy *bool `json:"no_copy,omitempty"`
Labels *map[string]any `json:"labels,omitempty"`
VolumeDriver *string `json:"volume_driver,omitempty"`
VolumeOptions *map[string]any `json:"volume_options,omitempty"`
TmpfsSize *string `json:"tmpfs_size,omitempty"`
TmpfsMode *string `json:"tmpfs_mode,omitempty"`
} `json:"mounts,omitempty"`
// Assign a name to a new container or match an existing container.
// When identifying an existing container name may be a name or a long or short
// container ID.
Name string `json:"name"`
// Connect the container to a network. Choices are `bridge`, `host`, `none`,
// `container:<name|id>`, `<network_name>` or `default`.
// Since community.docker 2.0.0, if `networks_cli_compatible=true` and
// `networks` contains at least one network, the default value for
// `network_mode` is the name of the first network in the `networks` list. You
// can prevent this by explicitly specifying a value for `network_mode`, like
// the default value `default` which will be used by Docker if `network_mode`
// is not specified.
NetworkMode *string `json:"network_mode,omitempty"`
// Set the user namespace mode for the container. Currently, the only valid
// value are `host` and the empty string (`""`).
UsernsMode *string `json:"userns_mode,omitempty"`
// List of networks the container belongs to.
// For examples of the data structure and usage see EXAMPLES below.
// To remove a container from one or more networks, use `networks: strict` in
// the `comparisons` option.
// If `networks_cli_compatible=false`, this will not remove the default network
// if `networks` is specified. This is different from the behavior of `docker
// run ...`. You need to explicitly use `networks: strict` in `comparisons` to
// enforce the removal of the default network (and all other networks not
// explicitly mentioned in `networks`) in that case.
Networks *struct {
Name string `json:"name"`
Ipv4Address *string `json:"ipv4_address,omitempty"`
Ipv6Address *string `json:"ipv6_address,omitempty"`
Links *[]string `json:"links,omitempty"`
Aliases *[]string `json:"aliases,omitempty"`
MacAddress *string `json:"mac_address,omitempty"`
} `json:"networks,omitempty"`
// If `networks_cli_compatible=true` (default), this module will behave as
// `docker run --network` and will `not` add the default network if `networks`
// is specified. If `networks` is not specified, the default network will be
// attached.
// When `networks_cli_compatible=false` and networks are provided to the module
// with the `networks` option, the module behaves differently than `docker run
// --network`: `docker run --network other` will create a container with
// network `other` attached, but the default network not attached. This module
// with `networks` set to `{name: other}` will create a container with both
// `default` and `other` attached. If `networks: strict` or `*: strict` is set
// in `comparisons`, the `default` network will be removed afterwards.
// default: true
NetworksCliCompatible *bool `json:"networks_cli_compatible,omitempty"`
// Whether or not to disable OOM Killer for the container.
OomKiller *bool `json:"oom_killer,omitempty"`
// An integer value containing the score given to the container in order to
// tune OOM killer preferences.
OomScoreAdj *int `json:"oom_score_adj,omitempty"`
// If set to true, output of the container command will be printed.
// Only effective when `log_driver` is set to `json-file`, `journald`, or
// `local`.
// default: false
OutputLogs *bool `json:"output_logs,omitempty"`
// Use with the started state to pause running processes inside the container.
// If `container_default_behavior=compatibility`, this option has a default of
// `false`.
Paused *bool `json:"paused,omitempty"`
// Set the PID namespace mode for the container.
PidMode *string `json:"pid_mode,omitempty"`
// Set PIDs limit for the container. It accepts an integer value.
// Set `-1` for unlimited PIDs.
PidsLimit *int `json:"pids_limit,omitempty"`
// Platform for the container in the format `os[/arch[/variant]]`.
// Note that since community.docker 3.5.0, the module uses both the image's
// metadata and the Docker daemon's information to normalize platform strings
// similarly to how Docker itself is doing this. If you notice idempotency
// problems, `please create an issue in the community.docker GitHub repository,
// https://github.com/ansible-collections/community.docker/issues/new?assignees
// =&labels=&projects=&template=bug_report.md`. For older community.docker
// versions, you can use the `comparisons` option with `platform: ignore` to
// prevent accidental recreation of the container due to this.
Platform *string `json:"platform,omitempty"`
// Give extended privileges to the container.
// If `container_default_behavior=compatibility`, this option has a default of
// `false`.
Privileged *bool `json:"privileged,omitempty"`
// Publish all ports to the host.
// Any specified port bindings from `published_ports` will remain intact when
// `true`.
PublishAllPorts *bool `json:"publish_all_ports,omitempty"`
// List of ports to publish from the container to the host.
// Use docker CLI syntax: `8000`, `9000:8000`, or `0.0.0.0:9000:8000`, where
// 8000 is a container port, 9000 is a host port, and 0.0.0.0 is a host
// interface.
// Port ranges can be used for source and destination ports. If two ranges with
// different lengths are specified, the shorter range will be used. Since
// community.general 0.2.0, if the source port range has length 1, the port
// will not be assigned to the first port of the destination range, but to a
// free port in that range. This is the same behavior as for `docker` command
// line utility.
// Bind addresses must be either IPv4 or IPv6 addresses. Hostnames are `not`
// allowed. This is different from the `docker` command line utility. Use the
// `community.general.dig#lookup` lookup to resolve hostnames.
// If `networks` parameter is provided, will inspect each network to see if
// there exists a bridge network with optional parameter
// `com.docker.network.bridge.host_binding_ipv4`. If such a network is found,
// then published ports where no host IP address is specified will be bound to
// the host IP pointed to by `com.docker.network.bridge.host_binding_ipv4`.
// Note that the first bridge network with a
// `com.docker.network.bridge.host_binding_ipv4` value encountered in the list
// of `networks` is the one that will be used.
// The value `all` was allowed in earlier versions of this module. Support for
// it was removed in community.docker 3.0.0. Use the `publish_all_ports` option
// instead.
PublishedPorts *[]string `json:"published_ports,omitempty"`
// If set to `never`, will never try to pull an image. Will fail if the image
// is not available on the Docker daemon.
// If set to `missing` or `false`, only pull the image if it is not available
// on the Docker daemon. This is the default behavior.
// If set to `always` or `true`, always try to pull the latest version of the
// image.
// `Note:` images are only pulled when specified by name. If the image is
// specified as a image ID (hash), it cannot be pulled, and this option is
// ignored.
// `Note:` the values `never`, `missing`, and `always` are only available since
// community.docker 3.8.0. Earlier versions only support `true` and `false`.
// default: DockerContainerPullMissing
Pull *any `json:"pull,omitempty"`
// Allows to adjust the behavior when `pull=always` or `pull=true` in check
// mode.
// Since the Docker daemon does not expose any functionality to test whether a
// pull will result in a changed image, the module by default acts like
// `pull=always` only results in a change when the image is not present.
// If set to `image_not_present` (default), only report changes in check mode
// when the image is not present.
// If set to `always`, always report changes in check mode.
// default: DockerContainerPullCheckModeBehaviorImageNotPresent
PullCheckModeBehavior *DockerContainerPullCheckModeBehavior `json:"pull_check_mode_behavior,omitempty"`
// Mount the container's root file system as read-only.
// If `container_default_behavior=compatibility`, this option has a default of
// `false`.
ReadOnly *bool `json:"read_only,omitempty"`
// Use with present and started states to force the re-creation of an existing
// container.
// default: false
Recreate *bool `json:"recreate,omitempty"`
// When removing an existing container, the docker daemon API call exists after
// the container is scheduled for removal. Removal usually is very fast, but it
// can happen that during high I/O load, removal can take longer. By default,
// the module will wait until the container has been removed before trying to
// (re-)create it, however long this takes.
// By setting this option, the module will wait at most this many seconds for
// the container to be removed. If the container is still in the removal phase
// after this many seconds, the module will fail.
RemovalWaitTimeout *float64 `json:"removal_wait_timeout,omitempty"`
// Use with started state to force a matching container to be stopped and
// restarted.
// default: false
Restart *bool `json:"restart,omitempty"`
// Container restart policy.
// Place quotes around `no` option.
RestartPolicy *DockerContainerRestartPolicy `json:"restart_policy,omitempty"`
// Use with restart policy to control maximum number of restart attempts.
RestartRetries *int `json:"restart_retries,omitempty"`
// Runtime to use for the container.
Runtime *string `json:"runtime,omitempty"`
// Size of `/dev/shm` in format `<number>[<unit>]`. Number is positive integer.
// Unit can be `B` (byte), `K` (kibibyte, 1024B), `M` (mebibyte), `G`
// (gibibyte), `T` (tebibyte), or `P` (pebibyte).
// Omitting the unit defaults to bytes. If you omit the size entirely, Docker
// daemon uses `64M`.
ShmSize *string `json:"shm_size,omitempty"`
// List of security options in the form of `"label:user:User"`.
SecurityOpts *[]string `json:"security_opts,omitempty"`
// `absent` - A container matching the specified name will be stopped and
// removed. Use `force_kill` to kill the container rather than stopping it. Use
// `keep_volumes` to retain anonymous volumes associated with the removed
// container.
// `present` - Asserts the existence of a container matching the name and any
// provided configuration parameters. If no container matches the name, a
// container will be created. If a container matches the name but the provided
// configuration does not match, the container will be updated, if it can be.
// If it cannot be updated, it will be removed and re-created with the
// requested config.
// `started` - Asserts that the container is first `present`, and then if the
// container is not running moves it to a running state. Use `restart` to force
// a matching container to be stopped and restarted.
// `healthy` - Asserts that the container is `present` and `started`, and is
// actually healthy as well. This means that the conditions defined in
// `healthcheck` respectively in the image's `HEALTHCHECK` (`Docker reference
// for HEALTHCHECK, https://docs.docker.com/reference/dockerfile/#healthcheck`)
// are satisfied. The time waited can be controlled with
// `healthy_wait_timeout`. This state has been added in community.docker
// 3.11.0.
// `stopped` - Asserts that the container is first `present`, and then if the
// container is running moves it to a stopped state.
// To control what will be taken into account when comparing configuration, see
// the `comparisons` option. To avoid that the image version will be taken into
// account, you can also use the `image: ignore` in the `comparisons` option.
// Use the `recreate` option to always force re-creation of a matching
// container, even if it is running.
// If the container should be killed instead of stopped in case it needs to be
// stopped for recreation, or because `state` is `stopped`, please use the
// `force_kill` option. Use `keep_volumes` to retain anonymous volumes
// associated with a removed container.
// Use `keep_volumes` to retain anonymous volumes associated with a removed
// container.
// default: DockerContainerStateStarted
State *DockerContainerState `json:"state,omitempty"`
// Override default signal used to stop the container.
StopSignal *string `json:"stop_signal,omitempty"`
// When waiting for the container to become healthy if `state=healthy`, this
// option controls how long the module waits until the container state becomes
// healthy.
// The timeout is specified in seconds. The default, `300`, is 5 minutes.
// Set this to 0 or a negative value to wait indefinitely. Note that depending
// on the container this can result in the module not terminating.
// default: 300
HealthyWaitTimeout *float64 `json:"healthy_wait_timeout,omitempty"`
// Number of seconds to wait for the container to stop before sending
// `SIGKILL`. When the container is created by this module, its `StopTimeout`
// configuration will be set to this value.
// When the container is stopped, will be used as a timeout for stopping the
// container. In case the container has a custom `StopTimeout` configuration,
// the behavior depends on the version of the docker daemon. New versions of
// the docker daemon will always use the container's configured `StopTimeout`
// value if it has been configured.
StopTimeout *int `json:"stop_timeout,omitempty"`
// Storage driver options for this container as a key-value mapping.
StorageOpts *map[string]any `json:"storage_opts,omitempty"`
// Mount a tmpfs directory.
Tmpfs *[]string `json:"tmpfs,omitempty"`
// Allocate a pseudo-TTY.
// If `container_default_behavior=compatibility`, this option has a default of
// `false`.
Tty *bool `json:"tty,omitempty"`
// List of ulimit options. A ulimit is specified as `nofile:262144:262144`.
Ulimits *[]string `json:"ulimits,omitempty"`
// Dictionary of key,value pairs.
Sysctls *map[string]any `json:"sysctls,omitempty"`
// Sets the username or UID used and optionally the groupname or GID for the
// specified command.
// Can be of the forms `user`, `user:group`, `uid`, `uid:gid`, `user:gid` or
// `uid:group`.
User *string `json:"user,omitempty"`
// Set the UTS namespace mode for the container.
Uts *string `json:"uts,omitempty"`
// List of volumes to mount within the container.
// Use docker CLI-style syntax: `/host:/container[:mode]`.
// Mount modes can be a comma-separated list of various modes such as `ro`,
// `rw`, `consistent`, `delegated`, `cached`, `rprivate`, `private`, `rshared`,
// `shared`, `rslave`, `slave`, and `nocopy`. Note that the docker daemon might
// not support all modes and combinations of such modes.
// SELinux hosts can additionally use `z` or `Z` to use a shared or private
// label for the volume.
// Note that Ansible 2.7 and earlier only supported one mode, which had to be
// one of `ro`, `rw`, `z`, and `Z`.
Volumes *[]string `json:"volumes,omitempty"`
// The container volume driver.
VolumeDriver *string `json:"volume_driver,omitempty"`
// List of container names or IDs to get volumes from.
VolumesFrom *[]string `json:"volumes_from,omitempty"`
// Path to the working directory.
WorkingDir *string `json:"working_dir,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_container` Ansible module.
func (DockerContainerParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerContainerParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerContainerParameters into an `rpc.RPCCall`.
type DockerContainerPullCheckModeBehavior ¶ added in v0.0.12
type DockerContainerPullCheckModeBehavior string
Allows to adjust the behavior when `pull=always` or `pull=true` in check mode. Since the Docker daemon does not expose any functionality to test whether a pull will result in a changed image, the module by default acts like `pull=always` only results in a change when the image is not present. If set to `image_not_present` (default), only report changes in check mode when the image is not present. If set to `always`, always report changes in check mode.
const ( DockerContainerPullCheckModeBehaviorImageNotPresent DockerContainerPullCheckModeBehavior = "image_not_present" DockerContainerPullCheckModeBehaviorAlways DockerContainerPullCheckModeBehavior = "always" )
func OptionalDockerContainerPullCheckModeBehavior ¶ added in v0.0.12
func OptionalDockerContainerPullCheckModeBehavior[T interface {
*DockerContainerPullCheckModeBehavior | DockerContainerPullCheckModeBehavior | *string | string
}](s T) *DockerContainerPullCheckModeBehavior
Convert a supported type to an optional (pointer) DockerContainerPullCheckModeBehavior
type DockerContainerRestartPolicy ¶ added in v0.0.12
type DockerContainerRestartPolicy string
Container restart policy. Place quotes around `no` option.
const ( DockerContainerRestartPolicyNo DockerContainerRestartPolicy = "no" DockerContainerRestartPolicyOnFailure DockerContainerRestartPolicy = "on-failure" DockerContainerRestartPolicyAlways DockerContainerRestartPolicy = "always" DockerContainerRestartPolicyUnlessStopped DockerContainerRestartPolicy = "unless-stopped" )
func OptionalDockerContainerRestartPolicy ¶ added in v0.0.12
func OptionalDockerContainerRestartPolicy[T interface {
*DockerContainerRestartPolicy | DockerContainerRestartPolicy | *string | string
}](s T) *DockerContainerRestartPolicy
Convert a supported type to an optional (pointer) DockerContainerRestartPolicy
type DockerContainerReturn ¶ added in v0.0.12
type DockerContainerReturn struct {
AnsibleCommonReturns
// Facts representing the current state of the container. Matches the docker
// inspection output.
// Empty if `state=absent`.
// If `detach=false`, will include `Output` attribute containing any output
// from container run.
Container *map[string]any `json:"container,omitempty"`
// In case a container is started without detaching, this contains the exit
// code of the process in the container.
// Before community.docker 1.1.0, this was only returned when non-zero.
Status *int `json:"status,omitempty"`
}
Return values for the `docker_container` Ansible module.
func DockerContainerReturnFromRPCResult ¶ added in v0.0.12
func DockerContainerReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerContainerReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerContainerReturn`
type DockerContainerState ¶ added in v0.0.12
type DockerContainerState string
`absent` - A container matching the specified name will be stopped and removed. Use `force_kill` to kill the container rather than stopping it. Use `keep_volumes` to retain anonymous volumes associated with the removed container. `present` - Asserts the existence of a container matching the name and any provided configuration parameters. If no container matches the name, a container will be created. If a container matches the name but the provided configuration does not match, the container will be updated, if it can be. If it cannot be updated, it will be removed and re-created with the requested config. `started` - Asserts that the container is first `present`, and then if the container is not running moves it to a running state. Use `restart` to force a matching container to be stopped and restarted. `healthy` - Asserts that the container is `present` and `started`, and is actually healthy as well. This means that the conditions defined in `healthcheck` respectively in the image's `HEALTHCHECK` (`Docker reference for HEALTHCHECK, https://docs.docker.com/reference/dockerfile/#healthcheck`) are satisfied. The time waited can be controlled with `healthy_wait_timeout`. This state has been added in community.docker 3.11.0. `stopped` - Asserts that the container is first `present`, and then if the container is running moves it to a stopped state. To control what will be taken into account when comparing configuration, see the `comparisons` option. To avoid that the image version will be taken into account, you can also use the `image: ignore` in the `comparisons` option. Use the `recreate` option to always force re-creation of a matching container, even if it is running. If the container should be killed instead of stopped in case it needs to be stopped for recreation, or because `state` is `stopped`, please use the `force_kill` option. Use `keep_volumes` to retain anonymous volumes associated with a removed container. Use `keep_volumes` to retain anonymous volumes associated with a removed container.
const ( DockerContainerStateAbsent DockerContainerState = "absent" DockerContainerStatePresent DockerContainerState = "present" DockerContainerStateHealthy DockerContainerState = "healthy" DockerContainerStateStopped DockerContainerState = "stopped" DockerContainerStateStarted DockerContainerState = "started" )
func OptionalDockerContainerState ¶ added in v0.0.12
func OptionalDockerContainerState[T interface {
*DockerContainerState | DockerContainerState | *string | string
}](s T) *DockerContainerState
Convert a supported type to an optional (pointer) DockerContainerState
type DockerContextInfoParameters ¶ added in v0.0.12
type DockerContextInfoParameters struct {
// If set to `true`, R`contexts` will just contain the current context and none
// else.
// If set to `false` (default), R`contexts` will list all contexts, unless
// `name` is specified.
// Mutually exclusive to `name`.
// default: false
OnlyCurrent *bool `json:"only_current,omitempty"`
// A specific Docker CLI context to query.
// The module will fail if this context does not exist. If you simply want to
// query whether a context exists, do not specify this parameter and use Jinja2
// to search the resulting list for a context of the given name instead.
// Mutually exclusive with `only_current`.
Name *string `json:"name,omitempty"`
// Override for the default context's name.
// This is preferably used for context selection when `only_current=true`, and
// it is used to compute the return values R`contexts[].current` and
// R`current_context_name`.
CliContext *string `json:"cli_context,omitempty"`
}
Parameters for the `docker_context_info` Ansible module.
func (DockerContextInfoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerContextInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerContextInfoParameters into an `rpc.RPCCall`.
type DockerContextInfoReturn ¶ added in v0.0.12
type DockerContextInfoReturn struct {
AnsibleCommonReturns
// A list of all contexts (`only_current=false`, `name` not specified), only
// the current context (`only_current=true`), or the requested context (`name`
// specified).
Contexts *map[string]any `json:"contexts,omitempty"`
// The name of the current Docker context.
CurrentContextName *string `json:"current_context_name,omitempty"`
}
Return values for the `docker_context_info` Ansible module.
func DockerContextInfoReturnFromRPCResult ¶ added in v0.0.12
func DockerContextInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerContextInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerContextInfoReturn`
type DockerHostInfoParameters ¶ added in v0.0.12
type DockerHostInfoParameters struct {
// Whether to list containers.
// default: false
Containers *bool `json:"containers,omitempty"`
// By default, only running containers are returned.
// This corresponds to the `--all` option to `docker container list`.
// default: false
ContainersAll *bool `json:"containers_all,omitempty"`
// A dictionary of filter values used for selecting containers to list.
// For example, `until: 24h`.
// `label` is a special case of filter which can be a string `<key>` matching
// when a label is present, a string `<key>=<value>` matching when a label has
// a particular value, or a list of strings `<key>`/`<key>=<value`.
// See `the docker documentation,https://docs.docker.com/engine/reference/comma
// ndline/container_prune/#filtering` for more information on possible filters.
ContainersFilters *map[string]any `json:"containers_filters,omitempty"`
// Whether to list images.
// default: false
Images *bool `json:"images,omitempty"`
// A dictionary of filter values used for selecting images to list.
// For example, `dangling: true`.
// `label` is a special case of filter which can be a string `<key>` matching
// when a label is present, a string `<key>=<value>` matching when a label has
// a particular value, or a list of strings `<key>`/`<key>=<value`.
// See `the docker documentation,https://docs.docker.com/engine/reference/comma
// ndline/image_prune/#filtering` for more information on possible filters.
ImagesFilters *map[string]any `json:"images_filters,omitempty"`
// Whether to list networks.
// default: false
Networks *bool `json:"networks,omitempty"`
// A dictionary of filter values used for selecting networks to list.
// `label` is a special case of filter which can be a string `<key>` matching
// when a label is present, a string `<key>=<value>` matching when a label has
// a particular value, or a list of strings `<key>`/`<key>=<value`.
// See `the docker documentation,https://docs.docker.com/engine/reference/comma
// ndline/network_prune/#filtering` for more information on possible filters.
NetworksFilters *map[string]any `json:"networks_filters,omitempty"`
// Whether to list volumes.
// default: false
Volumes *bool `json:"volumes,omitempty"`
// A dictionary of filter values used for selecting volumes to list.
// `label` is a special case of filter which can be a string `<key>` matching
// when a label is present, a string `<key>=<value>` matching when a label has
// a particular value, or a list of strings `<key>`/`<key>=<value`.
// See `the docker documentation,https://docs.docker.com/engine/reference/comma
// ndline/volume_prune/#filtering` for more information on possible filters.
VolumesFilters *map[string]any `json:"volumes_filters,omitempty"`
// Summary information on used disk space by all Docker layers.
// The output is a sum of images, volumes, containers and build cache.
// default: false
DiskUsage *bool `json:"disk_usage,omitempty"`
// When set to `true` and `networks`, `volumes`, `images`, `containers`, or
// `disk_usage` is set to `true` then output will contain verbose information
// about objects matching the full output of API method. For details see the
// documentation of your version of Docker API at
// `https://docs.docker.com/engine/api/`.
// The verbose output in this module contains only subset of information
// returned by this module for each type of the objects.
// default: false
VerboseOutput *bool `json:"verbose_output,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_host_info` Ansible module.
func (DockerHostInfoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerHostInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerHostInfoParameters into an `rpc.RPCCall`.
type DockerHostInfoReturn ¶ added in v0.0.12
type DockerHostInfoReturn struct {
AnsibleCommonReturns
// Will be `true` if the module can talk to the docker daemon.
CanTalkToDocker *bool `json:"can_talk_to_docker,omitempty"`
// Facts representing the basic state of the docker host. Matches the `docker
// system info` output.
HostInfo *map[string]any `json:"host_info,omitempty"`
// List of dict objects containing the basic information about each volume.
// Keys matches the `docker volume ls` output unless `verbose_output=true`. See
// description for `verbose_output`.
Volumes *map[string]any `json:"volumes,omitempty"`
// List of dict objects containing the basic information about each network.
// Keys matches the `docker network ls` output unless `verbose_output=true`.
// See description for `verbose_output`.
Networks *map[string]any `json:"networks,omitempty"`
// List of dict objects containing the basic information about each container.
// Keys matches the `docker container ls` output unless `verbose_output=true`.
// See description for `verbose_output`.
Containers *map[string]any `json:"containers,omitempty"`
// List of dict objects containing the basic information about each image. Keys
// matches the `docker image ls` output unless `verbose_output=true`. See
// description for `verbose_output`.
Images *map[string]any `json:"images,omitempty"`
// Information on summary disk usage by images, containers and volumes on
// docker host unless `verbose_output=true`. See description for
// `verbose_output`.
DiskUsage *map[string]any `json:"disk_usage,omitempty"`
}
Return values for the `docker_host_info` Ansible module.
func DockerHostInfoReturnFromRPCResult ¶ added in v0.0.12
func DockerHostInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerHostInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerHostInfoReturn`
type DockerImageBuildParameters ¶ added in v0.0.12
type DockerImageBuildParameters struct {
// Image name. Name format will be one of: `name`, `repository/name`,
// `registry_server:port/name`. When pushing or pulling an image the name can
// optionally include the tag by appending `:tag_name`.
// Note that image IDs (hashes) and names with digest cannot be used.
Name string `json:"name"`
// Tag for the image name `name` that is to be tagged.
// If `name`'s format is `name:tag`, then the tag value from `name` will take
// precedence.
// default: "latest"
Tag *string `json:"tag,omitempty"`
// The path for the build environment.
Path string `json:"path"`
// Provide an alternate name for the Dockerfile to use when building an image.
// This can also include a relative path (relative to `path`).
Dockerfile *string `json:"dockerfile,omitempty"`
// List of image names to consider as cache source.
CacheFrom *[]string `json:"cache_from,omitempty"`
// When building an image downloads any updates to the FROM image in
// Dockerfile.
// default: false
Pull *bool `json:"pull,omitempty"`
// The network to use for `RUN` build instructions.
Network *string `json:"network,omitempty"`
// Do not use cache when building an image.
// default: false
Nocache *bool `json:"nocache,omitempty"`
// Extra hosts to add to `/etc/hosts` in building containers, as a mapping of
// hostname to IP address.
// Instead of an IP address, the special value `host-gateway` can also be used,
// which resolves to the host's gateway IP and allows building containers to
// connect to services running on the host.
EtcHosts *map[string]any `json:"etc_hosts,omitempty"`
// Provide a dictionary of `key:value` build arguments that map to Dockerfile
// ARG directive.
// Docker expects the value to be a string. For convenience any non-string
// values will be converted to strings.
Args *map[string]any `json:"args,omitempty"`
// When building an image specifies an intermediate build stage by name as a
// final stage for the resulting image.
Target *string `json:"target,omitempty"`
// Platforms in the format `os[/arch[/variant]]`.
// Since community.docker 3.10.0 this can be a list of platforms, instead of
// just a single platform.
Platform *[]string `json:"platform,omitempty"`
// Size of `/dev/shm` in format `<number>[<unit>]`. Number is positive integer.
// Unit can be `B` (byte), `K` (kibibyte, 1024B), `M` (mebibyte), `G`
// (gibibyte), `T` (tebibyte), or `P` (pebibyte).
// Omitting the unit defaults to bytes. If you omit the size entirely, Docker
// daemon uses `64M`.
ShmSize *string `json:"shm_size,omitempty"`
// Dictionary of key value pairs.
Labels *map[string]any `json:"labels,omitempty"`
// Defines the behavior of the module if the image to build (as specified in
// `name` and `tag`) already exists.
// default: DockerImageBuildRebuildNever
Rebuild *DockerImageBuildRebuild `json:"rebuild,omitempty"`
// Secrets to expose to the build.
Secrets *struct {
Id string `json:"id"`
Type string `json:"type"`
Src *string `json:"src,omitempty"`
Env *string `json:"env,omitempty"`
Value *string `json:"value,omitempty"`
} `json:"secrets,omitempty"`
// Output destinations.
// You can provide a list of exporters to export the built image in various
// places. Note that not all exporters might be supported by the build driver
// used.
// Note that depending on how this option is used, no image with name `name`
// and tag `tag` might be created, which can cause the basic idempotency this
// module offers to not work.
// Providing an empty list to this option is equivalent to not specifying it at
// all. The default behavior is a single entry with `outputs[].type=image`.
// `Note` that since community.docker 4.2.0, an entry for `name`/`tag` is added
// if `outputs` has at least one entry and no entry has type
// `outputs[].type=image` and includes `name`/`tag` in `outputs[].name`. This
// is because the module would otherwise pass `--tag name:image` to the buildx
// plugin, which for some reason overwrites all images in `outputs` by the
// `name:image` provided in `name`/`tag`.
Outputs *struct {
Type string `json:"type"`
Dest *string `json:"dest,omitempty"`
Context *string `json:"context,omitempty"`
Name *[]string `json:"name,omitempty"`
Push *bool `json:"push,omitempty"`
} `json:"outputs,omitempty"`
// Path to the Docker CLI. If not provided, will search for Docker CLI on the
// `PATH`.
DockerCli *string `json:"docker_cli,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// Mutually exclusive with `cli_context`. If neither `docker_host` nor
// `cli_context` are provided, the value `unix:///var/run/docker.sock` is used.
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// The Docker CLI context to use.
// Mutually exclusive with `docker_host`.
CliContext *string `json:"cli_context,omitempty"`
}
Parameters for the `docker_image_build` Ansible module.
func (DockerImageBuildParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerImageBuildParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerImageBuildParameters into an `rpc.RPCCall`.
type DockerImageBuildRebuild ¶ added in v0.0.12
type DockerImageBuildRebuild string
Defines the behavior of the module if the image to build (as specified in `name` and `tag`) already exists.
const ( DockerImageBuildRebuildNever DockerImageBuildRebuild = "never" DockerImageBuildRebuildAlways DockerImageBuildRebuild = "always" )
func OptionalDockerImageBuildRebuild ¶ added in v0.0.12
func OptionalDockerImageBuildRebuild[T interface {
*DockerImageBuildRebuild | DockerImageBuildRebuild | *string | string
}](s T) *DockerImageBuildRebuild
Convert a supported type to an optional (pointer) DockerImageBuildRebuild
type DockerImageBuildReturn ¶ added in v0.0.12
type DockerImageBuildReturn struct {
AnsibleCommonReturns
// Image inspection results for the affected image.
Image *map[string]any `json:"image,omitempty"`
// The command executed.
Command *[]string `json:"command,omitempty"`
}
Return values for the `docker_image_build` Ansible module.
func DockerImageBuildReturnFromRPCResult ¶ added in v0.0.12
func DockerImageBuildReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerImageBuildReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerImageBuildReturn`
type DockerImageExportParameters ¶ added in v0.0.12
type DockerImageExportParameters struct {
// One or more image names. Name format will be one of: `name`,
// `repository/name`, `registry_server:port/name`. When pushing or pulling an
// image the name can optionally include the tag by appending `:tag_name`.
// Note that image IDs (hashes) can also be used.
Names []string `json:"names"`
// Tag for the image name `name` that is to be tagged.
// If `name`'s format is `name:tag`, then the tag value from `name` will take
// precedence.
// default: "latest"
Tag *string `json:"tag,omitempty"`
// The `.tar` file the image should be exported to.
Path *string `json:"path,omitempty"`
// Export the image even if the `.tar` file already exists and seems to contain
// the right image.
// default: false
Force *bool `json:"force,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_image_export` Ansible module.
func (DockerImageExportParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerImageExportParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerImageExportParameters into an `rpc.RPCCall`.
type DockerImageExportReturn ¶ added in v0.0.12
type DockerImageExportReturn struct {
AnsibleCommonReturns
// Image inspection results for the affected images.
Images *map[string]any `json:"images,omitempty"`
}
Return values for the `docker_image_export` Ansible module.
func DockerImageExportReturnFromRPCResult ¶ added in v0.0.12
func DockerImageExportReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerImageExportReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerImageExportReturn`
type DockerImageInfoParameters ¶ added in v0.0.12
type DockerImageInfoParameters struct {
// An image name or a list of image names. Name format will be `name[:tag]` or
// `repository/name[:tag]`, where `tag` is optional. If a tag is not provided,
// `latest` will be used. Instead of image names, also image IDs can be used.
// If no name is provided, a list of all images will be returned.
Name *[]string `json:"name,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_image_info` Ansible module.
func (DockerImageInfoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerImageInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerImageInfoParameters into an `rpc.RPCCall`.
type DockerImageInfoReturn ¶ added in v0.0.12
type DockerImageInfoReturn struct {
AnsibleCommonReturns
// Inspection results for the selected images.
// The list only contains inspection results of images existing locally.
Images *map[string]any `json:"images,omitempty"`
}
Return values for the `docker_image_info` Ansible module.
func DockerImageInfoReturnFromRPCResult ¶ added in v0.0.12
func DockerImageInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerImageInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerImageInfoReturn`
type DockerImageLoadParameters ¶ added in v0.0.12
type DockerImageLoadParameters struct {
// The path to the `.tar` archive to load Docker image(s) from.
Path string `json:"path"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_image_load` Ansible module.
func (DockerImageLoadParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerImageLoadParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerImageLoadParameters into an `rpc.RPCCall`.
type DockerImageLoadReturn ¶ added in v0.0.12
type DockerImageLoadReturn struct {
AnsibleCommonReturns
// List of image names and IDs loaded from the archive.
ImageNames *[]string `json:"image_names,omitempty"`
// Image inspection results for the loaded images.
Images *map[string]any `json:"images,omitempty"`
}
Return values for the `docker_image_load` Ansible module.
func DockerImageLoadReturnFromRPCResult ¶ added in v0.0.12
func DockerImageLoadReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerImageLoadReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerImageLoadReturn`
type DockerImageParameters ¶ added in v0.0.12
type DockerImageParameters struct {
// Determines where the module will try to retrieve the image from.
// Use `build` to build the image from a `Dockerfile`. `build.path` must be
// specified when this value is used.
// Use `load` to load the image from a `.tar` file. `load_path` must be
// specified when this value is used.
// Use `pull` to pull the image from a registry.
// Use `local` to make sure that the image is already available on the local
// docker daemon. This means that the module does not try to build, pull or
// load the image.
Source *DockerImageSource `json:"source,omitempty"`
// Specifies options used for building images.
Build *struct {
CacheFrom *[]string `json:"cache_from,omitempty"`
Dockerfile *string `json:"dockerfile,omitempty"`
HttpTimeout *int `json:"http_timeout,omitempty"`
Path string `json:"path"`
Pull *bool `json:"pull,omitempty"`
Rm *bool `json:"rm,omitempty"`
Network *string `json:"network,omitempty"`
Nocache *bool `json:"nocache,omitempty"`
EtcHosts *map[string]any `json:"etc_hosts,omitempty"`
Args *map[string]any `json:"args,omitempty"`
ContainerLimits *struct {
Memory *string `json:"memory,omitempty"`
Memswap *string `json:"memswap,omitempty"`
Cpushares *int `json:"cpushares,omitempty"`
Cpusetcpus *string `json:"cpusetcpus,omitempty"`
} `json:"container_limits,omitempty"`
UseConfigProxy *bool `json:"use_config_proxy,omitempty"`
Target *string `json:"target,omitempty"`
Platform *string `json:"platform,omitempty"`
ShmSize *string `json:"shm_size,omitempty"`
Labels *map[string]any `json:"labels,omitempty"`
} `json:"build,omitempty"`
// Use with `state=present` to archive an image to a `.tar` file.
ArchivePath *string `json:"archive_path,omitempty"`
// Use with `state=present` to load an image from a `.tar` file.
// Set `source=load` if you want to load the image.
LoadPath *string `json:"load_path,omitempty"`
// Use with `state=present` to build, load or pull an image (depending on the
// value of the `source` option) when the image already exists.
// default: false
ForceSource *bool `json:"force_source,omitempty"`
// Use with `state=absent` to un-tag and remove all images matching the
// specified name.
// default: false
ForceAbsent *bool `json:"force_absent,omitempty"`
// Use with `state=present` to force tagging an image.
// default: false
ForceTag *bool `json:"force_tag,omitempty"`
// Image name. Name format will be one of: `name`, `repository/name`,
// `registry_server:port/name`. When pushing or pulling an image the name can
// optionally include the tag by appending `:tag_name`.
// Note that image IDs (hashes) are only supported for `state=absent`, for
// `state=present` with `source=load`, and for `state=present` with
// `source=local`.
Name string `json:"name"`
// Specifies options used for pulling images.
Pull *struct {
Platform *string `json:"platform,omitempty"`
} `json:"pull,omitempty"`
// Push the image to the registry. Specify the registry as part of the `name`
// or `repository` parameter.
// default: false
Push *bool `json:"push,omitempty"`
// Use with `state=present` to tag the image.
// Expects format `repository:tag`. If no tag is provided, will use the value
// of the `tag` parameter or `latest`.
// If `push=true`, `repository` must either include a registry, or will be
// assumed to belong to the default registry (Docker Hub).
Repository *string `json:"repository,omitempty"`
// Make assertions about the state of an image.
// When `absent` an image will be removed. Use the force option to un-tag and
// remove all images matching the provided name.
// When `present` check if an image exists using the provided name and tag. If
// the image is not found or the force option is used, the image will either be
// pulled, built or loaded, depending on the `source` option.
// default: DockerImageStatePresent
State *DockerImageState `json:"state,omitempty"`
// Used to select an image when pulling. Will be added to the image when
// pushing, tagging or building. Defaults to `latest`.
// If `name` parameter format is `name:tag`, then tag value from `name` will
// take precedence.
// default: "latest"
Tag *string `json:"tag,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_image` Ansible module.
func (DockerImageParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerImageParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerImageParameters into an `rpc.RPCCall`.
type DockerImagePullParameters ¶ added in v0.0.12
type DockerImagePullParameters struct {
// Image name. Name format must be one of `name`, `repository/name`, or
// `registry_server:port/name`.
// The name can optionally include the tag by appending `:tag_name`, or it can
// contain a digest by appending `@hash:digest`.
Name string `json:"name"`
// Used to select an image when pulling. Defaults to `latest`.
// If `name` parameter format is `name:tag` or `image@hash:digest`, then `tag`
// will be ignored.
// default: "latest"
Tag *string `json:"tag,omitempty"`
// Ask for this specific platform when pulling.
Platform *string `json:"platform,omitempty"`
// Determines when to pull an image.
// If `always`, will always pull the image.
// If `not_present`, will only pull the image if no image of the name exists on
// the current Docker daemon, or if `platform` does not match.
// default: DockerImagePullPullAlways
Pull *DockerImagePullPull `json:"pull,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_image_pull` Ansible module.
func (DockerImagePullParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerImagePullParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerImagePullParameters into an `rpc.RPCCall`.
type DockerImagePullPull ¶ added in v0.0.12
type DockerImagePullPull string
Determines when to pull an image. If `always`, will always pull the image. If `not_present`, will only pull the image if no image of the name exists on the current Docker daemon, or if `platform` does not match.
const ( DockerImagePullPullAlways DockerImagePullPull = "always" DockerImagePullPullNotPresent DockerImagePullPull = "not_present" )
func OptionalDockerImagePullPull ¶ added in v0.0.12
func OptionalDockerImagePullPull[T interface {
*DockerImagePullPull | DockerImagePullPull | *string | string
}](s T) *DockerImagePullPull
Convert a supported type to an optional (pointer) DockerImagePullPull
type DockerImagePullReturn ¶ added in v0.0.12
type DockerImagePullReturn struct {
AnsibleCommonReturns
// Image inspection results for the affected image.
Image *map[string]any `json:"image,omitempty"`
}
Return values for the `docker_image_pull` Ansible module.
func DockerImagePullReturnFromRPCResult ¶ added in v0.0.12
func DockerImagePullReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerImagePullReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerImagePullReturn`
type DockerImagePushParameters ¶ added in v0.0.12
type DockerImagePushParameters struct {
// Image name. Name format must be one of `name`, `repository/name`, or
// `registry_server:port/name`.
// The name can optionally include the tag by appending `:tag_name`, or it can
// contain a digest by appending `@hash:digest`.
Name string `json:"name"`
// Select which image to push. Defaults to `latest`.
// If `name` parameter format is `name:tag` or `image@hash:digest`, then `tag`
// will be ignored.
// default: "latest"
Tag *string `json:"tag,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_image_push` Ansible module.
func (DockerImagePushParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerImagePushParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerImagePushParameters into an `rpc.RPCCall`.
type DockerImagePushReturn ¶ added in v0.0.12
type DockerImagePushReturn struct {
AnsibleCommonReturns
// Image inspection results for the affected image.
Image *map[string]any `json:"image,omitempty"`
}
Return values for the `docker_image_push` Ansible module.
func DockerImagePushReturnFromRPCResult ¶ added in v0.0.12
func DockerImagePushReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerImagePushReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerImagePushReturn`
type DockerImageRemoveParameters ¶ added in v0.0.12
type DockerImageRemoveParameters struct {
// Image name. Name format will be one of: `name`, `repository/name`,
// `registry_server:port/name`. When pushing or pulling an image the name can
// optionally include the tag by appending `:tag_name`.
// Note that image IDs (hashes) can also be used.
Name string `json:"name"`
// Tag for the image name `name` that is to be tagged.
// If `name`'s format is `name:tag`, then the tag value from `name` will take
// precedence.
// default: "latest"
Tag *string `json:"tag,omitempty"`
// Un-tag and remove all images matching the specified name.
// default: false
Force *bool `json:"force,omitempty"`
// Delete untagged parent images.
// default: true
Prune *bool `json:"prune,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_image_remove` Ansible module.
func (DockerImageRemoveParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerImageRemoveParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerImageRemoveParameters into an `rpc.RPCCall`.
type DockerImageRemoveReturn ¶ added in v0.0.12
type DockerImageRemoveReturn struct {
AnsibleCommonReturns
// Image inspection results for the affected image before removal.
// Empty if the image was not found.
Image *map[string]any `json:"image,omitempty"`
// The digests of the images that were deleted.
Deleted *[]string `json:"deleted,omitempty"`
// The digests of the images that were untagged.
Untagged *[]string `json:"untagged,omitempty"`
}
Return values for the `docker_image_remove` Ansible module.
func DockerImageRemoveReturnFromRPCResult ¶ added in v0.0.12
func DockerImageRemoveReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerImageRemoveReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerImageRemoveReturn`
type DockerImageReturn ¶ added in v0.0.12
type DockerImageReturn struct {
AnsibleCommonReturns
// Image inspection results for the affected image.
Image *map[string]any `json:"image,omitempty"`
// Docker build output when building an image.
Stdout *string `json:"stdout,omitempty"`
}
Return values for the `docker_image` Ansible module.
func DockerImageReturnFromRPCResult ¶ added in v0.0.12
func DockerImageReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerImageReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerImageReturn`
type DockerImageSource ¶ added in v0.0.12
type DockerImageSource string
Determines where the module will try to retrieve the image from. Use `build` to build the image from a `Dockerfile`. `build.path` must be specified when this value is used. Use `load` to load the image from a `.tar` file. `load_path` must be specified when this value is used. Use `pull` to pull the image from a registry. Use `local` to make sure that the image is already available on the local docker daemon. This means that the module does not try to build, pull or load the image.
const ( DockerImageSourceBuild DockerImageSource = "build" DockerImageSourceLoad DockerImageSource = "load" DockerImageSourcePull DockerImageSource = "pull" DockerImageSourceLocal DockerImageSource = "local" )
func OptionalDockerImageSource ¶ added in v0.0.12
func OptionalDockerImageSource[T interface {
*DockerImageSource | DockerImageSource | *string | string
}](s T) *DockerImageSource
Convert a supported type to an optional (pointer) DockerImageSource
type DockerImageState ¶ added in v0.0.12
type DockerImageState string
Make assertions about the state of an image. When `absent` an image will be removed. Use the force option to un-tag and remove all images matching the provided name. When `present` check if an image exists using the provided name and tag. If the image is not found or the force option is used, the image will either be pulled, built or loaded, depending on the `source` option.
const ( DockerImageStateAbsent DockerImageState = "absent" DockerImageStatePresent DockerImageState = "present" )
func OptionalDockerImageState ¶ added in v0.0.12
func OptionalDockerImageState[T interface {
*DockerImageState | DockerImageState | *string | string
}](s T) *DockerImageState
Convert a supported type to an optional (pointer) DockerImageState
type DockerImageTagExistingImages ¶ added in v0.0.12
type DockerImageTagExistingImages string
Defines the behavior if the image to be tagged already exists and is another image than the one identified by `name` and `tag`. If set to `keep`, the tagged image is kept. If set to `overwrite`, the tagged image is overwritten by the specified one.
const ( DockerImageTagExistingImagesKeep DockerImageTagExistingImages = "keep" DockerImageTagExistingImagesOverwrite DockerImageTagExistingImages = "overwrite" )
func OptionalDockerImageTagExistingImages ¶ added in v0.0.12
func OptionalDockerImageTagExistingImages[T interface {
*DockerImageTagExistingImages | DockerImageTagExistingImages | *string | string
}](s T) *DockerImageTagExistingImages
Convert a supported type to an optional (pointer) DockerImageTagExistingImages
type DockerImageTagParameters ¶ added in v0.0.12
type DockerImageTagParameters struct {
// Image name. Name format will be one of: `name`, `repository/name`,
// `registry_server:port/name`. When pushing or pulling an image the name can
// optionally include the tag by appending `:tag_name`.
// Note that image IDs (hashes) can also be used.
Name string `json:"name"`
// Tag for the image name `name` that is to be tagged.
// If `name`'s format is `name:tag`, then the tag value from `name` will take
// precedence.
// default: "latest"
Tag *string `json:"tag,omitempty"`
// List of new image names to tag the image as.
// Expects format `repository:tag`. If no tag is provided, will use the value
// of the `tag` parameter if present, or `latest`.
Repository []string `json:"repository"`
// Defines the behavior if the image to be tagged already exists and is another
// image than the one identified by `name` and `tag`.
// If set to `keep`, the tagged image is kept.
// If set to `overwrite`, the tagged image is overwritten by the specified one.
// default: DockerImageTagExistingImagesOverwrite
ExistingImages *DockerImageTagExistingImages `json:"existing_images,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_image_tag` Ansible module.
func (DockerImageTagParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerImageTagParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerImageTagParameters into an `rpc.RPCCall`.
type DockerImageTagReturn ¶ added in v0.0.12
type DockerImageTagReturn struct {
AnsibleCommonReturns
// Image inspection results for the affected image.
Image *map[string]any `json:"image,omitempty"`
// A list of images that got tagged.
TaggedImages *[]string `json:"tagged_images,omitempty"`
}
Return values for the `docker_image_tag` Ansible module.
func DockerImageTagReturnFromRPCResult ¶ added in v0.0.12
func DockerImageTagReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerImageTagReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerImageTagReturn`
type DockerLoginParameters ¶ added in v0.0.12
type DockerLoginParameters struct {
// The registry URL.
// default: "https://index.docker.io/v1/"
RegistryUrl *string `json:"registry_url,omitempty"`
// The username for the registry account.
// Required when `state=present`.
Username *string `json:"username,omitempty"`
// The plaintext password for the registry account.
// Required when `state=present`.
Password *string `json:"password,omitempty"`
// default: false
Reauthorize *bool `json:"reauthorize,omitempty"`
// Custom path to the Docker CLI configuration file.
// default: "~/.docker/config.json"
ConfigPath *string `json:"config_path,omitempty"`
// This controls the current state of the user. `present` will login in a user,
// `absent` will log them out.
// To logout you only need the registry server, which defaults to DockerHub.
// Before 2.1 you could ONLY log in.
// Docker does not support 'logout' with a custom config file.
// default: DockerLoginStatePresent
State *DockerLoginState `json:"state,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_login` Ansible module.
func (DockerLoginParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerLoginParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerLoginParameters into an `rpc.RPCCall`.
type DockerLoginReturn ¶ added in v0.0.12
type DockerLoginReturn struct {
AnsibleCommonReturns
// Results from the login.
LoginResults *map[string]any `json:"login_results,omitempty"`
}
Return values for the `docker_login` Ansible module.
func DockerLoginReturnFromRPCResult ¶ added in v0.0.12
func DockerLoginReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerLoginReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerLoginReturn`
type DockerLoginState ¶ added in v0.0.12
type DockerLoginState string
This controls the current state of the user. `present` will login in a user, `absent` will log them out. To logout you only need the registry server, which defaults to DockerHub. Before 2.1 you could ONLY log in. Docker does not support 'logout' with a custom config file.
const ( DockerLoginStatePresent DockerLoginState = "present" DockerLoginStateAbsent DockerLoginState = "absent" )
func OptionalDockerLoginState ¶ added in v0.0.12
func OptionalDockerLoginState[T interface {
*DockerLoginState | DockerLoginState | *string | string
}](s T) *DockerLoginState
Convert a supported type to an optional (pointer) DockerLoginState
type DockerNetworkInfoParameters ¶ added in v0.0.12
type DockerNetworkInfoParameters struct {
// The name of the network to inspect.
// When identifying an existing network name may be a name or a long or short
// network ID.
Name string `json:"name"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_network_info` Ansible module.
func (DockerNetworkInfoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerNetworkInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerNetworkInfoParameters into an `rpc.RPCCall`.
type DockerNetworkInfoReturn ¶ added in v0.0.12
type DockerNetworkInfoReturn struct {
AnsibleCommonReturns
// Returns whether the network exists.
Exists *bool `json:"exists,omitempty"`
// Facts representing the current state of the network. Matches the docker
// inspection output.
// Will be `none` if network does not exist.
Network *map[string]any `json:"network,omitempty"`
}
Return values for the `docker_network_info` Ansible module.
func DockerNetworkInfoReturnFromRPCResult ¶ added in v0.0.12
func DockerNetworkInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerNetworkInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerNetworkInfoReturn`
type DockerNetworkParameters ¶ added in v0.0.12
type DockerNetworkParameters struct {
// Name of the network to operate on.
Name string `json:"name"`
// Specifies the config only network to use the config from.
ConfigFrom *string `json:"config_from,omitempty"`
// Sets that this is a config only network.
ConfigOnly *bool `json:"config_only,omitempty"`
// List of container names or container IDs to connect to a network.
// Please note that the module only makes sure that these containers are
// connected to the network, but does not care about connection options. If you
// rely on specific IP addresses and so on, use the
// `community.docker.docker_container` module to ensure your containers are
// correctly connected to this network.
// default: []
Connected *[]string `json:"connected,omitempty"`
// Specify the type of network. Docker provides bridge and overlay drivers, but
// 3rd party drivers can also be used.
// default: "bridge"
Driver *string `json:"driver,omitempty"`
// Dictionary of network settings. Consult docker docs for valid options and
// values.
// default: {}
DriverOptions *map[string]any `json:"driver_options,omitempty"`
// With state `present` will disconnect all containers for existing networks,
// delete the network and re-create the network.
// This option is required if you have changed the IPAM or driver options and
// want an existing network to be updated to use the new options.
// default: false
Force *bool `json:"force,omitempty"`
// By default the connected list is canonical, meaning containers not on the
// list are removed from the network.
// Use `appends` to leave existing containers connected.
// default: false
Appends *bool `json:"appends,omitempty"`
// Enable IPv4 networking.
// This is enabled by default, but can be explicitly disabled.
// Requires Docker API 1.47 or newer.
EnableIpv4 *bool `json:"enable_ipv4,omitempty"`
// Enable IPv6 networking.
EnableIpv6 *bool `json:"enable_ipv6,omitempty"`
// Enable Swarm routing-mesh.
Ingress *bool `json:"ingress,omitempty"`
// Specify an IPAM driver.
IpamDriver *string `json:"ipam_driver,omitempty"`
// Dictionary of IPAM driver options.
IpamDriverOptions *map[string]any `json:"ipam_driver_options,omitempty"`
// List of IPAM config blocks. Consult `Docker
// docs,https://docs.docker.com/compose/compose-file/compose-file-v2/#ipam` for
// valid options and values. Note that `ipam_config[].iprange` is spelled
// differently here (we use the notation from the Docker SDK for Python).
IpamConfig *struct {
Subnet *string `json:"subnet,omitempty"`
Iprange *string `json:"iprange,omitempty"`
Gateway *string `json:"gateway,omitempty"`
AuxAddresses *map[string]any `json:"aux_addresses,omitempty"`
} `json:"ipam_config,omitempty"`
// `absent` deletes the network. If a network has connected containers, these
// will be detached from the network.
// `present` creates the network, if it does not already exist with the
// specified parameters, and connects the list of containers provided by the
// `connected` parameter. Containers not on the list will be disconnected. An
// empty list will leave no containers connected to the network. Use the
// `appends` option to leave existing containers connected. Use the `force`
// options to force re-creation of the network.
// default: DockerNetworkStatePresent
State *DockerNetworkState `json:"state,omitempty"`
// Restrict external access to the network.
Internal *bool `json:"internal,omitempty"`
// Dictionary of labels.
// default: {}
Labels *map[string]any `json:"labels,omitempty"`
// Specify the network's scope.
Scope *DockerNetworkScope `json:"scope,omitempty"`
// If enabled, and the network is in the global scope, non-service containers
// on worker nodes will be able to connect to the network.
Attachable *bool `json:"attachable,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_network` Ansible module.
func (DockerNetworkParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerNetworkParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerNetworkParameters into an `rpc.RPCCall`.
type DockerNetworkReturn ¶ added in v0.0.12
type DockerNetworkReturn struct {
AnsibleCommonReturns
// Network inspection results for the affected network.
Network *map[string]any `json:"network,omitempty"`
}
Return values for the `docker_network` Ansible module.
func DockerNetworkReturnFromRPCResult ¶ added in v0.0.12
func DockerNetworkReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerNetworkReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerNetworkReturn`
type DockerNetworkScope ¶ added in v0.0.12
type DockerNetworkScope string
Specify the network's scope.
const ( DockerNetworkScopeLocal DockerNetworkScope = "local" DockerNetworkScopeGlobal DockerNetworkScope = "global" DockerNetworkScopeSwarm DockerNetworkScope = "swarm" )
func OptionalDockerNetworkScope ¶ added in v0.0.12
func OptionalDockerNetworkScope[T interface {
*DockerNetworkScope | DockerNetworkScope | *string | string
}](s T) *DockerNetworkScope
Convert a supported type to an optional (pointer) DockerNetworkScope
type DockerNetworkState ¶ added in v0.0.12
type DockerNetworkState string
`absent` deletes the network. If a network has connected containers, these will be detached from the network. `present` creates the network, if it does not already exist with the specified parameters, and connects the list of containers provided by the `connected` parameter. Containers not on the list will be disconnected. An empty list will leave no containers connected to the network. Use the `appends` option to leave existing containers connected. Use the `force` options to force re-creation of the network.
const ( DockerNetworkStateAbsent DockerNetworkState = "absent" DockerNetworkStatePresent DockerNetworkState = "present" )
func OptionalDockerNetworkState ¶ added in v0.0.12
func OptionalDockerNetworkState[T interface {
*DockerNetworkState | DockerNetworkState | *string | string
}](s T) *DockerNetworkState
Convert a supported type to an optional (pointer) DockerNetworkState
type DockerNodeAvailability ¶ added in v0.0.12
type DockerNodeAvailability string
Node availability to assign. If not provided then node availability remains unchanged.
const ( DockerNodeAvailabilityActive DockerNodeAvailability = "active" DockerNodeAvailabilityPause DockerNodeAvailability = "pause" DockerNodeAvailabilityDrain DockerNodeAvailability = "drain" )
func OptionalDockerNodeAvailability ¶ added in v0.0.12
func OptionalDockerNodeAvailability[T interface {
*DockerNodeAvailability | DockerNodeAvailability | *string | string
}](s T) *DockerNodeAvailability
Convert a supported type to an optional (pointer) DockerNodeAvailability
type DockerNodeInfoParameters ¶ added in v0.0.12
type DockerNodeInfoParameters struct {
// The name of the node to inspect.
// The list of nodes names to inspect.
// If empty then return information of all nodes in Swarm cluster.
// When identifying the node use either the hostname of the node (as registered
// in Swarm) or node ID.
// If `self=true` then this parameter is ignored.
Name *[]string `json:"name,omitempty"`
// If `true`, queries the node (that is, the docker daemon) the module
// communicates with.
// If `true` then `name` is ignored.
// If `false` then query depends on `name` presence and value.
// default: false
Self *bool `json:"self,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
// `Note:` this option is no longer supported for Docker SDK for Python 7.0.0+.
// Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an
// error.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by Docker SDK for Python
// and the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// Requires Docker SDK for Python 4.4.0 or newer.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode.
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_node_info` Ansible module.
func (DockerNodeInfoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerNodeInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerNodeInfoParameters into an `rpc.RPCCall`.
type DockerNodeInfoReturn ¶ added in v0.0.12
type DockerNodeInfoReturn struct {
AnsibleCommonReturns
// Facts representing the current state of the nodes. Matches the `docker node
// inspect` output.
// Can contain multiple entries if more than one node provided in `name`, or
// `name` is not provided.
// If `name` contains a list of nodes, the output will provide information on
// all nodes registered at the swarm, including nodes that left the swarm but
// have not been removed from the cluster on swarm managers and nodes that are
// unreachable.
Nodes *map[string]any `json:"nodes,omitempty"`
}
Return values for the `docker_node_info` Ansible module.
func DockerNodeInfoReturnFromRPCResult ¶ added in v0.0.12
func DockerNodeInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerNodeInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerNodeInfoReturn`
type DockerNodeLabelsState ¶ added in v0.0.12
type DockerNodeLabelsState string
It defines the operation on the labels assigned to node and labels specified in `labels` option. Set to `merge` to combine labels provided in `labels` with those already assigned to the node. If no labels are assigned then it will add listed labels. For labels that are already assigned to the node, it will update their values. The labels not specified in `labels` will remain unchanged. If `labels` is empty then no changes will be made. Set to `replace` to replace all assigned labels with provided ones. If `labels` is empty then all labels assigned to the node will be removed.
const ( DockerNodeLabelsStateMerge DockerNodeLabelsState = "merge" DockerNodeLabelsStateReplace DockerNodeLabelsState = "replace" )
func OptionalDockerNodeLabelsState ¶ added in v0.0.12
func OptionalDockerNodeLabelsState[T interface {
*DockerNodeLabelsState | DockerNodeLabelsState | *string | string
}](s T) *DockerNodeLabelsState
Convert a supported type to an optional (pointer) DockerNodeLabelsState
type DockerNodeParameters ¶ added in v0.0.12
type DockerNodeParameters struct {
// The hostname or ID of node as registered in Swarm.
// If more than one node is registered using the same hostname the ID must be
// used, otherwise module will fail.
Hostname string `json:"hostname"`
// User-defined key/value metadata that will be assigned as node attribute.
// Label operations in this module apply to the docker swarm node specified by
// `hostname`. Use `community.docker.docker_swarm` module to add/modify/remove
// swarm cluster labels.
// The actual state of labels assigned to the node when module completes its
// work depends on `labels_state` and `labels_to_remove` parameters values. See
// description below.
Labels *map[string]any `json:"labels,omitempty"`
// It defines the operation on the labels assigned to node and labels specified
// in `labels` option.
// Set to `merge` to combine labels provided in `labels` with those already
// assigned to the node. If no labels are assigned then it will add listed
// labels. For labels that are already assigned to the node, it will update
// their values. The labels not specified in `labels` will remain unchanged. If
// `labels` is empty then no changes will be made.
// Set to `replace` to replace all assigned labels with provided ones. If
// `labels` is empty then all labels assigned to the node will be removed.
// default: DockerNodeLabelsStateMerge
LabelsState *DockerNodeLabelsState `json:"labels_state,omitempty"`
// List of labels that will be removed from the node configuration. The list
// has to contain only label names, not their values.
// If the label provided on the list is not assigned to the node, the entry is
// ignored.
// If the label is both on the `labels_to_remove` and `labels`, then value
// provided in `labels` remains assigned to the node.
// If `labels_state=replace` and `labels` is not provided or empty then all
// labels assigned to node are removed and `labels_to_remove` is ignored.
LabelsToRemove *[]string `json:"labels_to_remove,omitempty"`
// Node availability to assign. If not provided then node availability remains
// unchanged.
Availability *DockerNodeAvailability `json:"availability,omitempty"`
// Node role to assign. If not provided then node role remains unchanged.
Role *DockerNodeRole `json:"role,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
// `Note:` this option is no longer supported for Docker SDK for Python 7.0.0+.
// Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an
// error.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by Docker SDK for Python
// and the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// Requires Docker SDK for Python 4.4.0 or newer.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode.
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_node` Ansible module.
func (DockerNodeParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerNodeParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerNodeParameters into an `rpc.RPCCall`.
type DockerNodeReturn ¶ added in v0.0.12
type DockerNodeReturn struct {
AnsibleCommonReturns
// Information about node after 'update' operation.
Node *map[string]any `json:"node,omitempty"`
}
Return values for the `docker_node` Ansible module.
func DockerNodeReturnFromRPCResult ¶ added in v0.0.12
func DockerNodeReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerNodeReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerNodeReturn`
type DockerNodeRole ¶ added in v0.0.12
type DockerNodeRole string
Node role to assign. If not provided then node role remains unchanged.
const ( DockerNodeRoleManager DockerNodeRole = "manager" DockerNodeRoleWorker DockerNodeRole = "worker" )
func OptionalDockerNodeRole ¶ added in v0.0.12
func OptionalDockerNodeRole[T interface {
*DockerNodeRole | DockerNodeRole | *string | string
}](s T) *DockerNodeRole
Convert a supported type to an optional (pointer) DockerNodeRole
type DockerPluginParameters ¶ added in v0.0.12
type DockerPluginParameters struct {
// Name of the plugin to operate on.
PluginName string `json:"plugin_name"`
// `absent` remove the plugin.
// `present` install the plugin, if it does not already exist.
// `enable` enable the plugin.
// `disable` disable the plugin.
// default: DockerPluginStatePresent
State *DockerPluginState `json:"state,omitempty"`
// Local name for plugin.
Alias *string `json:"alias,omitempty"`
// Dictionary of plugin settings.
// default: {}
PluginOptions *map[string]any `json:"plugin_options,omitempty"`
// Remove even if the plugin is enabled.
// default: false
ForceRemove *bool `json:"force_remove,omitempty"`
// Timeout in seconds.
// default: 0
EnableTimeout *int `json:"enable_timeout,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_plugin` Ansible module.
func (DockerPluginParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerPluginParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerPluginParameters into an `rpc.RPCCall`.
type DockerPluginReturn ¶ added in v0.0.12
type DockerPluginReturn struct {
AnsibleCommonReturns
// Plugin inspection results for the affected plugin.
Plugin *map[string]any `json:"plugin,omitempty"`
// List of actions performed during task execution.
Actions *[]any `json:"actions,omitempty"`
}
Return values for the `docker_plugin` Ansible module.
func DockerPluginReturnFromRPCResult ¶ added in v0.0.12
func DockerPluginReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerPluginReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerPluginReturn`
type DockerPluginState ¶ added in v0.0.12
type DockerPluginState string
`absent` remove the plugin. `present` install the plugin, if it does not already exist. `enable` enable the plugin. `disable` disable the plugin.
const ( DockerPluginStateAbsent DockerPluginState = "absent" DockerPluginStatePresent DockerPluginState = "present" DockerPluginStateEnable DockerPluginState = "enable" DockerPluginStateDisable DockerPluginState = "disable" )
func OptionalDockerPluginState ¶ added in v0.0.12
func OptionalDockerPluginState[T interface {
*DockerPluginState | DockerPluginState | *string | string
}](s T) *DockerPluginState
Convert a supported type to an optional (pointer) DockerPluginState
type DockerPruneParameters ¶ added in v0.0.12
type DockerPruneParameters struct {
// Whether to prune containers.
// default: false
Containers *bool `json:"containers,omitempty"`
// A dictionary of filter values used for selecting containers to delete.
// For example, `until: 24h`.
// See `the docker documentation,https://docs.docker.com/engine/reference/comma
// ndline/container_prune/#filtering` for more information on possible filters.
ContainersFilters *map[string]any `json:"containers_filters,omitempty"`
// Whether to prune images.
// default: false
Images *bool `json:"images,omitempty"`
// A dictionary of filter values used for selecting images to delete.
// For example, `dangling: true`.
// See `the docker documentation,https://docs.docker.com/engine/reference/comma
// ndline/image_prune/#filtering` for more information on possible filters.
ImagesFilters *map[string]any `json:"images_filters,omitempty"`
// Whether to prune networks.
// default: false
Networks *bool `json:"networks,omitempty"`
// A dictionary of filter values used for selecting networks to delete.
// See `the docker documentation,https://docs.docker.com/engine/reference/comma
// ndline/network_prune/#filtering` for more information on possible filters.
NetworksFilters *map[string]any `json:"networks_filters,omitempty"`
// Whether to prune volumes.
// default: false
Volumes *bool `json:"volumes,omitempty"`
// A dictionary of filter values used for selecting volumes to delete.
// See `the docker documentation,https://docs.docker.com/engine/reference/comma
// ndline/volume_prune/#filtering` for more information on possible filters.
VolumesFilters *map[string]any `json:"volumes_filters,omitempty"`
// Whether to prune the builder cache.
// default: false
BuilderCache *bool `json:"builder_cache,omitempty"`
// Whether to remove all types of build cache.
// default: false
BuilderCacheAll *bool `json:"builder_cache_all,omitempty"`
// A dictionary of filter values used for selecting images to delete.
// For example, `until: 10m`.
// See `the API documentation,https://docs.docker.com/engine/api/v1.44/#tag/Ima
// ge/operation/BuildPrune` for more information on possible filters.
BuilderCacheFilters *map[string]any `json:"builder_cache_filters,omitempty"`
// Amount of disk space to keep for cache in format `<number>[<unit>]`.".
// Number is a positive integer. Unit can be one of `B` (byte), `K` (kibibyte,
// 1024B), `M` (mebibyte), `G` (gibibyte), `T` (tebibyte), or `P` (pebibyte).
// Omitting the unit defaults to bytes.
BuilderCacheKeepStorage *string `json:"builder_cache_keep_storage,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_prune` Ansible module.
func (DockerPruneParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerPruneParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerPruneParameters into an `rpc.RPCCall`.
type DockerPruneReturn ¶ added in v0.0.12
type DockerPruneReturn struct {
AnsibleCommonReturns
// List of IDs of deleted containers.
Containers *[]string `json:"containers,omitempty"`
// Amount of reclaimed disk space from container pruning in bytes.
ContainersSpaceReclaimed *int `json:"containers_space_reclaimed,omitempty"`
// List of IDs of deleted images.
Images *[]string `json:"images,omitempty"`
// Amount of reclaimed disk space from image pruning in bytes.
ImagesSpaceReclaimed *int `json:"images_space_reclaimed,omitempty"`
// List of IDs of deleted networks.
Networks *[]string `json:"networks,omitempty"`
// List of IDs of deleted volumes.
Volumes *[]string `json:"volumes,omitempty"`
// Amount of reclaimed disk space from volumes pruning in bytes.
VolumesSpaceReclaimed *int `json:"volumes_space_reclaimed,omitempty"`
// Amount of reclaimed disk space from builder cache pruning in bytes.
BuilderCacheSpaceReclaimed *int `json:"builder_cache_space_reclaimed,omitempty"`
// The build caches that were deleted.
BuilderCacheCachesDeleted *[]string `json:"builder_cache_caches_deleted,omitempty"`
}
Return values for the `docker_prune` Ansible module.
func DockerPruneReturnFromRPCResult ¶ added in v0.0.12
func DockerPruneReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerPruneReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerPruneReturn`
type DockerSecretParameters ¶ added in v0.0.12
type DockerSecretParameters struct {
// The value of the secret.
// Mutually exclusive with `data_src`. One of `data` and `data_src` is required
// if `state=present`.
Data *string `json:"data,omitempty"`
// If set to `true`, the data is assumed to be Base64 encoded and will be
// decoded before being used.
// To use binary `data`, it is better to keep it Base64 encoded and let it be
// decoded by this option.
// default: false
DataIsB64 *bool `json:"data_is_b64,omitempty"`
// The file on the target from which to read the secret.
// Mutually exclusive with `data`. One of `data` and `data_src` is required if
// `state=present`.
DataSrc *string `json:"data_src,omitempty"`
// A map of key:value meta data, where both key and value are expected to be
// strings.
// If new meta data is provided, or existing meta data is modified, the secret
// will be updated by removing it and creating it again.
Labels *map[string]any `json:"labels,omitempty"`
// Use with `state=present` to always remove and recreate an existing secret.
// If `true`, an existing secret will be replaced, even if it has not changed.
// default: false
Force *bool `json:"force,omitempty"`
// If set to `true`, secrets are created with an increasing version number
// appended to their name.
// Adds a label containing the version number to the managed secrets with the
// name `ansible_version`.
// default: false
RollingVersions *bool `json:"rolling_versions,omitempty"`
// When using `rolling_versions`, the number of old versions of the secret to
// keep.
// Extraneous old secrets are deleted after the new one is created.
// Set to `-1` to keep everything or to `0` or `1` to keep only the current
// one.
// default: 5
VersionsToKeep *int `json:"versions_to_keep,omitempty"`
// The name of the secret.
Name string `json:"name"`
// Set to `present`, if the secret should exist, and `absent`, if it should
// not.
// default: DockerSecretStatePresent
State *DockerSecretState `json:"state,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
// `Note:` this option is no longer supported for Docker SDK for Python 7.0.0+.
// Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an
// error.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by Docker SDK for Python
// and the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// Requires Docker SDK for Python 4.4.0 or newer.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode.
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_secret` Ansible module.
func (DockerSecretParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerSecretParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerSecretParameters into an `rpc.RPCCall`.
type DockerSecretReturn ¶ added in v0.0.12
type DockerSecretReturn struct {
AnsibleCommonReturns
// The ID assigned by Docker to the secret object.
SecretId *string `json:"secret_id,omitempty"`
// The name of the created secret object.
SecretName *string `json:"secret_name,omitempty"`
}
Return values for the `docker_secret` Ansible module.
func DockerSecretReturnFromRPCResult ¶ added in v0.0.12
func DockerSecretReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerSecretReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerSecretReturn`
type DockerSecretState ¶ added in v0.0.12
type DockerSecretState string
Set to `present`, if the secret should exist, and `absent`, if it should not.
const ( DockerSecretStateAbsent DockerSecretState = "absent" DockerSecretStatePresent DockerSecretState = "present" )
func OptionalDockerSecretState ¶ added in v0.0.12
func OptionalDockerSecretState[T interface {
*DockerSecretState | DockerSecretState | *string | string
}](s T) *DockerSecretState
Convert a supported type to an optional (pointer) DockerSecretState
type DockerStackInfoParameters ¶ added in v0.0.12
type DockerStackInfoParameters struct {
// Path to the Docker CLI. If not provided, will search for Docker CLI on the
// `PATH`.
DockerCli *string `json:"docker_cli,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// Mutually exclusive with `cli_context`. If neither `docker_host` nor
// `cli_context` are provided, the value `unix:///var/run/docker.sock` is used.
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// The Docker CLI context to use.
// Mutually exclusive with `docker_host`.
CliContext *string `json:"cli_context,omitempty"`
}
Parameters for the `docker_stack_info` Ansible module.
func (DockerStackInfoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerStackInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerStackInfoParameters into an `rpc.RPCCall`.
type DockerStackInfoReturn ¶ added in v0.0.12
type DockerStackInfoReturn struct {
AnsibleCommonReturns
// List of dictionaries containing the list of stacks on the target node.
Results *map[string]any `json:"results,omitempty"`
}
Return values for the `docker_stack_info` Ansible module.
func DockerStackInfoReturnFromRPCResult ¶ added in v0.0.12
func DockerStackInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerStackInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerStackInfoReturn`
type DockerStackParameters ¶ added in v0.0.12
type DockerStackParameters struct {
// Stack name.
Name string `json:"name"`
// Service state.
// default: DockerStackStatePresent
State *DockerStackState `json:"state,omitempty"`
// List of compose definitions. Any element may be a string referring to the
// path of the compose file on the target host or the YAML contents of a
// compose file nested as dictionary.
// default: []
Compose *[]any `json:"compose,omitempty"`
// If true will add the `--prune` option to the `docker stack deploy` command.
// This will have docker remove the services not present in the current stack
// definition.
// default: false
Prune *bool `json:"prune,omitempty"`
// If `false`, the `--detach=false` option is added to the `docker stack
// deploy` command, allowing Docker to wait for tasks to converge before
// exiting.
// If `true` (default), Docker exits immediately instead of waiting for tasks
// to converge.
// default: true
Detach *bool `json:"detach,omitempty"`
// If true will add the `--with-registry-auth` option to the `docker stack
// deploy` command. This will have docker send registry authentication details
// to Swarm agents.
// default: false
WithRegistryAuth *bool `json:"with_registry_auth,omitempty"`
// If set will add the `--resolve-image` option to the `docker stack deploy`
// command. This will have docker query the registry to resolve image digest
// and supported platforms. If not set, docker use "always" by default.
ResolveImage *DockerStackResolveImage `json:"resolve_image,omitempty"`
// If larger than `0` and `state=absent` the module will retry up to
// `absent_retries` times to delete the stack until all the resources have been
// effectively deleted. If the last try still reports the stack as not
// completely removed the module will fail.
// default: 0
AbsentRetries *int `json:"absent_retries,omitempty"`
// Interval in seconds between consecutive `absent_retries`.
// default: 1
AbsentRetriesInterval *int `json:"absent_retries_interval,omitempty"`
// Path to the Docker CLI. If not provided, will search for Docker CLI on the
// `PATH`.
DockerCli *string `json:"docker_cli,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// Mutually exclusive with `cli_context`. If neither `docker_host` nor
// `cli_context` are provided, the value `unix:///var/run/docker.sock` is used.
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// The Docker CLI context to use.
// Mutually exclusive with `docker_host`.
CliContext *string `json:"cli_context,omitempty"`
}
Parameters for the `docker_stack` Ansible module.
func (DockerStackParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerStackParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerStackParameters into an `rpc.RPCCall`.
type DockerStackResolveImage ¶ added in v0.0.12
type DockerStackResolveImage string
If set will add the `--resolve-image` option to the `docker stack deploy` command. This will have docker query the registry to resolve image digest and supported platforms. If not set, docker use "always" by default.
const ( DockerStackResolveImageAlways DockerStackResolveImage = "always" DockerStackResolveImageChanged DockerStackResolveImage = "changed" DockerStackResolveImageNever DockerStackResolveImage = "never" )
func OptionalDockerStackResolveImage ¶ added in v0.0.12
func OptionalDockerStackResolveImage[T interface {
*DockerStackResolveImage | DockerStackResolveImage | *string | string
}](s T) *DockerStackResolveImage
Convert a supported type to an optional (pointer) DockerStackResolveImage
type DockerStackReturn ¶ added in v0.0.12
type DockerStackReturn struct {
AnsibleCommonReturns
// Dictionary containing the differences between the 'Spec' field of the stack
// services before and after applying the new stack definition.
StackSpecDiff *map[string]any `json:"stack_spec_diff,omitempty"`
}
Return values for the `docker_stack` Ansible module.
func DockerStackReturnFromRPCResult ¶ added in v0.0.12
func DockerStackReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerStackReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerStackReturn`
type DockerStackState ¶ added in v0.0.12
type DockerStackState string
Service state.
const ( DockerStackStatePresent DockerStackState = "present" DockerStackStateAbsent DockerStackState = "absent" )
func OptionalDockerStackState ¶ added in v0.0.12
func OptionalDockerStackState[T interface {
*DockerStackState | DockerStackState | *string | string
}](s T) *DockerStackState
Convert a supported type to an optional (pointer) DockerStackState
type DockerStackTaskInfoParameters ¶ added in v0.0.12
type DockerStackTaskInfoParameters struct {
// Stack name.
Name string `json:"name"`
// Path to the Docker CLI. If not provided, will search for Docker CLI on the
// `PATH`.
DockerCli *string `json:"docker_cli,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// Mutually exclusive with `cli_context`. If neither `docker_host` nor
// `cli_context` are provided, the value `unix:///var/run/docker.sock` is used.
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// The Docker CLI context to use.
// Mutually exclusive with `docker_host`.
CliContext *string `json:"cli_context,omitempty"`
}
Parameters for the `docker_stack_task_info` Ansible module.
func (DockerStackTaskInfoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerStackTaskInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerStackTaskInfoParameters into an `rpc.RPCCall`.
type DockerStackTaskInfoReturn ¶ added in v0.0.12
type DockerStackTaskInfoReturn struct {
AnsibleCommonReturns
// List of dictionaries containing the list of tasks associated to a stack
// name.
Results *map[string]any `json:"results,omitempty"`
}
Return values for the `docker_stack_task_info` Ansible module.
func DockerStackTaskInfoReturnFromRPCResult ¶ added in v0.0.12
func DockerStackTaskInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerStackTaskInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerStackTaskInfoReturn`
type DockerSwarmInfoParameters ¶ added in v0.0.12
type DockerSwarmInfoParameters struct {
// Whether to list swarm nodes.
// default: false
Nodes *bool `json:"nodes,omitempty"`
// A dictionary of filter values used for selecting nodes to list.
// For example, `name: mynode`.
// See `the docker documentation,https://docs.docker.com/engine/reference/comma
// ndline/node_ls/#filtering` for more information on possible filters.
NodesFilters *map[string]any `json:"nodes_filters,omitempty"`
// Whether to list swarm services.
// default: false
Services *bool `json:"services,omitempty"`
// A dictionary of filter values used for selecting services to list.
// For example, `name: myservice`.
// See `the docker documentation,https://docs.docker.com/engine/reference/comma
// ndline/service_ls/#filtering` for more information on possible filters.
ServicesFilters *map[string]any `json:"services_filters,omitempty"`
// Whether to list containers.
// default: false
Tasks *bool `json:"tasks,omitempty"`
// A dictionary of filter values used for selecting tasks to list.
// For example, `node: mynode-1`.
// See `the docker documentation,https://docs.docker.com/engine/reference/comma
// ndline/service_ps/#filtering` for more information on possible filters.
TasksFilters *map[string]any `json:"tasks_filters,omitempty"`
// Whether to retrieve the swarm unlock key.
// default: false
UnlockKey *bool `json:"unlock_key,omitempty"`
// When set to `true` and `nodes`, `services`, or `tasks` is set to `true`,
// then the module output will contain verbose information about objects
// matching the full output of API method.
// For details see the documentation of your version of Docker API at
// `https://docs.docker.com/engine/api/`.
// The verbose output in this module contains only subset of information
// returned by this info module for each type of the objects.
// default: false
VerboseOutput *bool `json:"verbose_output,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
// `Note:` this option is no longer supported for Docker SDK for Python 7.0.0+.
// Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an
// error.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by Docker SDK for Python
// and the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// Requires Docker SDK for Python 4.4.0 or newer.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode.
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_swarm_info` Ansible module.
func (DockerSwarmInfoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerSwarmInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerSwarmInfoParameters into an `rpc.RPCCall`.
type DockerSwarmInfoReturn ¶ added in v0.0.12
type DockerSwarmInfoReturn struct {
AnsibleCommonReturns
// Will be `true` if the module can talk to the docker daemon.
CanTalkToDocker *bool `json:"can_talk_to_docker,omitempty"`
// Will be `true` if the module can talk to the docker daemon, and the docker
// daemon is in Swarm mode.
DockerSwarmActive *bool `json:"docker_swarm_active,omitempty"`
// Will be `true` if the module can talk to the docker daemon, the docker
// daemon is in Swarm mode, and the current node is a manager node.
// Only if this one is `true`, the module will not fail.
DockerSwarmManager *bool `json:"docker_swarm_manager,omitempty"`
// Facts representing the basic state of the docker Swarm cluster.
// Contains tokens to connect to the Swarm.
SwarmFacts *map[string]any `json:"swarm_facts,omitempty"`
// Contains the key needed to unlock the swarm.
SwarmUnlockKey *string `json:"swarm_unlock_key,omitempty"`
// List of dict objects containing the basic information about each volume.
// Keys matches the `docker node ls` output unless `verbose_output=true`. See
// description for `verbose_output`.
Nodes *map[string]any `json:"nodes,omitempty"`
// List of dict objects containing the basic information about each volume.
// Keys matches the `docker service ls` output unless `verbose_output=true`.
// See description for `verbose_output`.
Services *map[string]any `json:"services,omitempty"`
// List of dict objects containing the basic information about each volume.
// Keys matches the `docker service ps` output unless `verbose_output=true`.
// See description for `verbose_output`.
Tasks *map[string]any `json:"tasks,omitempty"`
}
Return values for the `docker_swarm_info` Ansible module.
func DockerSwarmInfoReturnFromRPCResult ¶ added in v0.0.12
func DockerSwarmInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerSwarmInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerSwarmInfoReturn`
type DockerSwarmParameters ¶ added in v0.0.12
type DockerSwarmParameters struct {
// Externally reachable address advertised to other nodes.
// This can either be an address/port combination in the form
// `192.168.1.1:4567`, or an interface followed by a port number, like
// `eth0:4567`.
// If the port number is omitted, the port number from the listen address is
// used.
// If `advertise_addr` is not specified, it will be automatically detected when
// possible.
// Only used when swarm is initialised or joined. Because of this it is not
// considered for idempotency checking.
AdvertiseAddr *string `json:"advertise_addr,omitempty"`
// Default address pool in CIDR format.
// Only used when swarm is initialised. Because of this it is not considered
// for idempotency checking.
// Requires API version >= 1.39.
DefaultAddrPool *[]string `json:"default_addr_pool,omitempty"`
// Default address pool subnet mask length.
// Only used when swarm is initialised. Because of this it is not considered
// for idempotency checking.
// Requires API version >= 1.39.
SubnetSize *int `json:"subnet_size,omitempty"`
// Listen address used for inter-manager communication.
// This can either be an address/port combination in the form
// `192.168.1.1:4567`, or an interface followed by a port number, like
// `eth0:4567`.
// If the port number is omitted, the default swarm listening port is used.
// Only used when swarm is initialised or joined. Because of this it is not
// considered for idempotency checking.
// default: "0.0.0.0:2377"
ListenAddr *string `json:"listen_addr,omitempty"`
// Use with state `present` to force creating a new Swarm, even if already part
// of one.
// Use with state `absent` to Leave the swarm even if this node is a manager.
// default: false
Force *bool `json:"force,omitempty"`
// Set to `present`, to create/update a new cluster.
// Set to `join`, to join an existing cluster.
// Set to `absent`, to leave an existing cluster.
// Set to `remove`, to remove an absent node from the cluster. Note that
// removing requires Docker SDK for Python >= 2.4.0.
// `community.docker.docker_node` can be used to demote a manager before
// removal.
// default: DockerSwarmStatePresent
State *DockerSwarmState `json:"state,omitempty"`
// Swarm id of the node to remove.
// Used with `state=remove`.
NodeId *string `json:"node_id,omitempty"`
// Swarm token used to join a swarm cluster.
// Used with `state=join`.
// If this value is specified, the corresponding value in the return values
// will be censored by Ansible. This is a side-effect of this value not being
// logged.
JoinToken *string `json:"join_token,omitempty"`
// Remote address of one or more manager nodes of an existing Swarm to connect
// to.
// Used with `state=join`.
RemoteAddrs *[]string `json:"remote_addrs,omitempty"`
// Maximum number of tasks history stored.
// Docker default value is `5`.
TaskHistoryRetentionLimit *int `json:"task_history_retention_limit,omitempty"`
// Number of logs entries between snapshot.
// Docker default value is `10000`.
SnapshotInterval *int `json:"snapshot_interval,omitempty"`
// Number of snapshots to keep beyond the current snapshot.
// Docker default value is `0`.
KeepOldSnapshots *int `json:"keep_old_snapshots,omitempty"`
// Number of log entries to keep around to sync up slow followers after a
// snapshot is created.
LogEntriesForSlowFollowers *int `json:"log_entries_for_slow_followers,omitempty"`
// Amount of ticks (in seconds) between each heartbeat.
// Docker default value is `1` seconds.
HeartbeatTick *int `json:"heartbeat_tick,omitempty"`
// Amount of ticks (in seconds) needed without a leader to trigger a new
// election.
// Docker default value is `10` seconds.
ElectionTick *int `json:"election_tick,omitempty"`
// The delay (in nanoseconds) for an agent to send a heartbeat to the
// dispatcher.
// Docker default value is 5 seconds, which corresponds to a value of
// `5000000000`.
DispatcherHeartbeatPeriod *int `json:"dispatcher_heartbeat_period,omitempty"`
// Automatic expiry for nodes certificates, given in nanoseconds.
// Docker default value is 90 days, which corresponds to a value of
// `7776000000000000`.
NodeCertExpiry *int `json:"node_cert_expiry,omitempty"`
// The name of the swarm.
Name *string `json:"name,omitempty"`
// User-defined key/value metadata.
// Label operations in this module apply to the docker swarm cluster. Use
// `community.docker.docker_node` module to add/modify/remove swarm node
// labels.
// Requires API version >= 1.32.
Labels *map[string]any `json:"labels,omitempty"`
// The desired signing CA certificate for all swarm node TLS leaf certificates,
// in PEM format.
// This must not be a path to a certificate, but the contents of the
// certificate.
// Requires API version >= 1.30.
SigningCaCert *string `json:"signing_ca_cert,omitempty"`
// The desired signing CA key for all swarm node TLS leaf certificates, in PEM
// format.
// This must not be a path to a key, but the contents of the key.
// Requires API version >= 1.30.
SigningCaKey *string `json:"signing_ca_key,omitempty"`
// An integer whose purpose is to force swarm to generate a new signing CA
// certificate and key, if none have been specified.
// Docker default value is `0`.
// Requires API version >= 1.30.
CaForceRotate *int `json:"ca_force_rotate,omitempty"`
// If set, generate a key and use it to lock data stored on the managers.
// Docker default value is `false`.
// `community.docker.docker_swarm_info` can be used to retrieve the unlock key.
AutolockManagers *bool `json:"autolock_managers,omitempty"`
// Rotate the worker join token.
// default: false
RotateWorkerToken *bool `json:"rotate_worker_token,omitempty"`
// Rotate the manager join token.
// default: false
RotateManagerToken *bool `json:"rotate_manager_token,omitempty"`
// Address or interface to use for data path traffic.
// This can either be an address in the form `192.168.1.1`, or an interface,
// like `eth0`.
// Only used when swarm is initialised or joined. Because of this it is not
// considered for idempotency checking.
// Requires API version >= 1.30.
DataPathAddr *string `json:"data_path_addr,omitempty"`
// Port to use for data path traffic.
// This needs to be a port number like `9789`.
// Only used when swarm is initialised. Because of this it is not considered
// for idempotency checking.
// Requires API version >= 1.40.
DataPathPort *int `json:"data_path_port,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
// `Note:` this option is no longer supported for Docker SDK for Python 7.0.0+.
// Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an
// error.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by Docker SDK for Python
// and the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// Requires Docker SDK for Python 4.4.0 or newer.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode.
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_swarm` Ansible module.
func (DockerSwarmParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerSwarmParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerSwarmParameters into an `rpc.RPCCall`.
type DockerSwarmReturn ¶ added in v0.0.12
type DockerSwarmReturn struct {
AnsibleCommonReturns
// Information about swarm.
SwarmFacts *map[string]any `json:"swarm_facts,omitempty"`
// Provides the actions done on the swarm.
Actions *[]string `json:"actions,omitempty"`
}
Return values for the `docker_swarm` Ansible module.
func DockerSwarmReturnFromRPCResult ¶ added in v0.0.12
func DockerSwarmReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerSwarmReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerSwarmReturn`
type DockerSwarmServiceEndpointMode ¶ added in v0.0.12
type DockerSwarmServiceEndpointMode string
Service endpoint mode. Corresponds to the `--endpoint-mode` option of `docker service create`.
const ( DockerSwarmServiceEndpointModeVip DockerSwarmServiceEndpointMode = "vip" DockerSwarmServiceEndpointModeDnsrr DockerSwarmServiceEndpointMode = "dnsrr" )
func OptionalDockerSwarmServiceEndpointMode ¶ added in v0.0.12
func OptionalDockerSwarmServiceEndpointMode[T interface {
*DockerSwarmServiceEndpointMode | DockerSwarmServiceEndpointMode | *string | string
}](s T) *DockerSwarmServiceEndpointMode
Convert a supported type to an optional (pointer) DockerSwarmServiceEndpointMode
type DockerSwarmServiceInfoParameters ¶ added in v0.0.12
type DockerSwarmServiceInfoParameters struct {
// The name of the service to inspect.
Name string `json:"name"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
// `Note:` this option is no longer supported for Docker SDK for Python 7.0.0+.
// Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an
// error.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by Docker SDK for Python
// and the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// Requires Docker SDK for Python 4.4.0 or newer.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode.
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_swarm_service_info` Ansible module.
func (DockerSwarmServiceInfoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerSwarmServiceInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerSwarmServiceInfoParameters into an `rpc.RPCCall`.
type DockerSwarmServiceInfoReturn ¶ added in v0.0.12
type DockerSwarmServiceInfoReturn struct {
AnsibleCommonReturns
// Returns whether the service exists.
Exists *bool `json:"exists,omitempty"`
// A dictionary representing the current state of the service. Matches the
// `docker service inspect` output.
// Will be `none` if service does not exist.
Service *map[string]any `json:"service,omitempty"`
}
Return values for the `docker_swarm_service_info` Ansible module.
func DockerSwarmServiceInfoReturnFromRPCResult ¶ added in v0.0.12
func DockerSwarmServiceInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerSwarmServiceInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerSwarmServiceInfoReturn`
type DockerSwarmServiceMode ¶ added in v0.0.12
type DockerSwarmServiceMode string
Service replication mode. Service will be removed and recreated when changed. Corresponds to the `--mode` option of `docker service create`. The value `replicated-job` was added in community.docker 4.7.0, and requires API version >= 1.41 and Docker SDK for Python >= 6.0.0.
const ( DockerSwarmServiceModeReplicated DockerSwarmServiceMode = "replicated" DockerSwarmServiceModeGlobal DockerSwarmServiceMode = "global" DockerSwarmServiceModeReplicatedJob DockerSwarmServiceMode = "replicated-job" )
func OptionalDockerSwarmServiceMode ¶ added in v0.0.12
func OptionalDockerSwarmServiceMode[T interface {
*DockerSwarmServiceMode | DockerSwarmServiceMode | *string | string
}](s T) *DockerSwarmServiceMode
Convert a supported type to an optional (pointer) DockerSwarmServiceMode
type DockerSwarmServiceParameters ¶ added in v0.0.12
type DockerSwarmServiceParameters struct {
// List arguments to be passed to the container.
// Corresponds to the `ARG` parameter of `docker service create`.
Args *[]string `json:"args,omitempty"`
// Command to execute when the container starts.
// A command may be either a string or a list or a list of strings.
// Corresponds to the `COMMAND` parameter of `docker service create`.
Command *any `json:"command,omitempty"`
// List of dictionaries describing the service configs.
// Corresponds to the `--config` option of `docker service create`.
// Requires API version >= 1.30.
Configs *struct {
ConfigId *string `json:"config_id,omitempty"`
ConfigName string `json:"config_name"`
Filename *string `json:"filename,omitempty"`
Uid *string `json:"uid,omitempty"`
Gid *string `json:"gid,omitempty"`
Mode *int `json:"mode,omitempty"`
} `json:"configs,omitempty"`
// Dictionary of key value pairs.
// Corresponds to the `--container-label` option of `docker service create`.
ContainerLabels *map[string]any `json:"container_labels,omitempty"`
// Dictionary of key, value pairs.
Sysctls *map[string]any `json:"sysctls,omitempty"`
// List of custom DNS servers.
// Corresponds to the `--dns` option of `docker service create`.
Dns *[]string `json:"dns,omitempty"`
// List of custom DNS search domains.
// Corresponds to the `--dns-search` option of `docker service create`.
DnsSearch *[]string `json:"dns_search,omitempty"`
// List of custom DNS options.
// Corresponds to the `--dns-option` option of `docker service create`.
DnsOptions *[]string `json:"dns_options,omitempty"`
// Service endpoint mode.
// Corresponds to the `--endpoint-mode` option of `docker service create`.
EndpointMode *DockerSwarmServiceEndpointMode `json:"endpoint_mode,omitempty"`
// List or dictionary of the service environment variables.
// If passed a list each items need to be in the format of `KEY=VALUE`.
// If passed a dictionary values which might be parsed as numbers, booleans or
// other types by the YAML parser must be quoted (for example `"true"`) in
// order to avoid data loss.
// Corresponds to the `--env` option of `docker service create`.
Env *any `json:"env,omitempty"`
// List of paths to files, present on the target, containing environment
// variables `FOO=BAR`.
// The order of the list is significant in determining the value assigned to a
// variable that shows up more than once.
// If variable also present in `env`, then `env` value will override.
EnvFiles *[]string `json:"env_files,omitempty"`
// Force update even if no changes require it.
// Corresponds to the `--force` option of `docker service update`.
// default: false
ForceUpdate *bool `json:"force_update,omitempty"`
// List of additional group names and/or IDs that the container process will
// run as.
// Corresponds to the `--group` option of `docker service update`.
Groups *[]string `json:"groups,omitempty"`
// Configure a check that is run to determine whether or not containers for
// this service are "healthy". See the docs for the `HEALTHCHECK Dockerfile
// instruction,https://docs.docker.com/engine/reference/builder/#healthcheck`
// for details on how healthchecks work.
// `healthcheck.interval`, `healthcheck.timeout`, and
// `healthcheck.start_period` are specified as durations. They accept duration
// as a string in a format that look like: `5h34m56s`, `1m30s`, and so on. The
// supported units are `us`, `ms`, `s`, `m` and `h`.
Healthcheck *struct {
Test *any `json:"test,omitempty"`
Interval *string `json:"interval,omitempty"`
Timeout *string `json:"timeout,omitempty"`
Retries *int `json:"retries,omitempty"`
StartPeriod *string `json:"start_period,omitempty"`
} `json:"healthcheck,omitempty"`
// Container hostname.
// Corresponds to the `--hostname` option of `docker service create`.
Hostname *string `json:"hostname,omitempty"`
// Dict of host-to-IP mappings, where each host name is a key in the
// dictionary. Each host name will be added to the container's /etc/hosts file.
// Corresponds to the `--host` option of `docker service create`.
Hosts *map[string]any `json:"hosts,omitempty"`
// Service image path and tag.
// Corresponds to the `IMAGE` parameter of `docker service create`.
Image *string `json:"image,omitempty"`
// Use an init inside each service container to forward signals and reap
// processes.
// Corresponds to the `--init` option of `docker service create`.
// Requires API version >= 1.37.
Init *bool `json:"init,omitempty"`
// Dictionary of key value pairs.
// Corresponds to the `--label` option of `docker service create`.
Labels *map[string]any `json:"labels,omitempty"`
// Configures service resource limits.
Limits *struct {
Cpus *float64 `json:"cpus,omitempty"`
Memory *string `json:"memory,omitempty"`
} `json:"limits,omitempty"`
// Logging configuration for the service.
Logging *struct {
Driver *string `json:"driver,omitempty"`
Options *map[string]any `json:"options,omitempty"`
} `json:"logging,omitempty"`
// Service replication mode.
// Service will be removed and recreated when changed.
// Corresponds to the `--mode` option of `docker service create`.
// The value `replicated-job` was added in community.docker 4.7.0, and requires
// API version >= 1.41 and Docker SDK for Python >= 6.0.0.
// default: DockerSwarmServiceModeReplicated
Mode *DockerSwarmServiceMode `json:"mode,omitempty"`
// List of dictionaries describing the service mounts.
// Corresponds to the `--mount` option of `docker service create`.
Mounts *struct {
Source *string `json:"source,omitempty"`
Target string `json:"target"`
Type *string `json:"type,omitempty"`
Readonly *bool `json:"readonly,omitempty"`
Labels *map[string]any `json:"labels,omitempty"`
Propagation *string `json:"propagation,omitempty"`
NoCopy *bool `json:"no_copy,omitempty"`
DriverConfig *struct {
Name *string `json:"name,omitempty"`
Options *map[string]any `json:"options,omitempty"`
} `json:"driver_config,omitempty"`
TmpfsSize *string `json:"tmpfs_size,omitempty"`
TmpfsMode *int `json:"tmpfs_mode,omitempty"`
} `json:"mounts,omitempty"`
// Service name.
// Corresponds to the `--name` option of `docker service create`.
Name string `json:"name"`
// List of the service networks names or dictionaries.
// When passed dictionaries valid sub-options are `name`, which is required,
// and `aliases` and `options`.
// Prior to API version 1.29, updating and removing networks is not supported.
// If changes are made the service will then be removed and recreated.
// Corresponds to the `--network` option of `docker service create`.
Networks *[]any `json:"networks,omitempty"`
// Configures service placement preferences and constraints.
Placement *struct {
Constraints *[]string `json:"constraints,omitempty"`
Preferences *map[string]any `json:"preferences,omitempty"`
ReplicasMaxPerNode *int `json:"replicas_max_per_node,omitempty"`
} `json:"placement,omitempty"`
// List of dictionaries describing the service published ports.
// Corresponds to the `--publish` option of `docker service create`.
Publish *struct {
PublishedPort *int `json:"published_port,omitempty"`
TargetPort int `json:"target_port"`
Protocol *string `json:"protocol,omitempty"`
Mode *string `json:"mode,omitempty"`
} `json:"publish,omitempty"`
// Mount the containers root filesystem as read only.
// Corresponds to the `--read-only` option of `docker service create`.
ReadOnly *bool `json:"read_only,omitempty"`
// Number of containers instantiated in the service. Valid only if
// `mode=replicated` or `mode=replicated-job`.
// If set to `-1`, and service is not present, service replicas will be set to
// `1`.
// If set to `-1`, and service is present, service replicas will be unchanged.
// Corresponds to the `--replicas` option of `docker service create`.
// default: -1
Replicas *int `json:"replicas,omitempty"`
// Configures service resource reservations.
Reservations *struct {
Cpus *float64 `json:"cpus,omitempty"`
Memory *string `json:"memory,omitempty"`
} `json:"reservations,omitempty"`
// If the current image digest should be resolved from registry and updated if
// changed.
// Requires API version >= 1.30.
// default: false
ResolveImage *bool `json:"resolve_image,omitempty"`
// Configures if and how to restart containers when they exit.
RestartConfig *struct {
Condition *string `json:"condition,omitempty"`
Delay *string `json:"delay,omitempty"`
MaxAttempts *int `json:"max_attempts,omitempty"`
Window *string `json:"window,omitempty"`
} `json:"restart_config,omitempty"`
// Configures how the service should be rolled back in case of a failing
// update.
RollbackConfig *struct {
Parallelism *int `json:"parallelism,omitempty"`
Delay *string `json:"delay,omitempty"`
FailureAction *string `json:"failure_action,omitempty"`
Monitor *string `json:"monitor,omitempty"`
MaxFailureRatio *float64 `json:"max_failure_ratio,omitempty"`
Order *string `json:"order,omitempty"`
} `json:"rollback_config,omitempty"`
// List of dictionaries describing the service secrets.
// Corresponds to the `--secret` option of `docker service create`.
Secrets *struct {
SecretId *string `json:"secret_id,omitempty"`
SecretName string `json:"secret_name"`
Filename *string `json:"filename,omitempty"`
Uid *string `json:"uid,omitempty"`
Gid *string `json:"gid,omitempty"`
Mode *int `json:"mode,omitempty"`
} `json:"secrets,omitempty"`
// `absent` - A service matching the specified name will be removed and have
// its tasks stopped.
// `present` - Asserts the existence of a service matching the name and
// provided configuration parameters. Unspecified configuration parameters will
// be set to docker defaults.
// default: DockerSwarmServiceStatePresent
State *DockerSwarmServiceState `json:"state,omitempty"`
// Time to wait before force killing a container.
// Accepts a duration as a string in a format that look like: `5h34m56s`,
// `1m30s`, and so on. The supported units are `us`, `ms`, `s`, `m` and `h`.
// Corresponds to the `--stop-grace-period` option of `docker service create`.
StopGracePeriod *string `json:"stop_grace_period,omitempty"`
// Override default signal used to stop the container.
// Corresponds to the `--stop-signal` option of `docker service create`.
StopSignal *string `json:"stop_signal,omitempty"`
// Allocate a pseudo-TTY.
// Corresponds to the `--tty` option of `docker service create`.
Tty *bool `json:"tty,omitempty"`
// Configures how the service should be updated. Useful for configuring rolling
// updates.
UpdateConfig *struct {
Parallelism *int `json:"parallelism,omitempty"`
Delay *string `json:"delay,omitempty"`
FailureAction *string `json:"failure_action,omitempty"`
Monitor *string `json:"monitor,omitempty"`
MaxFailureRatio *float64 `json:"max_failure_ratio,omitempty"`
Order *string `json:"order,omitempty"`
} `json:"update_config,omitempty"`
// Sets the username or UID used for the specified command.
// Before Ansible 2.8, the default value for this option was `root`.
// The default has been removed so that the user defined in the image is used
// if no user is specified here.
// Corresponds to the `--user` option of `docker service create`.
User *string `json:"user,omitempty"`
// Path to the working directory.
// Corresponds to the `--workdir` option of `docker service create`.
WorkingDir *string `json:"working_dir,omitempty"`
// List of capabilities to add to the container.
// Requires API version >= 1.41.
CapAdd *[]string `json:"cap_add,omitempty"`
// List of capabilities to drop from the container.
// Requires API version >= 1.41.
CapDrop *[]string `json:"cap_drop,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
// `Note:` this option is no longer supported for Docker SDK for Python 7.0.0+.
// Specifying it with Docker SDK for Python 7.0.0 or newer will lead to an
// error.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by Docker SDK for Python
// and the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// Requires Docker SDK for Python 4.4.0 or newer.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode.
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_swarm_service` Ansible module.
func (DockerSwarmServiceParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerSwarmServiceParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerSwarmServiceParameters into an `rpc.RPCCall`.
type DockerSwarmServiceReturn ¶ added in v0.0.12
type DockerSwarmServiceReturn struct {
AnsibleCommonReturns
// Dictionary of variables representing the current state of the service.
// Matches the module parameters format.
// Note that facts are not part of registered vars but accessible directly.
// Note that before Ansible 2.7.9, the return variable was documented as
// `ansible_swarm_service`, while the module actually returned a variable
// called `ansible_docker_service`. The variable was renamed to
// R`swarm_service` in both code and documentation for Ansible 2.7.9 and
// Ansible 2.8.0. In Ansible 2.7.x, the old name `ansible_docker_service` can
// still be used.
SwarmService *map[string]any `json:"swarm_service,omitempty"`
// List of changed service attributes if a service has been altered, []
// otherwise.
Changes *[]string `json:"changes,omitempty"`
// True if the service has been recreated (removed and created).
Rebuilt *bool `json:"rebuilt,omitempty"`
}
Return values for the `docker_swarm_service` Ansible module.
func DockerSwarmServiceReturnFromRPCResult ¶ added in v0.0.12
func DockerSwarmServiceReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerSwarmServiceReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerSwarmServiceReturn`
type DockerSwarmServiceState ¶ added in v0.0.12
type DockerSwarmServiceState string
`absent` - A service matching the specified name will be removed and have its tasks stopped. `present` - Asserts the existence of a service matching the name and provided configuration parameters. Unspecified configuration parameters will be set to docker defaults.
const ( DockerSwarmServiceStatePresent DockerSwarmServiceState = "present" DockerSwarmServiceStateAbsent DockerSwarmServiceState = "absent" )
func OptionalDockerSwarmServiceState ¶ added in v0.0.12
func OptionalDockerSwarmServiceState[T interface {
*DockerSwarmServiceState | DockerSwarmServiceState | *string | string
}](s T) *DockerSwarmServiceState
Convert a supported type to an optional (pointer) DockerSwarmServiceState
type DockerSwarmState ¶ added in v0.0.12
type DockerSwarmState string
Set to `present`, to create/update a new cluster. Set to `join`, to join an existing cluster. Set to `absent`, to leave an existing cluster. Set to `remove`, to remove an absent node from the cluster. Note that removing requires Docker SDK for Python >= 2.4.0. `community.docker.docker_node` can be used to demote a manager before removal.
const ( DockerSwarmStatePresent DockerSwarmState = "present" DockerSwarmStateJoin DockerSwarmState = "join" DockerSwarmStateAbsent DockerSwarmState = "absent" DockerSwarmStateRemove DockerSwarmState = "remove" )
func OptionalDockerSwarmState ¶ added in v0.0.12
func OptionalDockerSwarmState[T interface {
*DockerSwarmState | DockerSwarmState | *string | string
}](s T) *DockerSwarmState
Convert a supported type to an optional (pointer) DockerSwarmState
type DockerVolumeInfoParameters ¶ added in v0.0.12
type DockerVolumeInfoParameters struct {
// Name of the volume to inspect.
Name string `json:"name"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_volume_info` Ansible module.
func (DockerVolumeInfoParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerVolumeInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerVolumeInfoParameters into an `rpc.RPCCall`.
type DockerVolumeInfoReturn ¶ added in v0.0.12
type DockerVolumeInfoReturn struct {
AnsibleCommonReturns
// Returns whether the volume exists.
Exists *bool `json:"exists,omitempty"`
// Volume inspection results for the affected volume.
// Will be `none` if volume does not exist.
Volume *map[string]any `json:"volume,omitempty"`
}
Return values for the `docker_volume_info` Ansible module.
func DockerVolumeInfoReturnFromRPCResult ¶ added in v0.0.12
func DockerVolumeInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerVolumeInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerVolumeInfoReturn`
type DockerVolumeParameters ¶ added in v0.0.12
type DockerVolumeParameters struct {
// Name of the volume to operate on.
VolumeName string `json:"volume_name"`
// Specify the type of volume. Docker provides the `local` driver, but 3rd
// party drivers can also be used.
// default: "local"
Driver *string `json:"driver,omitempty"`
// Dictionary of volume settings. Consult the Docker documentation for valid
// options and values:
// `https://docs.docker.com/engine/reference/commandline/volume_create/#driver-
// specific-options`.
// default: {}
DriverOptions *map[string]any `json:"driver_options,omitempty"`
// Dictionary of label key/values to set for the volume.
Labels *map[string]any `json:"labels,omitempty"`
// Controls when a volume will be recreated when `state=present`. Please note
// that recreating an existing volume will cause `any data in the existing
// volume to be lost!` The volume will be deleted and a new volume with the
// same name will be created.
// The value `always` forces the volume to be always recreated.
// The value `never` makes sure the volume will not be recreated.
// The value `options-changed` makes sure the volume will be recreated if the
// volume already exist and the driver, driver options or labels differ.
// default: DockerVolumeRecreateNever
Recreate *DockerVolumeRecreate `json:"recreate,omitempty"`
// `absent` deletes the volume.
// `present` creates the volume, if it does not already exist.
// default: DockerVolumeStatePresent
State *DockerVolumeState `json:"state,omitempty"`
// The URL or Unix socket path used to connect to the Docker API. To connect to
// a remote host, provide the TCP connection string. For example,
// `tcp://192.0.2.23:2376`. If TLS is used to encrypt the connection, the
// module will automatically replace `tcp` in the connection URL with `https`.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_HOST` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: "unix:///var/run/docker.sock"
DockerHost *string `json:"docker_host,omitempty"`
// When verifying the authenticity of the Docker Host server, provide the
// expected name of the server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_HOSTNAME` will be used instead. If the environment variable is
// not set, the default value will be used.
// Note that this option had a default value `localhost` in older versions. It
// was removed in community.docker 3.0.0.
TlsHostname *string `json:"tls_hostname,omitempty"`
// The version of the Docker API running on the Docker Host.
// Defaults to the latest version of the API supported by this collection and
// the docker daemon.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_API_VERSION` will be used instead. If the environment variable is
// not set, the default value will be used.
// default: "auto"
ApiVersion *string `json:"api_version,omitempty"`
// The maximum amount of time in seconds to wait on a response from the API.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TIMEOUT` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: 60
Timeout *int `json:"timeout,omitempty"`
// Use a CA certificate when performing server verification by providing the
// path to a CA certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `ca.pem` from the directory specified in
// the environment variable `DOCKER_CERT_PATH` will be used.
// This option was called `ca_cert` and got renamed to `ca_path` in
// community.docker 3.6.0. The old name has been added as an alias and can
// still be used.
CaPath *string `json:"ca_path,omitempty"`
// Path to the client's TLS certificate file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `cert.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientCert *string `json:"client_cert,omitempty"`
// Path to the client's TLS key file.
// If the value is not specified in the task and the environment variable
// `DOCKER_CERT_PATH` is set, the file `key.pem` from the directory specified
// in the environment variable `DOCKER_CERT_PATH` will be used.
ClientKey *string `json:"client_key,omitempty"`
// Secure the connection to the API by using TLS without verifying the
// authenticity of the Docker host server. Note that if `validate_certs` is set
// to `true` as well, it will take precedence.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS` will be used instead. If the environment variable is not set,
// the default value will be used.
// default: false
Tls *bool `json:"tls,omitempty"`
// For SSH transports, use the `ssh` CLI tool instead of paramiko.
// default: false
UseSshClient *bool `json:"use_ssh_client,omitempty"`
// Secure the connection to the API by using TLS and verifying the authenticity
// of the Docker host server.
// If the value is not specified in the task, the value of environment variable
// `DOCKER_TLS_VERIFY` will be used instead. If the environment variable is not
// set, the default value will be used.
// default: false
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Debug mode
// default: false
Debug *bool `json:"debug,omitempty"`
}
Parameters for the `docker_volume` Ansible module.
func (DockerVolumeParameters) ToRPCCall ¶ added in v0.0.12
func (p DockerVolumeParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DockerVolumeParameters into an `rpc.RPCCall`.
type DockerVolumeRecreate ¶ added in v0.0.12
type DockerVolumeRecreate string
Controls when a volume will be recreated when `state=present`. Please note that recreating an existing volume will cause `any data in the existing volume to be lost!` The volume will be deleted and a new volume with the same name will be created. The value `always` forces the volume to be always recreated. The value `never` makes sure the volume will not be recreated. The value `options-changed` makes sure the volume will be recreated if the volume already exist and the driver, driver options or labels differ.
const ( DockerVolumeRecreateAlways DockerVolumeRecreate = "always" DockerVolumeRecreateNever DockerVolumeRecreate = "never" DockerVolumeRecreateOptionsChanged DockerVolumeRecreate = "options-changed" )
func OptionalDockerVolumeRecreate ¶ added in v0.0.12
func OptionalDockerVolumeRecreate[T interface {
*DockerVolumeRecreate | DockerVolumeRecreate | *string | string
}](s T) *DockerVolumeRecreate
Convert a supported type to an optional (pointer) DockerVolumeRecreate
type DockerVolumeReturn ¶ added in v0.0.12
type DockerVolumeReturn struct {
AnsibleCommonReturns
// Volume inspection results for the affected volume.
Volume *map[string]any `json:"volume,omitempty"`
}
Return values for the `docker_volume` Ansible module.
func DockerVolumeReturnFromRPCResult ¶ added in v0.0.12
func DockerVolumeReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DockerVolumeReturn, error)
Unwrap the `rpc.RPCResult` into an `DockerVolumeReturn`
type DockerVolumeState ¶ added in v0.0.12
type DockerVolumeState string
`absent` deletes the volume. `present` creates the volume, if it does not already exist.
const ( DockerVolumeStateAbsent DockerVolumeState = "absent" DockerVolumeStatePresent DockerVolumeState = "present" )
func OptionalDockerVolumeState ¶ added in v0.0.12
func OptionalDockerVolumeState[T interface {
*DockerVolumeState | DockerVolumeState | *string | string
}](s T) *DockerVolumeState
Convert a supported type to an optional (pointer) DockerVolumeState
type DpkgDivertParameters ¶ added in v0.0.7
type DpkgDivertParameters struct {
// The original and absolute path of the file to be diverted or undiverted.
// This path is unique, in other words it is not possible to get two diversions
// for the same `path`.
Path string `json:"path"`
// When `state=absent`, remove the diversion of the specified `path`; when
// `state=present`, create the diversion if it does not exist, or update its
// package `holder` or `divert` location, if it already exists.
// default: DpkgDivertStatePresent
State *DpkgDivertState `json:"state,omitempty"`
// The name of the package whose copy of file is not diverted, also known as
// the diversion holder or the package the diversion belongs to.
// The actual package does not have to be installed or even to exist for its
// name to be valid. If not specified, the diversion is hold by 'LOCAL', that
// is reserved by/for dpkg for local diversions.
// This parameter is ignored when `state=absent`.
Holder *string `json:"holder,omitempty"`
// The location where the versions of file will be diverted.
// Default is to add suffix `.distrib` to the file path.
// This parameter is ignored when `state=absent`.
Divert *string `json:"divert,omitempty"`
// Actually move the file aside (when `state=present`) or back (when
// `state=absent`), but only when changing the state of the diversion. This
// parameter has no effect when attempting to add a diversion that already
// exists or when removing an unexisting one.
// Unless `force=true`, renaming fails if the destination file already exists
// (this lock being a dpkg-divert feature, and bypassing it being a module
// feature).
// default: false
Rename *bool `json:"rename,omitempty"`
// When `rename=true` and `force=true`, renaming is performed even if the
// target of the renaming exists, in other words the existing contents of the
// file at this location will be lost.
// This parameter is ignored when `rename=false`.
// default: false
Force *bool `json:"force,omitempty"`
}
Parameters for the `dpkg_divert` Ansible module.
func (DpkgDivertParameters) ToRPCCall ¶ added in v0.0.7
func (p DpkgDivertParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DpkgDivertParameters into an `rpc.RPCCall`.
type DpkgDivertReturn ¶ added in v0.0.7
type DpkgDivertReturn struct {
AnsibleCommonReturns
// The dpkg-divert commands ran internally by the module.
Commands *[]string `json:"commands,omitempty"`
// The dpkg-divert relevant messages (stdout or stderr).
Messages *[]string `json:"messages,omitempty"`
// The status of the diversion after task execution.
Diversion *map[string]any `json:"diversion,omitempty"`
}
Return values for the `dpkg_divert` Ansible module.
func DpkgDivertReturnFromRPCResult ¶ added in v0.0.7
func DpkgDivertReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DpkgDivertReturn, error)
Unwrap the `rpc.RPCResult` into an `DpkgDivertReturn`
type DpkgDivertState ¶ added in v0.0.7
type DpkgDivertState string
When `state=absent`, remove the diversion of the specified `path`; when `state=present`, create the diversion if it does not exist, or update its package `holder` or `divert` location, if it already exists.
const ( DpkgDivertStateAbsent DpkgDivertState = "absent" DpkgDivertStatePresent DpkgDivertState = "present" )
func OptionalDpkgDivertState ¶ added in v0.0.7
func OptionalDpkgDivertState[T interface {
*DpkgDivertState | DpkgDivertState | *string | string
}](s T) *DpkgDivertState
Convert a supported type to an optional (pointer) DpkgDivertState
type DpkgSelectionsParameters ¶
type DpkgSelectionsParameters struct {
// Name of the package.
Name string `json:"name"`
// The selection state to set the package to.
Selection DpkgSelectionsSelection `json:"selection"`
}
Parameters for the `dpkg_selections` Ansible module.
func (DpkgSelectionsParameters) ToRPCCall ¶
func (p DpkgSelectionsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `DpkgSelectionsParameters into an `rpc.RPCCall`.
type DpkgSelectionsReturn ¶
type DpkgSelectionsReturn struct {
AnsibleCommonReturns
}
Return values for the `dpkg_selections` Ansible module.
func DpkgSelectionsReturnFromRPCResult ¶
func DpkgSelectionsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (DpkgSelectionsReturn, error)
Unwrap the `rpc.RPCResult` into an `DpkgSelectionsReturn`
type DpkgSelectionsSelection ¶ added in v0.0.7
type DpkgSelectionsSelection string
The selection state to set the package to.
const ( DpkgSelectionsSelectionInstall DpkgSelectionsSelection = "install" DpkgSelectionsSelectionHold DpkgSelectionsSelection = "hold" DpkgSelectionsSelectionDeinstall DpkgSelectionsSelection = "deinstall" DpkgSelectionsSelectionPurge DpkgSelectionsSelection = "purge" )
type ExpectParameters ¶
type ExpectParameters struct {
// The command module takes command to run.
Command string `json:"command"`
// A filename, when it already exists, this step will `not` be run.
Creates *string `json:"creates,omitempty"`
// A filename, when it does not exist, this step will `not` be run.
Removes *string `json:"removes,omitempty"`
// Change into this directory before running the command.
Chdir *string `json:"chdir,omitempty"`
// Mapping of prompt regular expressions and corresponding answer(s).
// Each key in `responses` is a Python regex
// `https://docs.python.org/3/library/re.html#regular-expression-syntax`.
// The value of each key is a string or list of strings. If the value is a
// string and the prompt is encountered multiple times, the answer will be
// repeated. Provide the value as a list to give different answers for
// successive matches.
Responses map[string]any `json:"responses"`
// Amount of time in seconds to wait for the expected strings. Use `null` to
// disable timeout.
// default: 30
Timeout *any `json:"timeout,omitempty"`
// Whether or not to echo out your response strings.
// default: false
Echo *bool `json:"echo,omitempty"`
}
Parameters for the `expect` Ansible module.
func (ExpectParameters) ToRPCCall ¶
func (p ExpectParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ExpectParameters into an `rpc.RPCCall`.
type ExpectReturn ¶
type ExpectReturn struct {
AnsibleCommonReturns
}
Return values for the `expect` Ansible module.
func ExpectReturnFromRPCResult ¶
func ExpectReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (ExpectReturn, error)
Unwrap the `rpc.RPCResult` into an `ExpectReturn`
type FacterFactsParameters ¶ added in v0.0.7
type FacterFactsParameters struct {
// Specifies arguments for facter.
Arguments *[]string `json:"arguments,omitempty"`
}
Parameters for the `facter_facts` Ansible module.
func (FacterFactsParameters) ToRPCCall ¶ added in v0.0.7
func (p FacterFactsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `FacterFactsParameters into an `rpc.RPCCall`.
type FacterFactsReturn ¶ added in v0.0.7
type FacterFactsReturn struct {
AnsibleCommonReturns
// Dictionary with one key `facter`.
AnsibleFacts *map[string]any `json:"ansible_facts,omitempty"`
}
Return values for the `facter_facts` Ansible module.
func FacterFactsReturnFromRPCResult ¶ added in v0.0.7
func FacterFactsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (FacterFactsReturn, error)
Unwrap the `rpc.RPCResult` into an `FacterFactsReturn`
type FacterParameters ¶ added in v0.0.7
type FacterParameters struct {
// Specifies arguments for facter.
Arguments *[]string `json:"arguments,omitempty"`
}
Parameters for the `facter` Ansible module.
func (FacterParameters) ToRPCCall ¶ added in v0.0.7
func (p FacterParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `FacterParameters into an `rpc.RPCCall`.
type FacterReturn ¶ added in v0.0.7
type FacterReturn struct {
AnsibleCommonReturns
}
Return values for the `facter` Ansible module.
func FacterReturnFromRPCResult ¶ added in v0.0.7
func FacterReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (FacterReturn, error)
Unwrap the `rpc.RPCResult` into an `FacterReturn`
type FileParameters ¶
type FileParameters struct {
// Path to the file being managed.
Path string `json:"path"`
// If `absent`, directories will be recursively deleted, and files or symlinks
// will be unlinked. In the case of a directory, if `diff` is declared, you
// will see the files and folders deleted listed under `path_contents`. Note
// that `absent` will not cause `ansible.builtin.file` to fail if the `path`
// does not exist as the state did not change.
// If `directory`, all intermediate subdirectories will be created if they do
// not exist. Since Ansible 1.7 they will be created with the supplied
// permissions.
// If `file`, with no other options, returns the current state of `path`.
// If `file`, even with other options (such as `mode`), the file will be
// modified if it exists but will NOT be created if it does not exist. Set to
// `touch` or use the `ansible.builtin.copy` or `ansible.builtin.template`
// module if you want to create the file if it does not exist.
// If `hard`, the hard link will be created or changed.
// If `link`, the symbolic link will be created or changed.
// If `touch` (new in 1.4), an empty file will be created if the file does not
// exist, while an existing file or directory will receive updated file access
// and modification times (similar to the way `touch` works from the command
// line).
// Default is the current state of the file if it exists, `directory` if
// `recurse=yes`, or `file` otherwise.
State *FileState `json:"state,omitempty"`
// Path of the file to link to.
// This applies only to `state=link` and `state=hard`.
// For `state=link`, this will also accept a non-existing path.
// Relative paths are relative to the file being created (`path`) which is how
// the Unix command `ln -s SRC DEST` treats relative paths.
Src *string `json:"src,omitempty"`
// Recursively set the specified file attributes on directory contents.
// This applies only when `state` is set to `directory`.
// default: false
Recurse *bool `json:"recurse,omitempty"`
// Force the creation of the links in two cases: if the link type is symbolic
// and the source file does not exist (but will appear later); the destination
// exists and is a file (so, we need to unlink the `path` file and create a
// link to the `src` file in place of it).
// default: false
Force *bool `json:"force,omitempty"`
// This flag indicates that filesystem links, if they exist, should be
// followed.
// `follow=yes` and `state=link` can modify `src` when combined with parameters
// such as `mode`.
// Previous to Ansible 2.5, this was `false` by default.
// While creating a symlink with a non-existent destination, set `follow=false`
// to avoid a warning message related to permission issues. The warning message
// is added to notify the user that we can not set permissions to the non-
// existent destination.
// default: true
Follow *bool `json:"follow,omitempty"`
// This parameter indicates the time the file's modification time should be set
// to.
// Should be `preserve` when no modification is required, `YYYYMMDDHHMM.SS`
// when using default time format, or `now`.
// Default is None meaning that `preserve` is the default for
// `state=[file,directory,link,hard]` and `now` is default for `state=touch`.
ModificationTime *string `json:"modification_time,omitempty"`
// When used with `modification_time`, indicates the time format that must be
// used.
// Based on default Python format (see time.strftime doc).
// default: "%Y%m%d%H%M.%S"
ModificationTimeFormat *string `json:"modification_time_format,omitempty"`
// This parameter indicates the time the file's access time should be set to.
// Should be `preserve` when no modification is required, `YYYYMMDDHHMM.SS`
// when using default time format, or `now`.
// Default is `None` meaning that `preserve` is the default for
// `state=[file,directory,link,hard]` and `now` is default for `state=touch`.
AccessTime *string `json:"access_time,omitempty"`
// When used with `access_time`, indicates the time format that must be used.
// Based on default Python format (see time.strftime doc).
// default: "%Y%m%d%H%M.%S"
AccessTimeFormat *string `json:"access_time_format,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
}
Parameters for the `file` Ansible module.
func (FileParameters) ToRPCCall ¶
func (p FileParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `FileParameters into an `rpc.RPCCall`.
type FileReturn ¶
type FileReturn struct {
AnsibleCommonReturns
// Destination file/path, equal to the value passed to `path`.
Dest *string `json:"dest,omitempty"`
// Destination file/path, equal to the value passed to `path`.
Path *string `json:"path,omitempty"`
}
Return values for the `file` Ansible module.
func FileReturnFromRPCResult ¶
func FileReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (FileReturn, error)
Unwrap the `rpc.RPCResult` into an `FileReturn`
type FileState ¶ added in v0.0.7
type FileState string
If `absent`, directories will be recursively deleted, and files or symlinks will be unlinked. In the case of a directory, if `diff` is declared, you will see the files and folders deleted listed under `path_contents`. Note that `absent` will not cause `ansible.builtin.file` to fail if the `path` does not exist as the state did not change. If `directory`, all intermediate subdirectories will be created if they do not exist. Since Ansible 1.7 they will be created with the supplied permissions. If `file`, with no other options, returns the current state of `path`. If `file`, even with other options (such as `mode`), the file will be modified if it exists but will NOT be created if it does not exist. Set to `touch` or use the `ansible.builtin.copy` or `ansible.builtin.template` module if you want to create the file if it does not exist. If `hard`, the hard link will be created or changed. If `link`, the symbolic link will be created or changed. If `touch` (new in 1.4), an empty file will be created if the file does not exist, while an existing file or directory will receive updated file access and modification times (similar to the way `touch` works from the command line). Default is the current state of the file if it exists, `directory` if `recurse=yes`, or `file` otherwise.
type FilesizeParameters ¶ added in v0.0.7
type FilesizeParameters struct {
// Path of the regular file to create or resize.
Path string `json:"path"`
// Requested size of the file.
// The value is a number (either `int` or `float`) optionally followed by a
// multiplicative suffix, that can be one of `B` (bytes), `KB` or `kB` (=
// 1000B), `MB` or `mB` (= 1000kB), `GB` or `gB` (= 1000MB), and so on for `T`,
// `P`, `E`, `Z` and `Y`; or alternatively one of `K`, `k` or `KiB` (= 1024B);
// `M`, `m` or `MiB` (= 1024KiB); `G`, `g` or `GiB` (= 1024MiB); and so on.
// If the multiplicative suffix is not provided, the value is treated as an
// integer number of blocks of `blocksize` bytes each (float values are rounded
// to the closest integer).
// When the `size` value is equal to the current file size, does nothing.
// When the `size` value is bigger than the current file size, bytes from
// `source` (if `sparse` is not `false`) are appended to the file without
// truncating it, in other words, without modifying the existing bytes of the
// file.
// When the `size` value is smaller than the current file size, it is truncated
// to the requested value without modifying bytes before this value.
// That means that a file of any arbitrary size can be grown to any other
// arbitrary size, and then resized down to its initial size without modifying
// its initial content.
Size any `json:"size"`
// Size of blocks, in bytes if not followed by a multiplicative suffix.
// The numeric value (before the unit) `MUST` be an integer (or a `float` if it
// equals an integer).
// If not set, the size of blocks is guessed from the OS and commonly results
// in `512` or `4096` bytes, that is used internally by the module or when
// `size` has no unit.
Blocksize *any `json:"blocksize,omitempty"`
// Device or file that provides input data to provision the file.
// This parameter is ignored when `sparse=true`.
// default: "/dev/zero"
Source *string `json:"source,omitempty"`
// Whether or not to overwrite the file if it exists, in other words, to
// truncate it from 0. When `true`, the module is not idempotent, that means it
// always reports `changed=true`.
// `force=true` and `sparse=true` are mutually exclusive.
// default: false
Force *bool `json:"force,omitempty"`
// Whether or not the file to create should be a sparse file.
// This option is effective only on newly created files, or when growing a
// file, only for the bytes to append.
// This option is not supported on OSes or filesystems not supporting sparse
// files.
// `force=true` and `sparse=true` are mutually exclusive.
// default: false
Sparse *bool `json:"sparse,omitempty"`
// This option is silently ignored. This module always modifies file size in-
// place.
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
}
Parameters for the `filesize` Ansible module.
func (FilesizeParameters) ToRPCCall ¶ added in v0.0.7
func (p FilesizeParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `FilesizeParameters into an `rpc.RPCCall`.
type FilesizeReturn ¶ added in v0.0.7
type FilesizeReturn struct {
AnsibleCommonReturns
// Command executed to create or resize the file.
Cmd *string `json:"cmd,omitempty"`
// Dictionary of sizes related to the file.
Filesize *map[string]any `json:"filesize,omitempty"`
// Difference (positive or negative) between old size and new size, in bytes.
SizeDiff *int `json:"size_diff,omitempty"`
// Realpath of the file if it is a symlink, otherwise the same than module's
// param.
Path *string `json:"path,omitempty"`
}
Return values for the `filesize` Ansible module.
func FilesizeReturnFromRPCResult ¶ added in v0.0.7
func FilesizeReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (FilesizeReturn, error)
Unwrap the `rpc.RPCResult` into an `FilesizeReturn`
type FilesystemFstype ¶ added in v0.0.7
type FilesystemFstype string
Filesystem type to be created. This option is required with `state=present` (or if `state` is omitted). Ufs support has been added in community.general 3.4.0. Bcachefs support has been added in community.general 8.6.0.
const ( FilesystemFstypeBcachefs FilesystemFstype = "bcachefs" FilesystemFstypeBtrfs FilesystemFstype = "btrfs" FilesystemFstypeExt2 FilesystemFstype = "ext2" FilesystemFstypeExt3 FilesystemFstype = "ext3" FilesystemFstypeExt4 FilesystemFstype = "ext4" FilesystemFstypeExt4dev FilesystemFstype = "ext4dev" FilesystemFstypeF2fs FilesystemFstype = "f2fs" FilesystemFstypeLvm FilesystemFstype = "lvm" FilesystemFstypeOcfs2 FilesystemFstype = "ocfs2" FilesystemFstypeReiserfs FilesystemFstype = "reiserfs" FilesystemFstypeXfs FilesystemFstype = "xfs" FilesystemFstypeVfat FilesystemFstype = "vfat" FilesystemFstypeSwap FilesystemFstype = "swap" FilesystemFstypeUfs FilesystemFstype = "ufs" )
func OptionalFilesystemFstype ¶ added in v0.0.7
func OptionalFilesystemFstype[T interface {
*FilesystemFstype | FilesystemFstype | *string | string
}](s T) *FilesystemFstype
Convert a supported type to an optional (pointer) FilesystemFstype
type FilesystemParameters ¶ added in v0.0.7
type FilesystemParameters struct {
// If `state=present`, the filesystem is created if it does not already exist,
// that is the default behaviour if `state` is omitted.
// If `state=absent`, filesystem signatures on `dev` are wiped if it contains a
// filesystem (as known by `blkid`).
// When `state=absent`, all other options but `dev` are ignored, and the module
// does not fail if the device `dev` does not actually exist.
// default: FilesystemStatePresent
State *FilesystemState `json:"state,omitempty"`
// Filesystem type to be created. This option is required with `state=present`
// (or if `state` is omitted).
// Ufs support has been added in community.general 3.4.0.
// Bcachefs support has been added in community.general 8.6.0.
Fstype *FilesystemFstype `json:"fstype,omitempty"`
// Target path to block device (Linux) or character device (FreeBSD) or regular
// file (both).
// When setting Linux-specific filesystem types on FreeBSD, this module only
// works when applying to regular files, aka disk images.
// Currently `lvm` (Linux-only) and `ufs` (FreeBSD-only) do not support a
// regular file as their target `dev`.
// Support for character devices on FreeBSD has been added in community.general
// 3.4.0.
Dev string `json:"dev"`
// If `true`, allows to create new filesystem on devices that already has
// filesystem.
// default: false
Force *bool `json:"force,omitempty"`
// If `true`, if the block device and filesystem size differ, grow the
// filesystem into the space.
// Supported for `bcachefs`, `btrfs`, `ext2`, `ext3`, `ext4`, `ext4dev`,
// `f2fs`, `lvm`, `xfs`, `ufs` and `vfat` filesystems. Attempts to resize other
// filesystem types will fail.
// XFS Will only grow if mounted. Currently, the module is based on commands
// from `util-linux` package to perform operations, so resizing of XFS is not
// supported on FreeBSD systems.
// VFAT will likely fail if `fatresize < 1.04`.
// Mutually exclusive with `uuid`.
// default: false
Resizefs *bool `json:"resizefs,omitempty"`
// List of options to be passed to `mkfs` command.
Opts *string `json:"opts,omitempty"`
// Set filesystem's UUID to the given value.
// The UUID options specified in `opts` take precedence over this value.
// See xfs_admin(8) (`xfs`), tune2fs(8) (`ext2`, `ext3`, `ext4`, `ext4dev`) for
// possible values.
// For `fstype=lvm` the value is ignored, it resets the PV UUID if set.
// Supported for `fstype` being one of `bcachefs`, `ext2`, `ext3`, `ext4`,
// `ext4dev`, `lvm`, or `xfs`.
// This is `not idempotent`. Specifying this option will always result in a
// change.
// Mutually exclusive with `resizefs`.
Uuid *string `json:"uuid,omitempty"`
}
Parameters for the `filesystem` Ansible module.
func (FilesystemParameters) ToRPCCall ¶ added in v0.0.7
func (p FilesystemParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `FilesystemParameters into an `rpc.RPCCall`.
type FilesystemReturn ¶ added in v0.0.7
type FilesystemReturn struct {
AnsibleCommonReturns
}
Return values for the `filesystem` Ansible module.
func FilesystemReturnFromRPCResult ¶ added in v0.0.7
func FilesystemReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (FilesystemReturn, error)
Unwrap the `rpc.RPCResult` into an `FilesystemReturn`
type FilesystemState ¶ added in v0.0.7
type FilesystemState string
If `state=present`, the filesystem is created if it does not already exist, that is the default behaviour if `state` is omitted. If `state=absent`, filesystem signatures on `dev` are wiped if it contains a filesystem (as known by `blkid`). When `state=absent`, all other options but `dev` are ignored, and the module does not fail if the device `dev` does not actually exist.
const ( FilesystemStatePresent FilesystemState = "present" FilesystemStateAbsent FilesystemState = "absent" )
func OptionalFilesystemState ¶ added in v0.0.7
func OptionalFilesystemState[T interface {
*FilesystemState | FilesystemState | *string | string
}](s T) *FilesystemState
Convert a supported type to an optional (pointer) FilesystemState
type FindAgeStamp ¶ added in v0.0.7
type FindAgeStamp string
Choose the file property against which we compare age.
const ( FindAgeStampAtime FindAgeStamp = "atime" FindAgeStampCtime FindAgeStamp = "ctime" FindAgeStampMtime FindAgeStamp = "mtime" )
func OptionalFindAgeStamp ¶ added in v0.0.7
func OptionalFindAgeStamp[T interface {
*FindAgeStamp | FindAgeStamp | *string | string
}](s T) *FindAgeStamp
Convert a supported type to an optional (pointer) FindAgeStamp
type FindFileType ¶ added in v0.0.7
type FindFileType string
Type of file to select. The `link` and `any` choices were added in Ansible 2.3.
const ( FindFileTypeAny FindFileType = "any" FindFileTypeDirectory FindFileType = "directory" FindFileTypeFile FindFileType = "file" FindFileTypeLink FindFileType = "link" )
func OptionalFindFileType ¶ added in v0.0.7
func OptionalFindFileType[T interface {
*FindFileType | FindFileType | *string | string
}](s T) *FindFileType
Convert a supported type to an optional (pointer) FindFileType
type FindParameters ¶
type FindParameters struct {
// Select files whose age is equal to or greater than the specified time.
// Use a negative age to find files equal to or less than the specified time.
// You can choose seconds, minutes, hours, days, or weeks by specifying the
// first letter of any of those words (e.g., "1w").
Age *string `json:"age,omitempty"`
// One or more (shell or regex) patterns, which type is controlled by
// `use_regex` option.
// The patterns restrict the list of files to be returned to those whose
// basenames match at least one of the patterns specified. Multiple patterns
// can be specified using a list.
// The pattern is matched against the file base name, excluding the directory.
// When using regexen, the pattern MUST match the ENTIRE file name, not just
// parts of it. So if you are looking to match all files ending in .default,
// you'd need to use `.*\.default` as a regexp and not just `\.default`.
// This parameter expects a list, which can be either comma separated or YAML.
// If any of the patterns contain a comma, make sure to put them in a list to
// avoid splitting the patterns in undesirable ways.
// Defaults to `*` when `use_regex=False`, or `.*` when `use_regex=True`.
// default: []
Patterns *[]string `json:"patterns,omitempty"`
// One or more (shell or regex) patterns, which type is controlled by
// `use_regex` option.
// Items whose basenames match an `excludes` pattern are culled from `patterns`
// matches. Multiple patterns can be specified using a list.
Excludes *[]string `json:"excludes,omitempty"`
// A regular expression or pattern which should be matched against the file
// content.
// If `read_whole_file=false` it matches against the beginning of the line
// (uses `re.match(\`)). If `read_whole_file=true`, it searches anywhere for
// that pattern (uses `re.search(\`)).
// Works only when `file_type` is `file`.
Contains *string `json:"contains,omitempty"`
// When doing a `contains` search, determines whether the whole file should be
// read into memory or if the regex should be applied to the file line-by-line.
// Setting this to `true` can have performance and memory implications for
// large files.
// This uses `re.search(\`) instead of `re.match(\`).
// default: false
ReadWholeFile *bool `json:"read_whole_file,omitempty"`
// List of paths of directories to search. All paths must be fully qualified.
// From ansible-core 2.18 and onwards, the data type has changed from `str` to
// `path`.
Paths []string `json:"paths"`
// Type of file to select.
// The `link` and `any` choices were added in Ansible 2.3.
// default: FindFileTypeFile
FileType *FindFileType `json:"file_type,omitempty"`
// If target is a directory, recursively descend into the directory looking for
// files.
// default: false
Recurse *bool `json:"recurse,omitempty"`
// Select files whose size is equal to or greater than the specified size.
// Use a negative size to find files equal to or less than the specified size.
// Unqualified values are in bytes but b, k, m, g, and t can be appended to
// specify bytes, kilobytes, megabytes, gigabytes, and terabytes, respectively.
// Size is not evaluated for directories.
Size *string `json:"size,omitempty"`
// Choose the file property against which we compare age.
// default: FindAgeStampMtime
AgeStamp *FindAgeStamp `json:"age_stamp,omitempty"`
// Set this to `true` to include hidden files, otherwise they will be ignored.
// default: false
Hidden *bool `json:"hidden,omitempty"`
// Choose objects matching a specified permission. This value is restricted to
// modes that can be applied using the python `os.chmod` function.
// The mode can be provided as an octal such as `"0644"` or as symbolic such as
// `u=rw,g=r,o=r`.
Mode *any `json:"mode,omitempty"`
// Restrict mode matching to exact matches only, and not as a minimum set of
// permissions to match.
// default: true
ExactMode *bool `json:"exact_mode,omitempty"`
// Set this to `true` to follow symlinks in path for systems with python 2.6+.
// default: false
Follow *bool `json:"follow,omitempty"`
// Set this to `true` to retrieve a file's SHA1 checksum.
// default: false
GetChecksum *bool `json:"get_checksum,omitempty"`
// If `false`, the patterns are file globs (shell).
// If `true`, they are python regexes.
// default: false
UseRegex *bool `json:"use_regex,omitempty"`
// Set the maximum number of levels to descend into.
// Setting `recurse=false` will override this value, which is effectively depth
// 1.
// Default is unlimited depth.
Depth *int `json:"depth,omitempty"`
// When doing a `contains` search, determine the encoding of the files to be
// searched.
Encoding *string `json:"encoding,omitempty"`
// Limit the maximum number of matching paths returned. After finding this
// many, the find action will stop looking.
// Matches are made from the top, down (i.e. shallowest directory first).
// If not set, or set to v(null), it will do unlimited matches.
// Default is unlimited matches.
Limit *int `json:"limit,omitempty"`
}
Parameters for the `find` Ansible module.
func (FindParameters) ToRPCCall ¶
func (p FindParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `FindParameters into an `rpc.RPCCall`.
type FindReturn ¶
type FindReturn struct {
AnsibleCommonReturns
// All matches found with the specified criteria (see stat module for full
// output of each dictionary)
Files *[]any `json:"files,omitempty"`
// Number of matches
Matched *int `json:"matched,omitempty"`
// Number of filesystem objects looked at
Examined *int `json:"examined,omitempty"`
// skipped paths and reasons they were skipped
SkippedPaths *map[string]any `json:"skipped_paths,omitempty"`
}
Return values for the `find` Ansible module.
func FindReturnFromRPCResult ¶
func FindReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (FindReturn, error)
Unwrap the `rpc.RPCResult` into an `FindReturn`
type FirewalldInfoParameters ¶ added in v0.0.7
type FirewalldInfoParameters struct {
// Gather information about active zones.
// default: false
ActiveZones *bool `json:"active_zones,omitempty"`
// Gather information about specific zones.
// If only works if `active_zones=false`.
Zones *[]string `json:"zones,omitempty"`
}
Parameters for the `firewalld_info` Ansible module.
func (FirewalldInfoParameters) ToRPCCall ¶ added in v0.0.7
func (p FirewalldInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `FirewalldInfoParameters into an `rpc.RPCCall`.
type FirewalldInfoReturn ¶ added in v0.0.7
type FirewalldInfoReturn struct {
AnsibleCommonReturns
// Gather active zones only if turn it `true`.
ActiveZones *bool `json:"active_zones,omitempty"`
// A list of collected zones.
CollectedZones *[]any `json:"collected_zones,omitempty"`
// A list of undefined zones in `zones` option.
// `undefined_zones` will be ignored for gathering process.
UndefinedZones *[]any `json:"undefined_zones,omitempty"`
// Returns various information about firewalld configuration.
FirewalldInfo *any `json:"firewalld_info,omitempty"`
}
Return values for the `firewalld_info` Ansible module.
func FirewalldInfoReturnFromRPCResult ¶ added in v0.0.7
func FirewalldInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (FirewalldInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `FirewalldInfoReturn`
type FirewalldParameters ¶ added in v0.0.7
type FirewalldParameters struct {
// Name of a service to add/remove to/from firewalld.
// The service must be listed in output of `firewall-cmd --get-services`.
Service *string `json:"service,omitempty"`
// Name of a protocol to add/remove to/from firewalld.
Protocol *string `json:"protocol,omitempty"`
// Name of a port or port range to add/remove to/from firewalld.
// Must be in the form PORT/PROTOCOL or PORT-PORT/PROTOCOL for port ranges.
Port *string `json:"port,omitempty"`
// Port and protocol to forward using firewalld.
PortForward *struct {
Port string `json:"port"`
Proto string `json:"proto"`
Toport string `json:"toport"`
Toaddr *string `json:"toaddr,omitempty"`
} `json:"port_forward,omitempty"`
// Rich rule to add/remove to/from firewalld.
// See `Syntax for firewalld rich language
// rules,https://firewalld.org/documentation/man-
// pages/firewalld.richlanguage.html`.
RichRule *string `json:"rich_rule,omitempty"`
// The source/network you would like to add/remove to/from firewalld.
Source *string `json:"source,omitempty"`
// The interface you would like to add/remove to/from a zone in firewalld.
Interface *string `json:"interface,omitempty"`
// The ICMP block you would like to add/remove to/from a zone in firewalld.
IcmpBlock *string `json:"icmp_block,omitempty"`
// Enable/Disable inversion of ICMP blocks for a zone in firewalld.
// Note that the option type is changed to bool in ansible.posix version 2.0.0
// and later.
IcmpBlockInversion *bool `json:"icmp_block_inversion,omitempty"`
// The firewalld zone to add/remove to/from.
// Note that the default zone can be configured per system but `public` is
// default from upstream.
// Available choices can be extended based on per-system configs, listed here
// are "out of the box" defaults.
// Possible values include `block`, `dmz`, `drop`, `external`, `home`,
// `internal`, `public`, `trusted`, `work`.
Zone *string `json:"zone,omitempty"`
// Whether to apply this change to the permanent firewalld configuration.
// As of Ansible 2.3, permanent operations can operate on firewalld configs
// when it is not running (requires firewalld >= 0.3.9).
// Note that if this is `false`, `immediate=true` by default.
// default: false
Permanent *bool `json:"permanent,omitempty"`
// Whether to apply this change to the runtime firewalld configuration.
// Defaults to `true` if `permanent=false`.
// default: false
Immediate *bool `json:"immediate,omitempty"`
// Enable or disable a setting.
// For ports: Should this port accept (`enabled`) or reject (`disabled`)
// connections.
// The states `present` and `absent` can only be used in zone level operations
// (i.e. when no other parameters but zone and state are set).
State FirewalldState `json:"state"`
// The amount of time in seconds the rule should be in effect for when non-
// permanent.
// default: 0
Timeout *int `json:"timeout,omitempty"`
// The forward setting you would like to enable/disable to/from zones within
// firewalld.
// This option only is supported by firewalld v0.9.0 or later.
// Note that the option type is changed to bool in ansible.posix version 2.0.0
// and later.
Forward *bool `json:"forward,omitempty"`
// The masquerade setting you would like to enable/disable to/from zones within
// firewalld.
// Note that the option type is changed to bool in ansible.posix version 2.0.0
// and later.
Masquerade *bool `json:"masquerade,omitempty"`
// Ignores `immediate` if `permanent=true` and firewalld is not running.
// default: false
Offline *bool `json:"offline,omitempty"`
// firewalld Zone target.
// If `state=absent`, this will reset the target to default.
Target *FirewalldTarget `json:"target,omitempty"`
}
Parameters for the `firewalld` Ansible module.
func (FirewalldParameters) ToRPCCall ¶ added in v0.0.7
func (p FirewalldParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `FirewalldParameters into an `rpc.RPCCall`.
type FirewalldReturn ¶ added in v0.0.7
type FirewalldReturn struct {
AnsibleCommonReturns
}
Return values for the `firewalld` Ansible module.
func FirewalldReturnFromRPCResult ¶ added in v0.0.7
func FirewalldReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (FirewalldReturn, error)
Unwrap the `rpc.RPCResult` into an `FirewalldReturn`
type FirewalldState ¶ added in v0.0.7
type FirewalldState string
Enable or disable a setting. For ports: Should this port accept (`enabled`) or reject (`disabled`) connections. The states `present` and `absent` can only be used in zone level operations (i.e. when no other parameters but zone and state are set).
const ( FirewalldStateAbsent FirewalldState = "absent" FirewalldStateDisabled FirewalldState = "disabled" FirewalldStateEnabled FirewalldState = "enabled" FirewalldStatePresent FirewalldState = "present" )
type FirewalldTarget ¶ added in v0.0.7
type FirewalldTarget string
firewalld Zone target. If `state=absent`, this will reset the target to default.
const ( FirewalldTargetDefault FirewalldTarget = "default" FirewalldTargetAccept FirewalldTarget = "ACCEPT" FirewalldTargetDrop FirewalldTarget = "DROP" FirewalldTargetReject FirewalldTarget = "%%REJECT%%" )
func OptionalFirewalldTarget ¶ added in v0.0.7
func OptionalFirewalldTarget[T interface {
*FirewalldTarget | FirewalldTarget | *string | string
}](s T) *FirewalldTarget
Convert a supported type to an optional (pointer) FirewalldTarget
type FlatpakMethod ¶ added in v0.0.7
type FlatpakMethod string
The installation method to use. Defines if the `flatpak` is supposed to be installed globally for the whole `system` or only for the current `user`.
const ( FlatpakMethodSystem FlatpakMethod = "system" FlatpakMethodUser FlatpakMethod = "user" )
func OptionalFlatpakMethod ¶ added in v0.0.7
func OptionalFlatpakMethod[T interface {
*FlatpakMethod | FlatpakMethod | *string | string
}](s T) *FlatpakMethod
Convert a supported type to an optional (pointer) FlatpakMethod
type FlatpakParameters ¶ added in v0.0.7
type FlatpakParameters struct {
// The path to the `flatpak` executable to use.
// By default, this module looks for the `flatpak` executable on the path.
// default: "flatpak"
Executable *string `json:"executable,omitempty"`
// The installation method to use.
// Defines if the `flatpak` is supposed to be installed globally for the whole
// `system` or only for the current `user`.
// default: FlatpakMethodSystem
Method *FlatpakMethod `json:"method,omitempty"`
// The name of the flatpak to manage. To operate on several packages this can
// accept a list of packages.
// When used with `state=present`, `name` can be specified as a URL to a
// `flatpakref` file or the unique reverse DNS name that identifies a flatpak.
// Both `https://` and `http://` URLs are supported.
// When supplying a reverse DNS name, you can use the `remote` option to
// specify on what remote to look for the flatpak. An example for a reverse DNS
// name is `org.gnome.gedit`.
// When used with `state=absent` or `state=latest`, it is recommended to
// specify the name in the reverse DNS format.
// When supplying a URL with `state=absent` or `state=latest`, the module will
// try to match the installed flatpak based on the name of the flatpakref to
// remove or update it. However, there is no guarantee that the names of the
// flatpakref file and the reverse DNS name of the installed flatpak do match.
Name []string `json:"name"`
// If installing runtime dependencies should be omitted or not.
// This parameter is primarily implemented for integration testing this module.
// There might however be some use cases where you would want to have this,
// like when you are packaging your own flatpaks.
// default: false
NoDependencies *bool `json:"no_dependencies,omitempty"`
// The flatpak remote (repository) to install the flatpak from.
// By default, `flathub` is assumed, but you do need to add the flathub
// flatpak_remote before you can use this.
// See the `community.general.flatpak_remote` module for managing flatpak
// remotes.
// default: "flathub"
Remote *string `json:"remote,omitempty"`
// Indicates the desired package state.
// The value `latest` is supported since community.general 8.6.0.
// default: FlatpakStatePresent
State *FlatpakState `json:"state,omitempty"`
}
Parameters for the `flatpak` Ansible module.
func (FlatpakParameters) ToRPCCall ¶ added in v0.0.7
func (p FlatpakParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `FlatpakParameters into an `rpc.RPCCall`.
type FlatpakReturn ¶ added in v0.0.7
type FlatpakReturn struct {
AnsibleCommonReturns
// The exact flatpak command that was executed.
Command *string `json:"command,omitempty"`
// Module error message.
Msg *string `json:"msg,omitempty"`
// Return code from flatpak binary.
Rc *int `json:"rc,omitempty"`
// Error output from flatpak binary.
Stderr *string `json:"stderr,omitempty"`
// Output from flatpak binary.
Stdout *string `json:"stdout,omitempty"`
}
Return values for the `flatpak` Ansible module.
func FlatpakReturnFromRPCResult ¶ added in v0.0.7
func FlatpakReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (FlatpakReturn, error)
Unwrap the `rpc.RPCResult` into an `FlatpakReturn`
type FlatpakState ¶ added in v0.0.7
type FlatpakState string
Indicates the desired package state. The value `latest` is supported since community.general 8.6.0.
const ( FlatpakStateAbsent FlatpakState = "absent" FlatpakStatePresent FlatpakState = "present" FlatpakStateLatest FlatpakState = "latest" )
func OptionalFlatpakState ¶ added in v0.0.7
func OptionalFlatpakState[T interface {
*FlatpakState | FlatpakState | *string | string
}](s T) *FlatpakState
Convert a supported type to an optional (pointer) FlatpakState
type Gconftool2InfoParameters ¶ added in v0.0.7
type Gconftool2InfoParameters struct {
// The key name for an element in the GConf database.
Key string `json:"key"`
}
Parameters for the `gconftool2_info` Ansible module.
func (Gconftool2InfoParameters) ToRPCCall ¶ added in v0.0.7
func (p Gconftool2InfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `Gconftool2InfoParameters into an `rpc.RPCCall`.
type Gconftool2InfoReturn ¶ added in v0.0.7
type Gconftool2InfoReturn struct {
AnsibleCommonReturns
// The value of the property.
Value *string `json:"value,omitempty"`
// Version of gconftool-2.
Version *string `json:"version,omitempty"`
}
Return values for the `gconftool2_info` Ansible module.
func Gconftool2InfoReturnFromRPCResult ¶ added in v0.0.7
func Gconftool2InfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (Gconftool2InfoReturn, error)
Unwrap the `rpc.RPCResult` into an `Gconftool2InfoReturn`
type Gconftool2Parameters ¶ added in v0.0.7
type Gconftool2Parameters struct {
// A GConf preference key is an element in the GConf repository that
// corresponds to an application preference.
Key string `json:"key"`
// Preference keys typically have simple values such as strings, integers, or
// lists of strings and integers. This is ignored unless `state=present`.
Value *string `json:"value,omitempty"`
// The type of value being set. This is ignored unless `state=present`.
ValueType *Gconftool2ValueType `json:"value_type,omitempty"`
// The action to take upon the key/value.
State Gconftool2State `json:"state"`
// Specify a configuration source to use rather than the default path.
ConfigSource *string `json:"config_source,omitempty"`
// Access the config database directly, bypassing server. If `direct` is
// specified then the `config_source` must be specified as well.
// default: false
Direct *bool `json:"direct,omitempty"`
}
Parameters for the `gconftool2` Ansible module.
func (Gconftool2Parameters) ToRPCCall ¶ added in v0.0.7
func (p Gconftool2Parameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `Gconftool2Parameters into an `rpc.RPCCall`.
type Gconftool2Return ¶ added in v0.0.7
type Gconftool2Return struct {
AnsibleCommonReturns
// The key specified in the module parameters.
Key *string `json:"key,omitempty"`
// The type of the value that was changed.
ValueType *string `json:"value_type,omitempty"`
// The value of the preference key after executing the module or `null` if key
// is removed.
// From community.general 7.0.0 onwards it returns `null` for a non-existent
// `key`, and returned `""` before that.
Value *string `json:"value,omitempty"`
// The value of the preference key before executing the module.
// From community.general 7.0.0 onwards it returns `null` for a non-existent
// `key`, and returned `""` before that.
PreviousValue *string `json:"previous_value,omitempty"`
// Version of gconftool-2.
Version *string `json:"version,omitempty"`
}
Return values for the `gconftool2` Ansible module.
func Gconftool2ReturnFromRPCResult ¶ added in v0.0.7
func Gconftool2ReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (Gconftool2Return, error)
Unwrap the `rpc.RPCResult` into an `Gconftool2Return`
type Gconftool2State ¶ added in v0.0.7
type Gconftool2State string
The action to take upon the key/value.
const ( Gconftool2StateAbsent Gconftool2State = "absent" Gconftool2StatePresent Gconftool2State = "present" )
type Gconftool2ValueType ¶ added in v0.0.7
type Gconftool2ValueType string
The type of value being set. This is ignored unless `state=present`.
const ( Gconftool2ValueTypeBool Gconftool2ValueType = "bool" Gconftool2ValueTypeFloat Gconftool2ValueType = "float" Gconftool2ValueTypeInt Gconftool2ValueType = "int" Gconftool2ValueTypeString Gconftool2ValueType = "string" )
func OptionalGconftool2ValueType ¶ added in v0.0.7
func OptionalGconftool2ValueType[T interface {
*Gconftool2ValueType | Gconftool2ValueType | *string | string
}](s T) *Gconftool2ValueType
Convert a supported type to an optional (pointer) Gconftool2ValueType
type GemParameters ¶ added in v0.0.7
type GemParameters struct {
// The name of the gem to be managed.
Name string `json:"name"`
// The desired state of the gem. `latest` ensures that the latest version is
// installed.
// default: GemStatePresent
State *GemState `json:"state,omitempty"`
// The path to a local gem used as installation source.
GemSource *string `json:"gem_source,omitempty"`
// Whether to include dependencies or not.
// default: true
IncludeDependencies *bool `json:"include_dependencies,omitempty"`
// The repository from which the gem will be installed.
Repository *string `json:"repository,omitempty"`
// Install gem in user's local gems cache or for all users.
// default: true
UserInstall *bool `json:"user_install,omitempty"`
// Override the path to the gem executable.
Executable *string `json:"executable,omitempty"`
// Install the gems into a specific directory. These gems will be independent
// from the global installed ones. Specifying this requires user_install to be
// false.
InstallDir *string `json:"install_dir,omitempty"`
// Install executables into a specific directory.
Bindir *string `json:"bindir,omitempty"`
// Avoid loading any `.gemrc` file. Ignored for RubyGems prior to 2.5.2.
// The default changed from `false` to `true` in community.general 6.0.0.
// default: true
Norc *bool `json:"norc,omitempty"`
// Rewrite the shebang line on installed scripts to use /usr/bin/env.
// default: false
EnvShebang *bool `json:"env_shebang,omitempty"`
// Version of the gem to be installed/removed.
Version *string `json:"version,omitempty"`
// Allow installation of pre-release versions of the gem.
// default: false
PreRelease *bool `json:"pre_release,omitempty"`
// Install with or without docs.
// default: false
IncludeDoc *bool `json:"include_doc,omitempty"`
// Allow adding build flags for gem compilation.
BuildFlags *string `json:"build_flags,omitempty"`
// Force gem to (un-)install, bypassing dependency checks.
// default: false
Force *bool `json:"force,omitempty"`
}
Parameters for the `gem` Ansible module.
func (GemParameters) ToRPCCall ¶ added in v0.0.7
func (p GemParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `GemParameters into an `rpc.RPCCall`.
type GemReturn ¶ added in v0.0.7
type GemReturn struct {
AnsibleCommonReturns
}
Return values for the `gem` Ansible module.
func GemReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `GemReturn`
type GemState ¶ added in v0.0.7
type GemState string
The desired state of the gem. `latest` ensures that the latest version is installed.
type GetUrlParameters ¶
type GetUrlParameters struct {
// SSL/TLS Ciphers to use for the request.
// When a list is provided, all ciphers are joined in order with `:`.
// See the `OpenSSL Cipher List
// Format,https://www.openssl.org/docs/manmaster/man1/openssl-
// ciphers.html#CIPHER-LIST-FORMAT` for more details.
// The available ciphers is dependent on the Python and OpenSSL/LibreSSL
// versions.
Ciphers *[]string `json:"ciphers,omitempty"`
// Whether to attempt to decompress gzip content-encoded responses.
// default: true
Decompress *bool `json:"decompress,omitempty"`
// HTTP, HTTPS, or FTP URL in the form
// `(http|https|ftp`://[user[:pass]]@host.domain[:port]/path).
Url string `json:"url"`
// Absolute path of where to download the file to.
// If `dest` is a directory, either the server provided filename or, if none
// provided, the base name of the URL on the remote server will be used. If a
// directory, `force` has no effect.
// If `dest` is a directory, the file will always be downloaded (regardless of
// the `force` and `checksum` option), but replaced only if the contents
// changed.
Dest string `json:"dest"`
// Absolute path of where temporary file is downloaded to.
// When run on Ansible 2.5 or greater, path defaults to ansible's `remote_tmp`
// setting.
// When run on Ansible prior to 2.5, it defaults to `TMPDIR`, `TEMP` or `TMP`
// env variables or a platform specific value.
// `https://docs.python.org/3/library/tempfile.html#tempfile.tempdir`.
TmpDest *string `json:"tmp_dest,omitempty"`
// If `true` and `dest` is not a directory, will download the file every time
// and replace the file if the contents change. If `false`, the file will only
// be downloaded if the destination does not exist. Generally should be `true`
// only for small local files.
// Prior to 0.6, this module behaved as if `true` was the default.
// default: false
Force *bool `json:"force,omitempty"`
// Create a backup file including the timestamp information so you can get the
// original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
// If a checksum is passed to this parameter, the digest of the destination
// file will be calculated after it is downloaded to ensure its integrity and
// verify that the transfer completed successfully. Format:
// <algorithm>:<checksum|url>, for example
// `checksum="sha256:D98291AC[...]B6DC7B97",
// C(checksum="sha256:http://example.com/path/sha256sum.txt"`.
// If you worry about portability, only the sha1 algorithm is available on all
// platforms and python versions.
// The Python `hashlib` module is responsible for providing the available
// algorithms. The choices vary based on Python version and OpenSSL version.
// On systems running in FIPS compliant mode, the `md5` algorithm may be
// unavailable.
// Additionally, if a checksum is passed to this parameter, and the file exist
// under the `dest` location, the `destination_checksum` would be calculated,
// and if checksum equals `destination_checksum`, the file download would be
// skipped (unless `force=true`). If the checksum does not equal
// `destination_checksum`, the destination file is deleted.
// If the checksum URL requires username and password, `url_username` and
// `url_password` are used to download the checksum file.
// default: ""
Checksum *string `json:"checksum,omitempty"`
// if `false`, it will not use a proxy, even if one is defined in an
// environment variable on the target hosts.
// default: true
UseProxy *bool `json:"use_proxy,omitempty"`
// If `false`, SSL certificates will not be validated.
// This should only be used on personally controlled sites using self-signed
// certificates.
// default: true
ValidateCerts *bool `json:"validate_certs,omitempty"`
// Timeout in seconds for URL request.
// default: 10
Timeout *int `json:"timeout,omitempty"`
// Add custom HTTP headers to a request in hash/dict format.
// The hash/dict format was added in Ansible 2.6.
// Previous versions used a `"key:value,key:value"` string format.
// The `"key:value,key:value"` string format is deprecated and has been removed
// in version 2.10.
Headers *map[string]any `json:"headers,omitempty"`
// The username for use in HTTP basic authentication.
// This parameter can be used without `url_password` for sites that allow empty
// passwords.
// Since version 2.8 you can also use the `username` alias for this option.
UrlUsername *string `json:"url_username,omitempty"`
// The password for use in HTTP basic authentication.
// If the `url_username` parameter is not specified, the `url_password`
// parameter will not be used.
// Since version 2.8 you can also use the `password` alias for this option.
UrlPassword *string `json:"url_password,omitempty"`
// Force the sending of the Basic authentication header upon initial request.
// httplib2, the library used by the uri module only sends authentication
// information when a webservice responds to an initial request with a 401
// status. Since some basic auth services do not properly send a 401, logins
// will fail.
// default: false
ForceBasicAuth *bool `json:"force_basic_auth,omitempty"`
// PEM formatted certificate chain file to be used for SSL client
// authentication.
// This file can also include the key as well, and if the key is included,
// `client_key` is not required.
ClientCert *string `json:"client_cert,omitempty"`
// PEM formatted file that contains your private key to be used for SSL client
// authentication.
// If `client_cert` contains both the certificate and key, this option is not
// required.
ClientKey *string `json:"client_key,omitempty"`
// Header to identify as, generally appears in web server logs.
// default: "ansible-httpget"
HttpAgent *string `json:"http_agent,omitempty"`
// A list of header names that will not be sent on subsequent redirected
// requests. This list is case insensitive. By default all headers will be
// redirected. In some cases it may be beneficial to list headers such as
// `Authorization` here to avoid potential credential exposure.
// default: []
UnredirectedHeaders *[]string `json:"unredirected_headers,omitempty"`
// Use GSSAPI to perform the authentication, typically this is for Kerberos or
// Kerberos through Negotiate authentication.
// Requires the Python library `gssapi,https://github.com/pythongssapi/python-
// gssapi` to be installed.
// Credentials for GSSAPI can be specified with `url_username`/`url_password`
// or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos
// credential cache.
// NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has
// been installed.
// default: false
UseGssapi *bool `json:"use_gssapi,omitempty"`
// Determining whether to use credentials from `~/.netrc` file.
// By default `.netrc` is used with Basic authentication headers.
// When `false`, `.netrc` credentials are ignored.
// default: true
UseNetrc *bool `json:"use_netrc,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
}
Parameters for the `get_url` Ansible module.
func (GetUrlParameters) ToRPCCall ¶
func (p GetUrlParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `GetUrlParameters into an `rpc.RPCCall`.
type GetUrlReturn ¶
type GetUrlReturn struct {
AnsibleCommonReturns
// name of backup file created after download
BackupFile *string `json:"backup_file,omitempty"`
// sha1 checksum of the file after copy
ChecksumDest *string `json:"checksum_dest,omitempty"`
// sha1 checksum of the file
ChecksumSrc *string `json:"checksum_src,omitempty"`
// destination file/path
Dest *string `json:"dest,omitempty"`
// The number of seconds that elapsed while performing the download
Elapsed *int `json:"elapsed,omitempty"`
// group id of the file
Gid *int `json:"gid,omitempty"`
// group of the file
Group *string `json:"group,omitempty"`
// md5 checksum of the file after download
Md5sum *string `json:"md5sum,omitempty"`
// permissions of the target
Mode *string `json:"mode,omitempty"`
// the HTTP message from the request
Msg *string `json:"msg,omitempty"`
// owner of the file
Owner *string `json:"owner,omitempty"`
// the SELinux security context of the file
Secontext *string `json:"secontext,omitempty"`
// size of the target
Size *int `json:"size,omitempty"`
// source file used after download
Src *string `json:"src,omitempty"`
// state of the target
State *string `json:"state,omitempty"`
// the HTTP status code from the request
StatusCode *int `json:"status_code,omitempty"`
// owner id of the file, after execution
Uid *int `json:"uid,omitempty"`
// the actual URL used for the request
Url *string `json:"url,omitempty"`
}
Return values for the `get_url` Ansible module.
func GetUrlReturnFromRPCResult ¶
func GetUrlReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (GetUrlReturn, error)
Unwrap the `rpc.RPCResult` into an `GetUrlReturn`
type GetentParameters ¶
type GetentParameters struct {
// The name of a getent database supported by the target system (passwd, group,
// hosts, etc).
Database string `json:"database"`
// Key from which to return values from the specified database, otherwise the
// full contents are returned.
Key *string `json:"key,omitempty"`
// Override all databases with the specified service
// The underlying system must support the service flag which is not always
// available.
Service *string `json:"service,omitempty"`
// Character used to split the database values into lists/arrays such as `:` or
// `\\t`, otherwise it will try to pick one depending on the database.
Split *string `json:"split,omitempty"`
// If a supplied key is missing this will make the task fail if `true`.
// default: "yes"
FailKey *bool `json:"fail_key,omitempty"`
}
Parameters for the `getent` Ansible module.
func (GetentParameters) ToRPCCall ¶
func (p GetentParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `GetentParameters into an `rpc.RPCCall`.
type GetentReturn ¶
type GetentReturn struct {
AnsibleCommonReturns
// Facts to add to ansible_facts.
AnsibleFacts *map[string]any `json:"ansible_facts,omitempty"`
}
Return values for the `getent` Ansible module.
func GetentReturnFromRPCResult ¶
func GetentReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (GetentReturn, error)
Unwrap the `rpc.RPCResult` into an `GetentReturn`
type GitConfigAddMode ¶ added in v0.0.7
type GitConfigAddMode string
Specify if a value should replace the existing value(s) or if the new value should be added alongside other values with the same name. This option is only relevant when adding/replacing values. If `state=absent` or values are just read out, this option is not considered.
const ( GitConfigAddModeAdd GitConfigAddMode = "add" GitConfigAddModeReplaceAll GitConfigAddMode = "replace-all" )
func OptionalGitConfigAddMode ¶ added in v0.0.7
func OptionalGitConfigAddMode[T interface {
*GitConfigAddMode | GitConfigAddMode | *string | string
}](s T) *GitConfigAddMode
Convert a supported type to an optional (pointer) GitConfigAddMode
type GitConfigInfoParameters ¶ added in v0.0.7
type GitConfigInfoParameters struct {
// The name of the setting to read.
// If not provided, all settings will be returned as R`config_values`.
Name *string `json:"name,omitempty"`
// Path to a git repository or file for reading values from a specific repo.
// If `scope` is `local`, this must point to a repository to read from.
// If `scope` is `file`, this must point to specific git config file to read
// from.
// Otherwise `path` is ignored if set.
Path *string `json:"path,omitempty"`
// Specify which scope to read values from.
// If set to `global`, the global git config is used. `path` is ignored.
// If set to `system`, the system git config is used. `path` is ignored.
// If set to `local`, `path` must be set to the repo to read from.
// If set to `file`, `path` must be set to the config file to read from.
// default: GitConfigInfoScopeSystem
Scope *GitConfigInfoScope `json:"scope,omitempty"`
}
Parameters for the `git_config_info` Ansible module.
func (GitConfigInfoParameters) ToRPCCall ¶ added in v0.0.7
func (p GitConfigInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `GitConfigInfoParameters into an `rpc.RPCCall`.
type GitConfigInfoReturn ¶ added in v0.0.7
type GitConfigInfoReturn struct {
AnsibleCommonReturns
// When `name` is set, a string containing the value of the setting in name. If
// `name` is not set, empty. If a config key such as `push.pushoption` has more
// then one entry, just the first one is returned here.
ConfigValue *string `json:"config_value,omitempty"`
// This is a dictionary mapping a git configuration setting to a list of its
// values.
// When `name` is not set, all configuration settings are returned here.
// When `name` is set, only the setting specified in `name` is returned here.
// If that setting is not set, the key will still be present, and its value
// will be an empty list.
ConfigValues *map[string]any `json:"config_values,omitempty"`
}
Return values for the `git_config_info` Ansible module.
func GitConfigInfoReturnFromRPCResult ¶ added in v0.0.7
func GitConfigInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (GitConfigInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `GitConfigInfoReturn`
type GitConfigInfoScope ¶ added in v0.0.7
type GitConfigInfoScope string
Specify which scope to read values from. If set to `global`, the global git config is used. `path` is ignored. If set to `system`, the system git config is used. `path` is ignored. If set to `local`, `path` must be set to the repo to read from. If set to `file`, `path` must be set to the config file to read from.
const ( GitConfigInfoScopeGlobal GitConfigInfoScope = "global" GitConfigInfoScopeSystem GitConfigInfoScope = "system" GitConfigInfoScopeLocal GitConfigInfoScope = "local" GitConfigInfoScopeFile GitConfigInfoScope = "file" )
func OptionalGitConfigInfoScope ¶ added in v0.0.7
func OptionalGitConfigInfoScope[T interface {
*GitConfigInfoScope | GitConfigInfoScope | *string | string
}](s T) *GitConfigInfoScope
Convert a supported type to an optional (pointer) GitConfigInfoScope
type GitConfigParameters ¶ added in v0.0.7
type GitConfigParameters struct {
// The name of the setting.
Name string `json:"name"`
// Path to a git repository for reading and writing values from a specific
// repo.
Repo *string `json:"repo,omitempty"`
// Path to an adhoc git configuration file to be managed using the `file`
// scope.
File *string `json:"file,omitempty"`
// Specify which scope to read/set values from.
// This is required when setting config values.
// If this is set to `local`, you must also specify the `repo` parameter.
// If this is set to `file`, you must also specify the `file` parameter.
// It defaults to system.
Scope *GitConfigScope `json:"scope,omitempty"`
// Indicates the setting should be set/unset. This parameter has higher
// precedence than `value` parameter: when `state=absent` and `value` is
// defined, `value` is discarded.
// default: GitConfigStatePresent
State *GitConfigState `json:"state,omitempty"`
// When specifying the name of a single setting, supply a value to set that
// setting to the given value.
// From community.general 11.0.0 on, `value` is required if `state=present`. To
// read values, use the `community.general.git_config_info` module instead.
Value *string `json:"value,omitempty"`
// Specify if a value should replace the existing value(s) or if the new value
// should be added alongside other values with the same name.
// This option is only relevant when adding/replacing values. If `state=absent`
// or values are just read out, this option is not considered.
// default: GitConfigAddModeReplaceAll
AddMode *GitConfigAddMode `json:"add_mode,omitempty"`
}
Parameters for the `git_config` Ansible module.
func (GitConfigParameters) ToRPCCall ¶ added in v0.0.7
func (p GitConfigParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `GitConfigParameters into an `rpc.RPCCall`.
type GitConfigReturn ¶ added in v0.0.7
type GitConfigReturn struct {
AnsibleCommonReturns
}
Return values for the `git_config` Ansible module.
func GitConfigReturnFromRPCResult ¶ added in v0.0.7
func GitConfigReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (GitConfigReturn, error)
Unwrap the `rpc.RPCResult` into an `GitConfigReturn`
type GitConfigScope ¶ added in v0.0.7
type GitConfigScope string
Specify which scope to read/set values from. This is required when setting config values. If this is set to `local`, you must also specify the `repo` parameter. If this is set to `file`, you must also specify the `file` parameter. It defaults to system.
const ( GitConfigScopeFile GitConfigScope = "file" GitConfigScopeLocal GitConfigScope = "local" GitConfigScopeGlobal GitConfigScope = "global" GitConfigScopeSystem GitConfigScope = "system" )
func OptionalGitConfigScope ¶ added in v0.0.7
func OptionalGitConfigScope[T interface {
*GitConfigScope | GitConfigScope | *string | string
}](s T) *GitConfigScope
Convert a supported type to an optional (pointer) GitConfigScope
type GitConfigState ¶ added in v0.0.7
type GitConfigState string
Indicates the setting should be set/unset. This parameter has higher precedence than `value` parameter: when `state=absent` and `value` is defined, `value` is discarded.
const ( GitConfigStatePresent GitConfigState = "present" GitConfigStateAbsent GitConfigState = "absent" )
func OptionalGitConfigState ¶ added in v0.0.7
func OptionalGitConfigState[T interface {
*GitConfigState | GitConfigState | *string | string
}](s T) *GitConfigState
Convert a supported type to an optional (pointer) GitConfigState
type GitParameters ¶
type GitParameters struct {
// git, SSH, or HTT`S` protocol address of the git repository.
Repo string `json:"repo"`
// The path of where the repository should be checked out. This is equivalent
// to `git clone [repo_url] [directory]`. The repository named in `repo` is not
// appended to this path and the destination directory must be empty. This
// parameter is required, unless `clone` is set to `false`.
Dest string `json:"dest"`
// What version of the repository to check out. This can be the literal string
// `HEAD`, a branch name, a tag name. It can also be a `SHA-1` hash, in which
// case `refspec` needs to be specified if the given revision is not already
// available.
// default: "HEAD"
Version *string `json:"version,omitempty"`
// Will ensure or not that `-o StrictHostKeyChecking=no` is present as an ssh
// option.
// Be aware that this disables a protection against MITM attacks.
// Those using OpenSSH >= 7.5 might want to use `accept_newhostkey` or set
// `ssh_opts` to `StrictHostKeyChecking=accept-new` instead, it does not remove
// the MITM issue but it does restrict it to the first attempt.
// default: "no"
AcceptHostkey *bool `json:"accept_hostkey,omitempty"`
// As of OpenSSH 7.5, `-o StrictHostKeyChecking=accept-new` can be used which
// is safer and will only accepts host keys which are not present or are the
// same. If `true`, ensure that `-o StrictHostKeyChecking=accept-new` is
// present as an ssh option.
// default: "no"
AcceptNewhostkey *bool `json:"accept_newhostkey,omitempty"`
// Options git will pass to ssh when used as protocol, it works via `git`'s
// `GIT_SSH`/`GIT_SSH_COMMAND` environment variables.
// For older versions it appends `GIT_SSH_OPTS` (specific to this module) to
// the variables above or via a wrapper script.
// Other options can add to this list, like `key_file` and `accept_hostkey`.
// An example value could be `-o StrictHostKeyChecking=no` (although this
// particular option is better set by `accept_hostkey`).
// The module ensures that `BatchMode=yes` is always present to avoid prompts.
SshOpts *string `json:"ssh_opts,omitempty"`
// Specify an optional private key file path, on the target host, to use for
// the checkout.
// This ensures `IdentitiesOnly=yes` is present in `ssh_opts`.
KeyFile *string `json:"key_file,omitempty"`
// Reference repository (see `git clone --reference ...`).
Reference *string `json:"reference,omitempty"`
// Name of the remote.
// default: "origin"
Remote *string `json:"remote,omitempty"`
// Add an additional refspec to be fetched. If version is set to a `SHA-1` not
// reachable from any branch or tag, this option may be necessary to specify
// the ref containing the `SHA-1`. Uses the same syntax as the `git fetch`
// command. An example value could be "refs/meta/config".
Refspec *string `json:"refspec,omitempty"`
// If `true`, any modified files in the working repository will be discarded.
// Prior to 0.7, this was always `true` and could not be disabled. Prior to
// 1.9, the default was `true`.
// default: "no"
Force *bool `json:"force,omitempty"`
// Create a shallow clone with a history truncated to the specified number or
// revisions. The minimum possible value is `1`, otherwise ignored. Needs
// `git>=1.9.1` to work correctly.
Depth *int `json:"depth,omitempty"`
// If `false`, do not clone the repository even if it does not exist locally.
// default: "yes"
Clone *bool `json:"clone,omitempty"`
// If `false`, do not retrieve new revisions from the origin repository.
// Operations like archive will work on the existing (old) repository and might
// not respond to changes to the options version or remote.
// default: "yes"
Update *bool `json:"update,omitempty"`
// Path to git executable to use. If not supplied, the normal mechanism for
// resolving binary paths will be used.
Executable *string `json:"executable,omitempty"`
// If `true`, repository will be created as a bare repo, otherwise it will be a
// standard repo with a workspace.
// default: "no"
Bare *bool `json:"bare,omitempty"`
// The umask to set before doing any checkouts, or any other repository
// maintenance.
Umask *any `json:"umask,omitempty"`
// If `false`, repository will be cloned without the `--recursive` option,
// skipping sub-modules.
// default: "yes"
Recursive *bool `json:"recursive,omitempty"`
// Clone only the history leading to the tip of the specified revision.
// default: "no"
SingleBranch *bool `json:"single_branch,omitempty"`
// If `true`, submodules will track the latest commit on their master branch
// (or other branch specified in `.gitmodules`). If `false`, submodules will
// be kept at the revision specified by the main project. This is equivalent to
// specifying the `--remote` flag to git submodule update.
// default: "no"
TrackSubmodules *bool `json:"track_submodules,omitempty"`
// If `true`, when cloning or checking out a `version` verify the signature of
// a GPG signed commit. This requires git version>=2.1.0 to be installed. The
// commit MUST be signed and the public key MUST be present in the GPG keyring.
// default: "no"
VerifyCommit *bool `json:"verify_commit,omitempty"`
// Specify archive file path with extension. If specified, creates an archive
// file of the specified format containing the tree structure for the source
// tree. Allowed archive formats ["zip", "tar.gz", "tar", "tgz"].
// This will clone and perform git archive from local directory as not all git
// servers support git archive.
Archive *string `json:"archive,omitempty"`
// Specify a prefix to add to each file path in archive. Requires `archive` to
// be specified.
ArchivePrefix *string `json:"archive_prefix,omitempty"`
// The path to place the cloned repository. If specified, Git repository can be
// separated from working tree.
SeparateGitDir *string `json:"separate_git_dir,omitempty"`
// A list of trusted GPG fingerprints to compare to the fingerprint of the GPG-
// signed commit.
// Only used when `verify_commit=yes`.
// Use of this feature requires Git 2.6+ due to its reliance on git's `--raw`
// flag to `verify-commit` and `verify-tag`.
// Alias `gpg_allowlist` is added in version 2.17.
// Alias `gpg_whitelist` is deprecated and will be removed in version 2.21.
// default: []
GpgAllowlist *[]string `json:"gpg_allowlist,omitempty"`
}
Parameters for the `git` Ansible module.
func (GitParameters) ToRPCCall ¶
func (p GitParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `GitParameters into an `rpc.RPCCall`.
type GitReturn ¶
type GitReturn struct {
AnsibleCommonReturns
// Last commit revision of the repository retrieved during the update.
After *string `json:"after,omitempty"`
// Commit revision before the repository was updated, "null" for new
// repository.
Before *string `json:"before,omitempty"`
// Contains True or False whether or not the remote URL was changed.
RemoteUrlChanged *bool `json:"remote_url_changed,omitempty"`
// List of warnings if requested features were not available due to a too old
// git version.
Warnings *string `json:"warnings,omitempty"`
// Contains the new path of .git directory if it is changed.
GitDirNow *string `json:"git_dir_now,omitempty"`
// Contains the original path of .git directory if it is changed.
GitDirBefore *string `json:"git_dir_before,omitempty"`
}
Return values for the `git` Ansible module.
func GitReturnFromRPCResult ¶
Unwrap the `rpc.RPCResult` into an `GitReturn`
type GroupParameters ¶
type GroupParameters struct {
// Name of the group to manage.
Name string `json:"name"`
// Optional `GID` to set for the group.
Gid *int `json:"gid,omitempty"`
// Whether the group should be present or not on the remote host.
// default: GroupStatePresent
State *GroupState `json:"state,omitempty"`
// Whether to delete a group even if it is the primary group of a user.
// Only applicable on platforms which implement a `--force` flag on the group
// deletion command.
// default: false
Force *bool `json:"force,omitempty"`
// If `yes`, indicates that the group created is a system group.
// default: false
System *bool `json:"system,omitempty"`
// Forces the use of "local" command alternatives on platforms that implement
// it.
// This is useful in environments that use centralized authentication when you
// want to manipulate the local groups. (for example, it uses `lgroupadd`
// instead of `groupadd`).
// This requires that these commands exist on the targeted host, otherwise it
// will be a fatal error.
// default: false
Local *bool `json:"local,omitempty"`
// This option allows to change the group ID to a non-unique value. Requires
// `gid`.
// Not supported on macOS or BusyBox distributions.
// default: false
NonUnique *bool `json:"non_unique,omitempty"`
// Sets the GID_MIN value for group creation.
// Overwrites /etc/login.defs default value.
// Currently supported on Linux. Does nothing when used with other platforms.
// Requires `local` is omitted or `False`.
GidMin *int `json:"gid_min,omitempty"`
// Sets the GID_MAX value for group creation.
// Overwrites /etc/login.defs default value.
// Currently supported on Linux. Does nothing when used with other platforms.
// Requires `local` is omitted or `False`.
GidMax *int `json:"gid_max,omitempty"`
}
Parameters for the `group` Ansible module.
func (GroupParameters) ToRPCCall ¶
func (p GroupParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `GroupParameters into an `rpc.RPCCall`.
type GroupReturn ¶
type GroupReturn struct {
AnsibleCommonReturns
// Group ID of the group.
Gid *int `json:"gid,omitempty"`
// Group name.
Name *string `json:"name,omitempty"`
// Whether the group is present or not.
State *string `json:"state,omitempty"`
// Whether the group is a system group or not.
System *bool `json:"system,omitempty"`
}
Return values for the `group` Ansible module.
func GroupReturnFromRPCResult ¶
func GroupReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (GroupReturn, error)
Unwrap the `rpc.RPCResult` into an `GroupReturn`
type GroupState ¶ added in v0.0.7
type GroupState string
Whether the group should be present or not on the remote host.
const ( GroupStateAbsent GroupState = "absent" GroupStatePresent GroupState = "present" )
func OptionalGroupState ¶ added in v0.0.7
func OptionalGroupState[T interface {
*GroupState | GroupState | *string | string
}](s T) *GroupState
Convert a supported type to an optional (pointer) GroupState
type GunicornParameters ¶ added in v0.0.7
type GunicornParameters struct {
// The app module. A name refers to a WSGI callable that should be found in the
// specified module.
App string `json:"app"`
// Path to the virtualenv directory.
Venv *string `json:"venv,omitempty"`
// Path to the gunicorn configuration file.
Config *string `json:"config,omitempty"`
// Chdir to specified directory before apps loading.
Chdir *string `json:"chdir,omitempty"`
// A filename to use for the PID file. If not set and not found on the
// configuration file a tmp pid file will be created to check a successful run
// of gunicorn.
Pid *string `json:"pid,omitempty"`
// The type of workers to use. The default class (sync) should handle most
// "normal" types of workloads.
Worker *GunicornWorker `json:"worker,omitempty"`
// Switch worker processes to run as this user.
User *string `json:"user,omitempty"`
}
Parameters for the `gunicorn` Ansible module.
func (GunicornParameters) ToRPCCall ¶ added in v0.0.7
func (p GunicornParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `GunicornParameters into an `rpc.RPCCall`.
type GunicornReturn ¶ added in v0.0.7
type GunicornReturn struct {
AnsibleCommonReturns
// Process ID of gunicorn.
Gunicorn *string `json:"gunicorn,omitempty"`
}
Return values for the `gunicorn` Ansible module.
func GunicornReturnFromRPCResult ¶ added in v0.0.7
func GunicornReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (GunicornReturn, error)
Unwrap the `rpc.RPCResult` into an `GunicornReturn`
type GunicornWorker ¶ added in v0.0.7
type GunicornWorker string
The type of workers to use. The default class (sync) should handle most "normal" types of workloads.
const ( GunicornWorkerSync GunicornWorker = "sync" GunicornWorkerEventlet GunicornWorker = "eventlet" GunicornWorkerGevent GunicornWorker = "gevent" GunicornWorkerTornado GunicornWorker = "tornado " GunicornWorkerGthread GunicornWorker = "gthread" GunicornWorkerGaiohttp GunicornWorker = "gaiohttp" )
func OptionalGunicornWorker ¶ added in v0.0.7
func OptionalGunicornWorker[T interface {
*GunicornWorker | GunicornWorker | *string | string
}](s T) *GunicornWorker
Convert a supported type to an optional (pointer) GunicornWorker
type HomebrewCaskParameters ¶ added in v0.0.7
type HomebrewCaskParameters struct {
// Name of cask to install or remove.
Name *[]string `json:"name,omitempty"`
// ':' separated list of paths to search for 'brew' executable.
// default: "/usr/local/bin:/opt/homebrew/bin"
Path *string `json:"path,omitempty"`
// State of the cask.
// default: HomebrewCaskStatePresent
State *HomebrewCaskState `json:"state,omitempty"`
// The sudo password to be passed to `SUDO_ASKPASS`.
SudoPassword *string `json:"sudo_password,omitempty"`
// Update homebrew itself first.
// Note that `brew cask update` is a synonym for `brew update`.
// default: false
UpdateHomebrew *bool `json:"update_homebrew,omitempty"`
// Options flags to install a package.
InstallOptions *[]string `json:"install_options,omitempty"`
// Allow external apps.
// default: false
AcceptExternalApps *bool `json:"accept_external_apps,omitempty"`
// Upgrade all casks.
// Mutually exclusive with `upgraded` state.
// default: false
UpgradeAll *bool `json:"upgrade_all,omitempty"`
// Upgrade casks that auto update.
// Passes `--greedy` to `brew outdated --cask` when checking if an installed
// cask has a newer version available, or to `brew upgrade --cask` when
// upgrading all casks.
// default: false
Greedy *bool `json:"greedy,omitempty"`
}
Parameters for the `homebrew_cask` Ansible module.
func (HomebrewCaskParameters) ToRPCCall ¶ added in v0.0.7
func (p HomebrewCaskParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `HomebrewCaskParameters into an `rpc.RPCCall`.
type HomebrewCaskReturn ¶ added in v0.0.7
type HomebrewCaskReturn struct {
AnsibleCommonReturns
}
Return values for the `homebrew_cask` Ansible module.
func HomebrewCaskReturnFromRPCResult ¶ added in v0.0.7
func HomebrewCaskReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (HomebrewCaskReturn, error)
Unwrap the `rpc.RPCResult` into an `HomebrewCaskReturn`
type HomebrewCaskState ¶ added in v0.0.7
type HomebrewCaskState string
State of the cask.
const ( HomebrewCaskStateAbsent HomebrewCaskState = "absent" HomebrewCaskStateInstalled HomebrewCaskState = "installed" HomebrewCaskStateLatest HomebrewCaskState = "latest" HomebrewCaskStatePresent HomebrewCaskState = "present" HomebrewCaskStateRemoved HomebrewCaskState = "removed" HomebrewCaskStateUninstalled HomebrewCaskState = "uninstalled" HomebrewCaskStateUpgraded HomebrewCaskState = "upgraded" )
func OptionalHomebrewCaskState ¶ added in v0.0.7
func OptionalHomebrewCaskState[T interface {
*HomebrewCaskState | HomebrewCaskState | *string | string
}](s T) *HomebrewCaskState
Convert a supported type to an optional (pointer) HomebrewCaskState
type HomebrewParameters ¶ added in v0.0.7
type HomebrewParameters struct {
// A list of names of packages to install/remove.
Name *[]string `json:"name,omitempty"`
// A `:` separated list of paths to search for `brew` executable. Since a
// package (`formula` in homebrew parlance) location is prefixed relative to
// the actual path of `brew` command, providing an alternative `brew` path
// enables managing different set of packages in an alternative location in the
// system.
// default: "/usr/local/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin"
Path *string `json:"path,omitempty"`
// State of the package.
// default: HomebrewStatePresent
State *HomebrewState `json:"state,omitempty"`
// Update homebrew itself first.
// default: false
UpdateHomebrew *bool `json:"update_homebrew,omitempty"`
// Upgrade all homebrew packages.
// default: false
UpgradeAll *bool `json:"upgrade_all,omitempty"`
// Options flags to install a package.
InstallOptions *[]string `json:"install_options,omitempty"`
// Option flags to upgrade.
UpgradeOptions *[]string `json:"upgrade_options,omitempty"`
// Force the package(s) to be treated as a formula (equivalent to `brew
// --formula`).
// To install a cask, use the `community.general.homebrew_cask` module.
// default: false
ForceFormula *bool `json:"force_formula,omitempty"`
}
Parameters for the `homebrew` Ansible module.
func (HomebrewParameters) ToRPCCall ¶ added in v0.0.7
func (p HomebrewParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `HomebrewParameters into an `rpc.RPCCall`.
type HomebrewReturn ¶ added in v0.0.7
type HomebrewReturn struct {
AnsibleCommonReturns
// If the cache was updated or not.
Msg *string `json:"msg,omitempty"`
// List of package names which are unchanged after module run.
UnchangedPkgs *[]any `json:"unchanged_pkgs,omitempty"`
// List of package names which are changed after module run.
ChangedPkgs *[]any `json:"changed_pkgs,omitempty"`
}
Return values for the `homebrew` Ansible module.
func HomebrewReturnFromRPCResult ¶ added in v0.0.7
func HomebrewReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (HomebrewReturn, error)
Unwrap the `rpc.RPCResult` into an `HomebrewReturn`
type HomebrewServicesParameters ¶ added in v0.0.7
type HomebrewServicesParameters struct {
// An installed homebrew package whose service is to be updated.
Name string `json:"name"`
// A `:` separated list of paths to search for `brew` executable. Since a
// package (`formula` in homebrew parlance) location is prefixed relative to
// the actual path of `brew` command, providing an alternative `brew` path
// enables managing different set of packages in an alternative location in the
// system.
// default: "/usr/local/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin"
Path *string `json:"path,omitempty"`
// State of the package's service.
// default: HomebrewServicesStatePresent
State *HomebrewServicesState `json:"state,omitempty"`
}
Parameters for the `homebrew_services` Ansible module.
func (HomebrewServicesParameters) ToRPCCall ¶ added in v0.0.7
func (p HomebrewServicesParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `HomebrewServicesParameters into an `rpc.RPCCall`.
type HomebrewServicesReturn ¶ added in v0.0.7
type HomebrewServicesReturn struct {
AnsibleCommonReturns
// If the service is now running, this is the PID of the service, otherwise -1.
Pid *int `json:"pid,omitempty"`
// Whether the service is running after running this command.
Running *bool `json:"running,omitempty"`
}
Return values for the `homebrew_services` Ansible module.
func HomebrewServicesReturnFromRPCResult ¶ added in v0.0.7
func HomebrewServicesReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (HomebrewServicesReturn, error)
Unwrap the `rpc.RPCResult` into an `HomebrewServicesReturn`
type HomebrewServicesState ¶ added in v0.0.7
type HomebrewServicesState string
State of the package's service.
const ( HomebrewServicesStatePresent HomebrewServicesState = "present" HomebrewServicesStateAbsent HomebrewServicesState = "absent" HomebrewServicesStateRestarted HomebrewServicesState = "restarted" )
func OptionalHomebrewServicesState ¶ added in v0.0.7
func OptionalHomebrewServicesState[T interface {
*HomebrewServicesState | HomebrewServicesState | *string | string
}](s T) *HomebrewServicesState
Convert a supported type to an optional (pointer) HomebrewServicesState
type HomebrewState ¶ added in v0.0.7
type HomebrewState string
State of the package.
const ( HomebrewStateAbsent HomebrewState = "absent" HomebrewStateHead HomebrewState = "head" HomebrewStateInstalled HomebrewState = "installed" HomebrewStateLatest HomebrewState = "latest" HomebrewStateLinked HomebrewState = "linked" HomebrewStatePresent HomebrewState = "present" HomebrewStateRemoved HomebrewState = "removed" HomebrewStateUninstalled HomebrewState = "uninstalled" HomebrewStateUnlinked HomebrewState = "unlinked" HomebrewStateUpgraded HomebrewState = "upgraded" )
func OptionalHomebrewState ¶ added in v0.0.7
func OptionalHomebrewState[T interface {
*HomebrewState | HomebrewState | *string | string
}](s T) *HomebrewState
Convert a supported type to an optional (pointer) HomebrewState
type HomebrewTapParameters ¶ added in v0.0.7
type HomebrewTapParameters struct {
// The GitHub user/organization repository to tap.
Name []string `json:"name"`
// The optional git URL of the repository to tap. The URL is not assumed to be
// on GitHub, and the protocol does not have to be HTTP. Any location and
// protocol that git can handle is fine.
// `name` option may not be a list of multiple taps (but a single tap instead)
// when this option is provided.
Url *string `json:"url,omitempty"`
// State of the repository.
// default: HomebrewTapStatePresent
State *HomebrewTapState `json:"state,omitempty"`
// A `:` separated list of paths to search for `brew` executable.
// default: "/usr/local/bin:/opt/homebrew/bin:/home/linuxbrew/.linuxbrew/bin"
Path *string `json:"path,omitempty"`
}
Parameters for the `homebrew_tap` Ansible module.
func (HomebrewTapParameters) ToRPCCall ¶ added in v0.0.7
func (p HomebrewTapParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `HomebrewTapParameters into an `rpc.RPCCall`.
type HomebrewTapReturn ¶ added in v0.0.7
type HomebrewTapReturn struct {
AnsibleCommonReturns
}
Return values for the `homebrew_tap` Ansible module.
func HomebrewTapReturnFromRPCResult ¶ added in v0.0.7
func HomebrewTapReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (HomebrewTapReturn, error)
Unwrap the `rpc.RPCResult` into an `HomebrewTapReturn`
type HomebrewTapState ¶ added in v0.0.7
type HomebrewTapState string
State of the repository.
const ( HomebrewTapStatePresent HomebrewTapState = "present" HomebrewTapStateAbsent HomebrewTapState = "absent" )
func OptionalHomebrewTapState ¶ added in v0.0.7
func OptionalHomebrewTapState[T interface {
*HomebrewTapState | HomebrewTapState | *string | string
}](s T) *HomebrewTapState
Convert a supported type to an optional (pointer) HomebrewTapState
type HomectlParameters ¶ added in v0.0.7
type HomectlParameters struct {
// The user name to create, remove, or update.
Name string `json:"name"`
// Set the user's password to this.
// Homed requires this value to be in cleartext on user creation and updating a
// user.
// The module takes the password and generates a password hash in SHA-512 with
// 10000 rounds of salt generation using crypt.
// See `https://systemd.io/USER_RECORD/`.
// This is required for `state=present`. When an existing user is updated this
// is checked against the stored hash in homed.
Password *string `json:"password,omitempty"`
// The operation to take on the user.
// default: HomectlStatePresent
State *HomectlState `json:"state,omitempty"`
// Indicates the storage mechanism for the user's home directory.
// If the storage type is not specified, `homed.conf(5\`) defines which default
// storage to use.
// Only used when a user is first created.
Storage *HomectlStorage `json:"storage,omitempty"`
// The intended home directory disk space.
// Human readable value such as `10G`, `10M`, or `10B`.
Disksize *string `json:"disksize,omitempty"`
// When used with `disksize` this will attempt to resize the home directory
// immediately.
// default: false
Resize *bool `json:"resize,omitempty"`
// The user's real ('human') name.
// This can also be used to add a comment to maintain compatibility with
// `useradd`.
Realname *string `json:"realname,omitempty"`
// The 'realm' a user is defined in.
Realm *string `json:"realm,omitempty"`
// The email address of the user.
Email *string `json:"email,omitempty"`
// A free-form location string describing the location of the user.
Location *string `json:"location,omitempty"`
// The name of an icon picked by the user, for example for the purpose of an
// avatar.
// Should follow the semantics defined in the Icon Naming Specification.
// See `https://specifications.freedesktop.org/icon-naming-spec/icon-naming-
// spec-latest.html` for specifics.
Iconname *string `json:"iconname,omitempty"`
// Path to use as home directory for the user.
// This is the directory the user's home directory is mounted to while the user
// is logged in.
// This is not where the user's data is actually stored, see `imagepath` for
// that.
// Only used when a user is first created.
Homedir *string `json:"homedir,omitempty"`
// Path to place the user's home directory.
// See `https://www.freedesktop.org/software/systemd/man/homectl.html#--image-
// path=PATH` for more information.
// Only used when a user is first created.
Imagepath *string `json:"imagepath,omitempty"`
// Sets the UID of the user.
// If using `gid` homed requires the value to be the same.
// Only used when a user is first created.
Uid *int `json:"uid,omitempty"`
// Sets the gid of the user.
// If using `uid` homed requires the value to be the same.
// Only used when a user is first created.
Gid *int `json:"gid,omitempty"`
// String separated by comma each indicating mount options for a users home
// directory.
// Valid options are `nosuid`, `nodev` or `noexec`.
// Homed by default uses `nodev` and `nosuid` while `noexec` is off.
Mountopts *string `json:"mountopts,omitempty"`
// Sets the umask for the user's login sessions.
// Value from `0000` to `0777`.
Umask *int `json:"umask,omitempty"`
// String separated by comma each indicating a UNIX group this user shall be a
// member of.
// Groups the user should be a member of should be supplied as comma separated
// list.
Memberof *string `json:"memberof,omitempty"`
// The absolute path to the skeleton directory to populate a new home directory
// from.
// This is only used when a home directory is first created.
// If not specified homed by default uses `/etc/skel`.
Skeleton *string `json:"skeleton,omitempty"`
// Shell binary to use for terminal logins of given user.
// If not specified homed by default uses `/bin/bash`.
Shell *string `json:"shell,omitempty"`
// String separated by comma each containing an environment variable and its
// value to set for the user's login session, in a format compatible with
// `putenv(\`).
// Any environment variable listed here is automatically set by pam_systemd for
// all login sessions of the user.
Environment *string `json:"environment,omitempty"`
// Preferred timezone to use for the user.
// Should be a tzdata compatible location string such as `America/New_York`.
Timezone *string `json:"timezone,omitempty"`
// Whether the user account should be locked or not.
Locked *bool `json:"locked,omitempty"`
// The preferred language/locale for the user.
// This should be in a format compatible with the `LANG` environment variable.
Language *string `json:"language,omitempty"`
// Password hint for the given user.
Passwordhint *string `json:"passwordhint,omitempty"`
// String separated by comma each listing a SSH public key that is authorized
// to access the account.
// The keys should follow the same format as the lines in a traditional
// `~/.ssh/authorized_key` file.
Sshkeys *string `json:"sshkeys,omitempty"`
// A time since the UNIX epoch before which the record should be considered
// invalid for the purpose of logging in.
Notbefore *int `json:"notbefore,omitempty"`
// A time since the UNIX epoch after which the record should be considered
// invalid for the purpose of logging in.
Notafter *int `json:"notafter,omitempty"`
}
Parameters for the `homectl` Ansible module.
func (HomectlParameters) ToRPCCall ¶ added in v0.0.7
func (p HomectlParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `HomectlParameters into an `rpc.RPCCall`.
type HomectlReturn ¶ added in v0.0.7
type HomectlReturn struct {
AnsibleCommonReturns
// Dictionary returned from `homectl inspect -j`.
Data *map[string]any `json:"data,omitempty"`
}
Return values for the `homectl` Ansible module.
func HomectlReturnFromRPCResult ¶ added in v0.0.7
func HomectlReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (HomectlReturn, error)
Unwrap the `rpc.RPCResult` into an `HomectlReturn`
type HomectlState ¶ added in v0.0.7
type HomectlState string
The operation to take on the user.
const ( HomectlStateAbsent HomectlState = "absent" HomectlStatePresent HomectlState = "present" )
func OptionalHomectlState ¶ added in v0.0.7
func OptionalHomectlState[T interface {
*HomectlState | HomectlState | *string | string
}](s T) *HomectlState
Convert a supported type to an optional (pointer) HomectlState
type HomectlStorage ¶ added in v0.0.7
type HomectlStorage string
Indicates the storage mechanism for the user's home directory. If the storage type is not specified, `homed.conf(5\`) defines which default storage to use. Only used when a user is first created.
const ( HomectlStorageClassic HomectlStorage = "classic" HomectlStorageLuks HomectlStorage = "luks" HomectlStorageDirectory HomectlStorage = "directory" HomectlStorageSubvolume HomectlStorage = "subvolume" HomectlStorageFscrypt HomectlStorage = "fscrypt" HomectlStorageCifs HomectlStorage = "cifs" )
func OptionalHomectlStorage ¶ added in v0.0.7
func OptionalHomectlStorage[T interface {
*HomectlStorage | HomectlStorage | *string | string
}](s T) *HomectlStorage
Convert a supported type to an optional (pointer) HomectlStorage
type HostnameParameters ¶
type HostnameParameters struct {
// Name of the host.
// If the value is a fully qualified domain name that does not resolve from the
// given host, this will cause the module to hang for a few seconds while
// waiting for the name resolution attempt to timeout.
Name string `json:"name"`
// Which strategy to use to update the hostname.
// If not set we try to autodetect, but this can be problematic, particularly
// with containers as they can present misleading information.
// Note that `systemd` should be specified for RHEL/EL/CentOS 7+. Older
// distributions should use `redhat`.
Use *HostnameUse `json:"use,omitempty"`
}
Parameters for the `hostname` Ansible module.
func (HostnameParameters) ToRPCCall ¶
func (p HostnameParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `HostnameParameters into an `rpc.RPCCall`.
type HostnameReturn ¶
type HostnameReturn struct {
AnsibleCommonReturns
}
Return values for the `hostname` Ansible module.
func HostnameReturnFromRPCResult ¶
func HostnameReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (HostnameReturn, error)
Unwrap the `rpc.RPCResult` into an `HostnameReturn`
type HostnameUse ¶ added in v0.0.7
type HostnameUse string
Which strategy to use to update the hostname. If not set we try to autodetect, but this can be problematic, particularly with containers as they can present misleading information. Note that `systemd` should be specified for RHEL/EL/CentOS 7+. Older distributions should use `redhat`.
const ( HostnameUseAlpine HostnameUse = "alpine" HostnameUseDebian HostnameUse = "debian" HostnameUseFreebsd HostnameUse = "freebsd" HostnameUseGeneric HostnameUse = "generic" HostnameUseMacos HostnameUse = "macos" HostnameUseMacosx HostnameUse = "macosx" HostnameUseDarwin HostnameUse = "darwin" HostnameUseOpenbsd HostnameUse = "openbsd" HostnameUseOpenrc HostnameUse = "openrc" HostnameUseRedhat HostnameUse = "redhat" HostnameUseSles HostnameUse = "sles" HostnameUseSolaris HostnameUse = "solaris" HostnameUseSystemd HostnameUse = "systemd" )
func OptionalHostnameUse ¶ added in v0.0.7
func OptionalHostnameUse[T interface {
*HostnameUse | HostnameUse | *string | string
}](s T) *HostnameUse
Convert a supported type to an optional (pointer) HostnameUse
type HponcfgParameters ¶ added in v0.0.7
type HponcfgParameters struct {
// The XML file as accepted by `hponcfg`.
Path string `json:"path"`
// The minimum firmware level needed.
Minfw *string `json:"minfw,omitempty"`
// Path to the hponcfg executable (`hponcfg` which uses `PATH`).
// default: "hponcfg"
Executable *string `json:"executable,omitempty"`
// Run `hponcfg` in verbose mode (-v).
// default: false
Verbose *bool `json:"verbose,omitempty"`
}
Parameters for the `hponcfg` Ansible module.
func (HponcfgParameters) ToRPCCall ¶ added in v0.0.7
func (p HponcfgParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `HponcfgParameters into an `rpc.RPCCall`.
type HponcfgReturn ¶ added in v0.0.7
type HponcfgReturn struct {
AnsibleCommonReturns
}
Return values for the `hponcfg` Ansible module.
func HponcfgReturnFromRPCResult ¶ added in v0.0.7
func HponcfgReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (HponcfgReturn, error)
Unwrap the `rpc.RPCResult` into an `HponcfgReturn`
type IniFileParameters ¶ added in v0.0.7
type IniFileParameters struct {
// Path to the INI-style file; this file is created if required.
Path string `json:"path"`
// Section name in INI file. This is added if `state=present` automatically
// when a single value is being set.
// If being omitted, the `option` will be placed before the first `section`.
// Omitting `section` is also required if the config format does not support
// sections.
Section *string `json:"section,omitempty"`
// Among possibly multiple sections of the same name, select the first one that
// contains matching options and values.
// With `state=present`, if a suitable section is not found, a new section will
// be added, including the required options.
// With `state=absent`, at most one `section` is removed if it contains the
// values.
SectionHasValues *struct {
Option string `json:"option"`
Value *string `json:"value,omitempty"`
Values *[]string `json:"values,omitempty"`
} `json:"section_has_values,omitempty"`
// If set (required for changing a `value`), this is the name of the option.
// May be omitted if adding/removing a whole `section`.
Option *string `json:"option,omitempty"`
// The string value to be associated with an `option`.
// May be omitted when removing an `option`.
// Mutually exclusive with `values`.
// `value=v` is equivalent to `values=[v]`.
Value *string `json:"value,omitempty"`
// The string value to be associated with an `option`.
// May be omitted when removing an `option`.
// Mutually exclusive with `value`.
// `value=v` is equivalent to `values=[v]`.
Values *[]string `json:"values,omitempty"`
// Create a backup file including the timestamp information so you can get the
// original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
// If set to `absent` and `exclusive` set to `true` all matching `option` lines
// are removed.
// If set to `absent` and `exclusive` set to `false` the specified
// `option=value` lines are removed, but the other `option`s with the same name
// are not touched.
// If set to `present` and `exclusive` set to `false` the specified
// `option=values` lines are added, but the other `option`s with the same name
// are not touched.
// If set to `present` and `exclusive` set to `true` all given `option=values`
// lines will be added and the other `option`s with the same name are removed.
// default: IniFileStatePresent
State *IniFileState `json:"state,omitempty"`
// If set to `true` (default), all matching `option` lines are removed when
// `state=absent`, or replaced when `state=present`.
// If set to `false`, only the specified `value`/`values` are added when
// `state=present`, or removed when `state=absent`, and existing ones are not
// modified.
// default: true
Exclusive *bool `json:"exclusive,omitempty"`
// Do not insert spaces before and after '=' symbol.
// default: false
NoExtraSpaces *bool `json:"no_extra_spaces,omitempty"`
// Do not change a line if doing so would only add or remove spaces before or
// after the `=` symbol.
// default: false
IgnoreSpaces *bool `json:"ignore_spaces,omitempty"`
// If set to `false`, the module will fail if the file does not already exist.
// By default it will create the file if it is missing.
// default: true
Create *bool `json:"create,omitempty"`
// Allow option without value and without '=' symbol.
// default: false
AllowNoValue *bool `json:"allow_no_value,omitempty"`
// By default the module replaces a commented line that matches the given
// option.
// Set this option to `false` to avoid this. This is useful when you want to
// keep commented example `key=value` pairs for documentation purposes.
// default: true
ModifyInactiveOption *bool `json:"modify_inactive_option,omitempty"`
// This flag indicates that filesystem links, if they exist, should be
// followed.
// `follow=true` can modify `path` when combined with parameters such as
// `mode`.
// default: false
Follow *bool `json:"follow,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
}
Parameters for the `ini_file` Ansible module.
func (IniFileParameters) ToRPCCall ¶ added in v0.0.7
func (p IniFileParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `IniFileParameters into an `rpc.RPCCall`.
type IniFileReturn ¶ added in v0.0.7
type IniFileReturn struct {
AnsibleCommonReturns
}
Return values for the `ini_file` Ansible module.
func IniFileReturnFromRPCResult ¶ added in v0.0.7
func IniFileReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (IniFileReturn, error)
Unwrap the `rpc.RPCResult` into an `IniFileReturn`
type IniFileState ¶ added in v0.0.7
type IniFileState string
If set to `absent` and `exclusive` set to `true` all matching `option` lines are removed. If set to `absent` and `exclusive` set to `false` the specified `option=value` lines are removed, but the other `option`s with the same name are not touched. If set to `present` and `exclusive` set to `false` the specified `option=values` lines are added, but the other `option`s with the same name are not touched. If set to `present` and `exclusive` set to `true` all given `option=values` lines will be added and the other `option`s with the same name are removed.
const ( IniFileStateAbsent IniFileState = "absent" IniFileStatePresent IniFileState = "present" )
func OptionalIniFileState ¶ added in v0.0.7
func OptionalIniFileState[T interface {
*IniFileState | IniFileState | *string | string
}](s T) *IniFileState
Convert a supported type to an optional (pointer) IniFileState
type InstallpParameters ¶ added in v0.0.7
type InstallpParameters struct {
// Whether to accept the license for the package(s).
// default: false
AcceptLicense *bool `json:"accept_license,omitempty"`
// One or more packages to install or remove.
// Use `all` to install all packages available on informed `repository_path`.
Name []string `json:"name"`
// Path with AIX packages (required to install).
RepositoryPath *string `json:"repository_path,omitempty"`
// Whether the package needs to be present on or absent from the system.
// default: InstallpStatePresent
State *InstallpState `json:"state,omitempty"`
}
Parameters for the `installp` Ansible module.
func (InstallpParameters) ToRPCCall ¶ added in v0.0.7
func (p InstallpParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `InstallpParameters into an `rpc.RPCCall`.
type InstallpReturn ¶ added in v0.0.7
type InstallpReturn struct {
AnsibleCommonReturns
}
Return values for the `installp` Ansible module.
func InstallpReturnFromRPCResult ¶ added in v0.0.7
func InstallpReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (InstallpReturn, error)
Unwrap the `rpc.RPCResult` into an `InstallpReturn`
type InstallpState ¶ added in v0.0.7
type InstallpState string
Whether the package needs to be present on or absent from the system.
const ( InstallpStateAbsent InstallpState = "absent" InstallpStatePresent InstallpState = "present" )
func OptionalInstallpState ¶ added in v0.0.7
func OptionalInstallpState[T interface {
*InstallpState | InstallpState | *string | string
}](s T) *InstallpState
Convert a supported type to an optional (pointer) InstallpState
type InterfacesFileParameters ¶ added in v0.0.7
type InterfacesFileParameters struct {
// Path to the interfaces file.
// default: "/etc/network/interfaces"
Dest *string `json:"dest,omitempty"`
// Name of the interface, required for value changes or option remove.
Iface *string `json:"iface,omitempty"`
// Address family of the interface, useful if same interface name is used for
// both `inet` and `inet6`.
AddressFamily *string `json:"address_family,omitempty"`
// Name of the option, required for value changes or option remove.
Option *string `json:"option,omitempty"`
// If `option` is not presented for the `iface` and `state` is `present` option
// will be added. If `option` already exists and is not `pre-up`, `up`, `post-
// up` or `down`, its value will be updated. `pre-up`, `up`, `post-up` and
// `down` options cannot be updated, only adding new options, removing existing
// ones or cleaning the whole option set are supported.
Value *string `json:"value,omitempty"`
// Create a backup file including the timestamp information so you can get the
// original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
// If set to `absent` the option or section will be removed if present instead
// of created.
// default: InterfacesFileStatePresent
State *InterfacesFileState `json:"state,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
}
Parameters for the `interfaces_file` Ansible module.
func (InterfacesFileParameters) ToRPCCall ¶ added in v0.0.7
func (p InterfacesFileParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `InterfacesFileParameters into an `rpc.RPCCall`.
type InterfacesFileReturn ¶ added in v0.0.7
type InterfacesFileReturn struct {
AnsibleCommonReturns
// Destination file/path.
Dest *string `json:"dest,omitempty"`
// Interfaces dictionary.
Ifaces *map[string]any `json:"ifaces,omitempty"`
}
Return values for the `interfaces_file` Ansible module.
func InterfacesFileReturnFromRPCResult ¶ added in v0.0.7
func InterfacesFileReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (InterfacesFileReturn, error)
Unwrap the `rpc.RPCResult` into an `InterfacesFileReturn`
type InterfacesFileState ¶ added in v0.0.7
type InterfacesFileState string
If set to `absent` the option or section will be removed if present instead of created.
const ( InterfacesFileStatePresent InterfacesFileState = "present" InterfacesFileStateAbsent InterfacesFileState = "absent" )
func OptionalInterfacesFileState ¶ added in v0.0.7
func OptionalInterfacesFileState[T interface {
*InterfacesFileState | InterfacesFileState | *string | string
}](s T) *InterfacesFileState
Convert a supported type to an optional (pointer) InterfacesFileState
type IpNetnsParameters ¶ added in v0.0.7
type IpNetnsParameters struct {
// Name of the namespace.
Name *string `json:"name,omitempty"`
// Whether the namespace should exist.
// default: IpNetnsStatePresent
State *IpNetnsState `json:"state,omitempty"`
}
Parameters for the `ip_netns` Ansible module.
func (IpNetnsParameters) ToRPCCall ¶ added in v0.0.7
func (p IpNetnsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `IpNetnsParameters into an `rpc.RPCCall`.
type IpNetnsReturn ¶ added in v0.0.7
type IpNetnsReturn struct {
AnsibleCommonReturns
}
Return values for the `ip_netns` Ansible module.
func IpNetnsReturnFromRPCResult ¶ added in v0.0.7
func IpNetnsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (IpNetnsReturn, error)
Unwrap the `rpc.RPCResult` into an `IpNetnsReturn`
type IpNetnsState ¶ added in v0.0.7
type IpNetnsState string
Whether the namespace should exist.
const ( IpNetnsStatePresent IpNetnsState = "present" IpNetnsStateAbsent IpNetnsState = "absent" )
func OptionalIpNetnsState ¶ added in v0.0.7
func OptionalIpNetnsState[T interface {
*IpNetnsState | IpNetnsState | *string | string
}](s T) *IpNetnsState
Convert a supported type to an optional (pointer) IpNetnsState
type IpmiBootBootdev ¶ added in v0.0.7
type IpmiBootBootdev string
Set boot device to use on next reboot. The choices for the device are: `network` -- Request network boot. `floppy` -- Boot from floppy. `hd` -- Boot from hard drive. `safe` -- Boot from hard drive, requesting 'safe mode'. `optical` -- boot from CD/DVD/BD drive. `setup` -- Boot into setup utility. `default` -- remove any IPMI directed boot device request.
const ( IpmiBootBootdevNetwork IpmiBootBootdev = "network" IpmiBootBootdevFloppy IpmiBootBootdev = "floppy" IpmiBootBootdevHd IpmiBootBootdev = "hd" IpmiBootBootdevSafe IpmiBootBootdev = "safe" IpmiBootBootdevOptical IpmiBootBootdev = "optical" IpmiBootBootdevSetup IpmiBootBootdev = "setup" IpmiBootBootdevDefault IpmiBootBootdev = "default" )
type IpmiBootParameters ¶ added in v0.0.7
type IpmiBootParameters struct {
// Hostname or IP address of the BMC.
Name string `json:"name"`
// Remote RMCP port.
// default: 623
Port *int `json:"port,omitempty"`
// Username to use to connect to the BMC.
User string `json:"user"`
// Password to connect to the BMC.
Password string `json:"password"`
// Encryption key to connect to the BMC in hex format.
Key *string `json:"key,omitempty"`
// Set boot device to use on next reboot.
// The choices for the device are:
// `network` -- Request network boot.
// `floppy` -- Boot from floppy.
// `hd` -- Boot from hard drive.
// `safe` -- Boot from hard drive, requesting 'safe mode'.
// `optical` -- boot from CD/DVD/BD drive.
// `setup` -- Boot into setup utility.
// `default` -- remove any IPMI directed boot device request.
Bootdev IpmiBootBootdev `json:"bootdev"`
// Whether to ensure that boot devices is desired.
// The choices for the state are: - present -- Request system turn on - absent
// -- Request system turn on.
// default: IpmiBootStatePresent
State *IpmiBootState `json:"state,omitempty"`
// If set, ask that system firmware uses this device beyond next boot. Be aware
// many systems do not honor this.
// default: false
Persistent *bool `json:"persistent,omitempty"`
// If set, request UEFI boot explicitly. Strictly speaking, the spec suggests
// that if not set, the system should BIOS boot and offers no "do not care"
// option. In practice, this flag not being set does not preclude UEFI boot on
// any system I have encountered.
// default: false
Uefiboot *bool `json:"uefiboot,omitempty"`
}
Parameters for the `ipmi_boot` Ansible module.
func (IpmiBootParameters) ToRPCCall ¶ added in v0.0.7
func (p IpmiBootParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `IpmiBootParameters into an `rpc.RPCCall`.
type IpmiBootReturn ¶ added in v0.0.7
type IpmiBootReturn struct {
AnsibleCommonReturns
// The boot device name which will be used beyond next boot.
Bootdev *string `json:"bootdev,omitempty"`
// If True, system firmware will use this device beyond next boot.
Persistent *bool `json:"persistent,omitempty"`
// If True, system firmware will use UEFI boot explicitly beyond next boot.
Uefimode *bool `json:"uefimode,omitempty"`
}
Return values for the `ipmi_boot` Ansible module.
func IpmiBootReturnFromRPCResult ¶ added in v0.0.7
func IpmiBootReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (IpmiBootReturn, error)
Unwrap the `rpc.RPCResult` into an `IpmiBootReturn`
type IpmiBootState ¶ added in v0.0.7
type IpmiBootState string
Whether to ensure that boot devices is desired. The choices for the state are: - present -- Request system turn on - absent -- Request system turn on.
const ( IpmiBootStatePresent IpmiBootState = "present" IpmiBootStateAbsent IpmiBootState = "absent" )
func OptionalIpmiBootState ¶ added in v0.0.7
func OptionalIpmiBootState[T interface {
*IpmiBootState | IpmiBootState | *string | string
}](s T) *IpmiBootState
Convert a supported type to an optional (pointer) IpmiBootState
type IpmiPowerParameters ¶ added in v0.0.7
type IpmiPowerParameters struct {
// Hostname or IP address of the BMC.
Name string `json:"name"`
// Remote RMCP port.
// default: 623
Port *int `json:"port,omitempty"`
// Username to use to connect to the BMC.
User string `json:"user"`
// Password to connect to the BMC.
Password string `json:"password"`
// Encryption key to connect to the BMC in hex format.
Key *string `json:"key,omitempty"`
// Whether to ensure that the machine in desired state.
// The choices for state are:
// `on` -- Request system turn on.
// `off` -- Request system turn off without waiting for OS to shutdown.
// `shutdown` -- Have system request OS proper shutdown.
// `reset` -- Request system reset without waiting for OS.
// `boot` -- If system is off, then `on`, else `reset`.
// Either this option or `machine` is required.
State *IpmiPowerState `json:"state,omitempty"`
// Maximum number of seconds before interrupt request.
// default: 300
Timeout *int `json:"timeout,omitempty"`
// Provide a list of the remote target address for the bridge IPMI request, and
// the power status.
// Either this option or `state` is required.
Machine *struct {
Targetaddress int `json:"targetAddress"`
State *string `json:"state,omitempty"`
} `json:"machine,omitempty"`
}
Parameters for the `ipmi_power` Ansible module.
func (IpmiPowerParameters) ToRPCCall ¶ added in v0.0.7
func (p IpmiPowerParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `IpmiPowerParameters into an `rpc.RPCCall`.
type IpmiPowerReturn ¶ added in v0.0.7
type IpmiPowerReturn struct {
AnsibleCommonReturns
// The current power state of the machine.
Powerstate *string `json:"powerstate,omitempty"`
// The current power state of the machine when the machine option is set.
Status *map[string]any `json:"status,omitempty"`
}
Return values for the `ipmi_power` Ansible module.
func IpmiPowerReturnFromRPCResult ¶ added in v0.0.7
func IpmiPowerReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (IpmiPowerReturn, error)
Unwrap the `rpc.RPCResult` into an `IpmiPowerReturn`
type IpmiPowerState ¶ added in v0.0.7
type IpmiPowerState string
Whether to ensure that the machine in desired state. The choices for state are: `on` -- Request system turn on. `off` -- Request system turn off without waiting for OS to shutdown. `shutdown` -- Have system request OS proper shutdown. `reset` -- Request system reset without waiting for OS. `boot` -- If system is off, then `on`, else `reset`. Either this option or `machine` is required.
const ( IpmiPowerStateOn IpmiPowerState = "on" IpmiPowerStateOff IpmiPowerState = "off" IpmiPowerStateShutdown IpmiPowerState = "shutdown" IpmiPowerStateReset IpmiPowerState = "reset" IpmiPowerStateBoot IpmiPowerState = "boot" )
func OptionalIpmiPowerState ¶ added in v0.0.7
func OptionalIpmiPowerState[T interface {
*IpmiPowerState | IpmiPowerState | *string | string
}](s T) *IpmiPowerState
Convert a supported type to an optional (pointer) IpmiPowerState
type IptablesAction ¶ added in v0.0.7
type IptablesAction string
Whether the rule should be appended at the bottom or inserted at the top. If the rule already exists the chain will not be modified.
const ( IptablesActionAppend IptablesAction = "append" IptablesActionInsert IptablesAction = "insert" )
func OptionalIptablesAction ¶ added in v0.0.7
func OptionalIptablesAction[T interface {
*IptablesAction | IptablesAction | *string | string
}](s T) *IptablesAction
Convert a supported type to an optional (pointer) IptablesAction
type IptablesIpVersion ¶ added in v0.0.7
type IptablesIpVersion string
Which version of the IP protocol this rule should apply to.
const ( IptablesIpVersionIpv4 IptablesIpVersion = "ipv4" IptablesIpVersionIpv6 IptablesIpVersion = "ipv6" )
func OptionalIptablesIpVersion ¶ added in v0.0.7
func OptionalIptablesIpVersion[T interface {
*IptablesIpVersion | IptablesIpVersion | *string | string
}](s T) *IptablesIpVersion
Convert a supported type to an optional (pointer) IptablesIpVersion
type IptablesLogLevel ¶ added in v0.0.7
type IptablesLogLevel string
Logging level according to the syslogd-defined priorities. The value can be strings or numbers from 1-8. This parameter is only applicable if `jump=LOG`.
const ( IptablesLogLevel0 IptablesLogLevel = "0" IptablesLogLevel1 IptablesLogLevel = "1" IptablesLogLevel2 IptablesLogLevel = "2" IptablesLogLevel3 IptablesLogLevel = "3" IptablesLogLevel4 IptablesLogLevel = "4" IptablesLogLevel5 IptablesLogLevel = "5" IptablesLogLevel6 IptablesLogLevel = "6" IptablesLogLevel7 IptablesLogLevel = "7" IptablesLogLevelEmerg IptablesLogLevel = "emerg" IptablesLogLevelAlert IptablesLogLevel = "alert" IptablesLogLevelCrit IptablesLogLevel = "crit" IptablesLogLevelError IptablesLogLevel = "error" IptablesLogLevelWarning IptablesLogLevel = "warning" IptablesLogLevelNotice IptablesLogLevel = "notice" IptablesLogLevelInfo IptablesLogLevel = "info" IptablesLogLevelDebug IptablesLogLevel = "debug" )
func OptionalIptablesLogLevel ¶ added in v0.0.7
func OptionalIptablesLogLevel[T interface {
*IptablesLogLevel | IptablesLogLevel | *string | string
}](s T) *IptablesLogLevel
Convert a supported type to an optional (pointer) IptablesLogLevel
type IptablesMatchSetFlags ¶ added in v0.0.7
type IptablesMatchSetFlags string
Specifies the necessary flags for the match_set parameter. Must be used together with the `match_set` parameter. Uses the iptables set extension. Choices `dst,dst` and `src,src` added in version 2.17.
const ( IptablesMatchSetFlagsSrc IptablesMatchSetFlags = "src" IptablesMatchSetFlagsDst IptablesMatchSetFlags = "dst" IptablesMatchSetFlagsSrcDst IptablesMatchSetFlags = "src,dst" IptablesMatchSetFlagsDstSrc IptablesMatchSetFlags = "dst,src" IptablesMatchSetFlagsDstDst IptablesMatchSetFlags = "dst,dst" IptablesMatchSetFlagsSrcSrc IptablesMatchSetFlags = "src,src" )
func OptionalIptablesMatchSetFlags ¶ added in v0.0.7
func OptionalIptablesMatchSetFlags[T interface {
*IptablesMatchSetFlags | IptablesMatchSetFlags | *string | string
}](s T) *IptablesMatchSetFlags
Convert a supported type to an optional (pointer) IptablesMatchSetFlags
type IptablesParameters ¶
type IptablesParameters struct {
// This option specifies the packet matching table on which the command should
// operate.
// If the kernel is configured with automatic module loading, an attempt will
// be made to load the appropriate module for that table if it is not already
// there.
// default: IptablesTableFilter
Table *IptablesTable `json:"table,omitempty"`
// Whether the rule should be absent or present.
// default: IptablesStatePresent
State *IptablesState `json:"state,omitempty"`
// Whether the rule should be appended at the bottom or inserted at the top.
// If the rule already exists the chain will not be modified.
// default: IptablesActionAppend
Action *IptablesAction `json:"action,omitempty"`
// Insert the rule as the given rule number.
// This works only with `action=insert`.
RuleNum *string `json:"rule_num,omitempty"`
// Which version of the IP protocol this rule should apply to.
// default: IptablesIpVersionIpv4
IpVersion *IptablesIpVersion `json:"ip_version,omitempty"`
// Specify the iptables chain to modify.
// This could be a user-defined chain or one of the standard iptables chains,
// like `INPUT`, `FORWARD`, `OUTPUT`, `PREROUTING`, `POSTROUTING`, `SECMARK` or
// `CONNSECMARK`.
Chain *string `json:"chain,omitempty"`
// The protocol of the rule or of the packet to check.
// The specified protocol can be one of `tcp`, `udp`, `udplite`, `icmp`,
// `ipv6-icmp` or `icmpv6`, `esp`, `ah`, `sctp` or the special keyword `all`,
// or it can be a numeric value, representing one of these protocols or a
// different one.
// A protocol name from `/etc/protocols` is also allowed.
// A `!` argument before the protocol inverts the test.
// The number zero is equivalent to all.
// `all` will match with all protocols and is taken as default when this option
// is omitted.
Protocol *string `json:"protocol,omitempty"`
// Source specification.
// Address can be either a network name, a hostname, a network IP address (with
// /mask), or a plain IP address.
// Hostnames will be resolved once only, before the rule is submitted to the
// kernel. Please note that specifying any name to be resolved with a remote
// query such as DNS is a really bad idea.
// The mask can be either a network mask or a plain number, specifying the
// number of 1's at the left side of the network mask. Thus, a mask of 24 is
// equivalent to 255.255.255.0. A `!` argument before the address specification
// inverts the sense of the address.
Source *string `json:"source,omitempty"`
// Destination specification.
// Address can be either a network name, a hostname, a network IP address (with
// /mask), or a plain IP address.
// Hostnames will be resolved once only, before the rule is submitted to the
// kernel. Please note that specifying any name to be resolved with a remote
// query such as DNS is a really bad idea.
// The mask can be either a network mask or a plain number, specifying the
// number of 1's at the left side of the network mask. Thus, a mask of 24 is
// equivalent to 255.255.255.0. A `!` argument before the address specification
// inverts the sense of the address.
Destination *string `json:"destination,omitempty"`
// TCP flags specification.
// `tcp_flags` expects a dict with the two keys `flags` and `flags_set`.
TcpFlags *struct {
Flags *[]string `json:"flags,omitempty"`
FlagsSet *[]string `json:"flags_set,omitempty"`
} `json:"tcp_flags,omitempty"`
// Specifies a match to use, that is, an extension module that tests for a
// specific property.
// The set of matches makes up the condition under which a target is invoked.
// Matches are evaluated first to last if specified as an array and work in
// short-circuit fashion, in other words if one extension yields false, the
// evaluation will stop.
// default: []
Match *[]string `json:"match,omitempty"`
// This specifies the target of the rule; i.e., what to do if the packet
// matches it.
// The target can be a user-defined chain (other than the one this rule is in),
// one of the special builtin targets that decide the fate of the packet
// immediately, or an extension (see EXTENSIONS below).
// If this option is omitted in a rule (and the goto parameter is not used),
// then matching the rule will have no effect on the packet's fate, but the
// counters on the rule will be incremented.
Jump *string `json:"jump,omitempty"`
// This specifies the IP address of the host to send the cloned packets.
// This option is only valid when `jump=TEE`.
Gateway *string `json:"gateway,omitempty"`
// Specifies a log text for the rule. Only makes sense with a LOG jump.
LogPrefix *string `json:"log_prefix,omitempty"`
// Logging level according to the syslogd-defined priorities.
// The value can be strings or numbers from 1-8.
// This parameter is only applicable if `jump=LOG`.
LogLevel *IptablesLogLevel `json:"log_level,omitempty"`
// This specifies that the processing should continue in a user-specified
// chain.
// Unlike the jump argument return will not continue processing in this chain
// but instead in the chain that called us via jump.
Goto *string `json:"goto,omitempty"`
// Name of an interface via which a packet was received (only for packets
// entering the `INPUT`, `FORWARD` and `PREROUTING` chains).
// When the `!` argument is used before the interface name, the sense is
// inverted.
// If the interface name ends in a `+`, then any interface which begins with
// this name will match.
// If this option is omitted, any interface name will match.
InInterface *string `json:"in_interface,omitempty"`
// Name of an interface via which a packet is going to be sent (for packets
// entering the `FORWARD`, `OUTPUT` and `POSTROUTING` chains).
// When the `!` argument is used before the interface name, the sense is
// inverted.
// If the interface name ends in a `+`, then any interface which begins with
// this name will match.
// If this option is omitted, any interface name will match.
OutInterface *string `json:"out_interface,omitempty"`
// This means that the rule only refers to second and further fragments of
// fragmented packets.
// Since there is no way to tell the source or destination ports of such a
// packet (or ICMP type), such a packet will not match any rules which specify
// them.
// When the "!" argument precedes the fragment argument, the rule will only
// match head fragments, or unfragmented packets.
Fragment *string `json:"fragment,omitempty"`
// This enables the administrator to initialize the packet and byte counters of
// a rule (during `INSERT`, `APPEND`, `REPLACE` operations).
SetCounters *string `json:"set_counters,omitempty"`
// Source port or port range specification.
// This can either be a service name or a port number.
// An inclusive range can also be specified, using the format `first:last`.
// If the first port is omitted, `0` is assumed; if the last is omitted,
// `65535` is assumed.
// If the first port is greater than the second one they will be swapped.
SourcePort *string `json:"source_port,omitempty"`
// Destination port or port range specification. This can either be a service
// name or a port number. An inclusive range can also be specified, using the
// format first:last. If the first port is omitted, '0' is assumed; if the last
// is omitted, '65535' is assumed. If the first port is greater than the second
// one they will be swapped. This is only valid if the rule also specifies one
// of the following protocols: tcp, udp, dccp or sctp.
DestinationPort *string `json:"destination_port,omitempty"`
// This specifies multiple destination port numbers or port ranges to match in
// the multiport module.
// It can only be used in conjunction with the protocols tcp, udp, udplite,
// dccp and sctp.
// default: []
DestinationPorts *[]string `json:"destination_ports,omitempty"`
// This specifies a destination port or range of ports to use, without this,
// the destination port is never altered.
// This is only valid if the rule also specifies one of the protocol `tcp`,
// `udp`, `dccp` or `sctp`.
ToPorts *string `json:"to_ports,omitempty"`
// This specifies a destination address to use with `ctstate=DNAT`.
// Without this, the destination address is never altered.
ToDestination *string `json:"to_destination,omitempty"`
// This specifies a source address to use with `ctstate=SNAT`.
// Without this, the source address is never altered.
ToSource *string `json:"to_source,omitempty"`
// This allows matching packets that have the SYN bit set and the ACK and RST
// bits unset.
// When negated, this matches all packets with the RST or the ACK bits set.
// default: IptablesSynIgnore
Syn *IptablesSyn `json:"syn,omitempty"`
// This allows specifying a DSCP mark to be added to packets. It takes either
// an integer or hex value.
// If the parameter is set, `jump` is set to `DSCP`.
// Mutually exclusive with `set_dscp_mark_class`.
SetDscpMark *string `json:"set_dscp_mark,omitempty"`
// This allows specifying a predefined DiffServ class which will be translated
// to the corresponding DSCP mark.
// If the parameter is set, `jump` is set to `DSCP`.
// Mutually exclusive with `set_dscp_mark`.
SetDscpMarkClass *string `json:"set_dscp_mark_class,omitempty"`
// This specifies a comment that will be added to the rule.
Comment *string `json:"comment,omitempty"`
// A list of the connection states to match in the conntrack module.
// Possible values are `INVALID`, `NEW`, `ESTABLISHED`, `RELATED`, `UNTRACKED`,
// `SNAT`, `DNAT`.
// default: []
Ctstate *[]string `json:"ctstate,omitempty"`
// Specifies the source IP range to match the iprange module.
SrcRange *string `json:"src_range,omitempty"`
// Specifies the destination IP range to match in the iprange module.
DstRange *string `json:"dst_range,omitempty"`
// Specifies a set name that can be defined by ipset.
// Must be used together with the `match_set_flags` parameter.
// When the `!` argument is prepended then it inverts the rule.
// Uses the iptables set extension.
MatchSet *string `json:"match_set,omitempty"`
// Specifies the necessary flags for the match_set parameter.
// Must be used together with the `match_set` parameter.
// Uses the iptables set extension.
// Choices `dst,dst` and `src,src` added in version 2.17.
MatchSetFlags *IptablesMatchSetFlags `json:"match_set_flags,omitempty"`
// Specifies the maximum average number of matches to allow per second.
// The number can specify units explicitly, using `/second`, `/minute`, `/hour`
// or `/day`, or parts of them (so `5/second` is the same as `5/s`).
Limit *string `json:"limit,omitempty"`
// Specifies the maximum burst before the above limit kicks in.
LimitBurst *string `json:"limit_burst,omitempty"`
// Specifies the UID or username to use in the match by owner rule.
// From Ansible 2.6 when the `!` argument is prepended then the it inverts the
// rule to apply instead to all users except that one specified.
UidOwner *string `json:"uid_owner,omitempty"`
// Specifies the GID or group to use in the match by owner rule.
GidOwner *string `json:"gid_owner,omitempty"`
// Specifies the error packet type to return while rejecting. It implies
// `jump=REJECT`.
RejectWith *string `json:"reject_with,omitempty"`
// This allows specification of the ICMP type, which can be a numeric ICMP
// type, type/code pair, or one of the ICMP type names shown by the command
// `iptables -p icmp -h`.
IcmpType *string `json:"icmp_type,omitempty"`
// Flushes the specified table and chain of all rules.
// If no chain is specified then the entire table is purged.
// Ignores all other parameters.
// default: false
Flush *bool `json:"flush,omitempty"`
// Set the policy for the chain to the given target.
// Only built-in chains can have policies.
// This parameter requires the `chain` parameter.
// If you specify this parameter, all other parameters will be ignored.
// This parameter is used to set the default policy for the given `chain`. Do
// not confuse this with `jump` parameter.
Policy *IptablesPolicy `json:"policy,omitempty"`
// Wait N seconds for the xtables lock to prevent multiple instances of the
// program from running concurrently.
Wait *string `json:"wait,omitempty"`
// If `true` and `state` is `present`, the chain will be created if needed.
// If `true` and `state` is `absent`, the chain will be deleted if the only
// other parameter passed are `chain` and optionally `table`.
// default: false
ChainManagement *bool `json:"chain_management,omitempty"`
// This parameter controls the running of the list -action of iptables, which
// is used internally by the module.
// Does not affect the actual functionality. Use this if iptables hang when
// creating a chain or altering policy.
// If `true`, then iptables skips the DNS-lookup of the IP addresses in a chain
// when it uses the list -action.
// Listing is used internally for example when setting a policy or creating a
// chain.
// default: false
Numeric *bool `json:"numeric,omitempty"`
}
Parameters for the `iptables` Ansible module.
func (IptablesParameters) ToRPCCall ¶
func (p IptablesParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `IptablesParameters into an `rpc.RPCCall`.
type IptablesPolicy ¶ added in v0.0.7
type IptablesPolicy string
Set the policy for the chain to the given target. Only built-in chains can have policies. This parameter requires the `chain` parameter. If you specify this parameter, all other parameters will be ignored. This parameter is used to set the default policy for the given `chain`. Do not confuse this with `jump` parameter.
const ( IptablesPolicyAccept IptablesPolicy = "ACCEPT" IptablesPolicyDrop IptablesPolicy = "DROP" IptablesPolicyQueue IptablesPolicy = "QUEUE" IptablesPolicyReturn IptablesPolicy = "RETURN" )
func OptionalIptablesPolicy ¶ added in v0.0.7
func OptionalIptablesPolicy[T interface {
*IptablesPolicy | IptablesPolicy | *string | string
}](s T) *IptablesPolicy
Convert a supported type to an optional (pointer) IptablesPolicy
type IptablesReturn ¶
type IptablesReturn struct {
AnsibleCommonReturns
}
Return values for the `iptables` Ansible module.
func IptablesReturnFromRPCResult ¶
func IptablesReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (IptablesReturn, error)
Unwrap the `rpc.RPCResult` into an `IptablesReturn`
type IptablesState ¶ added in v0.0.7
type IptablesState string
Whether the rule should be absent or present.
const ( IptablesStateAbsent IptablesState = "absent" IptablesStatePresent IptablesState = "present" )
func OptionalIptablesState ¶ added in v0.0.7
func OptionalIptablesState[T interface {
*IptablesState | IptablesState | *string | string
}](s T) *IptablesState
Convert a supported type to an optional (pointer) IptablesState
type IptablesSyn ¶ added in v0.0.7
type IptablesSyn string
This allows matching packets that have the SYN bit set and the ACK and RST bits unset. When negated, this matches all packets with the RST or the ACK bits set.
const ( IptablesSynIgnore IptablesSyn = "ignore" IptablesSynMatch IptablesSyn = "match" IptablesSynNegate IptablesSyn = "negate" )
func OptionalIptablesSyn ¶ added in v0.0.7
func OptionalIptablesSyn[T interface {
*IptablesSyn | IptablesSyn | *string | string
}](s T) *IptablesSyn
Convert a supported type to an optional (pointer) IptablesSyn
type IptablesTable ¶ added in v0.0.7
type IptablesTable string
This option specifies the packet matching table on which the command should operate. If the kernel is configured with automatic module loading, an attempt will be made to load the appropriate module for that table if it is not already there.
const ( IptablesTableFilter IptablesTable = "filter" IptablesTableNat IptablesTable = "nat" IptablesTableMangle IptablesTable = "mangle" IptablesTableRaw IptablesTable = "raw" IptablesTableSecurity IptablesTable = "security" )
func OptionalIptablesTable ¶ added in v0.0.7
func OptionalIptablesTable[T interface {
*IptablesTable | IptablesTable | *string | string
}](s T) *IptablesTable
Convert a supported type to an optional (pointer) IptablesTable
type IsoCreateInterchangeLevel ¶ added in v0.0.7
type IsoCreateInterchangeLevel int
The ISO9660 interchange level to use, it dictates the rules on the names of files. Levels and valid values `1`, `2`, `3`, `4` are supported. The default value is level `1`, which is the most conservative, level `3` is recommended. ISO9660 file names at interchange level `1` cannot have more than 8 characters or 3 characters in the extension.
const ( IsoCreateInterchangeLevel1 IsoCreateInterchangeLevel = 1 IsoCreateInterchangeLevel2 IsoCreateInterchangeLevel = 2 IsoCreateInterchangeLevel3 IsoCreateInterchangeLevel = 3 IsoCreateInterchangeLevel4 IsoCreateInterchangeLevel = 4 )
func OptionalIsoCreateInterchangeLevel ¶ added in v0.0.7
func OptionalIsoCreateInterchangeLevel[T interface {
*IsoCreateInterchangeLevel | IsoCreateInterchangeLevel | *int | int
}](s T) *IsoCreateInterchangeLevel
Convert a supported type to an optional (pointer) IsoCreateInterchangeLevel
type IsoCreateJoliet ¶ added in v0.0.7
type IsoCreateJoliet int
Support levels and valid values are `1`, `2`, or `3`. Level `3` is by far the most common. If not specified, then no Joliet support is added.
const ( IsoCreateJoliet1 IsoCreateJoliet = 1 IsoCreateJoliet2 IsoCreateJoliet = 2 IsoCreateJoliet3 IsoCreateJoliet = 3 )
func OptionalIsoCreateJoliet ¶ added in v0.0.7
func OptionalIsoCreateJoliet[T interface {
*IsoCreateJoliet | IsoCreateJoliet | *int | int
}](s T) *IsoCreateJoliet
Convert a supported type to an optional (pointer) IsoCreateJoliet
type IsoCreateParameters ¶ added in v0.0.7
type IsoCreateParameters struct {
// This is a list of absolute paths of source files or folders which will be
// contained in the new generated ISO file.
// Will fail if specified file or folder in `src_files` does not exist on local
// machine.
// Note: With all ISO9660 levels from 1 to 3, all file names are restricted to
// uppercase letters, numbers and underscores (_). File names are limited to 31
// characters, directory nesting is limited to 8 levels, and path names are
// limited to 255 characters.
SrcFiles []string `json:"src_files"`
// The absolute path with file name of the new generated ISO file on local
// machine.
// Will create intermediate folders when they does not exist.
DestIso string `json:"dest_iso"`
// The ISO9660 interchange level to use, it dictates the rules on the names of
// files.
// Levels and valid values `1`, `2`, `3`, `4` are supported.
// The default value is level `1`, which is the most conservative, level `3` is
// recommended.
// ISO9660 file names at interchange level `1` cannot have more than 8
// characters or 3 characters in the extension.
// default: IsoCreateInterchangeLevel1
InterchangeLevel *IsoCreateInterchangeLevel `json:"interchange_level,omitempty"`
// The volume identification string to use on the new generated ISO image.
VolIdent *string `json:"vol_ident,omitempty"`
// Whether to make this ISO have the Rock Ridge extensions or not.
// Valid values are `1.09`, `1.10` or `1.12`, means adding the specified Rock
// Ridge version to the ISO.
// If unsure, set `1.09` to ensure maximum compatibility.
// If not specified, then not add Rock Ridge extension to the ISO.
RockRidge *IsoCreateRockRidge `json:"rock_ridge,omitempty"`
// Support levels and valid values are `1`, `2`, or `3`.
// Level `3` is by far the most common.
// If not specified, then no Joliet support is added.
Joliet *IsoCreateJoliet `json:"joliet,omitempty"`
// Whether to add UDF support to this ISO.
// If set to `true`, then version 2.60 of the UDF spec is used.
// If not specified or set to `false`, then no UDF support is added.
// default: false
Udf *bool `json:"udf,omitempty"`
}
Parameters for the `iso_create` Ansible module.
func (IsoCreateParameters) ToRPCCall ¶ added in v0.0.7
func (p IsoCreateParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `IsoCreateParameters into an `rpc.RPCCall`.
type IsoCreateReturn ¶ added in v0.0.7
type IsoCreateReturn struct {
AnsibleCommonReturns
// Configured source files or directories list.
SourceFile *[]string `json:"source_file,omitempty"`
// Created iso file path.
CreatedIso *string `json:"created_iso,omitempty"`
// Configured interchange level.
InterchangeLevel *int `json:"interchange_level,omitempty"`
// Configured volume identification string.
VolIdent *string `json:"vol_ident,omitempty"`
// Configured Joliet support level.
Joliet *int `json:"joliet,omitempty"`
// Configured Rock Ridge version.
RockRidge *string `json:"rock_ridge,omitempty"`
// Configured UDF support.
Udf *bool `json:"udf,omitempty"`
}
Return values for the `iso_create` Ansible module.
func IsoCreateReturnFromRPCResult ¶ added in v0.0.7
func IsoCreateReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (IsoCreateReturn, error)
Unwrap the `rpc.RPCResult` into an `IsoCreateReturn`
type IsoCreateRockRidge ¶ added in v0.0.7
type IsoCreateRockRidge string
Whether to make this ISO have the Rock Ridge extensions or not. Valid values are `1.09`, `1.10` or `1.12`, means adding the specified Rock Ridge version to the ISO. If unsure, set `1.09` to ensure maximum compatibility. If not specified, then not add Rock Ridge extension to the ISO.
const ( IsoCreateRockRidge109 IsoCreateRockRidge = "1.09" IsoCreateRockRidge110 IsoCreateRockRidge = "1.10" IsoCreateRockRidge112 IsoCreateRockRidge = "1.12" )
func OptionalIsoCreateRockRidge ¶ added in v0.0.7
func OptionalIsoCreateRockRidge[T interface {
*IsoCreateRockRidge | IsoCreateRockRidge | *string | string
}](s T) *IsoCreateRockRidge
Convert a supported type to an optional (pointer) IsoCreateRockRidge
type IsoCustomizeParameters ¶ added in v0.0.7
type IsoCustomizeParameters struct {
// This is the path of source ISO file.
SrcIso string `json:"src_iso"`
// The path of the customized ISO file.
DestIso string `json:"dest_iso"`
// Absolute paths for files inside the ISO file that should be removed.
// default: []
DeleteFiles *[]string `json:"delete_files,omitempty"`
// Allows to add and replace files in the ISO file.
// Will create intermediate folders inside the ISO file when they do not exist.
// default: []
AddFiles *struct {
SrcFile string `json:"src_file"`
DestFile string `json:"dest_file"`
} `json:"add_files,omitempty"`
}
Parameters for the `iso_customize` Ansible module.
func (IsoCustomizeParameters) ToRPCCall ¶ added in v0.0.7
func (p IsoCustomizeParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `IsoCustomizeParameters into an `rpc.RPCCall`.
type IsoCustomizeReturn ¶ added in v0.0.7
type IsoCustomizeReturn struct {
AnsibleCommonReturns
// Path of source ISO file.
SrcIso *string `json:"src_iso,omitempty"`
// Path of the customized ISO file.
DestIso *string `json:"dest_iso,omitempty"`
}
Return values for the `iso_customize` Ansible module.
func IsoCustomizeReturnFromRPCResult ¶ added in v0.0.7
func IsoCustomizeReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (IsoCustomizeReturn, error)
Unwrap the `rpc.RPCResult` into an `IsoCustomizeReturn`
type IsoExtractParameters ¶ added in v0.0.7
type IsoExtractParameters struct {
// The ISO image to extract files from.
Image string `json:"image"`
// The destination directory to extract files to.
Dest string `json:"dest"`
// A list of files to extract from the image.
// Extracting directories does not work.
Files []string `json:"files"`
// If `true`, which will replace the remote file when contents are different
// than the source.
// If `false`, the file will only be extracted and copied if the destination
// does not already exist.
// default: true
Force *bool `json:"force,omitempty"`
// The path to the `7z` executable to use for extracting files from the ISO.
// If not provided, it will assume the value `7z`.
Executable *string `json:"executable,omitempty"`
// Password used to decrypt files from the ISO.
// Will only be used if 7z is used.
// The password is used as a command line argument to 7z. This is a `potential
// security risk` that allows passwords to be revealed if someone else can list
// running processes on the same machine in the right moment.
Password *string `json:"password,omitempty"`
}
Parameters for the `iso_extract` Ansible module.
func (IsoExtractParameters) ToRPCCall ¶ added in v0.0.7
func (p IsoExtractParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `IsoExtractParameters into an `rpc.RPCCall`.
type IsoExtractReturn ¶ added in v0.0.7
type IsoExtractReturn struct {
AnsibleCommonReturns
}
Return values for the `iso_extract` Ansible module.
func IsoExtractReturnFromRPCResult ¶ added in v0.0.7
func IsoExtractReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (IsoExtractReturn, error)
Unwrap the `rpc.RPCResult` into an `IsoExtractReturn`
type JbossParameters ¶ added in v0.0.7
type JbossParameters struct {
// The name of the deployment.
Deployment string `json:"deployment"`
// The remote path of the application ear or war to deploy.
// Required when `state=present`.
// Ignored when `state=absent`.
Src *string `json:"src,omitempty"`
// The location in the filesystem where the deployment scanner listens.
// default: "/var/lib/jbossas/standalone/deployments"
DeployPath *string `json:"deploy_path,omitempty"`
// Whether the application should be deployed or undeployed.
// default: JbossStatePresent
State *JbossState `json:"state,omitempty"`
}
Parameters for the `jboss` Ansible module.
func (JbossParameters) ToRPCCall ¶ added in v0.0.7
func (p JbossParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `JbossParameters into an `rpc.RPCCall`.
type JbossReturn ¶ added in v0.0.7
type JbossReturn struct {
AnsibleCommonReturns
}
Return values for the `jboss` Ansible module.
func JbossReturnFromRPCResult ¶ added in v0.0.7
func JbossReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (JbossReturn, error)
Unwrap the `rpc.RPCResult` into an `JbossReturn`
type JbossState ¶ added in v0.0.7
type JbossState string
Whether the application should be deployed or undeployed.
const ( JbossStatePresent JbossState = "present" JbossStateAbsent JbossState = "absent" )
func OptionalJbossState ¶ added in v0.0.7
func OptionalJbossState[T interface {
*JbossState | JbossState | *string | string
}](s T) *JbossState
Convert a supported type to an optional (pointer) JbossState
type KdeconfigParameters ¶ added in v0.0.7
type KdeconfigParameters struct {
// Path to the config file. If the file does not exist it will be created.
Path string `json:"path"`
// Path to the kwriteconfig executable. If not specified, Ansible will try to
// discover it.
KwriteconfigPath *string `json:"kwriteconfig_path,omitempty"`
// List of values to set.
Values struct {
Group *string `json:"group,omitempty"`
Groups *[]string `json:"groups,omitempty"`
Key string `json:"key"`
Value *string `json:"value,omitempty"`
BoolValue *bool `json:"bool_value,omitempty"`
} `json:"values"`
// Create a backup file.
// default: false
Backup *bool `json:"backup,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
}
Parameters for the `kdeconfig` Ansible module.
func (KdeconfigParameters) ToRPCCall ¶ added in v0.0.7
func (p KdeconfigParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `KdeconfigParameters into an `rpc.RPCCall`.
type KdeconfigReturn ¶ added in v0.0.7
type KdeconfigReturn struct {
AnsibleCommonReturns
}
Return values for the `kdeconfig` Ansible module.
func KdeconfigReturnFromRPCResult ¶ added in v0.0.7
func KdeconfigReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (KdeconfigReturn, error)
Unwrap the `rpc.RPCResult` into an `KdeconfigReturn`
type KernelBlacklistParameters ¶ added in v0.0.7
type KernelBlacklistParameters struct {
// Name of kernel module to black- or whitelist.
Name string `json:"name"`
// Whether the module should be present in the blacklist or absent.
// default: KernelBlacklistStatePresent
State *KernelBlacklistState `json:"state,omitempty"`
// If specified, use this blacklist file instead of `/etc/modprobe.d/blacklist-
// ansible.conf`.
// default: "/etc/modprobe.d/blacklist-ansible.conf"
BlacklistFile *string `json:"blacklist_file,omitempty"`
}
Parameters for the `kernel_blacklist` Ansible module.
func (KernelBlacklistParameters) ToRPCCall ¶ added in v0.0.7
func (p KernelBlacklistParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `KernelBlacklistParameters into an `rpc.RPCCall`.
type KernelBlacklistReturn ¶ added in v0.0.7
type KernelBlacklistReturn struct {
AnsibleCommonReturns
}
Return values for the `kernel_blacklist` Ansible module.
func KernelBlacklistReturnFromRPCResult ¶ added in v0.0.7
func KernelBlacklistReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (KernelBlacklistReturn, error)
Unwrap the `rpc.RPCResult` into an `KernelBlacklistReturn`
type KernelBlacklistState ¶ added in v0.0.7
type KernelBlacklistState string
Whether the module should be present in the blacklist or absent.
const ( KernelBlacklistStateAbsent KernelBlacklistState = "absent" KernelBlacklistStatePresent KernelBlacklistState = "present" )
func OptionalKernelBlacklistState ¶ added in v0.0.7
func OptionalKernelBlacklistState[T interface {
*KernelBlacklistState | KernelBlacklistState | *string | string
}](s T) *KernelBlacklistState
Convert a supported type to an optional (pointer) KernelBlacklistState
type KeyringInfoParameters ¶ added in v0.0.7
type KeyringInfoParameters struct {
// The name of the service.
Service string `json:"service"`
// The user belonging to the service.
Username string `json:"username"`
// Password to unlock keyring.
KeyringPassword string `json:"keyring_password"`
}
Parameters for the `keyring_info` Ansible module.
func (KeyringInfoParameters) ToRPCCall ¶ added in v0.0.7
func (p KeyringInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `KeyringInfoParameters into an `rpc.RPCCall`.
type KeyringInfoReturn ¶ added in v0.0.7
type KeyringInfoReturn struct {
AnsibleCommonReturns
// A string containing the password.
Passphrase *string `json:"passphrase,omitempty"`
}
Return values for the `keyring_info` Ansible module.
func KeyringInfoReturnFromRPCResult ¶ added in v0.0.7
func KeyringInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (KeyringInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `KeyringInfoReturn`
type KibanaPluginParameters ¶ added in v0.0.7
type KibanaPluginParameters struct {
// Name of the plugin to install.
Name string `json:"name"`
// Desired state of a plugin.
// default: KibanaPluginStatePresent
State *KibanaPluginState `json:"state,omitempty"`
// Set exact URL to download the plugin from.
// For local file, prefix its absolute path with `file://`.
Url *string `json:"url,omitempty"`
// Timeout setting: `30s`, `1m`, `1h` and so on.
// default: "1m"
Timeout *string `json:"timeout,omitempty"`
// Location of the Kibana binary.
// default: "/opt/kibana/bin/kibana"
PluginBin *string `json:"plugin_bin,omitempty"`
// Your configured plugin directory specified in Kibana.
// default: "/opt/kibana/installedPlugins/"
PluginDir *string `json:"plugin_dir,omitempty"`
// Version of the plugin to be installed.
// If plugin exists with previous version, plugin will `not` be updated unless
// `force` is set to `true`.
Version *string `json:"version,omitempty"`
// Delete and re-install the plugin. Can be useful for plugins update.
// default: false
Force *bool `json:"force,omitempty"`
// Whether to allow `kibana` and `kibana-plugin` to be run as root. Passes the
// `--allow-root` flag to these commands.
// default: false
AllowRoot *bool `json:"allow_root,omitempty"`
}
Parameters for the `kibana_plugin` Ansible module.
func (KibanaPluginParameters) ToRPCCall ¶ added in v0.0.7
func (p KibanaPluginParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `KibanaPluginParameters into an `rpc.RPCCall`.
type KibanaPluginReturn ¶ added in v0.0.7
type KibanaPluginReturn struct {
AnsibleCommonReturns
// The launched command during plugin management (install / remove).
Cmd *string `json:"cmd,omitempty"`
// The plugin name to install or remove.
Name *string `json:"name,omitempty"`
// The URL from where the plugin is installed from.
Url *string `json:"url,omitempty"`
// The timeout for plugin download.
Timeout *string `json:"timeout,omitempty"`
// The command stdout.
Stdout *string `json:"stdout,omitempty"`
// The command stderr.
Stderr *string `json:"stderr,omitempty"`
// The state for the managed plugin.
State *string `json:"state,omitempty"`
}
Return values for the `kibana_plugin` Ansible module.
func KibanaPluginReturnFromRPCResult ¶ added in v0.0.7
func KibanaPluginReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (KibanaPluginReturn, error)
Unwrap the `rpc.RPCResult` into an `KibanaPluginReturn`
type KibanaPluginState ¶ added in v0.0.7
type KibanaPluginState string
Desired state of a plugin.
const ( KibanaPluginStatePresent KibanaPluginState = "present" KibanaPluginStateAbsent KibanaPluginState = "absent" )
func OptionalKibanaPluginState ¶ added in v0.0.7
func OptionalKibanaPluginState[T interface {
*KibanaPluginState | KibanaPluginState | *string | string
}](s T) *KibanaPluginState
Convert a supported type to an optional (pointer) KibanaPluginState
type KnownHostsParameters ¶
type KnownHostsParameters struct {
// The host to add or remove (must match a host specified in key). It will be
// converted to lowercase so that `ssh-keygen` can find it.
// Must match with <hostname> or <ip> present in key attribute.
// For custom SSH port, `name` needs to specify port as well. See example
// section.
Name string `json:"name"`
// The SSH public host key, as a string.
// Required if `state=present`, optional when `state=absent`, in which case all
// keys for the host are removed.
// The key must be in the right format for SSH (see sshd(8), section
// "SSH_KNOWN_HOSTS FILE FORMAT").
// Specifically, the key should not match the format that is found in an SSH
// pubkey file, but should rather have the hostname prepended to a line that
// includes the pubkey, the same way that it would appear in the known_hosts
// file. The value prepended to the line must also match the value of the name
// parameter.
// Should be of format `<hostname[,IP]> ssh-rsa <pubkey>`.
// For custom SSH port, `key` needs to specify port as well. See example
// section.
Key *string `json:"key,omitempty"`
// The known_hosts file to edit.
// The known_hosts file will be created if needed. The rest of the path must
// exist prior to running the module.
// default: "~/.ssh/known_hosts"
Path *string `json:"path,omitempty"`
// Hash the hostname in the known_hosts file.
// default: "no"
HashHost *bool `json:"hash_host,omitempty"`
// `present` to add host keys.
// `absent` to remove host keys.
// default: KnownHostsStatePresent
State *KnownHostsState `json:"state,omitempty"`
}
Parameters for the `known_hosts` Ansible module.
func (KnownHostsParameters) ToRPCCall ¶
func (p KnownHostsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `KnownHostsParameters into an `rpc.RPCCall`.
type KnownHostsReturn ¶
type KnownHostsReturn struct {
AnsibleCommonReturns
}
Return values for the `known_hosts` Ansible module.
func KnownHostsReturnFromRPCResult ¶
func KnownHostsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (KnownHostsReturn, error)
Unwrap the `rpc.RPCResult` into an `KnownHostsReturn`
type KnownHostsState ¶ added in v0.0.7
type KnownHostsState string
`present` to add host keys. `absent` to remove host keys.
const ( KnownHostsStateAbsent KnownHostsState = "absent" KnownHostsStatePresent KnownHostsState = "present" )
func OptionalKnownHostsState ¶ added in v0.0.7
func OptionalKnownHostsState[T interface {
*KnownHostsState | KnownHostsState | *string | string
}](s T) *KnownHostsState
Convert a supported type to an optional (pointer) KnownHostsState
type LbuParameters ¶ added in v0.0.7
type LbuParameters struct {
// Control whether to commit changed files.
Commit *bool `json:"commit,omitempty"`
// List of paths to exclude.
Exclude *[]string `json:"exclude,omitempty"`
// List of paths to include.
Include *[]string `json:"include,omitempty"`
}
Parameters for the `lbu` Ansible module.
func (LbuParameters) ToRPCCall ¶ added in v0.0.7
func (p LbuParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `LbuParameters into an `rpc.RPCCall`.
type LbuReturn ¶ added in v0.0.7
type LbuReturn struct {
AnsibleCommonReturns
// Error message.
Msg *string `json:"msg,omitempty"`
}
Return values for the `lbu` Ansible module.
func LbuReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `LbuReturn`
type LineinfileParameters ¶
type LineinfileParameters struct {
// The file to modify.
// Before Ansible 2.3 this option was only usable as `dest`, `destfile` and
// `name`.
Path string `json:"path"`
// The regular expression to look for in every line of the file.
// For `state=present`, the pattern to replace if found. Only the last line
// found will be replaced.
// For `state=absent`, the pattern of the line(s) to remove.
// If the regular expression is not matched, the line will be added to the file
// in keeping with `insertbefore` or `insertafter` settings.
// When modifying a line the regexp should typically match both the initial
// state of the line as well as its state after replacement by `line` to ensure
// idempotence.
// Uses Python regular expressions. See
// `https://docs.python.org/3/library/re.html`.
Regexp *string `json:"regexp,omitempty"`
// The literal string to look for in every line of the file. This does not have
// to match the entire line.
// For `state=present`, the line to replace if the string is found in the file.
// Only the last line found will be replaced.
// For `state=absent`, the line(s) to remove if the string is in the line.
// If the literal expression is not matched, the line will be added to the file
// in keeping with `insertbefore` or `insertafter` settings.
// Mutually exclusive with `backrefs` and `regexp`.
SearchString *string `json:"search_string,omitempty"`
// Whether the line should be there or not.
// default: LineinfileStatePresent
State *LineinfileState `json:"state,omitempty"`
// The line to insert/replace into the file.
// Required for `state=present`.
// If `backrefs` is set, may contain backreferences that will get expanded with
// the `regexp` capture groups if the regexp matches.
Line *string `json:"line,omitempty"`
// Used with `state=present`.
// If set, `line` can contain backreferences (both positional and named) that
// will get populated if the `regexp` matches.
// This parameter changes the operation of the module slightly; `insertbefore`
// and `insertafter` will be ignored, and if the `regexp` does not match
// anywhere in the file, the file will be left unchanged.
// If the `regexp` does match, the last matching line will be replaced by the
// expanded line parameter.
// Mutually exclusive with `search_string`.
// default: false
Backrefs *bool `json:"backrefs,omitempty"`
// Used with `state=present`.
// If specified, the line will be inserted after the last match of specified
// regular expression.
// If the first match is required, use(firstmatch=yes).
// A special value is available; `EOF` for inserting the line at the end of the
// file.
// If specified regular expression has no matches or no value is passed, `EOF`
// will be used instead.
// If `insertbefore` is set, default value `EOF` will be ignored.
// If regular expressions are passed to both `regexp` and `insertafter`,
// `insertafter` is only honored if no match for `regexp` is found.
// May not be used with `backrefs` or `insertbefore`.
Insertafter *string `json:"insertafter,omitempty"`
// Used with `state=present`.
// If specified, the line will be inserted before the last match of specified
// regular expression.
// If the first match is required, use `firstmatch=yes`.
// A value is available; `BOF` for inserting the line at the beginning of the
// file.
// If specified regular expression has no matches, the line will be inserted at
// the end of the file.
// If regular expressions are passed to both `regexp` and `insertbefore`,
// `insertbefore` is only honored if no match for `regexp` is found.
// May not be used with `backrefs` or `insertafter`.
Insertbefore *string `json:"insertbefore,omitempty"`
// Used with `state=present`.
// If specified, the file will be created if it does not already exist.
// By default it will fail if the file is missing.
// default: false
Create *bool `json:"create,omitempty"`
// Create a backup file including the timestamp information so you can get the
// original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
// Used with `insertafter` or `insertbefore`.
// If set, `insertafter` and `insertbefore` will work with the first line that
// matches the given regular expression.
// default: false
Firstmatch *bool `json:"firstmatch,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
// The validation command to run before copying the updated file into the final
// destination.
// A temporary file path is used to validate, passed in through `%s` which must
// be present as in the examples below.
// Also, the command is passed securely so shell features such as expansion and
// pipes will not work.
// For an example on how to handle more complex validation than what this
// option provides, see `handling complex
// validation,complex_configuration_validation`.
Validate *string `json:"validate,omitempty"`
}
Parameters for the `lineinfile` Ansible module.
func (LineinfileParameters) ToRPCCall ¶
func (p LineinfileParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `LineinfileParameters into an `rpc.RPCCall`.
type LineinfileReturn ¶
type LineinfileReturn struct {
AnsibleCommonReturns
// backup file location
Backup *string `json:"backup,omitempty"`
}
Return values for the `lineinfile` Ansible module.
func LineinfileReturnFromRPCResult ¶
func LineinfileReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (LineinfileReturn, error)
Unwrap the `rpc.RPCResult` into an `LineinfileReturn`
type LineinfileState ¶ added in v0.0.7
type LineinfileState string
Whether the line should be there or not.
const ( LineinfileStateAbsent LineinfileState = "absent" LineinfileStatePresent LineinfileState = "present" )
func OptionalLineinfileState ¶ added in v0.0.7
func OptionalLineinfileState[T interface {
*LineinfileState | LineinfileState | *string | string
}](s T) *LineinfileState
Convert a supported type to an optional (pointer) LineinfileState
type ListenPortsFactsCommand ¶ added in v0.0.7
type ListenPortsFactsCommand string
Override which command to use for fetching listen ports. By default module will use first found supported command on the system (in alphanumerical order).
const ( ListenPortsFactsCommandNetstat ListenPortsFactsCommand = "netstat" ListenPortsFactsCommandSs ListenPortsFactsCommand = "ss" )
func OptionalListenPortsFactsCommand ¶ added in v0.0.7
func OptionalListenPortsFactsCommand[T interface {
*ListenPortsFactsCommand | ListenPortsFactsCommand | *string | string
}](s T) *ListenPortsFactsCommand
Convert a supported type to an optional (pointer) ListenPortsFactsCommand
type ListenPortsFactsParameters ¶ added in v0.0.7
type ListenPortsFactsParameters struct {
// Override which command to use for fetching listen ports.
// By default module will use first found supported command on the system (in
// alphanumerical order).
Command *ListenPortsFactsCommand `json:"command,omitempty"`
// Show both listening and non-listening sockets (for TCP this means
// established connections).
// Adds the return values R`ansible_facts.tcp_listen[].state`,
// R`ansible_facts.udp_listen[].state`,
// R`ansible_facts.tcp_listen[].foreign_address`, and
// R`ansible_facts.udp_listen[].foreign_address` to the returned facts.
// default: false
IncludeNonListening *bool `json:"include_non_listening,omitempty"`
}
Parameters for the `listen_ports_facts` Ansible module.
func (ListenPortsFactsParameters) ToRPCCall ¶ added in v0.0.7
func (p ListenPortsFactsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ListenPortsFactsParameters into an `rpc.RPCCall`.
type ListenPortsFactsReturn ¶ added in v0.0.7
type ListenPortsFactsReturn struct {
AnsibleCommonReturns
// Dictionary containing details of TCP and UDP ports with listening servers.
AnsibleFacts *any `json:"ansible_facts,omitempty"`
}
Return values for the `listen_ports_facts` Ansible module.
func ListenPortsFactsReturnFromRPCResult ¶ added in v0.0.7
func ListenPortsFactsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (ListenPortsFactsReturn, error)
Unwrap the `rpc.RPCResult` into an `ListenPortsFactsReturn`
type LldpParameters ¶ added in v0.0.7
type LldpParameters struct {
// If lldpctl outputs an attribute multiple time represent all values as a
// list.
// default: false
Multivalues *bool `json:"multivalues,omitempty"`
}
Parameters for the `lldp` Ansible module.
func (LldpParameters) ToRPCCall ¶ added in v0.0.7
func (p LldpParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `LldpParameters into an `rpc.RPCCall`.
type LldpReturn ¶ added in v0.0.7
type LldpReturn struct {
AnsibleCommonReturns
}
Return values for the `lldp` Ansible module.
func LldpReturnFromRPCResult ¶ added in v0.0.7
func LldpReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (LldpReturn, error)
Unwrap the `rpc.RPCResult` into an `LldpReturn`
type LocaleGenParameters ¶ added in v0.0.7
type LocaleGenParameters struct {
// Name and encoding of the locales, such as `en_GB.UTF-8`.
// Before community.general 9.3.0, this was a string. Using a string still
// works.
Name []string `json:"name"`
// Whether the locales shall be present.
// default: LocaleGenStatePresent
State *LocaleGenState `json:"state,omitempty"`
}
Parameters for the `locale_gen` Ansible module.
func (LocaleGenParameters) ToRPCCall ¶ added in v0.0.7
func (p LocaleGenParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `LocaleGenParameters into an `rpc.RPCCall`.
type LocaleGenReturn ¶ added in v0.0.7
type LocaleGenReturn struct {
AnsibleCommonReturns
// Mechanism used to deploy the locales.
Mechanism *string `json:"mechanism,omitempty"`
}
Return values for the `locale_gen` Ansible module.
func LocaleGenReturnFromRPCResult ¶ added in v0.0.7
func LocaleGenReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (LocaleGenReturn, error)
Unwrap the `rpc.RPCResult` into an `LocaleGenReturn`
type LocaleGenState ¶ added in v0.0.7
type LocaleGenState string
Whether the locales shall be present.
const ( LocaleGenStateAbsent LocaleGenState = "absent" LocaleGenStatePresent LocaleGenState = "present" )
func OptionalLocaleGenState ¶ added in v0.0.7
func OptionalLocaleGenState[T interface {
*LocaleGenState | LocaleGenState | *string | string
}](s T) *LocaleGenState
Convert a supported type to an optional (pointer) LocaleGenState
type LogentriesParameters ¶ added in v0.0.7
type LogentriesParameters struct {
// Path to a log file.
Path string `json:"path"`
// Following state of the log.
// default: LogentriesStatePresent
State *LogentriesState `json:"state,omitempty"`
// Name of the log.
Name *string `json:"name,omitempty"`
// Type of the log.
Logtype *string `json:"logtype,omitempty"`
}
Parameters for the `logentries` Ansible module.
func (LogentriesParameters) ToRPCCall ¶ added in v0.0.7
func (p LogentriesParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `LogentriesParameters into an `rpc.RPCCall`.
type LogentriesReturn ¶ added in v0.0.7
type LogentriesReturn struct {
AnsibleCommonReturns
}
Return values for the `logentries` Ansible module.
func LogentriesReturnFromRPCResult ¶ added in v0.0.7
func LogentriesReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (LogentriesReturn, error)
Unwrap the `rpc.RPCResult` into an `LogentriesReturn`
type LogentriesState ¶ added in v0.0.7
type LogentriesState string
Following state of the log.
const ( LogentriesStatePresent LogentriesState = "present" LogentriesStateAbsent LogentriesState = "absent" LogentriesStateFollowed LogentriesState = "followed" LogentriesStateUnfollowed LogentriesState = "unfollowed" )
func OptionalLogentriesState ¶ added in v0.0.7
func OptionalLogentriesState[T interface {
*LogentriesState | LogentriesState | *string | string
}](s T) *LogentriesState
Convert a supported type to an optional (pointer) LogentriesState
type LvgParameters ¶ added in v0.0.7
type LvgParameters struct {
// The name of the volume group.
Vg string `json:"vg"`
// List of comma-separated devices to use as physical devices in this volume
// group.
// Required when creating or resizing volume group.
// The module will take care of running pvcreate if needed.
// `remove_extra_pvs` controls whether or not unspecified physical devices are
// removed from the volume group.
Pvs *[]string `json:"pvs,omitempty"`
// The size of the physical extent. `pesize` must be a power of 2 of at least 1
// sector (where the sector size is the largest sector size of the PVs
// currently used in the VG), or at least 128KiB.
// `pesize` can be optionally suffixed by a UNIT (k/K/m/M/g/G), default unit is
// megabyte.
// default: "4"
Pesize *string `json:"pesize,omitempty"`
// Additional options to pass to `pvcreate` when creating the volume group.
// default: ""
PvOptions *string `json:"pv_options,omitempty"`
// If `true`, resize the physical volume to the maximum available size.
// default: false
Pvresize *bool `json:"pvresize,omitempty"`
// Additional options to pass to `vgcreate` when creating the volume group.
// default: ""
VgOptions *string `json:"vg_options,omitempty"`
// Control if the volume group exists and its state.
// The states `active` and `inactive` implies `present` state. Added in 7.1.0.
// If `active` or `inactive`, the module manages the VG's logical volumes
// current state. The module also handles the VG's autoactivation state if
// supported unless when creating a volume group and the autoactivation option
// specified in `vg_options`.
// default: LvgStatePresent
State *LvgState `json:"state,omitempty"`
// If `true`, allows to remove volume group with logical volumes.
// default: false
Force *bool `json:"force,omitempty"`
// Whether the volume group's UUID is regenerated.
// This is `not idempotent`. Specifying this parameter always results in a
// change.
// default: false
ResetVgUuid *bool `json:"reset_vg_uuid,omitempty"`
// Whether the volume group's physical volumes' UUIDs are regenerated.
// This is `not idempotent`. Specifying this parameter always results in a
// change.
// default: false
ResetPvUuid *bool `json:"reset_pv_uuid,omitempty"`
// Remove physical volumes from the volume group which are not in `pvs`.
// default: true
RemoveExtraPvs *bool `json:"remove_extra_pvs,omitempty"`
}
Parameters for the `lvg` Ansible module.
func (LvgParameters) ToRPCCall ¶ added in v0.0.7
func (p LvgParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `LvgParameters into an `rpc.RPCCall`.
type LvgRenameParameters ¶ added in v0.0.7
type LvgRenameParameters struct {
// The name or UUID of the source VG.
// See `vgrename(8\`) for valid values.
Vg string `json:"vg"`
// The new name of the VG.
// See `lvm(8\`) for valid names.
VgNew string `json:"vg_new"`
}
Parameters for the `lvg_rename` Ansible module.
func (LvgRenameParameters) ToRPCCall ¶ added in v0.0.7
func (p LvgRenameParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `LvgRenameParameters into an `rpc.RPCCall`.
type LvgRenameReturn ¶ added in v0.0.7
type LvgRenameReturn struct {
AnsibleCommonReturns
}
Return values for the `lvg_rename` Ansible module.
func LvgRenameReturnFromRPCResult ¶ added in v0.0.7
func LvgRenameReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (LvgRenameReturn, error)
Unwrap the `rpc.RPCResult` into an `LvgRenameReturn`
type LvgReturn ¶ added in v0.0.7
type LvgReturn struct {
AnsibleCommonReturns
}
Return values for the `lvg` Ansible module.
func LvgReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `LvgReturn`
type LvgState ¶ added in v0.0.7
type LvgState string
Control if the volume group exists and its state. The states `active` and `inactive` implies `present` state. Added in 7.1.0. If `active` or `inactive`, the module manages the VG's logical volumes current state. The module also handles the VG's autoactivation state if supported unless when creating a volume group and the autoactivation option specified in `vg_options`.
type MacportsParameters ¶ added in v0.0.7
type MacportsParameters struct {
// A list of port names.
Name *[]string `json:"name,omitempty"`
// Update Macports and the ports tree, either prior to installing ports or as a
// separate step.
// Equivalent to running `port selfupdate`.
// default: false
Selfupdate *bool `json:"selfupdate,omitempty"`
// Indicates the desired state of the port.
// default: MacportsStatePresent
State *MacportsState `json:"state,omitempty"`
// Upgrade all outdated ports, either prior to installing ports or as a
// separate step.
// Equivalent to running `port upgrade outdated`.
// default: false
Upgrade *bool `json:"upgrade,omitempty"`
// A port variant specification.
// `variant` is only supported with `state=installed` and `state=present`.
Variant *string `json:"variant,omitempty"`
}
Parameters for the `macports` Ansible module.
func (MacportsParameters) ToRPCCall ¶ added in v0.0.7
func (p MacportsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `MacportsParameters into an `rpc.RPCCall`.
type MacportsReturn ¶ added in v0.0.7
type MacportsReturn struct {
AnsibleCommonReturns
}
Return values for the `macports` Ansible module.
func MacportsReturnFromRPCResult ¶ added in v0.0.7
func MacportsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (MacportsReturn, error)
Unwrap the `rpc.RPCResult` into an `MacportsReturn`
type MacportsState ¶ added in v0.0.7
type MacportsState string
Indicates the desired state of the port.
const ( MacportsStatePresent MacportsState = "present" MacportsStateAbsent MacportsState = "absent" MacportsStateActive MacportsState = "active" MacportsStateInactive MacportsState = "inactive" MacportsStateInstalled MacportsState = "installed" MacportsStateRemoved MacportsState = "removed" )
func OptionalMacportsState ¶ added in v0.0.7
func OptionalMacportsState[T interface {
*MacportsState | MacportsState | *string | string
}](s T) *MacportsState
Convert a supported type to an optional (pointer) MacportsState
type MakeParameters ¶ added in v0.0.7
type MakeParameters struct {
// Change to this directory before running make.
Chdir string `json:"chdir"`
// Use a custom Makefile.
File *string `json:"file,omitempty"`
// Set the number of make jobs to run concurrently.
// Typically if set, this would be the number of processors and/or threads
// available to the machine.
// This is not supported by all make implementations.
Jobs *int `json:"jobs,omitempty"`
// Use a specific make binary.
Make *string `json:"make,omitempty"`
// Any extra parameters to pass to make.
// If the value is empty, only the key will be used. For example, `FOO:` will
// produce `FOO`, not `FOO=`.
Params *map[string]any `json:"params,omitempty"`
// The target to run.
// Typically this would be something like `install`, `test`, or `all`.
// `target` and `targets` are mutually exclusive.
Target *string `json:"target,omitempty"`
// The list of targets to run.
// Typically this would be something like `install`, `test`, or `all`.
// `target` and `targets` are mutually exclusive.
Targets *[]string `json:"targets,omitempty"`
}
Parameters for the `make` Ansible module.
func (MakeParameters) ToRPCCall ¶ added in v0.0.7
func (p MakeParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `MakeParameters into an `rpc.RPCCall`.
type MakeReturn ¶ added in v0.0.7
type MakeReturn struct {
AnsibleCommonReturns
// The value of the module parameter `chdir`.
Chdir *string `json:"chdir,omitempty"`
// The command built and executed by the module.
Command *string `json:"command,omitempty"`
// The value of the module parameter `file`.
File *string `json:"file,omitempty"`
// The value of the module parameter `jobs`.
Jobs *int `json:"jobs,omitempty"`
// The value of the module parameter `params`.
Params *map[string]any `json:"params,omitempty"`
// The value of the module parameter `target`.
Target *string `json:"target,omitempty"`
// The value of the module parameter `targets`.
Targets *string `json:"targets,omitempty"`
}
Return values for the `make` Ansible module.
func MakeReturnFromRPCResult ¶ added in v0.0.7
func MakeReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (MakeReturn, error)
Unwrap the `rpc.RPCResult` into an `MakeReturn`
type MasParameters ¶ added in v0.0.7
type MasParameters struct {
// The Mac App Store identifier of the app(s) you want to manage.
// This can be found by running `mas search APP_NAME` on your machine.
Id *[]int `json:"id,omitempty"`
// Desired state of the app installation.
// The `absent` value requires root permissions, also see the examples.
// default: MasStatePresent
State *MasState `json:"state,omitempty"`
// Upgrade all installed Mac App Store apps.
// default: false
UpgradeAll *bool `json:"upgrade_all,omitempty"`
}
Parameters for the `mas` Ansible module.
func (MasParameters) ToRPCCall ¶ added in v0.0.7
func (p MasParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `MasParameters into an `rpc.RPCCall`.
type MasReturn ¶ added in v0.0.7
type MasReturn struct {
AnsibleCommonReturns
}
Return values for the `mas` Ansible module.
func MasReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `MasReturn`
type MasState ¶ added in v0.0.7
type MasState string
Desired state of the app installation. The `absent` value requires root permissions, also see the examples.
type ModprobeParameters ¶ added in v0.0.7
type ModprobeParameters struct {
// Name of kernel module to manage.
Name string `json:"name"`
// Whether the module should be present or absent.
// default: ModprobeStatePresent
State *ModprobeState `json:"state,omitempty"`
// Modules parameters.
// default: ""
Params *string `json:"params,omitempty"`
// Persistency between reboots for configured module.
// This option creates files in `/etc/modules-load.d/` and `/etc/modprobe.d/`
// that make your module configuration persistent during reboots.
// If `present`, adds module name to `/etc/modules-load.d/` and params to
// `/etc/modprobe.d/` so the module will be loaded on next reboot.
// If `absent`, will comment out module name from `/etc/modules-load.d/` and
// comment out params from `/etc/modprobe.d/` so the module will not be loaded
// on next reboot.
// If `disabled`, will not touch anything and leave `/etc/modules-load.d/` and
// `/etc/modprobe.d/` as it is.
// Note that it is usually a better idea to rely on the automatic module
// loading by PCI IDs, USB IDs, DMI IDs or similar triggers encoded in the
// kernel modules themselves instead of configuration like this.
// In fact, most modern kernel modules are prepared for automatic loading
// already.
// `Note:` This option works only with distributions that use `systemd` when
// set to values other than `disabled`.
// default: ModprobePersistentDisabled
Persistent *ModprobePersistent `json:"persistent,omitempty"`
}
Parameters for the `modprobe` Ansible module.
func (ModprobeParameters) ToRPCCall ¶ added in v0.0.7
func (p ModprobeParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ModprobeParameters into an `rpc.RPCCall`.
type ModprobePersistent ¶ added in v0.0.7
type ModprobePersistent string
Persistency between reboots for configured module. This option creates files in `/etc/modules-load.d/` and `/etc/modprobe.d/` that make your module configuration persistent during reboots. If `present`, adds module name to `/etc/modules-load.d/` and params to `/etc/modprobe.d/` so the module will be loaded on next reboot. If `absent`, will comment out module name from `/etc/modules-load.d/` and comment out params from `/etc/modprobe.d/` so the module will not be loaded on next reboot. If `disabled`, will not touch anything and leave `/etc/modules-load.d/` and `/etc/modprobe.d/` as it is. Note that it is usually a better idea to rely on the automatic module loading by PCI IDs, USB IDs, DMI IDs or similar triggers encoded in the kernel modules themselves instead of configuration like this. In fact, most modern kernel modules are prepared for automatic loading already. `Note:` This option works only with distributions that use `systemd` when set to values other than `disabled`.
const ( ModprobePersistentDisabled ModprobePersistent = "disabled" ModprobePersistentAbsent ModprobePersistent = "absent" ModprobePersistentPresent ModprobePersistent = "present" )
func OptionalModprobePersistent ¶ added in v0.0.7
func OptionalModprobePersistent[T interface {
*ModprobePersistent | ModprobePersistent | *string | string
}](s T) *ModprobePersistent
Convert a supported type to an optional (pointer) ModprobePersistent
type ModprobeReturn ¶ added in v0.0.7
type ModprobeReturn struct {
AnsibleCommonReturns
}
Return values for the `modprobe` Ansible module.
func ModprobeReturnFromRPCResult ¶ added in v0.0.7
func ModprobeReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (ModprobeReturn, error)
Unwrap the `rpc.RPCResult` into an `ModprobeReturn`
type ModprobeState ¶ added in v0.0.7
type ModprobeState string
Whether the module should be present or absent.
const ( ModprobeStateAbsent ModprobeState = "absent" ModprobeStatePresent ModprobeState = "present" )
func OptionalModprobeState ¶ added in v0.0.7
func OptionalModprobeState[T interface {
*ModprobeState | ModprobeState | *string | string
}](s T) *ModprobeState
Convert a supported type to an optional (pointer) ModprobeState
type MountFactsOnTimeout ¶ added in v0.0.7
type MountFactsOnTimeout string
The action to take when gathering mount information exceeds `timeout`.
const ( MountFactsOnTimeoutError MountFactsOnTimeout = "error" MountFactsOnTimeoutWarn MountFactsOnTimeout = "warn" MountFactsOnTimeoutIgnore MountFactsOnTimeout = "ignore" )
func OptionalMountFactsOnTimeout ¶ added in v0.0.7
func OptionalMountFactsOnTimeout[T interface {
*MountFactsOnTimeout | MountFactsOnTimeout | *string | string
}](s T) *MountFactsOnTimeout
Convert a supported type to an optional (pointer) MountFactsOnTimeout
type MountFactsParameters ¶
type MountFactsParameters struct {
// A list of fnmatch patterns to filter mounts by the special device or remote
// file system.
// default: nil
Devices *[]string `json:"devices,omitempty"`
// A list of fnmatch patterns to filter mounts by the type of the file system.
// default: nil
Fstypes *[]string `json:"fstypes,omitempty"`
// A list of sources used to determine the mounts. Missing file sources (or
// empty files) are skipped. Repeat sources, including symlinks, are skipped.
// The `mount_points` return value contains the first definition found for a
// mount point.
// Additional mounts to the same mount point are available from
// `aggregate_mounts` (if enabled).
// By default, mounts are retrieved from all of the standard locations, which
// have the predefined aliases `all`/`static`/`dynamic`.
// `all` contains `dynamic` and `static`.
// `dynamic` contains `/etc/mtab`, `/proc/mounts`, `/etc/mnttab`, and the value
// of `mount_binary` if it is not None. This allows platforms like BSD or AIX,
// which don't have an equivalent to `/proc/mounts`, to collect the current
// mounts by default. See the `mount_binary` option to disable the fall back or
// configure a different executable.
// `static` contains `/etc/fstab`, `/etc/vfstab`, and `/etc/filesystems`. Note
// that `/etc/filesystems` is specific to AIX. The Linux file by this name has
// a different format/purpose and is ignored.
// The value of `mount_binary` can be configured as a source, which will cause
// it to always execute. Depending on the other sources configured, this could
// be inefficient/redundant. For example, if `/proc/mounts` and `mount` are
// listed as `sources`, Linux hosts will retrieve the same mounts twice.
// default: nil
Sources *[]string `json:"sources,omitempty"`
// The `mount_binary` is used if `sources` contain the value "mount", or if
// `sources` contains a dynamic source, and none were found (as can be expected
// on BSD or AIX hosts).
// Set to `null` to stop after no dynamic file source is found instead.
// default: "mount"
MountBinary *any `json:"mount_binary,omitempty"`
// This is the maximum number of seconds to wait for each mount to complete.
// When this is `null`, wait indefinitely.
// Configure in conjunction with `on_timeout` to skip unresponsive mounts.
// This timeout also applies to the `mount_binary` command to list mounts.
// If the module is configured to run during the play's fact gathering stage,
// set a timeout using module_defaults to prevent a hang (see example).
Timeout *float64 `json:"timeout,omitempty"`
// The action to take when gathering mount information exceeds `timeout`.
// default: MountFactsOnTimeoutError
OnTimeout *MountFactsOnTimeout `json:"on_timeout,omitempty"`
// Whether or not the module should return the `aggregate_mounts` list in
// `ansible_facts`.
// When this is `null`, a warning will be emitted if multiple mounts for the
// same mount point are found.
// default: nil
IncludeAggregateMounts *bool `json:"include_aggregate_mounts,omitempty"`
}
Parameters for the `mount_facts` Ansible module.
func (MountFactsParameters) ToRPCCall ¶
func (p MountFactsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `MountFactsParameters into an `rpc.RPCCall`.
type MountFactsReturn ¶
type MountFactsReturn struct {
AnsibleCommonReturns
// An ansible_facts dictionary containing a dictionary of `mount_points` and
// list of `aggregate_mounts` when enabled.
// Each key in `mount_points` is a mount point, and the value contains mount
// information (similar to `ansible_facts["mounts"]`). Each value also contains
// the key `ansible_context`, with details about the source and line(s)
// corresponding to the parsed mount point.
// When `aggregate_mounts` are included, the containing dictionaries are the
// same format as the `mount_point` values.
AnsibleFacts *map[string]any `json:"ansible_facts,omitempty"`
}
Return values for the `mount_facts` Ansible module.
func MountFactsReturnFromRPCResult ¶
func MountFactsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (MountFactsReturn, error)
Unwrap the `rpc.RPCResult` into an `MountFactsReturn`
type MountParameters ¶ added in v0.0.7
type MountParameters struct {
// Path to the mount point (e.g. `/mnt/files`).
// Before Ansible 2.3 this option was only usable as `ignore:dest`,
// `ignore:destfile`, and `name`.
Path string `json:"path"`
// Device (or NFS volume, or something else) to be mounted on `path`.
// Required when `state` set to `present`, `mounted`, or `ephemeral`.
// Ignored when `state` set to `absent` or `unmounted`.
Src *string `json:"src,omitempty"`
// Filesystem type.
// Required when `state` is `present`, `mounted`, or `ephemeral`.
Fstype *string `json:"fstype,omitempty"`
// Mount options (see fstab(5), or vfstab(4) on Solaris).
Opts *string `json:"opts,omitempty"`
// Do not log opts.
// default: false
OptsNoLog *bool `json:"opts_no_log,omitempty"`
// Dump (see fstab(5)).
// Note that if set to `null` and `state=present`, it will cease to work and
// duplicate entries will be made with subsequent runs.
// Has no effect on Solaris systems or when used with `state=ephemeral`.
// default: "0"
Dump *string `json:"dump,omitempty"`
// Passno (see fstab(5)).
// Note that if set to `null` and `state=present`, it will cease to work and
// duplicate entries will be made with subsequent runs.
// Deprecated on Solaris systems. Has no effect when used with
// `state=ephemeral`.
// default: "0"
Passno *string `json:"passno,omitempty"`
// If `mounted`, the device will be actively mounted and appropriately
// configured in `fstab`. If the mount point is not present, the mount point
// will be created.
// If `unmounted`, the device will be unmounted without changing `fstab`.
// `present` only specifies that the device is to be configured in `fstab` and
// does not trigger or require a mount.
// `ephemeral` only specifies that the device is to be mounted, without
// changing `fstab`. If it is already mounted, a remount will be triggered.
// This will always return R`ignore:changed=true`. If the mount point `path`
// has already a device mounted on, and its source is different than `src`, the
// module will fail to avoid unexpected unmount or mount point override. If the
// mount point is not present, the mount point will be created. The `fstab` is
// completely ignored. This option is added in version 1.5.0.
// `absent` specifies that the mount point entry `path` will be removed from
// `fstab` and will also unmount the mounted device and remove the mount point.
// A mounted device will be unmounted regardless of `src` or its real source.
// `absent` does not unmount recursively, and the module will fail if multiple
// devices are mounted on the same mount point. Using `absent` with a mount
// point that is not registered in the `fstab` has no effect, use `unmounted`
// instead.
// `remounted` specifies that the device will be remounted for when you want to
// force a refresh on the mount itself (added in 2.9). This will always return
// R`ignore:changed=true`. If `opts` is set, the options will be applied to the
// remount, but will not change `fstab`. Additionally, if `opts` is set, and
// the remount command fails, the module will error to prevent unexpected mount
// changes. Try using `mounted` instead to work around this issue.
// `remounted` expects the mount point to be present in the `fstab`. To remount
// a mount point not registered in `fstab`, use `ephemeral` instead, especially
// with BSD nodes.
// `absent_from_fstab` specifies that the device mount's entry will be removed
// from `fstab`. This option does not unmount it or delete the mountpoint.
State MountState `json:"state"`
// File to use instead of `/etc/fstab`.
// You should not use this option unless you really know what you are doing.
// This might be useful if you need to configure mountpoints in a chroot
// environment.
// OpenBSD does not allow specifying alternate fstab files with mount so do not
// use this on OpenBSD with any state that operates on the live filesystem.
// This parameter defaults to `/etc/fstab` or `/etc/vfstab` on Solaris.
// This parameter is ignored when `state=ephemeral`.
Fstab *string `json:"fstab,omitempty"`
// Determines if the filesystem should be mounted on boot.
// Only applies to Solaris and Linux systems.
// For Solaris systems, `true` will set `yes` as the value of mount at boot in
// `/etc/vfstab`.
// For Linux, FreeBSD, NetBSD and OpenBSD systems, `false` will add `noauto` to
// mount options in `/etc/fstab`.
// To avoid mount option conflicts, if `noauto` specified in `opts`, mount
// module will ignore `boot`.
// This parameter is ignored when `state=ephemeral`.
// default: true
Boot *bool `json:"boot,omitempty"`
// Create a backup file including the timestamp information so you can get the
// original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
}
Parameters for the `mount` Ansible module.
func (MountParameters) ToRPCCall ¶ added in v0.0.7
func (p MountParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `MountParameters into an `rpc.RPCCall`.
type MountReturn ¶ added in v0.0.7
type MountReturn struct {
AnsibleCommonReturns
}
Return values for the `mount` Ansible module.
func MountReturnFromRPCResult ¶ added in v0.0.7
func MountReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (MountReturn, error)
Unwrap the `rpc.RPCResult` into an `MountReturn`
type MountState ¶ added in v0.0.7
type MountState string
If `mounted`, the device will be actively mounted and appropriately configured in `fstab`. If the mount point is not present, the mount point will be created. If `unmounted`, the device will be unmounted without changing `fstab`. `present` only specifies that the device is to be configured in `fstab` and does not trigger or require a mount. `ephemeral` only specifies that the device is to be mounted, without changing `fstab`. If it is already mounted, a remount will be triggered. This will always return R`ignore:changed=true`. If the mount point `path` has already a device mounted on, and its source is different than `src`, the module will fail to avoid unexpected unmount or mount point override. If the mount point is not present, the mount point will be created. The `fstab` is completely ignored. This option is added in version 1.5.0. `absent` specifies that the mount point entry `path` will be removed from `fstab` and will also unmount the mounted device and remove the mount point. A mounted device will be unmounted regardless of `src` or its real source. `absent` does not unmount recursively, and the module will fail if multiple devices are mounted on the same mount point. Using `absent` with a mount point that is not registered in the `fstab` has no effect, use `unmounted` instead. `remounted` specifies that the device will be remounted for when you want to force a refresh on the mount itself (added in 2.9). This will always return R`ignore:changed=true`. If `opts` is set, the options will be applied to the remount, but will not change `fstab`. Additionally, if `opts` is set, and the remount command fails, the module will error to prevent unexpected mount changes. Try using `mounted` instead to work around this issue. `remounted` expects the mount point to be present in the `fstab`. To remount a mount point not registered in `fstab`, use `ephemeral` instead, especially with BSD nodes. `absent_from_fstab` specifies that the device mount's entry will be removed from `fstab`. This option does not unmount it or delete the mountpoint.
const ( MountStateAbsent MountState = "absent" MountStateAbsentFromFstab MountState = "absent_from_fstab" MountStateMounted MountState = "mounted" MountStatePresent MountState = "present" MountStateUnmounted MountState = "unmounted" MountStateRemounted MountState = "remounted" MountStateEphemeral MountState = "ephemeral" )
type NictagadmParameters ¶ added in v0.0.7
type NictagadmParameters struct {
// Name of the nic tag.
Name string `json:"name"`
// Specifies the `mac` address to attach the nic tag to when not creating an
// `etherstub`.
// Parameters `mac` and `etherstub` are mutually exclusive.
Mac *string `json:"mac,omitempty"`
// Specifies that the nic tag will be attached to a created `etherstub`.
// Parameter `etherstub` is mutually exclusive with both `mtu`, and `mac`.
// default: false
Etherstub *bool `json:"etherstub,omitempty"`
// Specifies the size of the `mtu` of the desired nic tag.
// Parameters `mtu` and `etherstub` are mutually exclusive.
Mtu *int `json:"mtu,omitempty"`
// When `state=absent` this switch will use the `-f` parameter and delete the
// nic tag regardless of existing VMs.
// default: false
Force *bool `json:"force,omitempty"`
// Create or delete a SmartOS nic tag.
// default: NictagadmStatePresent
State *NictagadmState `json:"state,omitempty"`
}
Parameters for the `nictagadm` Ansible module.
func (NictagadmParameters) ToRPCCall ¶ added in v0.0.7
func (p NictagadmParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `NictagadmParameters into an `rpc.RPCCall`.
type NictagadmReturn ¶ added in v0.0.7
type NictagadmReturn struct {
AnsibleCommonReturns
// Nic tag name.
Name *string `json:"name,omitempty"`
// MAC Address that the nic tag was attached to.
Mac *string `json:"mac,omitempty"`
// Specifies if the nic tag will create and attach to an etherstub.
Etherstub *bool `json:"etherstub,omitempty"`
// Specifies which MTU size was passed during the nictagadm add command. mtu
// and etherstub are mutually exclusive.
Mtu *int `json:"mtu,omitempty"`
// Shows if -f was used during the deletion of a nic tag.
Force *bool `json:"force,omitempty"`
// State of the target.
State *string `json:"state,omitempty"`
}
Return values for the `nictagadm` Ansible module.
func NictagadmReturnFromRPCResult ¶ added in v0.0.7
func NictagadmReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (NictagadmReturn, error)
Unwrap the `rpc.RPCResult` into an `NictagadmReturn`
type NictagadmState ¶ added in v0.0.7
type NictagadmState string
Create or delete a SmartOS nic tag.
const ( NictagadmStateAbsent NictagadmState = "absent" NictagadmStatePresent NictagadmState = "present" )
func OptionalNictagadmState ¶ added in v0.0.7
func OptionalNictagadmState[T interface {
*NictagadmState | NictagadmState | *string | string
}](s T) *NictagadmState
Convert a supported type to an optional (pointer) NictagadmState
type NmcliAddrGenMode6 ¶ added in v0.0.7
type NmcliAddrGenMode6 string
Configure method for creating the address for use with IPv6 Stateless Address Autoconfiguration. `default` and `default-or-eui64` have been added in community.general 6.5.0.
const ( NmcliAddrGenMode6Default NmcliAddrGenMode6 = "default" NmcliAddrGenMode6DefaultOrEui64 NmcliAddrGenMode6 = "default-or-eui64" NmcliAddrGenMode6Eui64 NmcliAddrGenMode6 = "eui64" NmcliAddrGenMode6StablePrivacy NmcliAddrGenMode6 = "stable-privacy" )
func OptionalNmcliAddrGenMode6 ¶ added in v0.0.7
func OptionalNmcliAddrGenMode6[T interface {
*NmcliAddrGenMode6 | NmcliAddrGenMode6 | *string | string
}](s T) *NmcliAddrGenMode6
Convert a supported type to an optional (pointer) NmcliAddrGenMode6
type NmcliFailOverMac ¶ added in v0.0.7
type NmcliFailOverMac string
This is only used with bond - fail_over_mac.
const ( NmcliFailOverMacNone NmcliFailOverMac = "none" NmcliFailOverMacActive NmcliFailOverMac = "active" NmcliFailOverMacFollow NmcliFailOverMac = "follow" )
func OptionalNmcliFailOverMac ¶ added in v0.0.7
func OptionalNmcliFailOverMac[T interface {
*NmcliFailOverMac | NmcliFailOverMac | *string | string
}](s T) *NmcliFailOverMac
Convert a supported type to an optional (pointer) NmcliFailOverMac
type NmcliIpPrivacy6 ¶ added in v0.0.7
type NmcliIpPrivacy6 string
If enabled, it makes the kernel generate a temporary IPv6 address in addition to the public one.
const ( NmcliIpPrivacy6Disabled NmcliIpPrivacy6 = "disabled" NmcliIpPrivacy6PreferPublicAddr NmcliIpPrivacy6 = "prefer-public-addr" NmcliIpPrivacy6PreferTempAddr NmcliIpPrivacy6 = "prefer-temp-addr" NmcliIpPrivacy6Unknown NmcliIpPrivacy6 = "unknown" )
func OptionalNmcliIpPrivacy6 ¶ added in v0.0.7
func OptionalNmcliIpPrivacy6[T interface {
*NmcliIpPrivacy6 | NmcliIpPrivacy6 | *string | string
}](s T) *NmcliIpPrivacy6
Convert a supported type to an optional (pointer) NmcliIpPrivacy6
type NmcliMethod4 ¶ added in v0.0.7
type NmcliMethod4 string
Configuration method to be used for IPv4. If `ip4` is set, `ipv4.method` is automatically set to `manual` and this parameter is not needed.
const ( NmcliMethod4Auto NmcliMethod4 = "auto" NmcliMethod4LinkLocal NmcliMethod4 = "link-local" NmcliMethod4Manual NmcliMethod4 = "manual" NmcliMethod4Disabled NmcliMethod4 = "disabled" )
func OptionalNmcliMethod4 ¶ added in v0.0.7
func OptionalNmcliMethod4[T interface {
*NmcliMethod4 | NmcliMethod4 | *string | string
}](s T) *NmcliMethod4
Convert a supported type to an optional (pointer) NmcliMethod4
type NmcliMethod6 ¶ added in v0.0.7
type NmcliMethod6 string
Configuration method to be used for IPv6. If `ip6` is set, `ipv6.method` is automatically set to `manual` and this parameter is not needed. `disabled` was added in community.general 3.3.0.
const ( NmcliMethod6Ignore NmcliMethod6 = "ignore" NmcliMethod6Auto NmcliMethod6 = "auto" NmcliMethod6Dhcp NmcliMethod6 = "dhcp" NmcliMethod6LinkLocal NmcliMethod6 = "link-local" NmcliMethod6Manual NmcliMethod6 = "manual" NmcliMethod6Disabled NmcliMethod6 = "disabled" )
func OptionalNmcliMethod6 ¶ added in v0.0.7
func OptionalNmcliMethod6[T interface {
*NmcliMethod6 | NmcliMethod6 | *string | string
}](s T) *NmcliMethod6
Convert a supported type to an optional (pointer) NmcliMethod6
type NmcliMode ¶ added in v0.0.7
type NmcliMode string
This is the type of device or network connection that you wish to create for a bond or bridge.
const ( NmcliMode8023ad NmcliMode = "802.3ad" NmcliModeActiveBackup NmcliMode = "active-backup" NmcliModeBalanceAlb NmcliMode = "balance-alb" NmcliModeBalanceRr NmcliMode = "balance-rr" NmcliModeBalanceTlb NmcliMode = "balance-tlb" NmcliModeBalanceXor NmcliMode = "balance-xor" NmcliModeBroadcast NmcliMode = "broadcast" )
type NmcliParameters ¶ added in v0.0.7
type NmcliParameters struct {
// Whether the device should exist or not, taking action if the state is
// different from what is stated.
// Using `state=present` to create connection will automatically bring
// connection up.
// Using `state=up` and `state=down` will not modify connection with other
// parameters. These states have been added in community.general 9.5.0.
State NmcliState `json:"state"`
// Whether the connection should start on boot.
// Whether the connection profile can be automatically activated.
// default: true
Autoconnect *bool `json:"autoconnect,omitempty"`
// The name used to call the connection. Pattern is
// `<type>[-<ifname>][-<num>]`.
ConnName string `json:"conn_name"`
// Whether the connection should be reloaded if it was modified.
// default: false
ConnReload *bool `json:"conn_reload,omitempty"`
// The interface to bind the connection to.
// The connection will only be applicable to this interface name.
// A special value of `*` can be used for interface-independent connections.
// The ifname argument is mandatory for all connection types except bond, team,
// bridge, vlan and vpn.
// This parameter defaults to `conn_name` when left unset for all connection
// types except vpn that removes it.
Ifname *string `json:"ifname,omitempty"`
// This is the type of device or network connection that you wish to create or
// modify.
// Type `dummy` is added in community.general 3.5.0.
// Type `gsm` is added in community.general 3.7.0.
// Type `infiniband` is added in community.general 2.0.0.
// Type `loopback` is added in community.general 8.1.0.
// Type `macvlan` is added in community.general 6.6.0.
// Type `ovs-bridge` is added in community.general 8.6.0.
// Type `ovs-interface` is added in community.general 8.6.0.
// Type `ovs-port` is added in community.general 8.6.0.
// Type `wireguard` is added in community.general 4.3.0.
// Type `vpn` is added in community.general 5.1.0.
// Type `vrf` is added in community.general 10.4.0.
// Using `bond-slave`, `bridge-slave`, or `team-slave` implies `ethernet`
// connection type with corresponding `slave_type` option.
// If you want to control non-ethernet connection attached to `bond`, `bridge`,
// or `team` consider using `slave_type` option.
Type *NmcliType `json:"type,omitempty"`
// This is the type of device or network connection that you wish to create for
// a bond or bridge.
// default: NmcliModeBalanceRr
Mode *NmcliMode `json:"mode,omitempty"`
// This option sets the connection type of Infiniband IPoIB devices.
TransportMode *NmcliTransportMode `json:"transport_mode,omitempty"`
// MAC address of the Infiniband IPoIB devices.
InfinibandMac *string `json:"infiniband_mac,omitempty"`
// Type of the device of this slave's master connection (for example `bond`).
// Type `ovs-port` is added in community.general 8.6.0.
SlaveType *NmcliSlaveType `json:"slave_type,omitempty"`
// Master <master (ifname, or connection UUID or conn_name) of bridge, team,
// bond, ovs-port master connection profile.
// Mandatory if `slave_type` is defined.
Master *string `json:"master,omitempty"`
// List of IPv4 addresses to this interface.
// Use the format `192.0.2.24/24` or `192.0.2.24`.
// If defined and `method4` is not specified, automatically set `ipv4.method`
// to `manual`.
Ip4 *[]string `json:"ip4,omitempty"`
// The IPv4 gateway for this interface.
// Use the format `192.0.2.1`.
// This parameter is mutually_exclusive with never_default4 parameter.
Gw4 *string `json:"gw4,omitempty"`
// Ignore automatically configured IPv4 routes.
// default: false
Gw4IgnoreAuto *bool `json:"gw4_ignore_auto,omitempty"`
// The list of IPv4 routes.
// Use the format `192.0.3.0/24 192.0.2.1`.
// To specify more complex routes, use the `routes4_extended` option.
Routes4 *[]string `json:"routes4,omitempty"`
// The list of IPv4 routes.
Routes4Extended *struct {
Ip string `json:"ip"`
NextHop *string `json:"next_hop,omitempty"`
Metric *int `json:"metric,omitempty"`
Table *int `json:"table,omitempty"`
Cwnd *int `json:"cwnd,omitempty"`
Mtu *int `json:"mtu,omitempty"`
Onlink *bool `json:"onlink,omitempty"`
Tos *int `json:"tos,omitempty"`
} `json:"routes4_extended,omitempty"`
// Set metric level of ipv4 routes configured on interface.
RouteMetric4 *int `json:"route_metric4,omitempty"`
// Is the same as in an `ip rule add` command, except always requires
// specifying a priority.
RoutingRules4 *[]string `json:"routing_rules4,omitempty"`
// Set as default route.
// This parameter is mutually_exclusive with gw4 parameter.
// default: false
NeverDefault4 *bool `json:"never_default4,omitempty"`
// A list of up to 3 DNS servers.
// The entries must be IPv4 addresses, for example `192.0.2.53`.
Dns4 *[]string `json:"dns4,omitempty"`
// A list of DNS search domains.
Dns4Search *[]string `json:"dns4_search,omitempty"`
// A list of DNS options.
Dns4Options *[]string `json:"dns4_options,omitempty"`
// Ignore automatically configured IPv4 name servers.
// default: false
Dns4IgnoreAuto *bool `json:"dns4_ignore_auto,omitempty"`
// Configuration method to be used for IPv4.
// If `ip4` is set, `ipv4.method` is automatically set to `manual` and this
// parameter is not needed.
Method4 *NmcliMethod4 `json:"method4,omitempty"`
// If you need `ip4` configured before `network-online.target` is reached, set
// this option to `false`.
// This option applies when `method4` is not `disabled`.
// default: true
MayFail4 *bool `json:"may_fail4,omitempty"`
// List of IPv6 addresses to this interface.
// Use the format `abbe::cafe/128` or `abbe::cafe`.
// If defined and `method6` is not specified, automatically set `ipv6.method`
// to `manual`.
Ip6 *[]string `json:"ip6,omitempty"`
// The IPv6 gateway for this interface.
// Use the format `2001:db8::1`.
Gw6 *string `json:"gw6,omitempty"`
// Ignore automatically configured IPv6 routes.
// default: false
Gw6IgnoreAuto *bool `json:"gw6_ignore_auto,omitempty"`
// The list of IPv6 routes.
// Use the format `fd12:3456:789a:1::/64 2001:dead:beef::1`.
// To specify more complex routes, use the `routes6_extended` option.
Routes6 *[]string `json:"routes6,omitempty"`
// The list of IPv6 routes but with parameters.
Routes6Extended *struct {
Ip string `json:"ip"`
NextHop *string `json:"next_hop,omitempty"`
Metric *int `json:"metric,omitempty"`
Table *int `json:"table,omitempty"`
Cwnd *int `json:"cwnd,omitempty"`
Mtu *int `json:"mtu,omitempty"`
Onlink *bool `json:"onlink,omitempty"`
} `json:"routes6_extended,omitempty"`
// Set metric level of IPv6 routes configured on interface.
RouteMetric6 *int `json:"route_metric6,omitempty"`
// A list of up to 3 DNS servers.
// The entries must be IPv6 addresses, for example `2001:4860:4860::8888`.
Dns6 *[]string `json:"dns6,omitempty"`
// A list of DNS search domains.
Dns6Search *[]string `json:"dns6_search,omitempty"`
// A list of DNS options.
Dns6Options *[]string `json:"dns6_options,omitempty"`
// Ignore automatically configured IPv6 name servers.
// default: false
Dns6IgnoreAuto *bool `json:"dns6_ignore_auto,omitempty"`
// Configuration method to be used for IPv6.
// If `ip6` is set, `ipv6.method` is automatically set to `manual` and this
// parameter is not needed.
// `disabled` was added in community.general 3.3.0.
Method6 *NmcliMethod6 `json:"method6,omitempty"`
// If enabled, it makes the kernel generate a temporary IPv6 address in
// addition to the public one.
IpPrivacy6 *NmcliIpPrivacy6 `json:"ip_privacy6,omitempty"`
// Configure method for creating the address for use with IPv6 Stateless
// Address Autoconfiguration.
// `default` and `default-or-eui64` have been added in community.general 6.5.0.
AddrGenMode6 *NmcliAddrGenMode6 `json:"addr_gen_mode6,omitempty"`
// The connection MTU, for example `9000`. This can not be applied when
// creating the interface and is done once the interface has been created.
// Can be used when modifying Team, VLAN, Ethernet (Future plans to implement
// wifi, gsm, pppoe, infiniband).
// This parameter defaults to `1500` when unset.
Mtu *int `json:"mtu,omitempty"`
// DHCP Client Identifier sent to the DHCP server.
DhcpClientId *string `json:"dhcp_client_id,omitempty"`
// This is only used with bond and is the primary interface name (for "active-
// backup" mode), this is the usually the 'ifname'.
Primary *string `json:"primary,omitempty"`
// This is only used with bond - miimon.
// This parameter defaults to `100` when unset.
Miimon *int `json:"miimon,omitempty"`
// This is only used with bond - downdelay.
Downdelay *int `json:"downdelay,omitempty"`
// This is only used with bond - updelay.
Updelay *int `json:"updelay,omitempty"`
// This is only used with bond - xmit_hash_policy type.
XmitHashPolicy *string `json:"xmit_hash_policy,omitempty"`
// This is only used with bond - fail_over_mac.
FailOverMac *NmcliFailOverMac `json:"fail_over_mac,omitempty"`
// This is only used with bond - ARP interval.
ArpInterval *int `json:"arp_interval,omitempty"`
// This is only used with bond - ARP IP target.
ArpIpTarget *string `json:"arp_ip_target,omitempty"`
// This is only used with bridge and controls whether Spanning Tree Protocol
// (STP) is enabled for this bridge.
// default: true
Stp *bool `json:"stp,omitempty"`
// This is only used with 'bridge' - sets STP priority.
// default: 128
Priority *int `json:"priority,omitempty"`
// This is only used with bridge - [forward-delay <2-30>] STP forwarding delay,
// in seconds.
// default: 15
Forwarddelay *int `json:"forwarddelay,omitempty"`
// This is only used with bridge - [hello-time <1-10>] STP hello time, in
// seconds.
// default: 2
Hellotime *int `json:"hellotime,omitempty"`
// This is only used with bridge - [max-age <6-42>] STP maximum message age, in
// seconds.
// default: 20
Maxage *int `json:"maxage,omitempty"`
// This is only used with bridge - [ageing-time <0-1000000>] the Ethernet MAC
// address aging time, in seconds.
// default: 300
Ageingtime *int `json:"ageingtime,omitempty"`
// MAC address of the connection.
// Note this requires a recent kernel feature, originally introduced in 3.15
// upstream kernel.
Mac *string `json:"mac,omitempty"`
// This is only used with 'bridge-slave' - [<0-63>] - STP priority of this
// slave.
// default: 32
Slavepriority *int `json:"slavepriority,omitempty"`
// This is only used with 'bridge-slave' - [<1-65535>] - STP port cost for
// destinations using this slave.
// default: 100
PathCost *int `json:"path_cost,omitempty"`
// This is only used with 'bridge-slave' - 'hairpin mode' for the slave, which
// allows frames to be sent back out through the slave the frame was received
// on.
// The default change to `false` in community.general 7.0.0. It used to be
// `true` before.
// default: false
Hairpin *bool `json:"hairpin,omitempty"`
// This is the type of device or network connection that you wish to create for
// a team.
// default: NmcliRunnerRoundrobin
Runner *NmcliRunner `json:"runner,omitempty"`
// This defines the policy of how hardware addresses of team device and port
// devices should be set during the team lifetime.
RunnerHwaddrPolicy *NmcliRunnerHwaddrPolicy `json:"runner_hwaddr_policy,omitempty"`
// Option specifies the rate at which our link partner is asked to transmit
// LACPDU packets. If this is `true` then packets will be sent once per second.
// Otherwise they will be sent every 30 seconds.
// Only allowed for `runner=lacp`.
RunnerFastRate *bool `json:"runner_fast_rate,omitempty"`
// This is only used with VLAN - VLAN ID in range <0-4095>.
Vlanid *int `json:"vlanid,omitempty"`
// This is only used with VLAN - parent device this VLAN is on, can use ifname.
Vlandev *string `json:"vlandev,omitempty"`
// This is only used with VLAN - flags.
Flags *string `json:"flags,omitempty"`
// This is only used with VLAN - VLAN ingress priority mapping.
Ingress *string `json:"ingress,omitempty"`
// This is only used with VLAN - VLAN egress priority mapping.
Egress *string `json:"egress,omitempty"`
// This is only used with VXLAN - VXLAN ID.
VxlanId *int `json:"vxlan_id,omitempty"`
// This is only used with VXLAN - VXLAN destination IP address.
VxlanRemote *string `json:"vxlan_remote,omitempty"`
// This is only used with VXLAN - VXLAN local IP address.
VxlanLocal *string `json:"vxlan_local,omitempty"`
// This is used with GRE/IPIP/SIT - parent device this GRE/IPIP/SIT tunnel, can
// use ifname.
IpTunnelDev *string `json:"ip_tunnel_dev,omitempty"`
// This is used with GRE/IPIP/SIT - GRE/IPIP/SIT destination IP address.
IpTunnelRemote *string `json:"ip_tunnel_remote,omitempty"`
// This is used with GRE/IPIP/SIT - GRE/IPIP/SIT local IP address.
IpTunnelLocal *string `json:"ip_tunnel_local,omitempty"`
// The key used for tunnel input packets.
// Only used when `type=gre`.
IpTunnelInputKey *string `json:"ip_tunnel_input_key,omitempty"`
// The key used for tunnel output packets.
// Only used when `type=gre`.
IpTunnelOutputKey *string `json:"ip_tunnel_output_key,omitempty"`
// This is only used with VRF - VRF table number.
Table *int `json:"table,omitempty"`
// The trust level of the connection.
// When updating this property on a currently activated connection, the change
// takes effect immediately.
Zone *string `json:"zone,omitempty"`
// The security configuration of the WiFi connection.
// Note the list of suboption attributes may vary depending on which version of
// NetworkManager/nmcli is installed on the host.
// An up-to-date list of supported attributes can be found here:
// `https://networkmanager.dev/docs/api/latest/settings-802-11-wireless-
// security.html`.
// For instance to use common WPA-PSK auth with a password: `{key-mgmt: wpa-
// psk, psk: my_password}`.
WifiSec *struct {
AuthAlg *string `json:"auth-alg,omitempty"`
Fils *int `json:"fils,omitempty"`
Group *[]string `json:"group,omitempty"`
KeyMgmt *string `json:"key-mgmt,omitempty"`
LeapPasswordFlags *[]int `json:"leap-password-flags,omitempty"`
LeapPassword *string `json:"leap-password,omitempty"`
LeapUsername *string `json:"leap-username,omitempty"`
Pairwise *[]string `json:"pairwise,omitempty"`
Pmf *int `json:"pmf,omitempty"`
Proto *[]string `json:"proto,omitempty"`
PskFlags *[]int `json:"psk-flags,omitempty"`
Psk *string `json:"psk,omitempty"`
WepKeyFlags *[]int `json:"wep-key-flags,omitempty"`
WepKeyType *int `json:"wep-key-type,omitempty"`
WepKey0 *string `json:"wep-key0,omitempty"`
WepKey1 *string `json:"wep-key1,omitempty"`
WepKey2 *string `json:"wep-key2,omitempty"`
WepKey3 *string `json:"wep-key3,omitempty"`
WepTxKeyidx *int `json:"wep-tx-keyidx,omitempty"`
WpsMethod *int `json:"wps-method,omitempty"`
} `json:"wifi_sec,omitempty"`
// Name of the Wireless router or the access point.
Ssid *string `json:"ssid,omitempty"`
// The configuration of the WiFi connection.
// Note the list of suboption attributes may vary depending on which version of
// NetworkManager/nmcli is installed on the host.
// An up-to-date list of supported attributes can be found here:
// `https://networkmanager.dev/docs/api/latest/settings-802-11-wireless.html`.
// For instance to create a hidden AP mode WiFi connection: `{hidden: true,
// mode: ap}`.
Wifi *struct {
ApIsolation *int `json:"ap-isolation,omitempty"`
AssignedMacAddress *string `json:"assigned-mac-address,omitempty"`
Band *string `json:"band,omitempty"`
Bssid *string `json:"bssid,omitempty"`
Channel *int `json:"channel,omitempty"`
ClonedMacAddress *string `json:"cloned-mac-address,omitempty"`
GenerateMacAddressMask *string `json:"generate-mac-address-mask,omitempty"`
Hidden *bool `json:"hidden,omitempty"`
MacAddressBlacklist *[]string `json:"mac-address-blacklist,omitempty"`
MacAddressRandomization *int `json:"mac-address-randomization,omitempty"`
MacAddress *string `json:"mac-address,omitempty"`
Mode *string `json:"mode,omitempty"`
Mtu *int `json:"mtu,omitempty"`
Powersave *int `json:"powersave,omitempty"`
Rate *int `json:"rate,omitempty"`
TxPower *int `json:"tx-power,omitempty"`
WakeOnWlan *int `json:"wake-on-wlan,omitempty"`
} `json:"wifi,omitempty"`
// Ignore suboptions which are invalid or unsupported by the version of
// NetworkManager/nmcli installed on the host.
// Only `wifi` and `wifi_sec` options are currently affected.
// default: false
IgnoreUnsupportedSuboptions *bool `json:"ignore_unsupported_suboptions,omitempty"`
// The configuration of the GSM connection.
// Note the list of suboption attributes may vary depending on which version of
// NetworkManager/nmcli is installed on the host.
// An up-to-date list of supported attributes can be found here:
// `https://networkmanager.dev/docs/api/latest/settings-gsm.html`.
// For instance to use apn, pin, username and password: `{apn: provider.apn,
// pin: 1234, username: apn.username, password: apn.password}`.
Gsm *struct {
Apn *string `json:"apn,omitempty"`
AutoConfig *bool `json:"auto-config,omitempty"`
DeviceId *string `json:"device-id,omitempty"`
HomeOnly *bool `json:"home-only,omitempty"`
Mtu *int `json:"mtu,omitempty"`
NetworkId *string `json:"network-id,omitempty"`
Number *string `json:"number,omitempty"`
Password *string `json:"password,omitempty"`
PasswordFlags *int `json:"password-flags,omitempty"`
Pin *string `json:"pin,omitempty"`
PinFlags *int `json:"pin-flags,omitempty"`
SimId *string `json:"sim-id,omitempty"`
SimOperatorId *string `json:"sim-operator-id,omitempty"`
Username *string `json:"username,omitempty"`
} `json:"gsm,omitempty"`
// The configuration of the MAC VLAN connection.
// Note the list of suboption attributes may vary depending on which version of
// NetworkManager/nmcli is installed on the host.
// An up-to-date list of supported attributes can be found here:
// `https://networkmanager.dev/docs/api/latest/settings-macvlan.html`.
Macvlan *struct {
Mode int `json:"mode"`
Parent string `json:"parent"`
Promiscuous *bool `json:"promiscuous,omitempty"`
Tap *bool `json:"tap,omitempty"`
} `json:"macvlan,omitempty"`
// The configuration of the Wireguard connection.
// Note the list of suboption attributes may vary depending on which version of
// NetworkManager/nmcli is installed on the host.
// An up-to-date list of supported attributes can be found here:
// `https://networkmanager.dev/docs/api/latest/settings-wireguard.html`.
// For instance to configure a listen port: `{listen-port: 12345}`.
Wireguard *struct {
Fwmark *int `json:"fwmark,omitempty"`
Ip4AutoDefaultRoute *bool `json:"ip4-auto-default-route,omitempty"`
Ip6AutoDefaultRoute *bool `json:"ip6-auto-default-route,omitempty"`
ListenPort *int `json:"listen-port,omitempty"`
Mtu *int `json:"mtu,omitempty"`
PeerRoutes *bool `json:"peer-routes,omitempty"`
PrivateKey *string `json:"private-key,omitempty"`
PrivateKeyFlags *int `json:"private-key-flags,omitempty"`
} `json:"wireguard,omitempty"`
// Configuration of a VPN connection (PPTP and L2TP).
// In order to use L2TP you need to be sure that `network-manager-l2tp` - and
// `network-manager-l2tp-gnome` if host has UI - are installed on the host.
Vpn *struct {
Permissions string `json:"permissions"`
ServiceType string `json:"service-type"`
Gateway string `json:"gateway"`
PasswordFlags *int `json:"password-flags,omitempty"`
User string `json:"user"`
IpsecEnabled *bool `json:"ipsec-enabled,omitempty"`
IpsecPsk *string `json:"ipsec-psk,omitempty"`
} `json:"vpn,omitempty"`
// Allow to configure SR-IOV settings.
// An up-to-date list of supported attributes can be found here: `https://netwo
// rkmanager.pages.freedesktop.org/NetworkManager/NetworkManager/settings-
// sriov.html`.
Sriov *struct {
AutoprobeDrivers *int `json:"autoprobe-drivers,omitempty"`
EswitchEncapMode *int `json:"eswitch-encap-mode,omitempty"`
EswitchInlineMode *int `json:"eswitch-inline-mode,omitempty"`
EswitchMode *int `json:"eswitch-mode,omitempty"`
TotalVfs *int `json:"total-vfs,omitempty"`
Vfs *string `json:"vfs,omitempty"`
} `json:"sriov,omitempty"`
}
Parameters for the `nmcli` Ansible module.
func (NmcliParameters) ToRPCCall ¶ added in v0.0.7
func (p NmcliParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `NmcliParameters into an `rpc.RPCCall`.
type NmcliReturn ¶ added in v0.0.7
type NmcliReturn struct {
AnsibleCommonReturns
}
Return values for the `nmcli` Ansible module.
func NmcliReturnFromRPCResult ¶ added in v0.0.7
func NmcliReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (NmcliReturn, error)
Unwrap the `rpc.RPCResult` into an `NmcliReturn`
type NmcliRunner ¶ added in v0.0.7
type NmcliRunner string
This is the type of device or network connection that you wish to create for a team.
const ( NmcliRunnerBroadcast NmcliRunner = "broadcast" NmcliRunnerRoundrobin NmcliRunner = "roundrobin" NmcliRunnerActivebackup NmcliRunner = "activebackup" NmcliRunnerLoadbalance NmcliRunner = "loadbalance" NmcliRunnerLacp NmcliRunner = "lacp" )
func OptionalNmcliRunner ¶ added in v0.0.7
func OptionalNmcliRunner[T interface {
*NmcliRunner | NmcliRunner | *string | string
}](s T) *NmcliRunner
Convert a supported type to an optional (pointer) NmcliRunner
type NmcliRunnerHwaddrPolicy ¶ added in v0.0.7
type NmcliRunnerHwaddrPolicy string
This defines the policy of how hardware addresses of team device and port devices should be set during the team lifetime.
const ( NmcliRunnerHwaddrPolicySameAll NmcliRunnerHwaddrPolicy = "same_all" NmcliRunnerHwaddrPolicyByActive NmcliRunnerHwaddrPolicy = "by_active" NmcliRunnerHwaddrPolicyOnlyActive NmcliRunnerHwaddrPolicy = "only_active" )
func OptionalNmcliRunnerHwaddrPolicy ¶ added in v0.0.7
func OptionalNmcliRunnerHwaddrPolicy[T interface {
*NmcliRunnerHwaddrPolicy | NmcliRunnerHwaddrPolicy | *string | string
}](s T) *NmcliRunnerHwaddrPolicy
Convert a supported type to an optional (pointer) NmcliRunnerHwaddrPolicy
type NmcliSlaveType ¶ added in v0.0.7
type NmcliSlaveType string
Type of the device of this slave's master connection (for example `bond`). Type `ovs-port` is added in community.general 8.6.0.
const ( NmcliSlaveTypeBond NmcliSlaveType = "bond" NmcliSlaveTypeBridge NmcliSlaveType = "bridge" NmcliSlaveTypeTeam NmcliSlaveType = "team" NmcliSlaveTypeOvsPort NmcliSlaveType = "ovs-port" NmcliSlaveTypeVrf NmcliSlaveType = "vrf" )
func OptionalNmcliSlaveType ¶ added in v0.0.7
func OptionalNmcliSlaveType[T interface {
*NmcliSlaveType | NmcliSlaveType | *string | string
}](s T) *NmcliSlaveType
Convert a supported type to an optional (pointer) NmcliSlaveType
type NmcliState ¶ added in v0.0.7
type NmcliState string
Whether the device should exist or not, taking action if the state is different from what is stated. Using `state=present` to create connection will automatically bring connection up. Using `state=up` and `state=down` will not modify connection with other parameters. These states have been added in community.general 9.5.0.
const ( NmcliStateAbsent NmcliState = "absent" NmcliStatePresent NmcliState = "present" NmcliStateUp NmcliState = "up" NmcliStateDown NmcliState = "down" )
type NmcliTransportMode ¶ added in v0.0.7
type NmcliTransportMode string
This option sets the connection type of Infiniband IPoIB devices.
const ( NmcliTransportModeDatagram NmcliTransportMode = "datagram" NmcliTransportModeConnected NmcliTransportMode = "connected" )
func OptionalNmcliTransportMode ¶ added in v0.0.7
func OptionalNmcliTransportMode[T interface {
*NmcliTransportMode | NmcliTransportMode | *string | string
}](s T) *NmcliTransportMode
Convert a supported type to an optional (pointer) NmcliTransportMode
type NmcliType ¶ added in v0.0.7
type NmcliType string
This is the type of device or network connection that you wish to create or modify. Type `dummy` is added in community.general 3.5.0. Type `gsm` is added in community.general 3.7.0. Type `infiniband` is added in community.general 2.0.0. Type `loopback` is added in community.general 8.1.0. Type `macvlan` is added in community.general 6.6.0. Type `ovs-bridge` is added in community.general 8.6.0. Type `ovs-interface` is added in community.general 8.6.0. Type `ovs-port` is added in community.general 8.6.0. Type `wireguard` is added in community.general 4.3.0. Type `vpn` is added in community.general 5.1.0. Type `vrf` is added in community.general 10.4.0. Using `bond-slave`, `bridge-slave`, or `team-slave` implies `ethernet` connection type with corresponding `slave_type` option. If you want to control non-ethernet connection attached to `bond`, `bridge`, or `team` consider using `slave_type` option.
const ( NmcliTypeBond NmcliType = "bond" NmcliTypeBondSlave NmcliType = "bond-slave" NmcliTypeBridge NmcliType = "bridge" NmcliTypeBridgeSlave NmcliType = "bridge-slave" NmcliTypeDummy NmcliType = "dummy" NmcliTypeEthernet NmcliType = "ethernet" NmcliTypeGeneric NmcliType = "generic" NmcliTypeGre NmcliType = "gre" NmcliTypeInfiniband NmcliType = "infiniband" NmcliTypeIpip NmcliType = "ipip" NmcliTypeMacvlan NmcliType = "macvlan" NmcliTypeSit NmcliType = "sit" NmcliTypeTeam NmcliType = "team" NmcliTypeTeamSlave NmcliType = "team-slave" NmcliTypeVlan NmcliType = "vlan" NmcliTypeVxlan NmcliType = "vxlan" NmcliTypeWifi NmcliType = "wifi" NmcliTypeGsm NmcliType = "gsm" NmcliTypeWireguard NmcliType = "wireguard" NmcliTypeOvsBridge NmcliType = "ovs-bridge" NmcliTypeOvsPort NmcliType = "ovs-port" NmcliTypeOvsInterface NmcliType = "ovs-interface" NmcliTypeVpn NmcliType = "vpn" NmcliTypeVrf NmcliType = "vrf" NmcliTypeLoopback NmcliType = "loopback" )
type NpmParameters ¶ added in v0.0.7
type NpmParameters struct {
// The name of a node.js library to install.
Name *string `json:"name,omitempty"`
// The base path where to install the node.js libraries.
Path *string `json:"path,omitempty"`
// The version to be installed.
Version *string `json:"version,omitempty"`
// Install the node.js library globally.
// default: false
Global *bool `json:"global,omitempty"`
// The executable location for npm.
// This is useful if you are using a version manager, such as nvm.
Executable *string `json:"executable,omitempty"`
// Use the `--ignore-scripts` flag when installing.
// default: false
IgnoreScripts *bool `json:"ignore_scripts,omitempty"`
// Use the `--unsafe-perm` flag when installing.
// default: false
UnsafePerm *bool `json:"unsafe_perm,omitempty"`
// Install packages based on package-lock file, same as running `npm ci`.
// default: false
Ci *bool `json:"ci,omitempty"`
// Install dependencies in production mode, excluding devDependencies.
// default: false
Production *bool `json:"production,omitempty"`
// The registry to install modules from.
Registry *string `json:"registry,omitempty"`
// The state of the node.js library.
// default: NpmStatePresent
State *NpmState `json:"state,omitempty"`
// Use the `--no-optional` flag when installing.
// default: false
NoOptional *bool `json:"no_optional,omitempty"`
// Use the `--no-bin-links` flag when installing.
// default: false
NoBinLinks *bool `json:"no_bin_links,omitempty"`
// Use the `--force` flag when installing.
// default: false
Force *bool `json:"force,omitempty"`
}
Parameters for the `npm` Ansible module.
func (NpmParameters) ToRPCCall ¶ added in v0.0.7
func (p NpmParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `NpmParameters into an `rpc.RPCCall`.
type NpmReturn ¶ added in v0.0.7
type NpmReturn struct {
AnsibleCommonReturns
}
Return values for the `npm` Ansible module.
func NpmReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `NpmReturn`
type NsupdateKeyAlgorithm ¶ added in v0.0.7
type NsupdateKeyAlgorithm string
Specify key algorithm used by `key_secret`.
const ( NsupdateKeyAlgorithmHmacMd5SigAlgRegInt NsupdateKeyAlgorithm = "HMAC-MD5.SIG-ALG.REG.INT" NsupdateKeyAlgorithmHmacMd5 NsupdateKeyAlgorithm = "hmac-md5" NsupdateKeyAlgorithmHmacSha1 NsupdateKeyAlgorithm = "hmac-sha1" NsupdateKeyAlgorithmHmacSha224 NsupdateKeyAlgorithm = "hmac-sha224" NsupdateKeyAlgorithmHmacSha256 NsupdateKeyAlgorithm = "hmac-sha256" NsupdateKeyAlgorithmHmacSha384 NsupdateKeyAlgorithm = "hmac-sha384" NsupdateKeyAlgorithmHmacSha512 NsupdateKeyAlgorithm = "hmac-sha512" )
func OptionalNsupdateKeyAlgorithm ¶ added in v0.0.7
func OptionalNsupdateKeyAlgorithm[T interface {
*NsupdateKeyAlgorithm | NsupdateKeyAlgorithm | *string | string
}](s T) *NsupdateKeyAlgorithm
Convert a supported type to an optional (pointer) NsupdateKeyAlgorithm
type NsupdateParameters ¶ added in v0.0.7
type NsupdateParameters struct {
// Manage DNS record.
// default: NsupdateStatePresent
State *NsupdateState `json:"state,omitempty"`
// Apply DNS modification on this server, specified by IPv4 or IPv6 address.
Server string `json:"server"`
// Use this TCP port when connecting to `server`.
// default: 53
Port *int `json:"port,omitempty"`
// Use TSIG key name to authenticate against DNS `server`.
KeyName *string `json:"key_name,omitempty"`
// Use TSIG key secret, associated with `key_name`, to authenticate against
// `server`.
KeySecret *string `json:"key_secret,omitempty"`
// Specify key algorithm used by `key_secret`.
// default: NsupdateKeyAlgorithmHmacMd5
KeyAlgorithm *NsupdateKeyAlgorithm `json:"key_algorithm,omitempty"`
// DNS record will be modified on this `zone`.
// When omitted DNS will be queried to attempt finding the correct zone.
Zone *string `json:"zone,omitempty"`
// Sets the DNS record to modify. When zone is omitted this has to be absolute
// (ending with a dot).
Record string `json:"record"`
// Sets the record type.
// default: "A"
Type *string `json:"type,omitempty"`
// Sets the record TTL.
// default: 3600
Ttl *int `json:"ttl,omitempty"`
// Sets the record value.
Value *[]string `json:"value,omitempty"`
// Sets the transport protocol (TCP or UDP). TCP is the recommended and a more
// robust option.
// default: NsupdateProtocolTcp
Protocol *NsupdateProtocol `json:"protocol,omitempty"`
}
Parameters for the `nsupdate` Ansible module.
func (NsupdateParameters) ToRPCCall ¶ added in v0.0.7
func (p NsupdateParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `NsupdateParameters into an `rpc.RPCCall`.
type NsupdateProtocol ¶ added in v0.0.7
type NsupdateProtocol string
Sets the transport protocol (TCP or UDP). TCP is the recommended and a more robust option.
const ( NsupdateProtocolTcp NsupdateProtocol = "tcp" NsupdateProtocolUdp NsupdateProtocol = "udp" )
func OptionalNsupdateProtocol ¶ added in v0.0.7
func OptionalNsupdateProtocol[T interface {
*NsupdateProtocol | NsupdateProtocol | *string | string
}](s T) *NsupdateProtocol
Convert a supported type to an optional (pointer) NsupdateProtocol
type NsupdateReturn ¶ added in v0.0.7
type NsupdateReturn struct {
AnsibleCommonReturns
// If module has modified record.
Changed *string `json:"changed,omitempty"`
// DNS record.
Record *string `json:"record,omitempty"`
// DNS record TTL.
Ttl *int `json:"ttl,omitempty"`
// DNS record type.
Type *string `json:"type,omitempty"`
// DNS record value(s).
Value *[]any `json:"value,omitempty"`
// DNS record zone.
Zone *string `json:"zone,omitempty"`
// `dnspython` return code.
DnsRc *int `json:"dns_rc,omitempty"`
// `dnspython` return code (string representation).
DnsRcStr *string `json:"dns_rc_str,omitempty"`
}
Return values for the `nsupdate` Ansible module.
func NsupdateReturnFromRPCResult ¶ added in v0.0.7
func NsupdateReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (NsupdateReturn, error)
Unwrap the `rpc.RPCResult` into an `NsupdateReturn`
type NsupdateState ¶ added in v0.0.7
type NsupdateState string
Manage DNS record.
const ( NsupdateStatePresent NsupdateState = "present" NsupdateStateAbsent NsupdateState = "absent" )
func OptionalNsupdateState ¶ added in v0.0.7
func OptionalNsupdateState[T interface {
*NsupdateState | NsupdateState | *string | string
}](s T) *NsupdateState
Convert a supported type to an optional (pointer) NsupdateState
type OpkgForce ¶ added in v0.0.7
type OpkgForce string
The `opkg --force` parameter used.
const ( OpkgForceDepends OpkgForce = "depends" OpkgForceMaintainer OpkgForce = "maintainer" OpkgForceReinstall OpkgForce = "reinstall" OpkgForceOverwrite OpkgForce = "overwrite" OpkgForceDowngrade OpkgForce = "downgrade" OpkgForceSpace OpkgForce = "space" OpkgForcePostinstall OpkgForce = "postinstall" OpkgForceRemove OpkgForce = "remove" OpkgForceChecksum OpkgForce = "checksum" OpkgForceRemovalOfDependentPackages OpkgForce = "removal-of-dependent-packages" )
type OpkgParameters ¶ added in v0.0.7
type OpkgParameters struct {
// Name of package(s) to install/remove.
// `NAME=VERSION` syntax is also supported to install a package in a certain
// version. See the examples. This only works on Yocto based Linux
// distributions (opkg>=0.3.2) and not for OpenWrt. This is supported since
// community.general 6.2.0.
Name []string `json:"name"`
// State of the package.
// default: OpkgStatePresent
State *OpkgState `json:"state,omitempty"`
// The `opkg --force` parameter used.
Force *OpkgForce `json:"force,omitempty"`
// Update the package DB first.
// default: false
UpdateCache *bool `json:"update_cache,omitempty"`
// The executable location for `opkg`.
Executable *string `json:"executable,omitempty"`
}
Parameters for the `opkg` Ansible module.
func (OpkgParameters) ToRPCCall ¶ added in v0.0.7
func (p OpkgParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `OpkgParameters into an `rpc.RPCCall`.
type OpkgReturn ¶ added in v0.0.7
type OpkgReturn struct {
AnsibleCommonReturns
// Version of opkg.
Version *string `json:"version,omitempty"`
}
Return values for the `opkg` Ansible module.
func OpkgReturnFromRPCResult ¶ added in v0.0.7
func OpkgReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (OpkgReturn, error)
Unwrap the `rpc.RPCResult` into an `OpkgReturn`
type PackageFactsManager ¶ added in v0.0.7
type PackageFactsManager string
The package manager(s) used by the system so we can query the package information. This is a list and can support multiple package managers per system, since version 2.8. The `portage` and `pkg` options were added in version 2.8. The `apk` option was added in version 2.11. The `pkg_info`' option was added in version 2.13. Aliases were added in 2.18, to support using `manager={{ansible_facts['pkg_mgr']}}`
const ( // Depending on `strategy`, will match the first or all package managers // provided, in order PackageFactsManagerAuto PackageFactsManager = "auto" // For RPM based distros, requires RPM Python bindings, not installed by // default on Suse (python3-rpm) PackageFactsManagerRpm PackageFactsManager = "rpm" // Alias to rpm PackageFactsManagerYum PackageFactsManager = "yum" // Alias to rpm PackageFactsManagerDnf PackageFactsManager = "dnf" // Alias to rpm PackageFactsManagerDnf5 PackageFactsManager = "dnf5" // Alias to rpm PackageFactsManagerZypper PackageFactsManager = "zypper" // For DEB based distros, `python-apt` package must be installed on targeted // hosts PackageFactsManagerApt PackageFactsManager = "apt" // Handles ebuild packages, it requires the `qlist` utility, which is part of // 'app-portage/portage-utils' PackageFactsManagerPortage PackageFactsManager = "portage" // libpkg front end (FreeBSD) PackageFactsManagerPkg PackageFactsManager = "pkg" // Alias to pkg PackageFactsManagerPkg5 PackageFactsManager = "pkg5" // Alias to pkg PackageFactsManagerPkgng PackageFactsManager = "pkgng" // Archlinux package manager/builder PackageFactsManagerPacman PackageFactsManager = "pacman" // Alpine Linux package manager PackageFactsManagerApk PackageFactsManager = "apk" // OpenBSD package manager PackageFactsManagerPkgInfo PackageFactsManager = "pkg_info" // Alias to pkg_info PackageFactsManagerOpenbsdPkg PackageFactsManager = "openbsd_pkg" )
func OptionalPackageFactsManager ¶ added in v0.0.7
func OptionalPackageFactsManager[T interface {
*PackageFactsManager | PackageFactsManager | *string | string
}](s T) *PackageFactsManager
Convert a supported type to an optional (pointer) PackageFactsManager
type PackageFactsParameters ¶
type PackageFactsParameters struct {
// The package manager(s) used by the system so we can query the package
// information. This is a list and can support multiple package managers per
// system, since version 2.8.
// The `portage` and `pkg` options were added in version 2.8.
// The `apk` option was added in version 2.11.
// The `pkg_info`' option was added in version 2.13.
// Aliases were added in 2.18, to support using
// `manager={{ansible_facts['pkg_mgr']}}`
// default: []PackageFactsManager{PackageFactsManagerAuto}
Manager *PackageFactsManager `json:"manager,omitempty"`
// This option controls how the module queries the package managers on the
// system.
// default: PackageFactsStrategyFirst
Strategy *PackageFactsStrategy `json:"strategy,omitempty"`
}
Parameters for the `package_facts` Ansible module.
func (PackageFactsParameters) ToRPCCall ¶
func (p PackageFactsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PackageFactsParameters into an `rpc.RPCCall`.
type PackageFactsReturn ¶
type PackageFactsReturn struct {
AnsibleCommonReturns
// Facts to add to ansible_facts.
AnsibleFacts *any `json:"ansible_facts,omitempty"`
}
Return values for the `package_facts` Ansible module.
func PackageFactsReturnFromRPCResult ¶
func PackageFactsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PackageFactsReturn, error)
Unwrap the `rpc.RPCResult` into an `PackageFactsReturn`
type PackageFactsStrategy ¶ added in v0.0.7
type PackageFactsStrategy string
This option controls how the module queries the package managers on the system.
const ( // returns only information for the first supported package manager available. PackageFactsStrategyFirst PackageFactsStrategy = "first" // returns information for all supported and available package managers on the // system. PackageFactsStrategyAll PackageFactsStrategy = "all" )
func OptionalPackageFactsStrategy ¶ added in v0.0.7
func OptionalPackageFactsStrategy[T interface {
*PackageFactsStrategy | PackageFactsStrategy | *string | string
}](s T) *PackageFactsStrategy
Convert a supported type to an optional (pointer) PackageFactsStrategy
type PackageParameters ¶ added in v0.0.7
type PackageParameters struct {
// Package name, or package specifier with version.
// Syntax varies with package manager. For example `name-1.0` or `name=1.0`.
// Package names also vary with package manager; this module will not
// "translate" them per distribution. For example `libyaml-dev`, `libyaml-
// devel`.
// To operate on several packages this can accept a comma separated string of
// packages or a list of packages, depending on the underlying package manager.
Name any `json:"name"`
// Whether to install (`present`), or remove (`absent`) a package.
// You can use other states like `latest` ONLY if they are supported by the
// underlying package module(s) executed.
State string `json:"state"`
// The required package manager module to use (`dnf`, `apt`, and so on). The
// default `auto` will use existing facts or try to auto-detect it.
// You should only use this field if the automatic selection is not working for
// some reason.
// Since version 2.17 you can use the `ansible_package_use` variable to
// override the automatic detection, but this option still takes precedence.
// default: "auto"
Use *string `json:"use,omitempty"`
}
Parameters for the `package` Ansible module.
func (PackageParameters) ToRPCCall ¶ added in v0.0.7
func (p PackageParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PackageParameters into an `rpc.RPCCall`.
type PackageReturn ¶ added in v0.0.7
type PackageReturn struct {
AnsibleCommonReturns
}
Return values for the `package` Ansible module.
func PackageReturnFromRPCResult ¶ added in v0.0.7
func PackageReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PackageReturn, error)
Unwrap the `rpc.RPCResult` into an `PackageReturn`
type PacmanParameters ¶ added in v0.0.7
type PacmanParameters struct {
// Name or list of names of the package(s) or file(s) to install, upgrade, or
// remove. Cannot be used in combination with `upgrade`.
Name *[]string `json:"name,omitempty"`
// Whether to install (`present` or `installed`, `latest`), or remove (`absent`
// or `removed`) a package.
// `present` and `installed` will simply ensure that a desired package is
// installed.
// `latest` will update the specified package if it is not of the latest
// available version.
// `absent` and `removed` will remove the specified package.
// default: PacmanStatePresent
State *PacmanState `json:"state,omitempty"`
// When removing packages, forcefully remove them, without any checks. Same as
// `extra_args="--nodeps --nodeps"`.
// When combined with `update_cache`, force a refresh of all package databases.
// Same as `update_cache_extra_args="--refresh --refresh"`.
// default: false
Force *bool `json:"force,omitempty"`
// When removing packages, do not save modified configuration files as
// `.pacsave` files. (passes `--nosave` to pacman).
// default: false
RemoveNosave *bool `json:"remove_nosave,omitempty"`
// Path of the binary to use. This can either be `pacman` or a pacman
// compatible AUR helper.
// Pacman compatibility is unfortunately ill defined, in particular, this
// modules makes extensive use of the `--print-format` directive which is known
// not to be implemented by some AUR helpers (notably, `yay`).
// Beware that AUR helpers might behave unexpectedly and are therefore not
// recommended.
// default: "pacman"
Executable *string `json:"executable,omitempty"`
// Additional option to pass to pacman when enforcing `state`.
// default: ""
ExtraArgs *string `json:"extra_args,omitempty"`
// Whether or not to refresh the master package lists.
// This can be run as part of a package installation or as a separate step.
// If not specified, it defaults to `false`.
// Please note that this option only had an influence on the module's `changed`
// state if `name` and `upgrade` are not specified before community.general
// 5.0.0. See the examples for how to keep the old behavior.
UpdateCache *bool `json:"update_cache,omitempty"`
// Additional option to pass to pacman when enforcing `update_cache`.
// default: ""
UpdateCacheExtraArgs *string `json:"update_cache_extra_args,omitempty"`
// Whether or not to upgrade the whole system. Cannot be used in combination
// with `name`.
// If not specified, it defaults to `false`.
Upgrade *bool `json:"upgrade,omitempty"`
// Additional option to pass to pacman when enforcing `upgrade`.
// default: ""
UpgradeExtraArgs *string `json:"upgrade_extra_args,omitempty"`
// The install reason to set for the packages.
Reason *PacmanReason `json:"reason,omitempty"`
// Set the install reason for `all` packages or only for `new` packages.
// In case of `state=latest` already installed packages which will be updated
// to a newer version are not counted as `new`.
// default: PacmanReasonForNew
ReasonFor *PacmanReasonFor `json:"reason_for,omitempty"`
}
Parameters for the `pacman` Ansible module.
func (PacmanParameters) ToRPCCall ¶ added in v0.0.7
func (p PacmanParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PacmanParameters into an `rpc.RPCCall`.
type PacmanReason ¶ added in v0.0.7
type PacmanReason string
The install reason to set for the packages.
const ( PacmanReasonDependency PacmanReason = "dependency" PacmanReasonExplicit PacmanReason = "explicit" )
func OptionalPacmanReason ¶ added in v0.0.7
func OptionalPacmanReason[T interface {
*PacmanReason | PacmanReason | *string | string
}](s T) *PacmanReason
Convert a supported type to an optional (pointer) PacmanReason
type PacmanReasonFor ¶ added in v0.0.7
type PacmanReasonFor string
Set the install reason for `all` packages or only for `new` packages. In case of `state=latest` already installed packages which will be updated to a newer version are not counted as `new`.
const ( PacmanReasonForAll PacmanReasonFor = "all" PacmanReasonForNew PacmanReasonFor = "new" )
func OptionalPacmanReasonFor ¶ added in v0.0.7
func OptionalPacmanReasonFor[T interface {
*PacmanReasonFor | PacmanReasonFor | *string | string
}](s T) *PacmanReasonFor
Convert a supported type to an optional (pointer) PacmanReasonFor
type PacmanReturn ¶ added in v0.0.7
type PacmanReturn struct {
AnsibleCommonReturns
// A list of packages that have been changed.
// Before community.general 4.5.0 this was only returned when `upgrade=true`.
// In community.general 4.5.0, it was sometimes omitted when the package list
// is empty, but since community.general 4.6.0 it is always returned when
// `name` is specified or `upgrade=true`.
Packages *[]string `json:"packages,omitempty"`
// The changed status of `pacman -Sy`.
// Useful when `name` or `upgrade=true` are specified next to
// `update_cache=true`.
CacheUpdated *bool `json:"cache_updated,omitempty"`
// Output from pacman.
Stdout *string `json:"stdout,omitempty"`
// Error output from pacman.
Stderr *string `json:"stderr,omitempty"`
}
Return values for the `pacman` Ansible module.
func PacmanReturnFromRPCResult ¶ added in v0.0.7
func PacmanReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PacmanReturn, error)
Unwrap the `rpc.RPCResult` into an `PacmanReturn`
type PacmanState ¶ added in v0.0.7
type PacmanState string
Whether to install (`present` or `installed`, `latest`), or remove (`absent` or `removed`) a package. `present` and `installed` will simply ensure that a desired package is installed. `latest` will update the specified package if it is not of the latest available version. `absent` and `removed` will remove the specified package.
const ( PacmanStateAbsent PacmanState = "absent" PacmanStateInstalled PacmanState = "installed" PacmanStateLatest PacmanState = "latest" PacmanStatePresent PacmanState = "present" PacmanStateRemoved PacmanState = "removed" )
func OptionalPacmanState ¶ added in v0.0.7
func OptionalPacmanState[T interface {
*PacmanState | PacmanState | *string | string
}](s T) *PacmanState
Convert a supported type to an optional (pointer) PacmanState
type PamLimitsLimitItem ¶ added in v0.0.7
type PamLimitsLimitItem string
The limit to be set.
const ( PamLimitsLimitItemCore PamLimitsLimitItem = "core" PamLimitsLimitItemData PamLimitsLimitItem = "data" PamLimitsLimitItemFsize PamLimitsLimitItem = "fsize" PamLimitsLimitItemMemlock PamLimitsLimitItem = "memlock" PamLimitsLimitItemNofile PamLimitsLimitItem = "nofile" PamLimitsLimitItemRss PamLimitsLimitItem = "rss" PamLimitsLimitItemStack PamLimitsLimitItem = "stack" PamLimitsLimitItemCpu PamLimitsLimitItem = "cpu" PamLimitsLimitItemNproc PamLimitsLimitItem = "nproc" PamLimitsLimitItemAs PamLimitsLimitItem = "as" PamLimitsLimitItemMaxlogins PamLimitsLimitItem = "maxlogins" PamLimitsLimitItemMaxsyslogins PamLimitsLimitItem = "maxsyslogins" PamLimitsLimitItemPriority PamLimitsLimitItem = "priority" PamLimitsLimitItemLocks PamLimitsLimitItem = "locks" PamLimitsLimitItemSigpending PamLimitsLimitItem = "sigpending" PamLimitsLimitItemMsgqueue PamLimitsLimitItem = "msgqueue" PamLimitsLimitItemNice PamLimitsLimitItem = "nice" PamLimitsLimitItemRtprio PamLimitsLimitItem = "rtprio" PamLimitsLimitItemChroot PamLimitsLimitItem = "chroot" )
type PamLimitsLimitType ¶ added in v0.0.7
type PamLimitsLimitType string
Limit type, see `man 5 limits.conf` for an explanation.
const ( PamLimitsLimitTypeHard PamLimitsLimitType = "hard" PamLimitsLimitTypeSoft PamLimitsLimitType = "soft" PamLimitsLimitTypeBoth PamLimitsLimitType = "-" )
type PamLimitsParameters ¶ added in v0.0.7
type PamLimitsParameters struct {
// A username, @groupname, wildcard, UID/GID range.
Domain string `json:"domain"`
// Limit type, see `man 5 limits.conf` for an explanation.
LimitType PamLimitsLimitType `json:"limit_type"`
// The limit to be set.
LimitItem PamLimitsLimitItem `json:"limit_item"`
// The value of the limit.
// Value must either be `unlimited`, `infinity` or `-1`, all of which indicate
// no limit, or a limit of 0 or larger.
// Value must be a number in the range -20 to 19 inclusive, if `limit_item` is
// set to `nice` or `priority`.
// Refer to the `man 5 limits.conf` manual pages for more details.
Value string `json:"value"`
// Create a backup file including the timestamp information so you can get the
// original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
// If set to `true`, the minimal value will be used or conserved.
// If the specified value is inferior to the value in the file, file content is
// replaced with the new value, else content is not modified.
// default: false
UseMin *bool `json:"use_min,omitempty"`
// If set to `true`, the maximal value will be used or conserved.
// If the specified value is superior to the value in the file, file content is
// replaced with the new value, else content is not modified.
// default: false
UseMax *bool `json:"use_max,omitempty"`
// Modify the limits.conf path.
// default: "/etc/security/limits.conf"
Dest *string `json:"dest,omitempty"`
// Comment associated with the limit.
// default: ""
Comment *string `json:"comment,omitempty"`
}
Parameters for the `pam_limits` Ansible module.
func (PamLimitsParameters) ToRPCCall ¶ added in v0.0.7
func (p PamLimitsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PamLimitsParameters into an `rpc.RPCCall`.
type PamLimitsReturn ¶ added in v0.0.7
type PamLimitsReturn struct {
AnsibleCommonReturns
}
Return values for the `pam_limits` Ansible module.
func PamLimitsReturnFromRPCResult ¶ added in v0.0.7
func PamLimitsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PamLimitsReturn, error)
Unwrap the `rpc.RPCResult` into an `PamLimitsReturn`
type PamdNewType ¶ added in v0.0.7
type PamdNewType string
The new type to assign to the new rule.
const ( PamdNewTypeAccount PamdNewType = "account" PamdNewTypeAccountNoLog PamdNewType = "-account" PamdNewTypeAuth PamdNewType = "auth" PamdNewTypeAuthNoLog PamdNewType = "-auth" PamdNewTypePassword PamdNewType = "password" PamdNewTypePasswordNoLog PamdNewType = "-password" PamdNewTypeSession PamdNewType = "session" PamdNewTypeSessionNoLog PamdNewType = "-session" )
func OptionalPamdNewType ¶ added in v0.0.7
func OptionalPamdNewType[T interface {
*PamdNewType | PamdNewType | *string | string
}](s T) *PamdNewType
Convert a supported type to an optional (pointer) PamdNewType
type PamdParameters ¶ added in v0.0.7
type PamdParameters struct {
// The name generally refers to the PAM service file to change, for example
// system-auth.
Name string `json:"name"`
// The type of the PAM rule being modified.
// The `type`, `control`, and `module_path` options all must match a rule to be
// modified.
Type PamdType `json:"type"`
// The control of the PAM rule being modified.
// This may be a complicated control with brackets. If this is the case, be
// sure to put "[bracketed controls]" in quotes.
// The `type`, `control`, and `module_path` options all must match a rule to be
// modified.
Control string `json:"control"`
// The module path of the PAM rule being modified.
// The `type`, `control`, and `module_path` options all must match a rule to be
// modified.
ModulePath string `json:"module_path"`
// The new type to assign to the new rule.
NewType *PamdNewType `json:"new_type,omitempty"`
// The new control to assign to the new rule.
NewControl *string `json:"new_control,omitempty"`
// The new module path to be assigned to the new rule.
NewModulePath *string `json:"new_module_path,omitempty"`
// When `state=updated`, the `module_arguments` will replace existing
// module_arguments.
// When `state=args_absent` args matching those listed in `module_arguments`
// will be removed.
// When `state=args_present` any args listed in `module_arguments` are added if
// missing from the existing rule.
// Furthermore, if the module argument takes a value denoted by `=`, the value
// will be changed to that specified in module_arguments.
ModuleArguments *[]string `json:"module_arguments,omitempty"`
// The default of `updated` will modify an existing rule if type, control and
// module_path all match an existing rule.
// With `before`, the new rule will be inserted before a rule matching type,
// control and module_path.
// Similarly, with `after`, the new rule will be inserted after an existing
// rulematching type, control and module_path.
// With either `before` or `after` `new_type`, `new_control`, and
// `new_module_path` must all be specified.
// If state is `args_absent` or `args_present`, `new_type`, `new_control`, and
// `new_module_path` will be ignored.
// State `absent` will remove the rule.
// default: PamdStateUpdated
State *PamdState `json:"state,omitempty"`
// This is the path to the PAM service files.
// default: "/etc/pam.d"
Path *string `json:"path,omitempty"`
// Create a backup file including the timestamp information so you can get the
// original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
}
Parameters for the `pamd` Ansible module.
func (PamdParameters) ToRPCCall ¶ added in v0.0.7
func (p PamdParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PamdParameters into an `rpc.RPCCall`.
type PamdReturn ¶ added in v0.0.7
type PamdReturn struct {
AnsibleCommonReturns
// How many rules were changed.
ChangeCount *int `json:"change_count,omitempty"`
// The file name of the backup file, if created.
Backupdest *string `json:"backupdest,omitempty"`
}
Return values for the `pamd` Ansible module.
func PamdReturnFromRPCResult ¶ added in v0.0.7
func PamdReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PamdReturn, error)
Unwrap the `rpc.RPCResult` into an `PamdReturn`
type PamdState ¶ added in v0.0.7
type PamdState string
The default of `updated` will modify an existing rule if type, control and module_path all match an existing rule. With `before`, the new rule will be inserted before a rule matching type, control and module_path. Similarly, with `after`, the new rule will be inserted after an existing rulematching type, control and module_path. With either `before` or `after` `new_type`, `new_control`, and `new_module_path` must all be specified. If state is `args_absent` or `args_present`, `new_type`, `new_control`, and `new_module_path` will be ignored. State `absent` will remove the rule.
type PamdType ¶ added in v0.0.7
type PamdType string
The type of the PAM rule being modified. The `type`, `control`, and `module_path` options all must match a rule to be modified.
const ( PamdTypeAccount PamdType = "account" PamdTypeAccountNoLog PamdType = "-account" PamdTypeAuth PamdType = "auth" PamdTypeAuthNoLog PamdType = "-auth" PamdTypePassword PamdType = "password" PamdTypePasswordNoLog PamdType = "-password" PamdTypeSession PamdType = "session" PamdTypeSessionNoLog PamdType = "-session" )
type PartedAlign ¶ added in v0.0.7
type PartedAlign string
Set alignment for newly created partitions. Use `undefined` for parted default alignment.
const ( PartedAlignCylinder PartedAlign = "cylinder" PartedAlignMinimal PartedAlign = "minimal" PartedAlignNone PartedAlign = "none" PartedAlignOptimal PartedAlign = "optimal" PartedAlignUndefined PartedAlign = "undefined" )
func OptionalPartedAlign ¶ added in v0.0.7
func OptionalPartedAlign[T interface {
*PartedAlign | PartedAlign | *string | string
}](s T) *PartedAlign
Convert a supported type to an optional (pointer) PartedAlign
type PartedLabel ¶ added in v0.0.7
type PartedLabel string
Disk label type or partition table to use. If `device` already contains a different label, it will be changed to `label` and any previous partitions will be lost. A `name` must be specified for a `gpt` partition table.
const ( PartedLabelAix PartedLabel = "aix" PartedLabelAmiga PartedLabel = "amiga" PartedLabelBsd PartedLabel = "bsd" PartedLabelDvh PartedLabel = "dvh" PartedLabelGpt PartedLabel = "gpt" PartedLabelLoop PartedLabel = "loop" PartedLabelMac PartedLabel = "mac" PartedLabelMsdos PartedLabel = "msdos" PartedLabelPc98 PartedLabel = "pc98" PartedLabelSun PartedLabel = "sun" )
func OptionalPartedLabel ¶ added in v0.0.7
func OptionalPartedLabel[T interface {
*PartedLabel | PartedLabel | *string | string
}](s T) *PartedLabel
Convert a supported type to an optional (pointer) PartedLabel
type PartedParameters ¶ added in v0.0.7
type PartedParameters struct {
// The block device (disk) where to operate.
// Regular files can also be partitioned, but it is recommended to create a
// loopback device using `losetup` to easily access its partitions.
Device string `json:"device"`
// Set alignment for newly created partitions. Use `undefined` for parted
// default alignment.
// default: PartedAlignOptimal
Align *PartedAlign `json:"align,omitempty"`
// The partition number being affected.
// Required when performing any action on the disk, except fetching
// information.
Number *int `json:"number,omitempty"`
// Selects the current default unit that Parted will use to display locations
// and capacities on the disk and to interpret those given by the user if they
// are not suffixed by an unit.
// When fetching information about a disk, it is recommended to always specify
// a unit.
// default: PartedUnitKib
Unit *PartedUnit `json:"unit,omitempty"`
// Disk label type or partition table to use.
// If `device` already contains a different label, it will be changed to
// `label` and any previous partitions will be lost.
// A `name` must be specified for a `gpt` partition table.
// default: PartedLabelMsdos
Label *PartedLabel `json:"label,omitempty"`
// May be specified only with `label=msdos` or `label=dvh`.
// Neither `part_type` nor `name` may be used with `label=sun`.
// default: PartedPartTypePrimary
PartType *PartedPartType `json:"part_type,omitempty"`
// Where the partition will start as offset from the beginning of the disk,
// that is, the "distance" from the start of the disk. Negative numbers specify
// distance from the end of the disk.
// The distance can be specified with all the units supported by parted (except
// compat) and it is case sensitive, for example `10GiB`, `15%`.
// Using negative values may require setting of `fs_type` (see notes).
// default: "0%"
PartStart *string `json:"part_start,omitempty"`
// Where the partition will end as offset from the beginning of the disk, that
// is, the "distance" from the start of the disk. Negative numbers specify
// distance from the end of the disk.
// The distance can be specified with all the units supported by parted (except
// compat) and it is case sensitive, for example `10GiB`, `15%`.
// default: "100%"
PartEnd *string `json:"part_end,omitempty"`
// Sets the name for the partition number (GPT, Mac, MIPS and PC98 only).
Name *string `json:"name,omitempty"`
// A list of the flags that has to be set on the partition.
Flags *[]string `json:"flags,omitempty"`
// Whether to create or delete a partition.
// If set to `info` the module will only return the device information.
// default: PartedStateInfo
State *PartedState `json:"state,omitempty"`
// If specified and the partition does not exist, will set filesystem type to
// given partition.
// Parameter optional, but see notes below about negative `part_start` values.
FsType *string `json:"fs_type,omitempty"`
// Call `resizepart` on existing partitions to match the size specified by
// `part_end`.
// default: false
Resize *bool `json:"resize,omitempty"`
}
Parameters for the `parted` Ansible module.
func (PartedParameters) ToRPCCall ¶ added in v0.0.7
func (p PartedParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PartedParameters into an `rpc.RPCCall`.
type PartedPartType ¶ added in v0.0.7
type PartedPartType string
May be specified only with `label=msdos` or `label=dvh`. Neither `part_type` nor `name` may be used with `label=sun`.
const ( PartedPartTypeExtended PartedPartType = "extended" PartedPartTypeLogical PartedPartType = "logical" PartedPartTypePrimary PartedPartType = "primary" )
func OptionalPartedPartType ¶ added in v0.0.7
func OptionalPartedPartType[T interface {
*PartedPartType | PartedPartType | *string | string
}](s T) *PartedPartType
Convert a supported type to an optional (pointer) PartedPartType
type PartedReturn ¶ added in v0.0.7
type PartedReturn struct {
AnsibleCommonReturns
// Current partition information.
PartitionInfo *any `json:"partition_info,omitempty"`
}
Return values for the `parted` Ansible module.
func PartedReturnFromRPCResult ¶ added in v0.0.7
func PartedReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PartedReturn, error)
Unwrap the `rpc.RPCResult` into an `PartedReturn`
type PartedState ¶ added in v0.0.7
type PartedState string
Whether to create or delete a partition. If set to `info` the module will only return the device information.
const ( PartedStateAbsent PartedState = "absent" PartedStatePresent PartedState = "present" PartedStateInfo PartedState = "info" )
func OptionalPartedState ¶ added in v0.0.7
func OptionalPartedState[T interface {
*PartedState | PartedState | *string | string
}](s T) *PartedState
Convert a supported type to an optional (pointer) PartedState
type PartedUnit ¶ added in v0.0.7
type PartedUnit string
Selects the current default unit that Parted will use to display locations and capacities on the disk and to interpret those given by the user if they are not suffixed by an unit. When fetching information about a disk, it is recommended to always specify a unit.
const ( PartedUnitS PartedUnit = "s" PartedUnitB PartedUnit = "B" PartedUnitKB PartedUnit = "KB" PartedUnitKiB PartedUnit = "KiB" PartedUnitMB PartedUnit = "MB" PartedUnitMiB PartedUnit = "MiB" PartedUnitGB PartedUnit = "GB" PartedUnitGiB PartedUnit = "GiB" PartedUnitTB PartedUnit = "TB" PartedUnitTiB PartedUnit = "TiB" PartedUnitPercent PartedUnit = "%" PartedUnitCyl PartedUnit = "cyl" PartedUnitChs PartedUnit = "chs" PartedUnitCompact PartedUnit = "compact" )
func OptionalPartedUnit ¶ added in v0.0.7
func OptionalPartedUnit[T interface {
*PartedUnit | PartedUnit | *string | string
}](s T) *PartedUnit
Convert a supported type to an optional (pointer) PartedUnit
type PatchParameters ¶ added in v0.0.7
type PatchParameters struct {
// Path of a base directory in which the patch file will be applied.
// May be omitted when `dest` option is specified, otherwise required.
Basedir *string `json:"basedir,omitempty"`
// Path of the file on the remote machine to be patched.
// The names of the files to be patched are usually taken from the patch file,
// but if there's just one file to be patched it can specified with this
// option.
Dest *string `json:"dest,omitempty"`
// Path of the patch file as accepted by the GNU patch tool. If
// `remote_src=false`, the patch source file is looked up from the module's
// `files` directory.
Src string `json:"src"`
// Whether the patch should be applied or reverted.
// default: PatchStatePresent
State *PatchState `json:"state,omitempty"`
// If `false`, it will search for src at originating/controller machine,
// If `true`, it will go to the remote/target machine for the `src`.
// default: false
RemoteSrc *bool `json:"remote_src,omitempty"`
// Number that indicates the smallest prefix containing leading slashes that
// will be stripped from each file name found in the patch file.
// For more information see the strip parameter of the GNU patch tool.
// default: 0
Strip *int `json:"strip,omitempty"`
// Passes `--backup --version-control=numbered` to patch, producing numbered
// backup copies.
// default: false
Backup *bool `json:"backup,omitempty"`
// Setting to `true` will disable patch's heuristic for transforming CRLF line
// endings into LF.
// Line endings of `src` and `dest` must match.
// If set to `false`, `patch` will replace CRLF in `src` files on POSIX.
// default: false
Binary *bool `json:"binary,omitempty"`
// Setting to `true` will ignore white space changes between patch and input.
// default: false
IgnoreWhitespace *bool `json:"ignore_whitespace,omitempty"`
}
Parameters for the `patch` Ansible module.
func (PatchParameters) ToRPCCall ¶ added in v0.0.7
func (p PatchParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PatchParameters into an `rpc.RPCCall`.
type PatchReturn ¶ added in v0.0.7
type PatchReturn struct {
AnsibleCommonReturns
}
Return values for the `patch` Ansible module.
func PatchReturnFromRPCResult ¶ added in v0.0.7
func PatchReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PatchReturn, error)
Unwrap the `rpc.RPCResult` into an `PatchReturn`
type PatchState ¶ added in v0.0.7
type PatchState string
Whether the patch should be applied or reverted.
const ( PatchStateAbsent PatchState = "absent" PatchStatePresent PatchState = "present" )
func OptionalPatchState ¶ added in v0.0.7
func OptionalPatchState[T interface {
*PatchState | PatchState | *string | string
}](s T) *PatchState
Convert a supported type to an optional (pointer) PatchState
type PearParameters ¶ added in v0.0.7
type PearParameters struct {
// Name of the package to install, upgrade, or remove.
Name string `json:"name"`
// Desired state of the package.
// default: PearStatePresent
State *PearState `json:"state,omitempty"`
// Path to the pear executable.
Executable *string `json:"executable,omitempty"`
// List of regular expressions that can be used to detect prompts during pear
// package installation to answer the expected question.
// Prompts will be processed in the same order as the packages list.
// You can optionally specify an answer to any question in the list.
// If no answer is provided, the list item will only contain the regular
// expression.
// To specify an answer, the item will be a dict with the regular expression as
// key and the answer as value `my_regular_expression: 'an_answer'`.
// You can provide a list containing items with or without answer.
// A prompt list can be shorter or longer than the packages list but will issue
// a warning.
// If you want to specify that a package will not need prompts in the middle of
// a list, `null`.
Prompts *[]any `json:"prompts,omitempty"`
}
Parameters for the `pear` Ansible module.
func (PearParameters) ToRPCCall ¶ added in v0.0.7
func (p PearParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PearParameters into an `rpc.RPCCall`.
type PearReturn ¶ added in v0.0.7
type PearReturn struct {
AnsibleCommonReturns
}
Return values for the `pear` Ansible module.
func PearReturnFromRPCResult ¶ added in v0.0.7
func PearReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PearReturn, error)
Unwrap the `rpc.RPCResult` into an `PearReturn`
type PidsParameters ¶ added in v0.0.7
type PidsParameters struct {
// The name of the process(es) you want to get PI`s` for.
Name *string `json:"name,omitempty"`
// The pattern (regular expression) to match the process(es) you want to get
// PI`s` for.
Pattern *string `json:"pattern,omitempty"`
// Ignore case in pattern if using the `pattern` option.
// default: false
IgnoreCase *bool `json:"ignore_case,omitempty"`
}
Parameters for the `pids` Ansible module.
func (PidsParameters) ToRPCCall ¶ added in v0.0.7
func (p PidsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PidsParameters into an `rpc.RPCCall`.
type PidsReturn ¶ added in v0.0.7
type PidsReturn struct {
AnsibleCommonReturns
// Process IDs of the given process.
Pids *[]any `json:"pids,omitempty"`
}
Return values for the `pids` Ansible module.
func PidsReturnFromRPCResult ¶ added in v0.0.7
func PidsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PidsReturn, error)
Unwrap the `rpc.RPCResult` into an `PidsReturn`
type PingParameters ¶
type PingParameters struct {
// Data to return for the R`ping` return value.
// If this parameter is set to `crash`, the module will cause an exception.
// default: "pong"
Data *string `json:"data,omitempty"`
}
Parameters for the `ping` Ansible module.
func (PingParameters) ToRPCCall ¶
func (p PingParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PingParameters into an `rpc.RPCCall`.
type PingReturn ¶
type PingReturn struct {
AnsibleCommonReturns
// Value provided with the `data` parameter.
Ping *string `json:"ping,omitempty"`
}
Return values for the `ping` Ansible module.
func PingReturnFromRPCResult ¶
func PingReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PingReturn, error)
Unwrap the `rpc.RPCResult` into an `PingReturn`
type PipPackageInfoParameters ¶ added in v0.0.7
type PipPackageInfoParameters struct {
// A list of the pip executables that will be used to get the packages. They
// can be supplied with the full path or just the executable name, for example
// `pip3.7`.
// default: ["pip"]
Clients *[]string `json:"clients,omitempty"`
}
Parameters for the `pip_package_info` Ansible module.
func (PipPackageInfoParameters) ToRPCCall ¶ added in v0.0.7
func (p PipPackageInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PipPackageInfoParameters into an `rpc.RPCCall`.
type PipPackageInfoReturn ¶ added in v0.0.7
type PipPackageInfoReturn struct {
AnsibleCommonReturns
// A dictionary of installed package data.
Packages *map[string]any `json:"packages,omitempty"`
}
Return values for the `pip_package_info` Ansible module.
func PipPackageInfoReturnFromRPCResult ¶ added in v0.0.7
func PipPackageInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PipPackageInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `PipPackageInfoReturn`
type PipParameters ¶
type PipParameters struct {
// The name of a Python library to install or the url(bzr+,hg+,git+,svn+) of
// the remote package.
// This can be a list (since 2.2) and contain version specifiers (since 2.7).
Name *[]string `json:"name,omitempty"`
// The version number to install of the Python library specified in the `name`
// parameter.
Version *string `json:"version,omitempty"`
// The path to a pip requirements file, which should be local to the remote
// system. File can be specified as a relative path if using the `chdir`
// option.
Requirements *string `json:"requirements,omitempty"`
// An optional path to a `virtualenv` directory to install into. It cannot be
// specified together with the `executable` parameter (added in 2.1). If the
// virtualenv does not exist, it will be created before installing packages.
// The optional `virtualenv_site_packages`, `virtualenv_command`, and
// `virtualenv_python` options affect the creation of the virtualenv.
Virtualenv *string `json:"virtualenv,omitempty"`
// Whether the virtual environment will inherit packages from the global `site-
// packages` directory. Note that if this setting is changed on an already
// existing virtual environment it will not have any effect, the environment
// must be deleted and newly created.
// default: "no"
VirtualenvSitePackages *bool `json:"virtualenv_site_packages,omitempty"`
// The command or a pathname to the command to create the virtual environment
// with. For example `pyvenv`, `virtualenv`, `virtualenv2`, `~/bin/virtualenv`,
// `/usr/local/bin/virtualenv`.
// default: "virtualenv"
VirtualenvCommand *string `json:"virtualenv_command,omitempty"`
// The Python executable used for creating the virtual environment. For example
// `python3.12`, `python2.7`. When not specified, the Python version used to
// run the ansible module is used. This parameter should not be used when
// `virtualenv_command` is using `pyvenv` or the `-m venv` module.
VirtualenvPython *string `json:"virtualenv_python,omitempty"`
// The state of module.
// The `forcereinstall` option is only available in Ansible 2.1 and above.
// default: PipStatePresent
State *PipState `json:"state,omitempty"`
// Extra arguments passed to `pip`.
ExtraArgs *string `json:"extra_args,omitempty"`
// Pass the editable flag.
// default: "no"
Editable *bool `json:"editable,omitempty"`
// cd into this directory before running the command.
Chdir *string `json:"chdir,omitempty"`
// The explicit executable or pathname for the `pip` executable, if different
// from the Ansible Python interpreter. For example `pip3.3`, if there are both
// Python 2.7 and 3.3 installations in the system and you want to run pip for
// the Python 3.3 installation.
// Mutually exclusive with `virtualenv` (added in 2.1).
// Does not affect the Ansible Python interpreter.
// The `setuptools` package must be installed for both the Ansible Python
// interpreter and for the version of Python specified by this option.
Executable *string `json:"executable,omitempty"`
// The system umask to apply before installing the pip package. This is useful,
// for example, when installing on systems that have a very restrictive umask
// by default (e.g., `0077`) and you want to `pip install` packages which are
// to be used by all users. Note that this requires you to specify desired
// umask mode as an octal string, (e.g., `0022`).
Umask *string `json:"umask,omitempty"`
// Allow `pip` to modify an externally-managed Python installation as defined
// by PEP 668.
// This is typically required when installing packages outside a virtual
// environment on modern systems.
// default: false
BreakSystemPackages *bool `json:"break_system_packages,omitempty"`
}
Parameters for the `pip` Ansible module.
func (PipParameters) ToRPCCall ¶
func (p PipParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PipParameters into an `rpc.RPCCall`.
type PipReturn ¶
type PipReturn struct {
AnsibleCommonReturns
// pip command used by the module
Cmd *string `json:"cmd,omitempty"`
// list of python modules targeted by pip
Name *[]any `json:"name,omitempty"`
// Path to the requirements file
Requirements *string `json:"requirements,omitempty"`
// Version of the package specified in 'name'
Version *string `json:"version,omitempty"`
// Path to the virtualenv
Virtualenv *string `json:"virtualenv,omitempty"`
}
Return values for the `pip` Ansible module.
func PipReturnFromRPCResult ¶
Unwrap the `rpc.RPCResult` into an `PipReturn`
type PipState ¶ added in v0.0.7
type PipState string
The state of module. The `forcereinstall` option is only available in Ansible 2.1 and above.
type PipxInfoParameters ¶ added in v0.0.7
type PipxInfoParameters struct {
// Name of an application installed with `pipx`.
Name *string `json:"name,omitempty"`
// Include dependent packages in the output.
// default: false
IncludeDeps *bool `json:"include_deps,omitempty"`
// Include injected packages in the output.
// default: false
IncludeInjected *bool `json:"include_injected,omitempty"`
// Returns the raw output of `pipx list --json`.
// The raw output is not affected by `include_deps` or `include_injected`.
// default: false
IncludeRaw *bool `json:"include_raw,omitempty"`
// The module will pass the `--global` argument to `pipx`, to execute actions
// in global scope.
// The `--global` is only available in `pipx>=1.6.0`, so make sure to have a
// compatible version when using this option. Moreover, a nasty bug with
// `--global` was fixed in `pipx==1.7.0`, so it is strongly recommended you
// used that version or newer.
// default: false
Global *bool `json:"global,omitempty"`
// Path to the `pipx` installed in the system.
// If not specified, the module will use `python -m pipx` to run the tool,
// using the same Python interpreter as ansible itself.
Executable *string `json:"executable,omitempty"`
}
Parameters for the `pipx_info` Ansible module.
func (PipxInfoParameters) ToRPCCall ¶ added in v0.0.7
func (p PipxInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PipxInfoParameters into an `rpc.RPCCall`.
type PipxInfoReturn ¶ added in v0.0.7
type PipxInfoReturn struct {
AnsibleCommonReturns
// The list of installed applications.
Application *map[string]any `json:"application,omitempty"`
// The raw output of the `pipx list` command, when `include_raw=true`. Used for
// debugging.
RawOutput *map[string]any `json:"raw_output,omitempty"`
// Command executed to obtain the list of installed applications.
Cmd *[]string `json:"cmd,omitempty"`
// Version of pipx.
Version *string `json:"version,omitempty"`
}
Return values for the `pipx_info` Ansible module.
func PipxInfoReturnFromRPCResult ¶ added in v0.0.7
func PipxInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PipxInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `PipxInfoReturn`
type PipxParameters ¶ added in v0.0.7
type PipxParameters struct {
// Desired state for the application.
// The states `present` and `absent` are aliases to `install` and `uninstall`,
// respectively.
// The state `latest` is equivalent to executing the task twice, with state
// `install` and then `upgrade`. It was added in community.general 5.5.0.
// The states `install_all`, `uninject`, `upgrade_shared`, `pin` and `unpin`
// are only available in `pipx>=1.6.0`, make sure to have a compatible version
// when using this option. These states have been added in community.general
// 9.4.0.
// default: PipxStateInstall
State *PipxState `json:"state,omitempty"`
// The name of the application and also the name of the Python package being
// installed.
// In `pipx` documentation it is also referred to as the name of the virtual
// environment where the application is installed.
// If `name` is a simple package name without version specifiers, then that
// name is used as the Python package name to be installed.
// Starting in community.general 10.7.0, you can use package specifiers when
// `state=present` or `state=install`. For example, `name=tox<4.0.0` or
// `name=tox>3.0.27`.
// Please note that when you use `state=present` and `name` with version
// specifiers, contrary to the behavior of `pipx`, this module honors the
// version specifier and installs a version of the application that satisfies
// it. If you want to ensure the reinstallation of the application even when
// the version specifier is met, then you must use `force=true`, or perhaps use
// `state=upgrade` instead.
// Use `source` for installing from URLs or directories.
Name *string `json:"name,omitempty"`
// Source for the package. This option is used when `state=install` or
// `state=latest`, and it is ignored with other states.
// Use `source` when installing a Python package with version specifier, or
// from a local path, from a VCS URL or compressed file.
// The value of this option is passed as-is to `pipx`.
// `name` is still required when using `source` to establish the application
// name without fetching the package from a remote source.
// The module is not idempotent when using `source`.
Source *string `json:"source,omitempty"`
// Add apps from the injected packages.
// Only used when `state=inject`.
// default: false
InstallApps *bool `json:"install_apps,omitempty"`
// Include applications of dependent packages.
// Only used when `state=install`, `state=latest`, or `state=inject`.
// default: false
InstallDeps *bool `json:"install_deps,omitempty"`
// Packages to be injected into an existing virtual environment.
// Only used when `state=inject`.
InjectPackages *[]string `json:"inject_packages,omitempty"`
// Force modification of the application's virtual environment. See `pipx` for
// details.
// Only used when `state=install`, `state=upgrade`, `state=upgrade_all`,
// `state=latest`, or `state=inject`.
// The module is not idempotent when `force=true`.
// default: false
Force *bool `json:"force,omitempty"`
// Upgrade the injected packages along with the application.
// Only used when `state=upgrade`, `state=upgrade_all`, or `state=latest`.
// This is used with `state=upgrade` and `state=latest` since community.general
// 6.6.0.
// default: false
IncludeInjected *bool `json:"include_injected,omitempty"`
// Base URL of Python Package Index.
// Only used when `state=install`, `state=upgrade`, `state=latest`, or
// `state=inject`.
IndexUrl *string `json:"index_url,omitempty"`
// Python version to be used when creating the application virtual environment.
// Must be 3.6+.
// Only used when `state=install`, `state=latest`, `state=reinstall`, or
// `state=reinstall_all`.
Python *string `json:"python,omitempty"`
// Give application virtual environment access to the system site-packages
// directory.
// Only used when `state=install` or `state=latest`.
// default: false
SystemSitePackages *bool `json:"system_site_packages,omitempty"`
// Install the project in editable mode.
// default: false
Editable *bool `json:"editable,omitempty"`
// Arbitrary arguments to pass directly to `pip`.
PipArgs *string `json:"pip_args,omitempty"`
// Optional suffix for virtual environment and executable names.
// `Warning:` `pipx` documentation states this is an `experimental` feature
// subject to change.
Suffix *string `json:"suffix,omitempty"`
// The module will pass the `--global` argument to `pipx`, to execute actions
// in global scope.
// The `--global` is only available in `pipx>=1.6.0`, so make sure to have a
// compatible version when using this option. Moreover, a nasty bug with
// `--global` was fixed in `pipx==1.7.0`, so it is strongly recommended you
// used that version or newer.
// default: false
Global *bool `json:"global,omitempty"`
// Spec metadata file for `state=install_all`.
// This content of the file is usually generated with `pipx list --json`, and
// it can be obtained with `community.general.pipx_info` with
// `community.general.pipx_info#module:include_raw=true` and obtaining the
// content from the R`community.general.pipx_info#module:raw_output`.
SpecMetadata *string `json:"spec_metadata,omitempty"`
// Path to the `pipx` installed in the system.
// If not specified, the module will use `python -m pipx` to run the tool,
// using the same Python interpreter as ansible itself.
Executable *string `json:"executable,omitempty"`
}
Parameters for the `pipx` Ansible module.
func (PipxParameters) ToRPCCall ¶ added in v0.0.7
func (p PipxParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PipxParameters into an `rpc.RPCCall`.
type PipxReturn ¶ added in v0.0.7
type PipxReturn struct {
AnsibleCommonReturns
// Version of pipx.
Version *string `json:"version,omitempty"`
}
Return values for the `pipx` Ansible module.
func PipxReturnFromRPCResult ¶ added in v0.0.7
func PipxReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PipxReturn, error)
Unwrap the `rpc.RPCResult` into an `PipxReturn`
type PipxState ¶ added in v0.0.7
type PipxState string
Desired state for the application. The states `present` and `absent` are aliases to `install` and `uninstall`, respectively. The state `latest` is equivalent to executing the task twice, with state `install` and then `upgrade`. It was added in community.general 5.5.0. The states `install_all`, `uninject`, `upgrade_shared`, `pin` and `unpin` are only available in `pipx>=1.6.0`, make sure to have a compatible version when using this option. These states have been added in community.general 9.4.0.
const ( PipxStatePresent PipxState = "present" PipxStateAbsent PipxState = "absent" PipxStateInstall PipxState = "install" PipxStateInstallAll PipxState = "install_all" PipxStateUninstall PipxState = "uninstall" PipxStateUninstallAll PipxState = "uninstall_all" PipxStateInject PipxState = "inject" PipxStateUninject PipxState = "uninject" PipxStateUpgrade PipxState = "upgrade" PipxStateUpgradeAll PipxState = "upgrade_all" PipxStateReinstall PipxState = "reinstall" PipxStateReinstallAll PipxState = "reinstall_all" PipxStateLatest PipxState = "latest" PipxStatePin PipxState = "pin" PipxStateUnpin PipxState = "unpin" )
type Pkg5Parameters ¶ added in v0.0.7
type Pkg5Parameters struct {
// An FRMI of the package(s) to be installed/removed/updated.
// Multiple packages may be specified, separated by `,`.
Name []string `json:"name"`
// Whether to install (`present`, `latest`), or remove (`absent`) a package.
// default: Pkg5StatePresent
State *Pkg5State `json:"state,omitempty"`
// Accept any licences.
// default: false
AcceptLicenses *bool `json:"accept_licenses,omitempty"`
// Creates a new boot environment with the given name.
BeName *string `json:"be_name,omitempty"`
// Refresh publishers before execution.
// default: true
Refresh *bool `json:"refresh,omitempty"`
// Set to `true` to disable quiet execution.
// default: false
Verbose *bool `json:"verbose,omitempty"`
}
Parameters for the `pkg5` Ansible module.
func (Pkg5Parameters) ToRPCCall ¶ added in v0.0.7
func (p Pkg5Parameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `Pkg5Parameters into an `rpc.RPCCall`.
type Pkg5PublisherParameters ¶ added in v0.0.7
type Pkg5PublisherParameters struct {
// The publisher's name.
Name string `json:"name"`
// Whether to ensure that a publisher is present or absent.
// default: Pkg5PublisherStatePresent
State *Pkg5PublisherState `json:"state,omitempty"`
// Packages installed from a sticky repository can only receive updates from
// that repository.
Sticky *bool `json:"sticky,omitempty"`
// Is the repository enabled or disabled?
Enabled *bool `json:"enabled,omitempty"`
// A path or URL to the repository.
// Multiple values may be provided.
Origin *[]string `json:"origin,omitempty"`
// A path or URL to the repository mirror.
// Multiple values may be provided.
Mirror *[]string `json:"mirror,omitempty"`
}
Parameters for the `pkg5_publisher` Ansible module.
func (Pkg5PublisherParameters) ToRPCCall ¶ added in v0.0.7
func (p Pkg5PublisherParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `Pkg5PublisherParameters into an `rpc.RPCCall`.
type Pkg5PublisherReturn ¶ added in v0.0.7
type Pkg5PublisherReturn struct {
AnsibleCommonReturns
}
Return values for the `pkg5_publisher` Ansible module.
func Pkg5PublisherReturnFromRPCResult ¶ added in v0.0.7
func Pkg5PublisherReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (Pkg5PublisherReturn, error)
Unwrap the `rpc.RPCResult` into an `Pkg5PublisherReturn`
type Pkg5PublisherState ¶ added in v0.0.7
type Pkg5PublisherState string
Whether to ensure that a publisher is present or absent.
const ( Pkg5PublisherStatePresent Pkg5PublisherState = "present" Pkg5PublisherStateAbsent Pkg5PublisherState = "absent" )
func OptionalPkg5PublisherState ¶ added in v0.0.7
func OptionalPkg5PublisherState[T interface {
*Pkg5PublisherState | Pkg5PublisherState | *string | string
}](s T) *Pkg5PublisherState
Convert a supported type to an optional (pointer) Pkg5PublisherState
type Pkg5Return ¶ added in v0.0.7
type Pkg5Return struct {
AnsibleCommonReturns
}
Return values for the `pkg5` Ansible module.
func Pkg5ReturnFromRPCResult ¶ added in v0.0.7
func Pkg5ReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (Pkg5Return, error)
Unwrap the `rpc.RPCResult` into an `Pkg5Return`
type Pkg5State ¶ added in v0.0.7
type Pkg5State string
Whether to install (`present`, `latest`), or remove (`absent`) a package.
type PkginParameters ¶ added in v0.0.7
type PkginParameters struct {
// Name of package to install/remove;
// Multiple names may be given, separated by commas.
Name *[]string `json:"name,omitempty"`
// Intended state of the package.
// default: PkginStatePresent
State *PkginState `json:"state,omitempty"`
// Update repository database. Can be run with other steps or on its own.
// default: false
UpdateCache *bool `json:"update_cache,omitempty"`
// Upgrade main packages to their newer versions.
// default: false
Upgrade *bool `json:"upgrade,omitempty"`
// Upgrade all packages to their newer versions.
// default: false
FullUpgrade *bool `json:"full_upgrade,omitempty"`
// Clean packages cache.
// default: false
Clean *bool `json:"clean,omitempty"`
// Force package reinstall.
// default: false
Force *bool `json:"force,omitempty"`
}
Parameters for the `pkgin` Ansible module.
func (PkginParameters) ToRPCCall ¶ added in v0.0.7
func (p PkginParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PkginParameters into an `rpc.RPCCall`.
type PkginReturn ¶ added in v0.0.7
type PkginReturn struct {
AnsibleCommonReturns
}
Return values for the `pkgin` Ansible module.
func PkginReturnFromRPCResult ¶ added in v0.0.7
func PkginReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PkginReturn, error)
Unwrap the `rpc.RPCResult` into an `PkginReturn`
type PkginState ¶ added in v0.0.7
type PkginState string
Intended state of the package.
const ( PkginStatePresent PkginState = "present" PkginStateAbsent PkginState = "absent" )
func OptionalPkginState ¶ added in v0.0.7
func OptionalPkginState[T interface {
*PkginState | PkginState | *string | string
}](s T) *PkginState
Convert a supported type to an optional (pointer) PkginState
type PkgngParameters ¶ added in v0.0.7
type PkgngParameters struct {
// Name or list of names of packages to install/remove.
// With `name=*`, `state=latest` will operate, but `state=present` and
// `state=absent` will be noops.
Name []string `json:"name"`
// State of the package.
// default: PkgngStatePresent
State *PkgngState `json:"state,omitempty"`
// Use local package base instead of fetching an updated one.
// default: false
Cached *bool `json:"cached,omitempty"`
// A list of keyvalue-pairs of the form `<+/-/:><key>[=<value>]`. A `+` denotes
// adding an annotation, a `-` denotes removing an annotation, and `:` denotes
// modifying an annotation. If setting or modifying annotations, a value must
// be provided.
Annotation *[]string `json:"annotation,omitempty"`
// For `pkgng` versions before 1.1.4, specify `packagesite` to use for
// downloading packages. If not specified, use settings from
// `/usr/local/etc/pkg.conf`.
// For newer `pkgng` versions, specify a the name of a repository configured in
// `/usr/local/etc/pkg/repos`.
Pkgsite *string `json:"pkgsite,omitempty"`
// For `pkgng` versions 1.5 and later, pkg will install all packages within the
// specified root directory.
// Can not be used together with `chroot` or `jail` options.
Rootdir *string `json:"rootdir,omitempty"`
// Pkg will chroot in the specified environment.
// Can not be used together with `rootdir` or `jail` options.
Chroot *string `json:"chroot,omitempty"`
// Pkg will execute in the given jail name or ID.
// Can not be used together with `chroot` or `rootdir` options.
Jail *string `json:"jail,omitempty"`
// Remove automatically installed packages which are no longer needed.
// default: false
Autoremove *bool `json:"autoremove,omitempty"`
// Ignore FreeBSD OS version check, useful on `-STABLE` and `-CURRENT`
// branches.
// Defines the `IGNORE_OSVERSION` environment variable.
// default: false
IgnoreOsver *bool `json:"ignore_osver,omitempty"`
// Treat the package names as shell glob patterns.
// default: true
UseGlobs *bool `json:"use_globs,omitempty"`
}
Parameters for the `pkgng` Ansible module.
func (PkgngParameters) ToRPCCall ¶ added in v0.0.7
func (p PkgngParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PkgngParameters into an `rpc.RPCCall`.
type PkgngReturn ¶ added in v0.0.7
type PkgngReturn struct {
AnsibleCommonReturns
}
Return values for the `pkgng` Ansible module.
func PkgngReturnFromRPCResult ¶ added in v0.0.7
func PkgngReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PkgngReturn, error)
Unwrap the `rpc.RPCResult` into an `PkgngReturn`
type PkgngState ¶ added in v0.0.7
type PkgngState string
State of the package.
const ( PkgngStatePresent PkgngState = "present" PkgngStateLatest PkgngState = "latest" PkgngStateAbsent PkgngState = "absent" )
func OptionalPkgngState ¶ added in v0.0.7
func OptionalPkgngState[T interface {
*PkgngState | PkgngState | *string | string
}](s T) *PkgngState
Convert a supported type to an optional (pointer) PkgngState
type PkgutilParameters ¶ added in v0.0.7
type PkgutilParameters struct {
// The name of the package.
// When using `state=latest`, this can be `'*'`, which updates all installed
// packages managed by pkgutil.
Name []string `json:"name"`
// The repository path to install the package from.
// Its global definition is in `/etc/opt/csw/pkgutil.conf`.
Site *string `json:"site,omitempty"`
// Whether to install (`present`/`installed`), or remove (`absent`/`removed`)
// packages.
// The upgrade (`latest`) operation will update/install the packages to the
// latest version available.
State PkgutilState `json:"state"`
// If you always want to refresh your catalog from the mirror, even when it is
// not stale, set this to `true`.
// default: false
UpdateCatalog *bool `json:"update_catalog,omitempty"`
// To allow the update process to downgrade packages to match what is present
// in the repository, set this to `true`.
// This is useful for rolling back to stable from testing, or similar
// operations.
// default: false
Force *bool `json:"force,omitempty"`
}
Parameters for the `pkgutil` Ansible module.
func (PkgutilParameters) ToRPCCall ¶ added in v0.0.7
func (p PkgutilParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PkgutilParameters into an `rpc.RPCCall`.
type PkgutilReturn ¶ added in v0.0.7
type PkgutilReturn struct {
AnsibleCommonReturns
}
Return values for the `pkgutil` Ansible module.
func PkgutilReturnFromRPCResult ¶ added in v0.0.7
func PkgutilReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PkgutilReturn, error)
Unwrap the `rpc.RPCResult` into an `PkgutilReturn`
type PkgutilState ¶ added in v0.0.7
type PkgutilState string
Whether to install (`present`/`installed`), or remove (`absent`/`removed`) packages. The upgrade (`latest`) operation will update/install the packages to the latest version available.
const ( PkgutilStateAbsent PkgutilState = "absent" PkgutilStateInstalled PkgutilState = "installed" PkgutilStateLatest PkgutilState = "latest" PkgutilStatePresent PkgutilState = "present" PkgutilStateRemoved PkgutilState = "removed" )
type PmemParameters ¶ added in v0.0.7
type PmemParameters struct {
// Percentage of the total capacity to use in AppDirect Mode (`0`-`100`).
// Create AppDirect capacity utilizing hardware interleaving across the
// requested PMem modules if applicable given the specified target.
// Total of `appdirect`, `memorymode` and `reserved` must be `100`.
Appdirect *int `json:"appdirect,omitempty"`
// Create AppDirect capacity that is interleaved any other PMem modules.
// default: true
AppdirectInterleaved *bool `json:"appdirect_interleaved,omitempty"`
// Percentage of the total capacity to use in Memory Mode (`0`-`100`).
Memorymode *int `json:"memorymode,omitempty"`
// Percentage of the capacity to reserve (`0`-`100`). `reserved` will not be
// mapped into the system physical address space and will be presented as
// reserved capacity with Show Device and Show Memory Resources Commands.
// `reserved` will be set automatically if this is not configured.
Reserved *int `json:"reserved,omitempty"`
// This enables to set the configuration for each socket by using the socket
// ID.
// Total of `appdirect`, `memorymode` and `reserved` must be `100` within one
// socket.
Socket *struct {
Id int `json:"id"`
Appdirect int `json:"appdirect"`
AppdirectInterleaved *bool `json:"appdirect_interleaved,omitempty"`
Memorymode int `json:"memorymode"`
Reserved *int `json:"reserved,omitempty"`
} `json:"socket,omitempty"`
// This enables to set the configuration for the namespace of the PMem.
Namespace *struct {
Mode string `json:"mode"`
Type *string `json:"type,omitempty"`
Size *string `json:"size,omitempty"`
} `json:"namespace,omitempty"`
// Enable to append the new namespaces to the system.
// The default is `false` so the all existing namespaces not listed in
// `namespace` are removed.
// default: false
NamespaceAppend *bool `json:"namespace_append,omitempty"`
}
Parameters for the `pmem` Ansible module.
func (PmemParameters) ToRPCCall ¶ added in v0.0.7
func (p PmemParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PmemParameters into an `rpc.RPCCall`.
type PmemReturn ¶ added in v0.0.7
type PmemReturn struct {
AnsibleCommonReturns
// Indicates that the system reboot is required to complete the PMem
// configuration.
RebootRequired *bool `json:"reboot_required,omitempty"`
// Shows the value of AppDirect, Memory Mode and Reserved size in bytes.
// If `socket` argument is provided, shows the values in each socket with
// `socket` which contains the socket ID.
// If `namespace` argument is provided, shows the detail of each namespace.
Result *map[string]any `json:"result,omitempty"`
}
Return values for the `pmem` Ansible module.
func PmemReturnFromRPCResult ¶ added in v0.0.7
func PmemReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PmemReturn, error)
Unwrap the `rpc.RPCResult` into an `PmemReturn`
type PnpmParameters ¶ added in v0.0.7
type PnpmParameters struct {
// The name of a Node.js library to install.
// All packages in `package.json` are installed if not provided.
Name *string `json:"name,omitempty"`
// Alias of the Node.js library.
Alias *string `json:"alias,omitempty"`
// The base path to install the Node.js libraries.
Path *string `json:"path,omitempty"`
// The version of the library to be installed, in semver format.
Version *string `json:"version,omitempty"`
// Install the Node.js library globally.
// default: false
Global *bool `json:"global,omitempty"`
// The executable location for pnpm.
// The default location it searches for is `PATH`, fails if not set.
Executable *string `json:"executable,omitempty"`
// Use the `--ignore-scripts` flag when installing.
// default: false
IgnoreScripts *bool `json:"ignore_scripts,omitempty"`
// Do not install optional packages, equivalent to `--no-optional`.
// default: false
NoOptional *bool `json:"no_optional,omitempty"`
// Install dependencies in production mode.
// Pnpm will ignore any dependencies under `devDependencies` in package.json.
// default: false
Production *bool `json:"production,omitempty"`
// Install dependencies in development mode.
// Pnpm will ignore any regular dependencies in `package.json`.
// default: false
Dev *bool `json:"dev,omitempty"`
// Install dependencies in optional mode.
// default: false
Optional *bool `json:"optional,omitempty"`
// Installation state of the named Node.js library.
// If `absent` is selected, a name option must be provided.
// default: PnpmStatePresent
State *PnpmState `json:"state,omitempty"`
}
Parameters for the `pnpm` Ansible module.
func (PnpmParameters) ToRPCCall ¶ added in v0.0.7
func (p PnpmParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PnpmParameters into an `rpc.RPCCall`.
type PnpmReturn ¶ added in v0.0.7
type PnpmReturn struct {
AnsibleCommonReturns
}
Return values for the `pnpm` Ansible module.
func PnpmReturnFromRPCResult ¶ added in v0.0.7
func PnpmReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PnpmReturn, error)
Unwrap the `rpc.RPCResult` into an `PnpmReturn`
type PnpmState ¶ added in v0.0.7
type PnpmState string
Installation state of the named Node.js library. If `absent` is selected, a name option must be provided.
type PortageParameters ¶ added in v0.0.7
type PortageParameters struct {
// Package atom or set, for example `sys-apps/foo` or `>foo-2.13` or `@world`.
Package *[]string `json:"package,omitempty"`
// State of the package atom.
// default: PortageStatePresent
State *PortageState `json:"state,omitempty"`
// Update packages to the best version available (`--update`).
// default: false
Update *bool `json:"update,omitempty"`
// Set backtrack value (`--backtrack`).
Backtrack *int `json:"backtrack,omitempty"`
// Consider the entire dependency tree of packages (`--deep`).
// default: false
Deep *bool `json:"deep,omitempty"`
// Include installed packages where USE flags have changed (`--newuse`).
// default: false
Newuse *bool `json:"newuse,omitempty"`
// Include installed packages where USE flags have changed, except when.
// Flags that the user has not enabled are added or removed.
// (`--changed-use`).
// default: false
ChangedUse *bool `json:"changed_use,omitempty"`
// Do not add the packages to the world file (`--oneshot`).
// default: false
Oneshot *bool `json:"oneshot,omitempty"`
// Do not re-emerge installed packages (`--noreplace`).
// default: true
Noreplace *bool `json:"noreplace,omitempty"`
// Only merge packages but not their dependencies (`--nodeps`).
// default: false
Nodeps *bool `json:"nodeps,omitempty"`
// Only merge packages' dependencies but not the packages (`--onlydeps`).
// default: false
Onlydeps *bool `json:"onlydeps,omitempty"`
// Remove packages not needed by explicitly merged packages (`--depclean`).
// If no package is specified, clean up the world's dependencies.
// Otherwise, `--depclean` serves as a dependency aware version of `--unmerge`.
// default: false
Depclean *bool `json:"depclean,omitempty"`
// Run emerge in quiet mode (`--quiet`).
// default: false
Quiet *bool `json:"quiet,omitempty"`
// Run emerge in verbose mode (`--verbose`).
// default: false
Verbose *bool `json:"verbose,omitempty"`
// If set to `true`, explicitely add the package to the world file.
// Please note that this option is not used for idempotency, it is only used
// when actually installing a package.
Select *bool `json:"select,omitempty"`
// Sync package repositories first.
// If `yes`, perform `emerge --sync`.
// If `web`, perform `emerge-webrsync`.
Sync *PortageSync `json:"sync,omitempty"`
// Merge only packages specified at `PORTAGE_BINHOST` in `make.conf`.
// default: false
Getbinpkgonly *bool `json:"getbinpkgonly,omitempty"`
// Prefer packages specified at `PORTAGE_BINHOST` in `make.conf`.
// default: false
Getbinpkg *bool `json:"getbinpkg,omitempty"`
// Merge only binaries (no compiling).
// default: false
Usepkgonly *bool `json:"usepkgonly,omitempty"`
// Tries to use the binary package(s) in the locally available packages
// directory.
// default: false
Usepkg *bool `json:"usepkg,omitempty"`
// Continue as much as possible after an error.
// default: false
Keepgoing *bool `json:"keepgoing,omitempty"`
// Specifies the number of packages to build simultaneously.
// Since version 2.6: Value of `0` or `false` resets any previously added
// `--jobs` setting values.
Jobs *int `json:"jobs,omitempty"`
// Specifies that no new builds should be started if there are other builds
// running and the load average is at least LOAD.
// Since version 2.6: Value of 0 or False resets any previously added `--load-
// average` setting values.
Loadavg *float64 `json:"loadavg,omitempty"`
// Specifies that build time dependencies should be installed.
Withbdeps *bool `json:"withbdeps,omitempty"`
// Redirect all build output to logs alone, and do not display it on stdout
// (`--quiet-build`).
// default: false
Quietbuild *bool `json:"quietbuild,omitempty"`
// Suppresses display of the build log on stdout (--quiet-fail).
// Only the die message and the path of the build log will be displayed on
// stdout.
// default: false
Quietfail *bool `json:"quietfail,omitempty"`
}
Parameters for the `portage` Ansible module.
func (PortageParameters) ToRPCCall ¶ added in v0.0.7
func (p PortageParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PortageParameters into an `rpc.RPCCall`.
type PortageReturn ¶ added in v0.0.7
type PortageReturn struct {
AnsibleCommonReturns
}
Return values for the `portage` Ansible module.
func PortageReturnFromRPCResult ¶ added in v0.0.7
func PortageReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PortageReturn, error)
Unwrap the `rpc.RPCResult` into an `PortageReturn`
type PortageState ¶ added in v0.0.7
type PortageState string
State of the package atom.
const ( PortageStatePresent PortageState = "present" PortageStateInstalled PortageState = "installed" PortageStateEmerged PortageState = "emerged" PortageStateAbsent PortageState = "absent" PortageStateRemoved PortageState = "removed" PortageStateUnmerged PortageState = "unmerged" PortageStateLatest PortageState = "latest" )
func OptionalPortageState ¶ added in v0.0.7
func OptionalPortageState[T interface {
*PortageState | PortageState | *string | string
}](s T) *PortageState
Convert a supported type to an optional (pointer) PortageState
type PortageSync ¶ added in v0.0.7
type PortageSync string
Sync package repositories first. If `yes`, perform `emerge --sync`. If `web`, perform `emerge-webrsync`.
const ( PortageSyncWeb PortageSync = "web" PortageSyncYes PortageSync = "yes" PortageSyncNo PortageSync = "no" )
func OptionalPortageSync ¶ added in v0.0.7
func OptionalPortageSync[T interface {
*PortageSync | PortageSync | *string | string
}](s T) *PortageSync
Convert a supported type to an optional (pointer) PortageSync
type PortinstallParameters ¶ added in v0.0.7
type PortinstallParameters struct {
// Name of package to install/remove.
Name string `json:"name"`
// State of the package.
// default: PortinstallStatePresent
State *PortinstallState `json:"state,omitempty"`
// Use packages instead of ports whenever available.
// default: true
UsePackages *bool `json:"use_packages,omitempty"`
}
Parameters for the `portinstall` Ansible module.
func (PortinstallParameters) ToRPCCall ¶ added in v0.0.7
func (p PortinstallParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `PortinstallParameters into an `rpc.RPCCall`.
type PortinstallReturn ¶ added in v0.0.7
type PortinstallReturn struct {
AnsibleCommonReturns
}
Return values for the `portinstall` Ansible module.
func PortinstallReturnFromRPCResult ¶ added in v0.0.7
func PortinstallReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (PortinstallReturn, error)
Unwrap the `rpc.RPCResult` into an `PortinstallReturn`
type PortinstallState ¶ added in v0.0.7
type PortinstallState string
State of the package.
const ( PortinstallStatePresent PortinstallState = "present" PortinstallStateAbsent PortinstallState = "absent" )
func OptionalPortinstallState ¶ added in v0.0.7
func OptionalPortinstallState[T interface {
*PortinstallState | PortinstallState | *string | string
}](s T) *PortinstallState
Convert a supported type to an optional (pointer) PortinstallState
type ReplaceParameters ¶
type ReplaceParameters struct {
// The file to modify.
// Before Ansible 2.3 this option was only usable as `dest`, `destfile` and
// `name`.
Path string `json:"path"`
// The regular expression to look for in the contents of the file.
// Uses Python regular expressions; see
// `https://docs.python.org/3/library/re.html`.
// Uses MULTILINE mode, which means `^` and `$` match the beginning and end of
// the file, as well as the beginning and end respectively of `each line` of
// the file.
// Does not use DOTALL, which means the `.` special character matches any
// character `except newlines`. A common mistake is to assume that a negated
// character set like `[^#]` will also not match newlines.
// In order to exclude newlines, they must be added to the set like `[^#\\n]`.
// Note that, as of Ansible 2.0, short form tasks should have any escape
// sequences backslash-escaped in order to prevent them being parsed as string
// literal escapes. See the examples.
Regexp string `json:"regexp"`
// The string to replace regexp matches.
// May contain backreferences that will get expanded with the regexp capture
// groups if the regexp matches.
// If not set, matches are removed entirely.
// Backreferences can be used ambiguously like `\\1`, or explicitly like
// `\\g<1>`.
// default: ""
Replace *string `json:"replace,omitempty"`
// If specified, only content after this match will be replaced/removed.
// Can be used in combination with `before`.
// Uses Python regular expressions; see
// `https://docs.python.org/3/library/re.html`.
// Uses DOTALL, which means the `.` special character `can match newlines`.
// Does not use MULTILINE, so `^` and `$` will only match the beginning and end
// of the file.
After *string `json:"after,omitempty"`
// If specified, only content before this match will be replaced/removed.
// Can be used in combination with `after`.
// Uses Python regular expressions; see
// `https://docs.python.org/3/library/re.html`.
// Uses DOTALL, which means the `.` special character `can match newlines`.
// Does not use MULTILINE, so `^` and `$` will only match the beginning and end
// of the file.
Before *string `json:"before,omitempty"`
// Create a backup file including the timestamp information so you can get the
// original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
// The character encoding for reading and writing the file.
// default: "utf-8"
Encoding *string `json:"encoding,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
// The validation command to run before copying the updated file into the final
// destination.
// A temporary file path is used to validate, passed in through `%s` which must
// be present as in the examples below.
// Also, the command is passed securely so shell features such as expansion and
// pipes will not work.
// For an example on how to handle more complex validation than what this
// option provides, see `handling complex
// validation,complex_configuration_validation`.
Validate *string `json:"validate,omitempty"`
}
Parameters for the `replace` Ansible module.
func (ReplaceParameters) ToRPCCall ¶
func (p ReplaceParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ReplaceParameters into an `rpc.RPCCall`.
type ReplaceReturn ¶
type ReplaceReturn struct {
AnsibleCommonReturns
}
Return values for the `replace` Ansible module.
func ReplaceReturnFromRPCResult ¶
func ReplaceReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (ReplaceReturn, error)
Unwrap the `rpc.RPCResult` into an `ReplaceReturn`
type RhelFactsParameters ¶ added in v0.0.7
type RhelFactsParameters struct {
}
Parameters for the `rhel_facts` Ansible module.
func (RhelFactsParameters) ToRPCCall ¶ added in v0.0.7
func (p RhelFactsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `RhelFactsParameters into an `rpc.RPCCall`.
type RhelFactsReturn ¶ added in v0.0.7
type RhelFactsReturn struct {
AnsibleCommonReturns
// Relevant Ansible Facts
AnsibleFacts *any `json:"ansible_facts,omitempty"`
}
Return values for the `rhel_facts` Ansible module.
func RhelFactsReturnFromRPCResult ¶ added in v0.0.7
func RhelFactsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (RhelFactsReturn, error)
Unwrap the `rpc.RPCResult` into an `RhelFactsReturn`
type RhelRpmOstreeParameters ¶ added in v0.0.7
type RhelRpmOstreeParameters struct {
// A package name or package specifier with version, like `name-1.0`.
// Comparison operators for package version are valid here `>`, `<`, `>=`,
// `<=`. Example - `name>=1.0`.
// If a previous version is specified, the task also needs to turn
// `allow_downgrade` on. See the `allow_downgrade` documentation for caveats
// with downgrading packages.
// When using `state=latest`, this can be `'*'` which means run `yum -y
// update`.
// You can also pass a url or a local path to a rpm file (using
// `state=present`). To operate on several packages this can accept a comma
// separated string of packages or (as of 2.0) a list of packages.
// default: []
Name *[]string `json:"name,omitempty"`
// Whether to install (`present` or `installed`, `latest`), or remove (`absent`
// or `removed`) a package.
// `present` and `installed` will simply ensure that a desired package is
// installed.
// `latest` will update the specified package if it's not of the latest
// available version.
// `absent` and `removed` will remove the specified package.
// Default is `null`, however in effect the default action is `present` unless
// the `autoremove` option is enabled for this module, then `absent` is
// inferred.
State *RhelRpmOstreeState `json:"state,omitempty"`
}
Parameters for the `rhel_rpm_ostree` Ansible module.
func (RhelRpmOstreeParameters) ToRPCCall ¶ added in v0.0.7
func (p RhelRpmOstreeParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `RhelRpmOstreeParameters into an `rpc.RPCCall`.
type RhelRpmOstreeReturn ¶ added in v0.0.7
type RhelRpmOstreeReturn struct {
AnsibleCommonReturns
// status of rpm transaction
Msg *string `json:"msg,omitempty"`
}
Return values for the `rhel_rpm_ostree` Ansible module.
func RhelRpmOstreeReturnFromRPCResult ¶ added in v0.0.7
func RhelRpmOstreeReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (RhelRpmOstreeReturn, error)
Unwrap the `rpc.RPCResult` into an `RhelRpmOstreeReturn`
type RhelRpmOstreeState ¶ added in v0.0.7
type RhelRpmOstreeState string
Whether to install (`present` or `installed`, `latest`), or remove (`absent` or `removed`) a package. `present` and `installed` will simply ensure that a desired package is installed. `latest` will update the specified package if it's not of the latest available version. `absent` and `removed` will remove the specified package. Default is `null`, however in effect the default action is `present` unless the `autoremove` option is enabled for this module, then `absent` is inferred.
const ( RhelRpmOstreeStateAbsent RhelRpmOstreeState = "absent" RhelRpmOstreeStateInstalled RhelRpmOstreeState = "installed" RhelRpmOstreeStateLatest RhelRpmOstreeState = "latest" RhelRpmOstreeStatePresent RhelRpmOstreeState = "present" RhelRpmOstreeStateRemoved RhelRpmOstreeState = "removed" )
func OptionalRhelRpmOstreeState ¶ added in v0.0.7
func OptionalRhelRpmOstreeState[T interface {
*RhelRpmOstreeState | RhelRpmOstreeState | *string | string
}](s T) *RhelRpmOstreeState
Convert a supported type to an optional (pointer) RhelRpmOstreeState
type RhsmReleaseParameters ¶ added in v0.0.7
type RhsmReleaseParameters struct {
// RHSM release version to use.
// To unset either pass `null` for this option, or omit this option.
Release *string `json:"release,omitempty"`
}
Parameters for the `rhsm_release` Ansible module.
func (RhsmReleaseParameters) ToRPCCall ¶ added in v0.0.7
func (p RhsmReleaseParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `RhsmReleaseParameters into an `rpc.RPCCall`.
type RhsmReleaseReturn ¶ added in v0.0.7
type RhsmReleaseReturn struct {
AnsibleCommonReturns
// The current RHSM release version value.
CurrentRelease *string `json:"current_release,omitempty"`
}
Return values for the `rhsm_release` Ansible module.
func RhsmReleaseReturnFromRPCResult ¶ added in v0.0.7
func RhsmReleaseReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (RhsmReleaseReturn, error)
Unwrap the `rpc.RPCResult` into an `RhsmReleaseReturn`
type RhsmRepositoryParameters ¶ added in v0.0.7
type RhsmRepositoryParameters struct {
// If state is equal to present or disabled, indicates the desired repository
// state.
// In community.general 10.0.0 the states `present` and `absent` have been
// removed. Please use `enabled` and `disabled` instead.
// default: RhsmRepositoryStateEnabled
State *RhsmRepositoryState `json:"state,omitempty"`
// The ID of repositories to enable.
// To operate on several repositories this can accept a comma separated list or
// a YAML list.
Name []string `json:"name"`
// Disable all currently enabled repositories that are not not specified in
// `name`. Only set this to `true` if passing in a list of repositories to the
// `name` field. Using this with `loop` will most likely not have the desired
// result.
// default: false
Purge *bool `json:"purge,omitempty"`
}
Parameters for the `rhsm_repository` Ansible module.
func (RhsmRepositoryParameters) ToRPCCall ¶ added in v0.0.7
func (p RhsmRepositoryParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `RhsmRepositoryParameters into an `rpc.RPCCall`.
type RhsmRepositoryReturn ¶ added in v0.0.7
type RhsmRepositoryReturn struct {
AnsibleCommonReturns
// The list of RHSM repositories with their states.
// When this module is used to change the repository states, this list contains
// the updated states after the changes.
Repositories *[]any `json:"repositories,omitempty"`
}
Return values for the `rhsm_repository` Ansible module.
func RhsmRepositoryReturnFromRPCResult ¶ added in v0.0.7
func RhsmRepositoryReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (RhsmRepositoryReturn, error)
Unwrap the `rpc.RPCResult` into an `RhsmRepositoryReturn`
type RhsmRepositoryState ¶ added in v0.0.7
type RhsmRepositoryState string
If state is equal to present or disabled, indicates the desired repository state. In community.general 10.0.0 the states `present` and `absent` have been removed. Please use `enabled` and `disabled` instead.
const ( RhsmRepositoryStateEnabled RhsmRepositoryState = "enabled" RhsmRepositoryStateDisabled RhsmRepositoryState = "disabled" )
func OptionalRhsmRepositoryState ¶ added in v0.0.7
func OptionalRhsmRepositoryState[T interface {
*RhsmRepositoryState | RhsmRepositoryState | *string | string
}](s T) *RhsmRepositoryState
Convert a supported type to an optional (pointer) RhsmRepositoryState
type RpmKeyParameters ¶
type RpmKeyParameters struct {
// Key that will be modified. Can be a url, a file on the managed node, or a
// keyid if the key already exists in the database.
Key string `json:"key"`
// If the key will be imported or removed from the rpm db.
// default: RpmKeyStatePresent
State *RpmKeyState `json:"state,omitempty"`
// If `false` and the `key` is a url starting with `https`, SSL certificates
// will not be validated.
// This should only be used on personally controlled sites using self-signed
// certificates.
// default: "yes"
ValidateCerts *bool `json:"validate_certs,omitempty"`
// The long-form fingerprint of the key being imported.
// This will be used to verify the specified key.
Fingerprint *[]string `json:"fingerprint,omitempty"`
}
Parameters for the `rpm_key` Ansible module.
func (RpmKeyParameters) ToRPCCall ¶
func (p RpmKeyParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `RpmKeyParameters into an `rpc.RPCCall`.
type RpmKeyReturn ¶
type RpmKeyReturn struct {
AnsibleCommonReturns
}
Return values for the `rpm_key` Ansible module.
func RpmKeyReturnFromRPCResult ¶
func RpmKeyReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (RpmKeyReturn, error)
Unwrap the `rpc.RPCResult` into an `RpmKeyReturn`
type RpmKeyState ¶ added in v0.0.7
type RpmKeyState string
If the key will be imported or removed from the rpm db.
const ( RpmKeyStateAbsent RpmKeyState = "absent" RpmKeyStatePresent RpmKeyState = "present" )
func OptionalRpmKeyState ¶ added in v0.0.7
func OptionalRpmKeyState[T interface {
*RpmKeyState | RpmKeyState | *string | string
}](s T) *RpmKeyState
Convert a supported type to an optional (pointer) RpmKeyState
type RpmOstreePkgParameters ¶ added in v0.0.7
type RpmOstreePkgParameters struct {
// Name of overlay package to install or remove.
Name []string `json:"name"`
// State of the overlay package.
// `present` simply ensures that a desired package is installed.
// `absent` removes the specified package.
// default: RpmOstreePkgStatePresent
State *RpmOstreePkgState `json:"state,omitempty"`
// Adds the options `--apply-live` when `state=present`.
// Option is ignored when `state=absent`.
// For more information, please see `https://coreos.github.io/rpm-ostree/apply-
// live/`.
// default: false
ApplyLive *bool `json:"apply_live,omitempty"`
}
Parameters for the `rpm_ostree_pkg` Ansible module.
func (RpmOstreePkgParameters) ToRPCCall ¶ added in v0.0.7
func (p RpmOstreePkgParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `RpmOstreePkgParameters into an `rpc.RPCCall`.
type RpmOstreePkgReturn ¶ added in v0.0.7
type RpmOstreePkgReturn struct {
AnsibleCommonReturns
// Return code of rpm-ostree command.
Rc *int `json:"rc,omitempty"`
// State changes.
Changed *bool `json:"changed,omitempty"`
// Action performed.
Action *string `json:"action,omitempty"`
// A list of packages specified.
Packages *[]any `json:"packages,omitempty"`
// Stdout of rpm-ostree command.
Stdout *string `json:"stdout,omitempty"`
// Stderr of rpm-ostree command.
Stderr *string `json:"stderr,omitempty"`
// Full command used for performed action.
Cmd *string `json:"cmd,omitempty"`
// Determine if machine needs a reboot to apply current changes.
NeedsReboot *bool `json:"needs_reboot,omitempty"`
}
Return values for the `rpm_ostree_pkg` Ansible module.
func RpmOstreePkgReturnFromRPCResult ¶ added in v0.0.7
func RpmOstreePkgReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (RpmOstreePkgReturn, error)
Unwrap the `rpc.RPCResult` into an `RpmOstreePkgReturn`
type RpmOstreePkgState ¶ added in v0.0.7
type RpmOstreePkgState string
State of the overlay package. `present` simply ensures that a desired package is installed. `absent` removes the specified package.
const ( RpmOstreePkgStateAbsent RpmOstreePkgState = "absent" RpmOstreePkgStatePresent RpmOstreePkgState = "present" )
func OptionalRpmOstreePkgState ¶ added in v0.0.7
func OptionalRpmOstreePkgState[T interface {
*RpmOstreePkgState | RpmOstreePkgState | *string | string
}](s T) *RpmOstreePkgState
Convert a supported type to an optional (pointer) RpmOstreePkgState
type RpmOstreeUpgradeParameters ¶ added in v0.0.7
type RpmOstreeUpgradeParameters struct {
// The OSNAME upon which to operate.
// default: ""
Os *string `json:"os,omitempty"`
// Perform the transaction using only pre-cached data, do not download.
// default: false
CacheOnly *bool `json:"cache_only,omitempty"`
// Allow for the upgrade to be a chronologically older tree.
// default: false
AllowDowngrade *bool `json:"allow_downgrade,omitempty"`
// Force peer-to-peer connection instead of using a system message bus.
// default: false
Peer *bool `json:"peer,omitempty"`
}
Parameters for the `rpm_ostree_upgrade` Ansible module.
func (RpmOstreeUpgradeParameters) ToRPCCall ¶ added in v0.0.7
func (p RpmOstreeUpgradeParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `RpmOstreeUpgradeParameters into an `rpc.RPCCall`.
type RpmOstreeUpgradeReturn ¶ added in v0.0.7
type RpmOstreeUpgradeReturn struct {
AnsibleCommonReturns
// The command standard output
Msg *string `json:"msg,omitempty"`
}
Return values for the `rpm_ostree_upgrade` Ansible module.
func RpmOstreeUpgradeReturnFromRPCResult ¶ added in v0.0.7
func RpmOstreeUpgradeReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (RpmOstreeUpgradeReturn, error)
Unwrap the `rpc.RPCResult` into an `RpmOstreeUpgradeReturn`
type SebooleanParameters ¶ added in v0.0.7
type SebooleanParameters struct {
// Name of the boolean to configure.
Name string `json:"name"`
// Set to `true` if the boolean setting should survive a reboot.
// default: false
Persistent *bool `json:"persistent,omitempty"`
// Desired boolean value.
State bool `json:"state"`
// Useful for scenarios (chrooted environment) that you can't get the real
// SELinux state.
// default: false
IgnoreSelinuxState *bool `json:"ignore_selinux_state,omitempty"`
}
Parameters for the `seboolean` Ansible module.
func (SebooleanParameters) ToRPCCall ¶ added in v0.0.7
func (p SebooleanParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SebooleanParameters into an `rpc.RPCCall`.
type SebooleanReturn ¶ added in v0.0.7
type SebooleanReturn struct {
AnsibleCommonReturns
}
Return values for the `seboolean` Ansible module.
func SebooleanReturnFromRPCResult ¶ added in v0.0.7
func SebooleanReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SebooleanReturn, error)
Unwrap the `rpc.RPCResult` into an `SebooleanReturn`
type SelinuxParameters ¶ added in v0.0.7
type SelinuxParameters struct {
// The name of the SELinux policy to use (e.g. `targeted`) will be required
// unless `state=disabled`.
Policy *string `json:"policy,omitempty"`
// The SELinux mode.
State SelinuxState `json:"state"`
// If set to `true`, will update also the kernel boot parameters when
// disabling/enabling SELinux.
// The `grubby` tool must be present on the target system for this to work.
// default: false
UpdateKernelParam *bool `json:"update_kernel_param,omitempty"`
// The path to the SELinux configuration file, if non-standard.
// default: "/etc/selinux/config"
Configfile *string `json:"configfile,omitempty"`
}
Parameters for the `selinux` Ansible module.
func (SelinuxParameters) ToRPCCall ¶ added in v0.0.7
func (p SelinuxParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SelinuxParameters into an `rpc.RPCCall`.
type SelinuxPermissiveParameters ¶ added in v0.0.7
type SelinuxPermissiveParameters struct {
// The domain that will be added or removed from the list of permissive
// domains.
Domain string `json:"domain"`
// Indicate if the domain should or should not be set as permissive.
Permissive bool `json:"permissive"`
// Disable reloading of the SELinux policy after making change to a domain's
// permissive setting.
// The default is `false`, which causes policy to be reloaded when a domain
// changes state.
// Reloading the policy does not work on older versions of the
// `policycoreutils-python` library, for example in EL 6.".
// default: false
NoReload *bool `json:"no_reload,omitempty"`
// Name of the SELinux policy store to use.
// default: ""
Store *string `json:"store,omitempty"`
}
Parameters for the `selinux_permissive` Ansible module.
func (SelinuxPermissiveParameters) ToRPCCall ¶ added in v0.0.7
func (p SelinuxPermissiveParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SelinuxPermissiveParameters into an `rpc.RPCCall`.
type SelinuxPermissiveReturn ¶ added in v0.0.7
type SelinuxPermissiveReturn struct {
AnsibleCommonReturns
}
Return values for the `selinux_permissive` Ansible module.
func SelinuxPermissiveReturnFromRPCResult ¶ added in v0.0.7
func SelinuxPermissiveReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SelinuxPermissiveReturn, error)
Unwrap the `rpc.RPCResult` into an `SelinuxPermissiveReturn`
type SelinuxReturn ¶ added in v0.0.7
type SelinuxReturn struct {
AnsibleCommonReturns
// Messages that describe changes that were made.
Msg *string `json:"msg,omitempty"`
// Path to SELinux configuration file.
Configfile *string `json:"configfile,omitempty"`
// Name of the SELinux policy.
Policy *string `json:"policy,omitempty"`
// SELinux mode.
State *string `json:"state,omitempty"`
// Whether or not an reboot is required for the changes to take effect.
RebootRequired *bool `json:"reboot_required,omitempty"`
}
Return values for the `selinux` Ansible module.
func SelinuxReturnFromRPCResult ¶ added in v0.0.7
func SelinuxReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SelinuxReturn, error)
Unwrap the `rpc.RPCResult` into an `SelinuxReturn`
type SelinuxState ¶ added in v0.0.7
type SelinuxState string
The SELinux mode.
const ( SelinuxStateDisabled SelinuxState = "disabled" SelinuxStateEnforcing SelinuxState = "enforcing" SelinuxStatePermissive SelinuxState = "permissive" )
type SeportParameters ¶ added in v0.0.7
type SeportParameters struct {
// Ports or port ranges.
// Can be a list (since 2.6) or comma separated string.
Ports []string `json:"ports"`
// Protocol for the specified port.
Proto SeportProto `json:"proto"`
// SELinux type for the specified port.
Setype string `json:"setype"`
// Desired boolean value.
// default: SeportStatePresent
State *SeportState `json:"state,omitempty"`
// Reload SELinux policy after commit.
// default: true
Reload *bool `json:"reload,omitempty"`
// Run independent of selinux runtime state.
// default: false
IgnoreSelinuxState *bool `json:"ignore_selinux_state,omitempty"`
// Work with local modifications only.
// default: false
Local *bool `json:"local,omitempty"`
}
Parameters for the `seport` Ansible module.
func (SeportParameters) ToRPCCall ¶ added in v0.0.7
func (p SeportParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SeportParameters into an `rpc.RPCCall`.
type SeportProto ¶ added in v0.0.7
type SeportProto string
Protocol for the specified port.
const ( SeportProtoTcp SeportProto = "tcp" SeportProtoUdp SeportProto = "udp" )
type SeportReturn ¶ added in v0.0.7
type SeportReturn struct {
AnsibleCommonReturns
}
Return values for the `seport` Ansible module.
func SeportReturnFromRPCResult ¶ added in v0.0.7
func SeportReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SeportReturn, error)
Unwrap the `rpc.RPCResult` into an `SeportReturn`
type SeportState ¶ added in v0.0.7
type SeportState string
Desired boolean value.
const ( SeportStateAbsent SeportState = "absent" SeportStatePresent SeportState = "present" )
func OptionalSeportState ¶ added in v0.0.7
func OptionalSeportState[T interface {
*SeportState | SeportState | *string | string
}](s T) *SeportState
Convert a supported type to an optional (pointer) SeportState
type ServiceParameters ¶
type ServiceParameters struct {
// Name of the service.
Name string `json:"name"`
// `started`/`stopped` are idempotent actions that will not run commands unless
// necessary.
// `restarted` will always bounce the service.
// `reloaded` will always reload.
// At least one of `state` and `enabled` are required.
// Note that `reloaded` will start the service if it is not already started,
// even if your chosen init system wouldn't normally.
State *ServiceState `json:"state,omitempty"`
// If the service is being `restarted` then sleep this many seconds between the
// stop and start command.
// This helps to work around badly-behaving init scripts that exit immediately
// after signaling a process to stop.
// Not all service managers support sleep, i.e when using systemd this setting
// will be ignored.
Sleep *int `json:"sleep,omitempty"`
// If the service does not respond to the status command, name a substring to
// look for as would be found in the output of the `ps` command as a stand-in
// for a status result.
// If the string is found, the service will be assumed to be started.
// While using remote hosts with systemd this setting will be ignored.
Pattern *string `json:"pattern,omitempty"`
// Whether the service should start on boot.
// At least one of `state` and `enabled` are required.
Enabled *bool `json:"enabled,omitempty"`
// For OpenRC init scripts (e.g. Gentoo) only.
// The runlevel that this service belongs to.
// While using remote hosts with systemd this setting will be ignored.
// default: "default"
Runlevel *string `json:"runlevel,omitempty"`
// Additional arguments provided on the command line.
// While using remote hosts with systemd this setting will be ignored.
// default: ""
Arguments *string `json:"arguments,omitempty"`
// The service module actually uses system specific modules, normally through
// auto detection, this setting can force a specific module.
// Normally it uses the value of the `ansible_service_mgr` fact and falls back
// to the `ansible.legacy.service` module when none matching is found.
// The 'old service module' still uses autodetection and in no way does it
// correspond to the `service` command.
// default: "auto"
Use *string `json:"use,omitempty"`
}
Parameters for the `service` Ansible module.
func (ServiceParameters) ToRPCCall ¶
func (p ServiceParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ServiceParameters into an `rpc.RPCCall`.
type ServiceReturn ¶
type ServiceReturn struct {
AnsibleCommonReturns
}
Return values for the `service` Ansible module.
func ServiceReturnFromRPCResult ¶
func ServiceReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (ServiceReturn, error)
Unwrap the `rpc.RPCResult` into an `ServiceReturn`
type ServiceState ¶ added in v0.0.7
type ServiceState string
`started`/`stopped` are idempotent actions that will not run commands unless necessary. `restarted` will always bounce the service. `reloaded` will always reload. At least one of `state` and `enabled` are required. Note that `reloaded` will start the service if it is not already started, even if your chosen init system wouldn't normally.
const ( ServiceStateReloaded ServiceState = "reloaded" ServiceStateRestarted ServiceState = "restarted" ServiceStateStarted ServiceState = "started" ServiceStateStopped ServiceState = "stopped" )
func OptionalServiceState ¶ added in v0.0.7
func OptionalServiceState[T interface {
*ServiceState | ServiceState | *string | string
}](s T) *ServiceState
Convert a supported type to an optional (pointer) ServiceState
type SetupParameters ¶
type SetupParameters struct {
// If supplied, restrict the additional facts collected to the given subset.
// Possible values: `all`, `all_ipv4_addresses`, `all_ipv6_addresses`,
// `apparmor`, `architecture`, `caps`, `chroot`,`cmdline`, `date_time`,
// `default_ipv4`, `default_ipv6`, `devices`, `distribution`,
// `distribution_major_version`, `distribution_release`,
// `distribution_version`, `dns`, `effective_group_ids`, `effective_user_id`,
// `env`, `facter`, `fips`, `hardware`, `interfaces`, `is_chroot`, `iscsi`,
// `kernel`, `local`, `lsb`, `machine`, `machine_id`, `mounts`, `network`,
// `ohai`, `os_family`, `pkg_mgr`, `platform`, `processor`, `processor_cores`,
// `processor_count`, `python`, `python_version`, `real_user_id`, `selinux`,
// `service_mgr`, `ssh_host_key_dsa_public`, `ssh_host_key_ecdsa_public`,
// `ssh_host_key_ed25519_public`, `ssh_host_key_rsa_public`,
// `ssh_host_pub_keys`, `ssh_pub_keys`, `system`, `system_capabilities`,
// `system_capabilities_enforced`, `systemd`, `user`, `user_dir`, `user_gecos`,
// `user_gid`, `user_id`, `user_shell`, `user_uid`, `virtual`,
// `virtualization_role`, `virtualization_type`. Can specify a list of values
// to specify a larger subset. Values can also be used with an initial `!` to
// specify that that specific subset should not be collected. For instance:
// `!hardware,!network,!virtual,!ohai,!facter`. If `!all` is specified then
// only the min subset is collected. To avoid collecting even the min subset,
// specify `!all,!min`. To collect only specific facts, use `!all,!min`, and
// specify the particular fact subsets. Use the filter parameter if you do not
// want to display some collected facts.
// default: "all"
GatherSubset *[]string `json:"gather_subset,omitempty"`
// Set the default timeout in seconds for individual fact gathering.
// default: 10
GatherTimeout *int `json:"gather_timeout,omitempty"`
// If supplied, only return facts that match one of the shell-style (fnmatch)
// pattern. An empty list basically means 'no filter'. As of Ansible 2.11, the
// type has changed from string to list and the default has became an empty
// list. A simple string is still accepted and works as a single pattern. The
// behaviour prior to Ansible 2.11 remains.
// default: []
Filter *[]string `json:"filter,omitempty"`
// Path used for local ansible facts (`*.fact`) - files in this dir will be run
// (if executable) and their results be added to `ansible_local` facts. If a
// file is not executable it is read instead. File/results format can be JSON
// or INI-format. The default `fact_path` can be specified in `ansible.cfg` for
// when setup is automatically called as part of `gather_facts`. NOTE - For
// windows clients, the results will be added to a variable named after the
// local file (without extension suffix), rather than `ansible_local`.
// Since Ansible 2.1, Windows hosts can use `fact_path`. Make sure that this
// path exists on the target host. Files in this path MUST be PowerShell
// scripts `.ps1` which outputs an object. This object will be formatted by
// Ansible as json so the script should be outputting a raw hashtable, array,
// or other primitive object.
// default: "/etc/ansible/facts.d"
FactPath *string `json:"fact_path,omitempty"`
}
Parameters for the `setup` Ansible module.
func (SetupParameters) ToRPCCall ¶
func (p SetupParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SetupParameters into an `rpc.RPCCall`.
type SetupReturn ¶
type SetupReturn struct {
AnsibleCommonReturns
}
Return values for the `setup` Ansible module.
func SetupReturnFromRPCResult ¶
func SetupReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SetupReturn, error)
Unwrap the `rpc.RPCResult` into an `SetupReturn`
type ShutdownParameters ¶ added in v0.0.7
type ShutdownParameters struct {
// Seconds to wait before shutdown. Passed as a parameter to the shutdown
// command.
// On Linux, macOS and OpenBSD, this is converted to minutes and rounded down.
// If less than 60, it is set to 0.
// On Solaris and FreeBSD, this represents seconds.
// default: 0
Delay *int `json:"delay,omitempty"`
// Message to display to users before shutdown.
// default: "Shut down initiated by Ansible"
Msg *string `json:"msg,omitempty"`
// Paths to search on the remote machine for the `shutdown` command.
// `Only` these paths are searched for the `shutdown` command. `PATH` is
// ignored in the remote node when searching for the `shutdown` command.
// default: ["/sbin", "/usr/sbin", "/usr/local/sbin"]
SearchPaths *[]string `json:"search_paths,omitempty"`
}
Parameters for the `shutdown` Ansible module.
func (ShutdownParameters) ToRPCCall ¶ added in v0.0.7
func (p ShutdownParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ShutdownParameters into an `rpc.RPCCall`.
type ShutdownReturn ¶ added in v0.0.7
type ShutdownReturn struct {
AnsibleCommonReturns
// `true` if the machine has been shut down.
Shutdown *bool `json:"shutdown,omitempty"`
}
Return values for the `shutdown` Ansible module.
func ShutdownReturnFromRPCResult ¶ added in v0.0.7
func ShutdownReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (ShutdownReturn, error)
Unwrap the `rpc.RPCResult` into an `ShutdownReturn`
type SlackpkgParameters ¶ added in v0.0.7
type SlackpkgParameters struct {
// Name of package to install/remove.
Name []string `json:"name"`
// State of the package, you can use `installed` as an alias for `present` and
// `removed` as one for `absent`.
// default: SlackpkgStatePresent
State *SlackpkgState `json:"state,omitempty"`
// Update the package database first.
// default: false
UpdateCache *bool `json:"update_cache,omitempty"`
}
Parameters for the `slackpkg` Ansible module.
func (SlackpkgParameters) ToRPCCall ¶ added in v0.0.7
func (p SlackpkgParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SlackpkgParameters into an `rpc.RPCCall`.
type SlackpkgReturn ¶ added in v0.0.7
type SlackpkgReturn struct {
AnsibleCommonReturns
}
Return values for the `slackpkg` Ansible module.
func SlackpkgReturnFromRPCResult ¶ added in v0.0.7
func SlackpkgReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SlackpkgReturn, error)
Unwrap the `rpc.RPCResult` into an `SlackpkgReturn`
type SlackpkgState ¶ added in v0.0.7
type SlackpkgState string
State of the package, you can use `installed` as an alias for `present` and `removed` as one for `absent`.
const ( SlackpkgStatePresent SlackpkgState = "present" SlackpkgStateAbsent SlackpkgState = "absent" SlackpkgStateLatest SlackpkgState = "latest" SlackpkgStateInstalled SlackpkgState = "installed" SlackpkgStateRemoved SlackpkgState = "removed" )
func OptionalSlackpkgState ¶ added in v0.0.7
func OptionalSlackpkgState[T interface {
*SlackpkgState | SlackpkgState | *string | string
}](s T) *SlackpkgState
Convert a supported type to an optional (pointer) SlackpkgState
type SlurpParameters ¶
type SlurpParameters struct {
// The file on the remote system to fetch. This `must` be a file, not a
// directory.
Src string `json:"src"`
}
Parameters for the `slurp` Ansible module.
func (SlurpParameters) ToRPCCall ¶
func (p SlurpParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SlurpParameters into an `rpc.RPCCall`.
type SlurpReturn ¶
type SlurpReturn struct {
AnsibleCommonReturns
// Encoded file content
Content *string `json:"content,omitempty"`
// Type of encoding used for file
Encoding *string `json:"encoding,omitempty"`
// Actual path of file slurped
Source *string `json:"source,omitempty"`
}
Return values for the `slurp` Ansible module.
func SlurpReturnFromRPCResult ¶
func SlurpReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SlurpReturn, error)
Unwrap the `rpc.RPCResult` into an `SlurpReturn`
type SmartosImageInfoParameters ¶ added in v0.0.7
type SmartosImageInfoParameters struct {
// Criteria for selecting image. Can be any value from image manifest and
// `published_date`, `published`, `source`, `clones`, and `size`.
// More information can be found at `https://smartos.org/man/1m/imgadm` under
// `imgadm list`.
Filters *string `json:"filters,omitempty"`
}
Parameters for the `smartos_image_info` Ansible module.
func (SmartosImageInfoParameters) ToRPCCall ¶ added in v0.0.7
func (p SmartosImageInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SmartosImageInfoParameters into an `rpc.RPCCall`.
type SmartosImageInfoReturn ¶ added in v0.0.7
type SmartosImageInfoReturn struct {
AnsibleCommonReturns
}
Return values for the `smartos_image_info` Ansible module.
func SmartosImageInfoReturnFromRPCResult ¶ added in v0.0.7
func SmartosImageInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SmartosImageInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `SmartosImageInfoReturn`
type SnapAliasParameters ¶ added in v0.0.7
type SnapAliasParameters struct {
// Desired state of the alias.
// default: SnapAliasStatePresent
State *SnapAliasState `json:"state,omitempty"`
// Name of the snap.
Name *string `json:"name,omitempty"`
// Aliases to be created or removed.
Alias *[]string `json:"alias,omitempty"`
}
Parameters for the `snap_alias` Ansible module.
func (SnapAliasParameters) ToRPCCall ¶ added in v0.0.7
func (p SnapAliasParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SnapAliasParameters into an `rpc.RPCCall`.
type SnapAliasReturn ¶ added in v0.0.7
type SnapAliasReturn struct {
AnsibleCommonReturns
// The snap aliases after execution. If called in check mode, then the list
// represents the state before execution.
SnapAliases *[]string `json:"snap_aliases,omitempty"`
// Versions of snap components as reported by `snap version`.
Version *map[string]any `json:"version,omitempty"`
}
Return values for the `snap_alias` Ansible module.
func SnapAliasReturnFromRPCResult ¶ added in v0.0.7
func SnapAliasReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SnapAliasReturn, error)
Unwrap the `rpc.RPCResult` into an `SnapAliasReturn`
type SnapAliasState ¶ added in v0.0.7
type SnapAliasState string
Desired state of the alias.
const ( SnapAliasStateAbsent SnapAliasState = "absent" SnapAliasStatePresent SnapAliasState = "present" )
func OptionalSnapAliasState ¶ added in v0.0.7
func OptionalSnapAliasState[T interface {
*SnapAliasState | SnapAliasState | *string | string
}](s T) *SnapAliasState
Convert a supported type to an optional (pointer) SnapAliasState
type SorceryParameters ¶ added in v0.0.7
type SorceryParameters struct {
// Name of the spell or grimoire.
// Multiple names can be given, separated by commas.
// Special value `*` in conjunction with states `latest` or `rebuild` will
// update or rebuild the whole system respectively.
// The alias `grimoire` was added in community.general 7.3.0.
Name *[]string `json:"name,omitempty"`
// Repository location.
// If specified, `name` represents grimoire(s) instead of spell(s).
// Special value `*` will pull grimoire from the official location.
// Only single item in `name` in conjunction with `*` can be used.
// `state=absent` must be used with a special value `*`.
Repository *string `json:"repository,omitempty"`
// Whether to cast, dispel or rebuild a package.
// State `cast` is an equivalent of `present`, not `latest`.
// State `rebuild` implies cast of all specified spells, not only those existed
// before.
// default: SorceryStatePresent
State *SorceryState `json:"state,omitempty"`
// Comma-separated list of _optional_ dependencies to build a spell (or make
// sure it is built) with; use `+`/`-` in front of dependency to turn it on/off
// (`+` is optional though).
// This option is ignored if `name` parameter is equal to `*` or contains more
// than one spell.
// Providers must be supplied in the form recognized by Sorcery, for example
// '`openssl(SSL\`)'.
Depends *string `json:"depends,omitempty"`
// Whether or not to update sorcery scripts at the very first stage.
// default: false
Update *bool `json:"update,omitempty"`
// Whether or not to update grimoire collection before casting spells.
// default: false
UpdateCache *bool `json:"update_cache,omitempty"`
// Time in seconds to invalidate grimoire collection on update.
// Especially useful for SCM and rsync grimoires.
// Makes sense only in pair with `update_cache`.
// default: 0
CacheValidTime *int `json:"cache_valid_time,omitempty"`
}
Parameters for the `sorcery` Ansible module.
func (SorceryParameters) ToRPCCall ¶ added in v0.0.7
func (p SorceryParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SorceryParameters into an `rpc.RPCCall`.
type SorceryReturn ¶ added in v0.0.7
type SorceryReturn struct {
AnsibleCommonReturns
}
Return values for the `sorcery` Ansible module.
func SorceryReturnFromRPCResult ¶ added in v0.0.7
func SorceryReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SorceryReturn, error)
Unwrap the `rpc.RPCResult` into an `SorceryReturn`
type SorceryState ¶ added in v0.0.7
type SorceryState string
Whether to cast, dispel or rebuild a package. State `cast` is an equivalent of `present`, not `latest`. State `rebuild` implies cast of all specified spells, not only those existed before.
const ( SorceryStatePresent SorceryState = "present" SorceryStateLatest SorceryState = "latest" SorceryStateAbsent SorceryState = "absent" SorceryStateCast SorceryState = "cast" SorceryStateDispelled SorceryState = "dispelled" SorceryStateRebuild SorceryState = "rebuild" )
func OptionalSorceryState ¶ added in v0.0.7
func OptionalSorceryState[T interface {
*SorceryState | SorceryState | *string | string
}](s T) *SorceryState
Convert a supported type to an optional (pointer) SorceryState
type StatChecksumAlgorithm ¶ added in v0.0.7
type StatChecksumAlgorithm string
Algorithm to determine checksum of file. Will throw an error if the host is unable to use specified algorithm. The remote host has to support the hashing method specified, `md5` can be unavailable if the host is FIPS-140 compliant.
const ( StatChecksumAlgorithmMd5 StatChecksumAlgorithm = "md5" StatChecksumAlgorithmSha1 StatChecksumAlgorithm = "sha1" StatChecksumAlgorithmSha224 StatChecksumAlgorithm = "sha224" StatChecksumAlgorithmSha256 StatChecksumAlgorithm = "sha256" StatChecksumAlgorithmSha384 StatChecksumAlgorithm = "sha384" StatChecksumAlgorithmSha512 StatChecksumAlgorithm = "sha512" )
func OptionalStatChecksumAlgorithm ¶ added in v0.0.7
func OptionalStatChecksumAlgorithm[T interface {
*StatChecksumAlgorithm | StatChecksumAlgorithm | *string | string
}](s T) *StatChecksumAlgorithm
Convert a supported type to an optional (pointer) StatChecksumAlgorithm
type StatParameters ¶
type StatParameters struct {
// The full path of the file/object to get the facts of.
Path string `json:"path"`
// Whether to follow symlinks.
// default: false
Follow *bool `json:"follow,omitempty"`
// Whether to return a checksum of the file.
// default: true
GetChecksum *bool `json:"get_checksum,omitempty"`
// Algorithm to determine checksum of file.
// Will throw an error if the host is unable to use specified algorithm.
// The remote host has to support the hashing method specified, `md5` can be
// unavailable if the host is FIPS-140 compliant.
// default: StatChecksumAlgorithmSha1
ChecksumAlgorithm *StatChecksumAlgorithm `json:"checksum_algorithm,omitempty"`
// Use file magic and return data about the nature of the file. This uses the
// `file` utility found on most Linux/Unix systems.
// This will add both R`stat.mimetype` and R`stat.charset` fields to the
// return, if possible.
// In Ansible 2.3 this option changed from `mime` to `get_mime` and the default
// changed to `true`.
// default: true
GetMime *bool `json:"get_mime,omitempty"`
// Get file attributes using lsattr tool if present.
// default: true
GetAttributes *bool `json:"get_attributes,omitempty"`
}
Parameters for the `stat` Ansible module.
func (StatParameters) ToRPCCall ¶
func (p StatParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `StatParameters into an `rpc.RPCCall`.
type StatReturn ¶
type StatReturn struct {
AnsibleCommonReturns
// Dictionary containing all the stat data, some platforms might add additional
// fields.
Stat *map[string]any `json:"stat,omitempty"`
}
Return values for the `stat` Ansible module.
func StatReturnFromRPCResult ¶
func StatReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (StatReturn, error)
Unwrap the `rpc.RPCResult` into an `StatReturn`
type SubversionParameters ¶
type SubversionParameters struct {
// The subversion URL to the repository.
Repo string `json:"repo"`
// Absolute path where the repository should be deployed.
// The destination directory must be specified unless `checkout=no`,
// `update=no`, and `export=no`.
Dest *string `json:"dest,omitempty"`
// Specific revision to checkout.
// default: "HEAD"
Revision *string `json:"revision,omitempty"`
// If `true`, modified files will be discarded. If `false`, module will fail if
// it encounters modified files. Prior to 1.9 the default was `true`.
// default: "no"
Force *bool `json:"force,omitempty"`
// If the directory exists, then the working copy will be checked-out over-the-
// top using `svn checkout --force`; if force is specified then existing files
// with different content are reverted.
// default: "no"
InPlace *bool `json:"in_place,omitempty"`
// `--username` parameter passed to svn.
Username *string `json:"username,omitempty"`
// `--password` parameter passed to svn when svn is less than version 1.10.0.
// This is not secure and the password will be leaked to argv.
// `--password-from-stdin` parameter when svn is greater or equal to version
// 1.10.0.
Password *string `json:"password,omitempty"`
// Path to svn executable to use. If not supplied, the normal mechanism for
// resolving binary paths will be used.
Executable *string `json:"executable,omitempty"`
// If `false`, do not check out the repository if it does not exist locally.
// default: "yes"
Checkout *bool `json:"checkout,omitempty"`
// If `false`, do not retrieve new revisions from the origin repository.
// default: "yes"
Update *bool `json:"update,omitempty"`
// If `true`, do export instead of checkout/update.
// default: "no"
Export *bool `json:"export,omitempty"`
// If `false`, do not call svn switch before update.
// default: "yes"
Switch *bool `json:"switch,omitempty"`
// If `false`, passes the `--trust-server-cert` flag to svn.
// If `true`, does not pass the flag.
// default: "no"
ValidateCerts *bool `json:"validate_certs,omitempty"`
}
Parameters for the `subversion` Ansible module.
func (SubversionParameters) ToRPCCall ¶
func (p SubversionParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SubversionParameters into an `rpc.RPCCall`.
type SubversionReturn ¶
type SubversionReturn struct {
AnsibleCommonReturns
}
Return values for the `subversion` Ansible module.
func SubversionReturnFromRPCResult ¶
func SubversionReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SubversionReturn, error)
Unwrap the `rpc.RPCResult` into an `SubversionReturn`
type Svr4pkgParameters ¶ added in v0.0.7
type Svr4pkgParameters struct {
// Package name, for example `SUNWcsr`.
Name string `json:"name"`
// Whether to install (`present`), or remove (`absent`) a package.
// If the package is to be installed, then `src` is required.
// The SVR4 package system does not provide an upgrade operation. You need to
// uninstall the old, then install the new package.
State Svr4pkgState `json:"state"`
// Specifies the location to install the package from. Required when
// `state=present`.
// Can be any path acceptable to the `pkgadd` command's `-d` option. For
// example: `somefile.pkg`, `/dir/with/pkgs`, `http://server/mypkgs.pkg`.
// If using a file or directory, they must already be accessible by the host.
// See the `ansible.builtin.copy` module for a way to get them there.
Src *string `json:"src,omitempty"`
// HTTP[s] proxy to be used if `src` is a URL.
Proxy *string `json:"proxy,omitempty"`
// Specifies the location of a response file to be used if package expects
// input on install.
ResponseFile *string `json:"response_file,omitempty"`
// Whether to install the package only in the current zone, or install it into
// all zones.
// The installation into all zones works only if you are working with the
// global zone.
// default: Svr4pkgZoneAll
Zone *Svr4pkgZone `json:"zone,omitempty"`
// Install/Remove category instead of a single package.
// default: false
Category *bool `json:"category,omitempty"`
}
Parameters for the `svr4pkg` Ansible module.
func (Svr4pkgParameters) ToRPCCall ¶ added in v0.0.7
func (p Svr4pkgParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `Svr4pkgParameters into an `rpc.RPCCall`.
type Svr4pkgReturn ¶ added in v0.0.7
type Svr4pkgReturn struct {
AnsibleCommonReturns
}
Return values for the `svr4pkg` Ansible module.
func Svr4pkgReturnFromRPCResult ¶ added in v0.0.7
func Svr4pkgReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (Svr4pkgReturn, error)
Unwrap the `rpc.RPCResult` into an `Svr4pkgReturn`
type Svr4pkgState ¶ added in v0.0.7
type Svr4pkgState string
Whether to install (`present`), or remove (`absent`) a package. If the package is to be installed, then `src` is required. The SVR4 package system does not provide an upgrade operation. You need to uninstall the old, then install the new package.
const ( Svr4pkgStatePresent Svr4pkgState = "present" Svr4pkgStateAbsent Svr4pkgState = "absent" )
type Svr4pkgZone ¶ added in v0.0.7
type Svr4pkgZone string
Whether to install the package only in the current zone, or install it into all zones. The installation into all zones works only if you are working with the global zone.
const ( Svr4pkgZoneCurrent Svr4pkgZone = "current" Svr4pkgZoneAll Svr4pkgZone = "all" )
func OptionalSvr4pkgZone ¶ added in v0.0.7
func OptionalSvr4pkgZone[T interface {
*Svr4pkgZone | Svr4pkgZone | *string | string
}](s T) *Svr4pkgZone
Convert a supported type to an optional (pointer) Svr4pkgZone
type SwdepotParameters ¶ added in v0.0.7
type SwdepotParameters struct {
// Package name.
Name string `json:"name"`
// Whether to install (`present`, `latest`), or remove (`absent`) a package.
State SwdepotState `json:"state"`
// The source repository from which install or upgrade a package.
Depot *string `json:"depot,omitempty"`
}
Parameters for the `swdepot` Ansible module.
func (SwdepotParameters) ToRPCCall ¶ added in v0.0.7
func (p SwdepotParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SwdepotParameters into an `rpc.RPCCall`.
type SwdepotReturn ¶ added in v0.0.7
type SwdepotReturn struct {
AnsibleCommonReturns
}
Return values for the `swdepot` Ansible module.
func SwdepotReturnFromRPCResult ¶ added in v0.0.7
func SwdepotReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SwdepotReturn, error)
Unwrap the `rpc.RPCResult` into an `SwdepotReturn`
type SwdepotState ¶ added in v0.0.7
type SwdepotState string
Whether to install (`present`, `latest`), or remove (`absent`) a package.
const ( SwdepotStatePresent SwdepotState = "present" SwdepotStateLatest SwdepotState = "latest" SwdepotStateAbsent SwdepotState = "absent" )
type SwupdParameters ¶ added in v0.0.7
type SwupdParameters struct {
// URL pointing to the contents of available bundles. If not specified, the
// contents are retrieved from clearlinux.org.
Contenturl *string `json:"contenturl,omitempty"`
// The format suffix for version file downloads. For example `1`, `2`, `3`, and
// so on, or the special value `staging`. If not specified, the default format
// is used.
Format *string `json:"format,omitempty"`
// The manifest contains information about the bundles at certain version of
// the OS. Specify a Manifest version to verify against that version or leave
// unspecified to verify against the current version.
Manifest *int `json:"manifest,omitempty"`
// Name of the (I)bundle to install or remove.
Name *string `json:"name,omitempty"`
// Indicates the desired (I)bundle state. `present` ensures the bundle is
// installed while `absent` ensures the (I)bundle is not installed.
// default: SwupdStatePresent
State *SwupdState `json:"state,omitempty"`
// Updates the OS to the latest version.
// default: false
Update *bool `json:"update,omitempty"`
// Overrides both `contenturl` and `versionurl`.
Url *string `json:"url,omitempty"`
// Verify content for OS version.
// default: false
Verify *bool `json:"verify,omitempty"`
// URL for version string download.
Versionurl *string `json:"versionurl,omitempty"`
}
Parameters for the `swupd` Ansible module.
func (SwupdParameters) ToRPCCall ¶ added in v0.0.7
func (p SwupdParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SwupdParameters into an `rpc.RPCCall`.
type SwupdReturn ¶ added in v0.0.7
type SwupdReturn struct {
AnsibleCommonReturns
// `stdout` of `swupd`.
Stdout *string `json:"stdout,omitempty"`
// `stderr` of `swupd`.
Stderr *string `json:"stderr,omitempty"`
}
Return values for the `swupd` Ansible module.
func SwupdReturnFromRPCResult ¶ added in v0.0.7
func SwupdReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SwupdReturn, error)
Unwrap the `rpc.RPCResult` into an `SwupdReturn`
type SwupdState ¶ added in v0.0.7
type SwupdState string
Indicates the desired (I)bundle state. `present` ensures the bundle is installed while `absent` ensures the (I)bundle is not installed.
const ( SwupdStatePresent SwupdState = "present" SwupdStateAbsent SwupdState = "absent" )
func OptionalSwupdState ¶ added in v0.0.7
func OptionalSwupdState[T interface {
*SwupdState | SwupdState | *string | string
}](s T) *SwupdState
Convert a supported type to an optional (pointer) SwupdState
type SynchronizeMode ¶ added in v0.0.7
type SynchronizeMode string
Specify the direction of the synchronization. In `push` mode the localhost or delegate is the source. In `pull` mode the remote host in context is the source.
const ( SynchronizeModePull SynchronizeMode = "pull" SynchronizeModePush SynchronizeMode = "push" )
func OptionalSynchronizeMode ¶ added in v0.0.7
func OptionalSynchronizeMode[T interface {
*SynchronizeMode | SynchronizeMode | *string | string
}](s T) *SynchronizeMode
Convert a supported type to an optional (pointer) SynchronizeMode
type SynchronizeParameters ¶ added in v0.0.7
type SynchronizeParameters struct {
// Path on the source host that will be synchronized to the destination.
// The path can be absolute or relative.
Src string `json:"src"`
// Path on the destination host that will be synchronized from the source.
// The path can be absolute or relative.
Dest string `json:"dest"`
// Port number for ssh on the destination host.
// Prior to Ansible 2.0, the `ansible_ssh_port` inventory var took precedence
// over this value.
// This parameter defaults to the value of `ansible_port`, the `remote_port`
// config setting or the value from ssh client configuration if none of the
// former have been set.
DestPort *int `json:"dest_port,omitempty"`
// Specify the direction of the synchronization.
// In `push` mode the localhost or delegate is the source.
// In `pull` mode the remote host in context is the source.
// default: SynchronizeModePush
Mode *SynchronizeMode `json:"mode,omitempty"`
// Mirrors the rsync archive flag, enables recursive, links, perms, times,
// owner, group flags, and `-D`.
// default: true
Archive *bool `json:"archive,omitempty"`
// Skip based on checksum, rather than mod-time & size; Note that that
// `archive` option is still enabled by default - the `checksum` option will
// not disable it.
// default: false
Checksum *bool `json:"checksum,omitempty"`
// Compress file data during the transfer.
// In most cases, leave this enabled unless it causes problems.
// default: true
Compress *bool `json:"compress,omitempty"`
// Skip creating new files on receiver.
// default: false
ExistingOnly *bool `json:"existing_only,omitempty"`
// Delete files in `dest` that do not exist (after transfer, not before) in the
// `src` path.
// This option requires `recursive=true`.
// This option ignores excluded files and behaves like the rsync opt `--delete-
// after`.
// default: false
Delete *bool `json:"delete,omitempty"`
// Transfer directories without recursing.
// default: false
Dirs *bool `json:"dirs,omitempty"`
// Recurse into directories.
// This parameter defaults to the value of the archive option.
Recursive *bool `json:"recursive,omitempty"`
// Copy symlinks as symlinks.
// This parameter defaults to the value of the archive option.
Links *bool `json:"links,omitempty"`
// Copy symlinks as the item that they point to (the referent) is copied,
// rather than the symlink.
// default: false
CopyLinks *bool `json:"copy_links,omitempty"`
// Preserve permissions.
// This parameter defaults to the value of the archive option.
Perms *bool `json:"perms,omitempty"`
// Preserve modification times.
// This parameter defaults to the value of the archive option.
Times *bool `json:"times,omitempty"`
// Preserve owner (super user only).
// This parameter defaults to the value of the archive option.
Owner *bool `json:"owner,omitempty"`
// Preserve group.
// This parameter defaults to the value of the archive option.
Group *bool `json:"group,omitempty"`
// Specify the rsync command to run on the remote host. See `--rsync-path` on
// the rsync man page.
// To specify the rsync command to run on the local host, you need to set this
// your task var `ansible_rsync_path`.
RsyncPath *string `json:"rsync_path,omitempty"`
// Specify a `--timeout` for the rsync command in seconds.
// default: 0
RsyncTimeout *int `json:"rsync_timeout,omitempty"`
// Put `user@` for the remote paths.
// If you have a custom ssh config to define the remote user for a host that
// does not match the inventory user, you should set this parameter to `false`.
// default: true
SetRemoteUser *bool `json:"set_remote_user,omitempty"`
// SSH connection multiplexing for rsync is disabled by default to prevent
// misconfigured ControlSockets from resulting in failed SSH connections. This
// is accomplished by setting the SSH `ControlSocket` to `none`.
// Set this option to `true` to allow multiplexing and reduce SSH connection
// overhead.
// Note that simply setting this option to `true` is not enough; You must also
// configure SSH connection multiplexing in your SSH client config by setting
// values for `ControlMaster`, `ControlPersist` and `ControlPath`.
// default: false
SshConnectionMultiplexing *bool `json:"ssh_connection_multiplexing,omitempty"`
// Specify additional rsync options by passing in an array.
// Note that an empty string in `rsync_opts` will end up transfer the current
// working directory.
// default: []
RsyncOpts *[]string `json:"rsync_opts,omitempty"`
// Tells rsync to keep the partial file which should make a subsequent transfer
// of the rest of the file much faster.
// default: false
Partial *bool `json:"partial,omitempty"`
// Verify destination host key.
// default: false
VerifyHost *bool `json:"verify_host,omitempty"`
// Specify the private key to use for SSH-based rsync connections (e.g.
// `~/.ssh/id_rsa`).
PrivateKey *string `json:"private_key,omitempty"`
// Add a destination to hard link against during the rsync.
// default: nil
LinkDest *[]string `json:"link_dest,omitempty"`
// This option puts the temporary file from each updated file into a holding
// directory until the end of the transfer, at which time all the files are
// renamed into place in rapid succession.
// default: true
DelayUpdates *bool `json:"delay_updates,omitempty"`
// In Ansible 2.10 and lower, it uses the ssh_args specified in `ansible.cfg`.
// In Ansible 2.11 and onwards, when set to `true`, it uses all SSH connection
// configurations like `ansible_ssh_args`, `ansible_ssh_common_args`, and
// `ansible_ssh_extra_args`.
// default: false
UseSshArgs *bool `json:"use_ssh_args,omitempty"`
// Internal use only.
// default: "rsync"
LocalRsyncPath *string `json:"_local_rsync_path,omitempty"`
// Internal use only, never logged.
LocalRsyncPassword *string `json:"_local_rsync_password,omitempty"`
// Internal use only.
// default: false
SubstituteController *bool `json:"_substitute_controller,omitempty"`
// Internal use only. See `use_ssh_args` for ssh arg settings.
SshArgs *string `json:"_ssh_args,omitempty"`
}
Parameters for the `synchronize` Ansible module.
func (SynchronizeParameters) ToRPCCall ¶ added in v0.0.7
func (p SynchronizeParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SynchronizeParameters into an `rpc.RPCCall`.
type SynchronizeReturn ¶ added in v0.0.7
type SynchronizeReturn struct {
AnsibleCommonReturns
}
Return values for the `synchronize` Ansible module.
func SynchronizeReturnFromRPCResult ¶ added in v0.0.7
func SynchronizeReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SynchronizeReturn, error)
Unwrap the `rpc.RPCResult` into an `SynchronizeReturn`
type SysctlParameters ¶ added in v0.0.7
type SysctlParameters struct {
// The dot-separated path (also known as `key`) specifying the sysctl variable.
Name string `json:"name"`
// Desired value of the sysctl key.
Value *string `json:"value,omitempty"`
// Whether the entry should be present or absent in the sysctl file.
// default: SysctlStatePresent
State *SysctlState `json:"state,omitempty"`
// Use this option to ignore errors about unknown keys.
// default: false
Ignoreerrors *bool `json:"ignoreerrors,omitempty"`
// If `true`, performs a `/sbin/sysctl -p` if the `sysctl_file` is updated. If
// `false`, does not reload `sysctl` even if the `sysctl_file` is updated.
// default: true
Reload *bool `json:"reload,omitempty"`
// Specifies the absolute path to `sysctl.conf`, if not `/etc/sysctl.conf`.
// default: "/etc/sysctl.conf"
SysctlFile *string `json:"sysctl_file,omitempty"`
// Verify token value with the sysctl command and set with `-w` if necessary.
// default: false
SysctlSet *bool `json:"sysctl_set,omitempty"`
}
Parameters for the `sysctl` Ansible module.
func (SysctlParameters) ToRPCCall ¶ added in v0.0.7
func (p SysctlParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SysctlParameters into an `rpc.RPCCall`.
type SysctlReturn ¶ added in v0.0.7
type SysctlReturn struct {
AnsibleCommonReturns
}
Return values for the `sysctl` Ansible module.
func SysctlReturnFromRPCResult ¶ added in v0.0.7
func SysctlReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SysctlReturn, error)
Unwrap the `rpc.RPCResult` into an `SysctlReturn`
type SysctlState ¶ added in v0.0.7
type SysctlState string
Whether the entry should be present or absent in the sysctl file.
const ( SysctlStatePresent SysctlState = "present" SysctlStateAbsent SysctlState = "absent" )
func OptionalSysctlState ¶ added in v0.0.7
func OptionalSysctlState[T interface {
*SysctlState | SysctlState | *string | string
}](s T) *SysctlState
Convert a supported type to an optional (pointer) SysctlState
type SyspatchParameters ¶ added in v0.0.7
type SyspatchParameters struct {
// Revert system patches.
Revert *SyspatchRevert `json:"revert,omitempty"`
}
Parameters for the `syspatch` Ansible module.
func (SyspatchParameters) ToRPCCall ¶ added in v0.0.7
func (p SyspatchParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SyspatchParameters into an `rpc.RPCCall`.
type SyspatchReturn ¶ added in v0.0.7
type SyspatchReturn struct {
AnsibleCommonReturns
// The command return code (0 means success).
Rc *int `json:"rc,omitempty"`
// `syspatch` standard output.
Stdout *string `json:"stdout,omitempty"`
// `syspatch` standard error.
Stderr *string `json:"stderr,omitempty"`
// Whether or not a reboot is required after an update.
RebootNeeded *bool `json:"reboot_needed,omitempty"`
}
Return values for the `syspatch` Ansible module.
func SyspatchReturnFromRPCResult ¶ added in v0.0.7
func SyspatchReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SyspatchReturn, error)
Unwrap the `rpc.RPCResult` into an `SyspatchReturn`
type SyspatchRevert ¶ added in v0.0.7
type SyspatchRevert string
Revert system patches.
const ( SyspatchRevertAll SyspatchRevert = "all" SyspatchRevertOne SyspatchRevert = "one" )
func OptionalSyspatchRevert ¶ added in v0.0.7
func OptionalSyspatchRevert[T interface {
*SyspatchRevert | SyspatchRevert | *string | string
}](s T) *SyspatchRevert
Convert a supported type to an optional (pointer) SyspatchRevert
type SysrcParameters ¶ added in v0.0.7
type SysrcParameters struct {
// Name of variable in `/etc/rc.conf` to manage.
Name string `json:"name"`
// The value to set when `state=present`.
// The value to add when `state=value_present`.
// The value to remove when `state=value_absent`.
Value *string `json:"value,omitempty"`
// Use `present` to add the variable.
// Use `absent` to remove the variable.
// Use `value_present` to add the value to the existing variable.
// Use `value_absent` to remove the value from the existing variable.
// default: SysrcStatePresent
State *SysrcState `json:"state,omitempty"`
// Path to file to use instead of `/etc/rc.conf`.
// default: "/etc/rc.conf"
Path *string `json:"path,omitempty"`
// Delimiter to be used instead of `" "` (space).
// Only used when `state=value_present` or `state=value_absent`.
// default: " "
Delim *string `json:"delim,omitempty"`
// Name or ID of the jail to operate on.
Jail *string `json:"jail,omitempty"`
}
Parameters for the `sysrc` Ansible module.
func (SysrcParameters) ToRPCCall ¶ added in v0.0.7
func (p SysrcParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SysrcParameters into an `rpc.RPCCall`.
type SysrcReturn ¶ added in v0.0.7
type SysrcReturn struct {
AnsibleCommonReturns
// Return changed for sysrc actions.
Changed *bool `json:"changed,omitempty"`
}
Return values for the `sysrc` Ansible module.
func SysrcReturnFromRPCResult ¶ added in v0.0.7
func SysrcReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SysrcReturn, error)
Unwrap the `rpc.RPCResult` into an `SysrcReturn`
type SysrcState ¶ added in v0.0.7
type SysrcState string
Use `present` to add the variable. Use `absent` to remove the variable. Use `value_present` to add the value to the existing variable. Use `value_absent` to remove the value from the existing variable.
const ( SysrcStateAbsent SysrcState = "absent" SysrcStatePresent SysrcState = "present" SysrcStateValuePresent SysrcState = "value_present" SysrcStateValueAbsent SysrcState = "value_absent" )
func OptionalSysrcState ¶ added in v0.0.7
func OptionalSysrcState[T interface {
*SysrcState | SysrcState | *string | string
}](s T) *SysrcState
Convert a supported type to an optional (pointer) SysrcState
type SystemdCredsDecryptParameters ¶ added in v0.0.7
type SystemdCredsDecryptParameters struct {
// The credential name to validate the embedded credential name.
Name *string `json:"name,omitempty"`
// Whether to add a trailing newline character to the end of the output, if not
// present.
// default: false
Newline *bool `json:"newline,omitempty"`
// The secret to decrypt.
Secret string `json:"secret"`
// The timestamp to use to validate the `not-after` timestamp that was used
// during encryption.
// Takes a timestamp specification in the format described in
// `systemd.time(7\`).
Timestamp *string `json:"timestamp,omitempty"`
// Whether to transcode the output before returning it.
Transcode *SystemdCredsDecryptTranscode `json:"transcode,omitempty"`
// A user name or numeric UID when decrypting from a specific user context.
// If set to the special string `self` it sets the user to the user of the
// calling process.
// Requires `systemd` 256 or later.
User *string `json:"user,omitempty"`
}
Parameters for the `systemd_creds_decrypt` Ansible module.
func (SystemdCredsDecryptParameters) ToRPCCall ¶ added in v0.0.7
func (p SystemdCredsDecryptParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SystemdCredsDecryptParameters into an `rpc.RPCCall`.
type SystemdCredsDecryptReturn ¶ added in v0.0.7
type SystemdCredsDecryptReturn struct {
AnsibleCommonReturns
// The decrypted secret.
// Note that Ansible only supports returning UTF-8 encoded strings. If the
// decrypted secret is binary data, or a string encoded in another way, use
// `transcode=base64` or `transcode=hex` to circument this restriction. You
// then need to decode the data when using it, for example using the
// `ansible.builtin.b64decode#filter` filter.
Value *string `json:"value,omitempty"`
}
Return values for the `systemd_creds_decrypt` Ansible module.
func SystemdCredsDecryptReturnFromRPCResult ¶ added in v0.0.7
func SystemdCredsDecryptReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SystemdCredsDecryptReturn, error)
Unwrap the `rpc.RPCResult` into an `SystemdCredsDecryptReturn`
type SystemdCredsDecryptTranscode ¶ added in v0.0.7
type SystemdCredsDecryptTranscode string
Whether to transcode the output before returning it.
const ( SystemdCredsDecryptTranscodeBase64 SystemdCredsDecryptTranscode = "base64" SystemdCredsDecryptTranscodeUnbase64 SystemdCredsDecryptTranscode = "unbase64" SystemdCredsDecryptTranscodeHex SystemdCredsDecryptTranscode = "hex" SystemdCredsDecryptTranscodeUnhex SystemdCredsDecryptTranscode = "unhex" )
func OptionalSystemdCredsDecryptTranscode ¶ added in v0.0.7
func OptionalSystemdCredsDecryptTranscode[T interface {
*SystemdCredsDecryptTranscode | SystemdCredsDecryptTranscode | *string | string
}](s T) *SystemdCredsDecryptTranscode
Convert a supported type to an optional (pointer) SystemdCredsDecryptTranscode
type SystemdCredsEncryptParameters ¶ added in v0.0.7
type SystemdCredsEncryptParameters struct {
// The credential name to embed in the encrypted credential data.
Name *string `json:"name,omitempty"`
// The time when the credential shall not be used anymore.
// Takes a timestamp specification in the format described in
// `systemd.time(7\`).
NotAfter *string `json:"not_after,omitempty"`
// Pretty print the output so that it may be pasted directly into a unit file.
// default: false
Pretty *bool `json:"pretty,omitempty"`
// The secret to encrypt.
Secret string `json:"secret"`
// The timestamp to embed into the encrypted credential.
// Takes a timestamp specification in the format described in
// `systemd.time(7\`).
Timestamp *string `json:"timestamp,omitempty"`
// A user name or numeric UID to encrypt the credential for.
// If set to the special string `self` it sets the user to the user of the
// calling process.
// Requires `systemd` 256 or later.
User *string `json:"user,omitempty"`
}
Parameters for the `systemd_creds_encrypt` Ansible module.
func (SystemdCredsEncryptParameters) ToRPCCall ¶ added in v0.0.7
func (p SystemdCredsEncryptParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SystemdCredsEncryptParameters into an `rpc.RPCCall`.
type SystemdCredsEncryptReturn ¶ added in v0.0.7
type SystemdCredsEncryptReturn struct {
AnsibleCommonReturns
// The Base64 encoded encrypted secret.
Value *string `json:"value,omitempty"`
}
Return values for the `systemd_creds_encrypt` Ansible module.
func SystemdCredsEncryptReturnFromRPCResult ¶ added in v0.0.7
func SystemdCredsEncryptReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SystemdCredsEncryptReturn, error)
Unwrap the `rpc.RPCResult` into an `SystemdCredsEncryptReturn`
type SystemdInfoParameters ¶ added in v0.0.7
type SystemdInfoParameters struct {
// List of unit names to process.
// It supports `.service`, `.target`, `.socket`, `.mount` and `.timer` units
// type.
// `.timer` units are supported since community.general 10.5.0.
// Each name must correspond to the full name of the `systemd` unit or to a
// wildcard expression like `'ssh*'` and `'*.service'`.
// Wildcard expressions in `unitname` are supported since community.general
// 10.5.0.
// default: []
Unitname *[]string `json:"unitname,omitempty"`
// Additional properties to retrieve (appended to the default ones).
// Note that all property names are converted to lower-case.
// default: []
ExtraProperties *[]string `json:"extra_properties,omitempty"`
}
Parameters for the `systemd_info` Ansible module.
func (SystemdInfoParameters) ToRPCCall ¶ added in v0.0.7
func (p SystemdInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SystemdInfoParameters into an `rpc.RPCCall`.
type SystemdInfoReturn ¶ added in v0.0.7
type SystemdInfoReturn struct {
AnsibleCommonReturns
// Dictionary of systemd unit info keyed by unit name.
// Additional fields will be returned depending on the value of
// `extra_properties`.
Units *map[string]any `json:"units,omitempty"`
}
Return values for the `systemd_info` Ansible module.
func SystemdInfoReturnFromRPCResult ¶ added in v0.0.7
func SystemdInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SystemdInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `SystemdInfoReturn`
type SystemdServiceParameters ¶
type SystemdServiceParameters struct {
// Name of the unit. This parameter takes the name of exactly one unit to work
// with.
// When no extension is given, it is implied to a `.service` as systemd.
// When using in a chroot environment you always need to specify the name of
// the unit with the extension. For example, `crond.service`.
Name *string `json:"name,omitempty"`
// `started`/`stopped` are idempotent actions that will not run commands unless
// necessary. `restarted` will always bounce the unit. `reloaded` will always
// reload and if the service is not running at the moment of the reload, it is
// started.
// If set, requires `name`.
State *SystemdServiceState `json:"state,omitempty"`
// Whether the unit should start on boot. At least one of `state` and `enabled`
// are required.
// If set, requires `name`.
Enabled *bool `json:"enabled,omitempty"`
// Whether to override existing symlinks.
Force *bool `json:"force,omitempty"`
// Whether the unit should be masked or not. A masked unit is impossible to
// start.
// If set, requires `name`.
Masked *bool `json:"masked,omitempty"`
// Run `daemon-reload` before doing any other operations, to make sure systemd
// has read any changes.
// When set to `true`, runs `daemon-reload` even if the module does not start
// or stop anything.
// default: false
DaemonReload *bool `json:"daemon_reload,omitempty"`
// Run daemon_reexec command before doing any other operations, the systemd
// manager will serialize the manager state.
// default: false
DaemonReexec *bool `json:"daemon_reexec,omitempty"`
// Run `systemctl` within a given service manager scope, either as the default
// system scope `system`, the current user's scope `user`, or the scope of all
// users `global`.
// For systemd to work with `user`, the executing user must have its own
// instance of dbus started and accessible (systemd requirement).
// The user dbus process is normally started during normal login, but not
// during the run of Ansible tasks. Otherwise you will probably get a 'Failed
// to connect to bus: no such file or directory' error.
// The user must have access, normally given via setting the `XDG_RUNTIME_DIR`
// variable, see the example below.
// default: SystemdServiceScopeSystem
Scope *SystemdServiceScope `json:"scope,omitempty"`
// Do not synchronously wait for the requested operation to finish. Enqueued
// job will continue without Ansible blocking on its completion.
// default: false
NoBlock *bool `json:"no_block,omitempty"`
}
Parameters for the `systemd_service` Ansible module.
func (SystemdServiceParameters) ToRPCCall ¶
func (p SystemdServiceParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SystemdServiceParameters into an `rpc.RPCCall`.
type SystemdServiceReturn ¶
type SystemdServiceReturn struct {
AnsibleCommonReturns
// A dictionary with the key=value pairs returned from `systemctl show`.
Status *map[string]any `json:"status,omitempty"`
}
Return values for the `systemd_service` Ansible module.
func SystemdServiceReturnFromRPCResult ¶
func SystemdServiceReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SystemdServiceReturn, error)
Unwrap the `rpc.RPCResult` into an `SystemdServiceReturn`
type SystemdServiceScope ¶ added in v0.0.7
type SystemdServiceScope string
Run `systemctl` within a given service manager scope, either as the default system scope `system`, the current user's scope `user`, or the scope of all users `global`. For systemd to work with `user`, the executing user must have its own instance of dbus started and accessible (systemd requirement). The user dbus process is normally started during normal login, but not during the run of Ansible tasks. Otherwise you will probably get a 'Failed to connect to bus: no such file or directory' error. The user must have access, normally given via setting the `XDG_RUNTIME_DIR` variable, see the example below.
const ( SystemdServiceScopeSystem SystemdServiceScope = "system" SystemdServiceScopeUser SystemdServiceScope = "user" SystemdServiceScopeGlobal SystemdServiceScope = "global" )
func OptionalSystemdServiceScope ¶ added in v0.0.7
func OptionalSystemdServiceScope[T interface {
*SystemdServiceScope | SystemdServiceScope | *string | string
}](s T) *SystemdServiceScope
Convert a supported type to an optional (pointer) SystemdServiceScope
type SystemdServiceState ¶ added in v0.0.7
type SystemdServiceState string
`started`/`stopped` are idempotent actions that will not run commands unless necessary. `restarted` will always bounce the unit. `reloaded` will always reload and if the service is not running at the moment of the reload, it is started. If set, requires `name`.
const ( SystemdServiceStateReloaded SystemdServiceState = "reloaded" SystemdServiceStateRestarted SystemdServiceState = "restarted" SystemdServiceStateStarted SystemdServiceState = "started" SystemdServiceStateStopped SystemdServiceState = "stopped" )
func OptionalSystemdServiceState ¶ added in v0.0.7
func OptionalSystemdServiceState[T interface {
*SystemdServiceState | SystemdServiceState | *string | string
}](s T) *SystemdServiceState
Convert a supported type to an optional (pointer) SystemdServiceState
type SysvinitParameters ¶
type SysvinitParameters struct {
// Name of the service.
Name string `json:"name"`
// `started`/`stopped` are idempotent actions that will not run commands unless
// necessary. Not all init scripts support `restarted` nor `reloaded` natively,
// so these will both trigger a stop and start as needed.
State *SysvinitState `json:"state,omitempty"`
// Whether the service should start on boot. At least one of `state` and
// `enabled` are required.
Enabled *bool `json:"enabled,omitempty"`
// If the service is being `restarted` or `reloaded` then sleep this many
// seconds between the stop and start command. This helps to workaround badly
// behaving services.
// default: 1
Sleep *int `json:"sleep,omitempty"`
// A substring to look for as would be found in the output of the `ps` command
// as a stand-in for a status result.
// If the string is found, the service will be assumed to be running.
// This option is mainly for use with init scripts that don't support the
// `status` option.
Pattern *string `json:"pattern,omitempty"`
// The runlevels this script should be enabled/disabled from.
// Use this to override the defaults set by the package or init script itself.
Runlevels *[]string `json:"runlevels,omitempty"`
// Additional arguments provided on the command line that some init scripts
// accept.
Arguments *string `json:"arguments,omitempty"`
// Have the module daemonize as the service itself might not do so properly.
// This is useful with badly written init scripts or daemons, which commonly
// manifests as the task hanging as it is still holding the tty or the service
// dying when the task is over as the connection closes the session.
// default: false
Daemonize *bool `json:"daemonize,omitempty"`
}
Parameters for the `sysvinit` Ansible module.
func (SysvinitParameters) ToRPCCall ¶
func (p SysvinitParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `SysvinitParameters into an `rpc.RPCCall`.
type SysvinitReturn ¶
type SysvinitReturn struct {
AnsibleCommonReturns
// results from actions taken
Results *any `json:"results,omitempty"`
}
Return values for the `sysvinit` Ansible module.
func SysvinitReturnFromRPCResult ¶
func SysvinitReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (SysvinitReturn, error)
Unwrap the `rpc.RPCResult` into an `SysvinitReturn`
type SysvinitState ¶ added in v0.0.7
type SysvinitState string
`started`/`stopped` are idempotent actions that will not run commands unless necessary. Not all init scripts support `restarted` nor `reloaded` natively, so these will both trigger a stop and start as needed.
const ( SysvinitStateStarted SysvinitState = "started" SysvinitStateStopped SysvinitState = "stopped" SysvinitStateRestarted SysvinitState = "restarted" SysvinitStateReloaded SysvinitState = "reloaded" )
func OptionalSysvinitState ¶ added in v0.0.7
func OptionalSysvinitState[T interface {
*SysvinitState | SysvinitState | *string | string
}](s T) *SysvinitState
Convert a supported type to an optional (pointer) SysvinitState
type TempfileParameters ¶
type TempfileParameters struct {
// Whether to create file or directory.
// default: TempfileStateFile
State *TempfileState `json:"state,omitempty"`
// Location where temporary file or directory should be created.
// If path is not specified, the default system temporary directory will be
// used.
Path *string `json:"path,omitempty"`
// Prefix of file/directory name created by module.
// default: "ansible."
Prefix *string `json:"prefix,omitempty"`
// Suffix of file/directory name created by module.
// default: ""
Suffix *string `json:"suffix,omitempty"`
}
Parameters for the `tempfile` Ansible module.
func (TempfileParameters) ToRPCCall ¶
func (p TempfileParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `TempfileParameters into an `rpc.RPCCall`.
type TempfileReturn ¶
type TempfileReturn struct {
AnsibleCommonReturns
// Path to created file or directory.
Path *string `json:"path,omitempty"`
}
Return values for the `tempfile` Ansible module.
func TempfileReturnFromRPCResult ¶
func TempfileReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (TempfileReturn, error)
Unwrap the `rpc.RPCResult` into an `TempfileReturn`
type TempfileState ¶ added in v0.0.7
type TempfileState string
Whether to create file or directory.
const ( TempfileStateDirectory TempfileState = "directory" TempfileStateFile TempfileState = "file" )
func OptionalTempfileState ¶ added in v0.0.7
func OptionalTempfileState[T interface {
*TempfileState | TempfileState | *string | string
}](s T) *TempfileState
Convert a supported type to an optional (pointer) TempfileState
type TimezoneHwclock ¶ added in v0.0.7
type TimezoneHwclock string
Whether the hardware clock is in UTC or in local timezone. Default is to keep current setting. Note that this option is recommended not to change and may fail to configure, especially on virtual environments such as AWS. `At least one` of `name` and `hwclock` are required. `Only used on Linux`.
const ( TimezoneHwclockLocal TimezoneHwclock = "local" TimezoneHwclockUtc TimezoneHwclock = "UTC" )
func OptionalTimezoneHwclock ¶ added in v0.0.7
func OptionalTimezoneHwclock[T interface {
*TimezoneHwclock | TimezoneHwclock | *string | string
}](s T) *TimezoneHwclock
Convert a supported type to an optional (pointer) TimezoneHwclock
type TimezoneParameters ¶ added in v0.0.7
type TimezoneParameters struct {
// Name of the timezone for the system clock.
// Default is to keep current setting.
// `At least one` of `name` and `hwclock` are required.
Name *string `json:"name,omitempty"`
// Whether the hardware clock is in UTC or in local timezone.
// Default is to keep current setting.
// Note that this option is recommended not to change and may fail to
// configure, especially on virtual environments such as AWS.
// `At least one` of `name` and `hwclock` are required.
// `Only used on Linux`.
Hwclock *TimezoneHwclock `json:"hwclock,omitempty"`
}
Parameters for the `timezone` Ansible module.
func (TimezoneParameters) ToRPCCall ¶ added in v0.0.7
func (p TimezoneParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `TimezoneParameters into an `rpc.RPCCall`.
type TimezoneReturn ¶ added in v0.0.7
type TimezoneReturn struct {
AnsibleCommonReturns
// The differences about the given arguments.
Diff *any `json:"diff,omitempty"`
}
Return values for the `timezone` Ansible module.
func TimezoneReturnFromRPCResult ¶ added in v0.0.7
func TimezoneReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (TimezoneReturn, error)
Unwrap the `rpc.RPCResult` into an `TimezoneReturn`
type UnarchiveParameters ¶
type UnarchiveParameters struct {
// If `remote_src=no` (default), local path to archive file to copy to the
// target server; can be absolute or relative. If `remote_src=yes`, path on the
// target server to existing archive file to unpack.
// If `remote_src=yes` and `src` contains `://`, the remote machine will
// download the file from the URL first. (version_added 2.0). This is only for
// simple cases, for full download support use the `ansible.builtin.get_url`
// module.
Src string `json:"src"`
// Remote absolute path where the archive should be unpacked.
// The given path must exist. Base directory is not created by this module.
Dest string `json:"dest"`
// If true, the file is copied from local controller to the managed (remote)
// node, otherwise, the plugin will look for src archive on the managed
// machine.
// This option has been deprecated in favor of `remote_src`.
// This option is mutually exclusive with `remote_src`.
// default: true
Copy *bool `json:"copy,omitempty"`
// If the specified absolute path (file or directory) already exists, this step
// will `not` be run.
// The specified absolute path (file or directory) must be below the base path
// given with `dest`.
Creates *string `json:"creates,omitempty"`
// Size of the volatile memory buffer that is used for extracting files from
// the archive in bytes.
// default: 65536
IoBufferSize *int `json:"io_buffer_size,omitempty"`
// If set to True, return the list of files that are contained in the tarball.
// default: false
ListFiles *bool `json:"list_files,omitempty"`
// List the directory and file entries that you would like to exclude from the
// unarchive action.
// Mutually exclusive with `include`.
// default: []
Exclude *[]string `json:"exclude,omitempty"`
// List of directory and file entries that you would like to extract from the
// archive. If `include` is not empty, only files listed here will be
// extracted.
// Mutually exclusive with `exclude`.
// default: []
Include *[]string `json:"include,omitempty"`
// Do not replace existing files that are newer than files from the archive.
// default: false
KeepNewer *bool `json:"keep_newer,omitempty"`
// Specify additional options by passing in an array.
// Each space-separated command-line option should be a new element of the
// array. See examples.
// Command-line options with multiple elements must use multiple lines in the
// array, one for each element.
// default: []
ExtraOpts *[]string `json:"extra_opts,omitempty"`
// Set to `true` to indicate the archived file is already on the remote system
// and not local to the Ansible controller.
// This option is mutually exclusive with `copy`.
// default: false
RemoteSrc *bool `json:"remote_src,omitempty"`
// This only applies if using a https URL as the source of the file.
// This should only set to `false` used on personally controlled sites using
// self-signed certificate.
// Prior to 2.2 the code worked as if this was set to `true`.
// default: true
ValidateCerts *bool `json:"validate_certs,omitempty"`
// This option controls the auto-decryption of source files using vault.
// default: true
Decrypt *bool `json:"decrypt,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
}
Parameters for the `unarchive` Ansible module.
func (UnarchiveParameters) ToRPCCall ¶
func (p UnarchiveParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `UnarchiveParameters into an `rpc.RPCCall`.
type UnarchiveReturn ¶
type UnarchiveReturn struct {
AnsibleCommonReturns
// Path to the destination directory.
Dest *string `json:"dest,omitempty"`
// List of all the files in the archive.
Files *[]any `json:"files,omitempty"`
// Numerical ID of the group that owns the destination directory.
Gid *int `json:"gid,omitempty"`
// Name of the group that owns the destination directory.
Group *string `json:"group,omitempty"`
// Archive software handler used to extract and decompress the archive.
Handler *string `json:"handler,omitempty"`
// String that represents the octal permissions of the destination directory.
Mode *string `json:"mode,omitempty"`
// Name of the user that owns the destination directory.
Owner *string `json:"owner,omitempty"`
// The size of destination directory in bytes. Does not include the size of
// files or subdirectories contained within.
Size *int `json:"size,omitempty"`
// The source archive's path.
// If `src` was a remote web URL, or from the local ansible controller, this
// shows the temporary location where the download was stored.
Src *string `json:"src,omitempty"`
// State of the destination. Effectively always "directory".
State *string `json:"state,omitempty"`
// Numerical ID of the user that owns the destination directory.
Uid *int `json:"uid,omitempty"`
}
Return values for the `unarchive` Ansible module.
func UnarchiveReturnFromRPCResult ¶
func UnarchiveReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (UnarchiveReturn, error)
Unwrap the `rpc.RPCResult` into an `UnarchiveReturn`
type UriBodyFormat ¶ added in v0.0.7
type UriBodyFormat string
The serialization format of the body. When set to `json`, `form-multipart`, or `form-urlencoded`, encodes the body argument, if needed, and automatically sets the `Content-Type` header accordingly. As of v2.3 it is possible to override the `Content-Type` header, when set to `json` or `form-urlencoded` via the `headers` option. The `Content-Type` header cannot be overridden when using `form-multipart`. `form-urlencoded` was added in v2.7. `form-multipart` was added in v2.10.
const ( UriBodyFormatFormUrlencoded UriBodyFormat = "form-urlencoded" UriBodyFormatJson UriBodyFormat = "json" UriBodyFormatRaw UriBodyFormat = "raw" UriBodyFormatFormMultipart UriBodyFormat = "form-multipart" )
func OptionalUriBodyFormat ¶ added in v0.0.7
func OptionalUriBodyFormat[T interface {
*UriBodyFormat | UriBodyFormat | *string | string
}](s T) *UriBodyFormat
Convert a supported type to an optional (pointer) UriBodyFormat
type UriFollowRedirects ¶ added in v0.0.7
type UriFollowRedirects string
Whether or not the URI module should follow redirects.
const ( // Will follow all redirects. UriFollowRedirectsAll UriFollowRedirects = "all" // Will not follow any redirects. UriFollowRedirectsNone UriFollowRedirects = "none" // Only redirects doing GET or HEAD requests will be followed. UriFollowRedirectsSafe UriFollowRedirects = "safe" // Defer to urllib2 behavior (As of writing this follows HTTP redirects). UriFollowRedirectsUrllib2 UriFollowRedirects = "urllib2" // (DEPRECATED, removed in 2.22) alias of `none`. UriFollowRedirectsNo UriFollowRedirects = "no" // (DEPRECATED, removed in 2.22) alias of `all`. UriFollowRedirectsYes UriFollowRedirects = "yes" )
func OptionalUriFollowRedirects ¶ added in v0.0.7
func OptionalUriFollowRedirects[T interface {
*UriFollowRedirects | UriFollowRedirects | *string | string
}](s T) *UriFollowRedirects
Convert a supported type to an optional (pointer) UriFollowRedirects
type UriParameters ¶
type UriParameters struct {
// SSL/TLS Ciphers to use for the request.
// When a list is provided, all ciphers are joined in order with `:`
// See the `OpenSSL Cipher List
// Format,https://www.openssl.org/docs/manmaster/man1/openssl-
// ciphers.html#CIPHER-LIST-FORMAT` for more details.
// The available ciphers is dependent on the Python and OpenSSL/LibreSSL
// versions.
Ciphers *[]string `json:"ciphers,omitempty"`
// Whether to attempt to decompress gzip content-encoded responses.
// default: true
Decompress *bool `json:"decompress,omitempty"`
// HTTP or HTTPS URL in the form (http|https)://host.domain[:port]/path.
Url string `json:"url"`
// A path of where to download the file to (if desired). If `dest` is a
// directory, the basename of the file on the remote server will be used.
Dest *string `json:"dest,omitempty"`
// A username for the module to use for Digest, Basic or WSSE authentication.
UrlUsername *string `json:"url_username,omitempty"`
// A password for the module to use for Digest, Basic or WSSE authentication.
UrlPassword *string `json:"url_password,omitempty"`
// The body of the http request/response to the web service. If `body_format`
// is set to `json` it will take an already formatted JSON string or convert a
// data structure into JSON.
// If `body_format` is set to `form-urlencoded` it will convert a dictionary or
// list of tuples into an `application/x-www-form-urlencoded` string. (Added in
// v2.7)
// If `body_format` is set to `form-multipart` it will convert a dictionary
// into `multipart/form-multipart` body. (Added in v2.10)
Body *any `json:"body,omitempty"`
// The serialization format of the body. When set to `json`, `form-multipart`,
// or `form-urlencoded`, encodes the body argument, if needed, and
// automatically sets the `Content-Type` header accordingly.
// As of v2.3 it is possible to override the `Content-Type` header, when set to
// `json` or `form-urlencoded` via the `headers` option.
// The `Content-Type` header cannot be overridden when using `form-multipart`.
// `form-urlencoded` was added in v2.7.
// `form-multipart` was added in v2.10.
// default: UriBodyFormatRaw
BodyFormat *UriBodyFormat `json:"body_format,omitempty"`
// The HTTP method of the request or response.
// In more recent versions we do not restrict the method at the module level
// anymore but it still must be a valid method accepted by the service handling
// the request.
// default: "GET"
Method *string `json:"method,omitempty"`
// Whether or not to return the body of the response as a "content" key in the
// dictionary result no matter it succeeded or failed.
// Independently of this option, if the reported `Content-Type` is
// `application/json`, then the JSON is always loaded into a key called
// R`ignore:json` in the dictionary results.
// default: false
ReturnContent *bool `json:"return_content,omitempty"`
// Force the sending of the Basic authentication header upon initial request.
// When this setting is `false`, this module will first try an unauthenticated
// request, and when the server replies with an `HTTP 401` error, it will
// submit the Basic authentication header.
// When this setting is `true`, this module will immediately send a Basic
// authentication header on the first request.
// Use this setting in any of the following scenarios:
// You know the webservice endpoint always requires HTTP Basic authentication,
// and you want to speed up your requests by eliminating the first roundtrip.
// The web service does not properly send an HTTP 401 error to your client, so
// Ansible's HTTP library will not properly respond with HTTP credentials, and
// logins will fail.
// The webservice bans or rate-limits clients that cause any HTTP 401 errors.
// default: false
ForceBasicAuth *bool `json:"force_basic_auth,omitempty"`
// Whether or not the URI module should follow redirects.
// default: UriFollowRedirectsSafe
FollowRedirects *UriFollowRedirects `json:"follow_redirects,omitempty"`
// A filename, when it already exists, this step will not be run.
Creates *string `json:"creates,omitempty"`
// A filename, when it does not exist, this step will not be run.
Removes *string `json:"removes,omitempty"`
// A list of valid, numeric, HTTP status codes that signifies success of the
// request.
// default: [200]
StatusCode *[]int `json:"status_code,omitempty"`
// The socket level timeout in seconds
// default: 30
Timeout *int `json:"timeout,omitempty"`
// Add custom HTTP headers to a request in the format of a YAML hash. As of
// Ansible 2.3 supplying `Content-Type` here will override the header generated
// by supplying `json` or `form-urlencoded` for `body_format`.
// default: {}
Headers *map[string]any `json:"headers,omitempty"`
// If `false`, SSL certificates will not be validated.
// This should only set to `false` used on personally controlled sites using
// self-signed certificates.
// Prior to 1.9.2 the code defaulted to `false`.
// default: true
ValidateCerts *bool `json:"validate_certs,omitempty"`
// PEM formatted certificate chain file to be used for SSL client
// authentication.
// This file can also include the key as well, and if the key is included,
// `client_key` is not required.
ClientCert *string `json:"client_cert,omitempty"`
// PEM formatted file that contains your private key to be used for SSL client
// authentication.
// If `client_cert` contains both the certificate and key, this option is not
// required.
ClientKey *string `json:"client_key,omitempty"`
// PEM formatted file that contains a CA certificate to be used for validation.
CaPath *string `json:"ca_path,omitempty"`
// Path to file to be submitted to the remote server.
// Cannot be used with `body`.
// Should be used with `force_basic_auth` to ensure success when the remote end
// sends a 401.
Src *string `json:"src,omitempty"`
// If `false`, the module will search for the `src` on the controller node.
// If `true`, the module will search for the `src` on the managed (remote)
// node.
// default: false
RemoteSrc *bool `json:"remote_src,omitempty"`
// If `true` do not get a cached copy.
// default: false
Force *bool `json:"force,omitempty"`
// If `false`, it will not use a proxy, even if one is defined in an
// environment variable on the target hosts.
// default: true
UseProxy *bool `json:"use_proxy,omitempty"`
// Path to Unix domain socket to use for connection.
UnixSocket *string `json:"unix_socket,omitempty"`
// Header to identify as, generally appears in web server logs.
// default: "ansible-httpget"
HttpAgent *string `json:"http_agent,omitempty"`
// A list of header names that will not be sent on subsequent redirected
// requests. This list is case insensitive. By default all headers will be
// redirected. In some cases it may be beneficial to list headers such as
// `Authorization` here to avoid potential credential exposure.
// default: []
UnredirectedHeaders *[]string `json:"unredirected_headers,omitempty"`
// Use GSSAPI to perform the authentication, typically this is for Kerberos or
// Kerberos through Negotiate authentication.
// Requires the Python library `gssapi,https://github.com/pythongssapi/python-
// gssapi` to be installed.
// Credentials for GSSAPI can be specified with `url_username`/`url_password`
// or with the GSSAPI env var `KRB5CCNAME` that specified a custom Kerberos
// credential cache.
// NTLM authentication is `not` supported even if the GSSAPI mech for NTLM has
// been installed.
// default: false
UseGssapi *bool `json:"use_gssapi,omitempty"`
// Determining whether to use credentials from `~/.netrc` file.
// By default `.netrc` is used with Basic authentication headers.
// When `false`, `.netrc` credentials are ignored.
// default: true
UseNetrc *bool `json:"use_netrc,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
}
Parameters for the `uri` Ansible module.
func (UriParameters) ToRPCCall ¶
func (p UriParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `UriParameters into an `rpc.RPCCall`.
type UriReturn ¶
type UriReturn struct {
AnsibleCommonReturns
// The response body content.
Content *string `json:"content,omitempty"`
// The cookie values placed in cookie jar.
Cookies *map[string]any `json:"cookies,omitempty"`
// The value for future request Cookie headers.
CookiesString *string `json:"cookies_string,omitempty"`
// The number of seconds that elapsed while performing the download.
Elapsed *int `json:"elapsed,omitempty"`
// The HTTP message from the request.
Msg *string `json:"msg,omitempty"`
// destination file/path
Path *string `json:"path,omitempty"`
// Whether the request was redirected.
Redirected *bool `json:"redirected,omitempty"`
// The HTTP status code from the request.
Status *int `json:"status,omitempty"`
// The actual URL used for the request.
Url *string `json:"url,omitempty"`
}
Return values for the `uri` Ansible module.
func UriReturnFromRPCResult ¶
Unwrap the `rpc.RPCResult` into an `UriReturn`
type UrpmiParameters ¶ added in v0.0.7
type UrpmiParameters struct {
// A list of package names to install, upgrade or remove.
Name []string `json:"name"`
// Indicates the desired package state.
// default: UrpmiStatePresent
State *UrpmiState `json:"state,omitempty"`
// Update the package database first `urpmi.update -a`.
// default: false
UpdateCache *bool `json:"update_cache,omitempty"`
// Corresponds to the `--no-recommends` option for `urpmi`.
// default: true
NoRecommends *bool `json:"no_recommends,omitempty"`
// Assume "yes" is the answer to any question urpmi has to ask. Corresponds to
// the `--force` option for `urpmi`.
// default: true
Force *bool `json:"force,omitempty"`
// Specifies an alternative install root, relative to which all packages are
// installed. Corresponds to the `--root` option for `urpmi`.
Root *string `json:"root,omitempty"`
}
Parameters for the `urpmi` Ansible module.
func (UrpmiParameters) ToRPCCall ¶ added in v0.0.7
func (p UrpmiParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `UrpmiParameters into an `rpc.RPCCall`.
type UrpmiReturn ¶ added in v0.0.7
type UrpmiReturn struct {
AnsibleCommonReturns
}
Return values for the `urpmi` Ansible module.
func UrpmiReturnFromRPCResult ¶ added in v0.0.7
func UrpmiReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (UrpmiReturn, error)
Unwrap the `rpc.RPCResult` into an `UrpmiReturn`
type UrpmiState ¶ added in v0.0.7
type UrpmiState string
Indicates the desired package state.
const ( UrpmiStateAbsent UrpmiState = "absent" UrpmiStatePresent UrpmiState = "present" UrpmiStateInstalled UrpmiState = "installed" UrpmiStateRemoved UrpmiState = "removed" )
func OptionalUrpmiState ¶ added in v0.0.7
func OptionalUrpmiState[T interface {
*UrpmiState | UrpmiState | *string | string
}](s T) *UrpmiState
Convert a supported type to an optional (pointer) UrpmiState
type UsbFactsParameters ¶ added in v0.0.7
type UsbFactsParameters struct {
}
Parameters for the `usb_facts` Ansible module.
func (UsbFactsParameters) ToRPCCall ¶ added in v0.0.7
func (p UsbFactsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `UsbFactsParameters into an `rpc.RPCCall`.
type UsbFactsReturn ¶ added in v0.0.7
type UsbFactsReturn struct {
AnsibleCommonReturns
// Dictionary containing details of connected USB devices.
AnsibleFacts *map[string]any `json:"ansible_facts,omitempty"`
}
Return values for the `usb_facts` Ansible module.
func UsbFactsReturnFromRPCResult ¶ added in v0.0.7
func UsbFactsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (UsbFactsReturn, error)
Unwrap the `rpc.RPCResult` into an `UsbFactsReturn`
type UserParameters ¶
type UserParameters struct {
// Name of the user to create, remove or modify.
Name string `json:"name"`
// Optionally sets the `UID` of the user.
Uid *int `json:"uid,omitempty"`
// Optionally sets the description (aka `GECOS`) of user account.
// On macOS, this defaults to the `name` option.
Comment *string `json:"comment,omitempty"`
// macOS only, optionally hide the user from the login window and system
// preferences.
// The default will be `true` if the `system` option is used.
Hidden *bool `json:"hidden,omitempty"`
// Optionally when used with the `-u` option, this option allows to change the
// user ID to a non-unique value.
// default: false
NonUnique *bool `json:"non_unique,omitempty"`
// Optionally sets the `seuser` type `user_u` on SELinux enabled systems.
Seuser *string `json:"seuser,omitempty"`
// Optionally sets the user's primary group (takes a group name).
// On macOS, this defaults to `staff`.
Group *string `json:"group,omitempty"`
// A list of supplementary groups which the user is also a member of.
// By default, the user is removed from all other groups. Configure `append` to
// modify this.
// When set to an empty string `”`, the user is removed from all groups except
// the primary group.
// Before Ansible 2.3, the only input format allowed was a comma separated
// string.
Groups *[]string `json:"groups,omitempty"`
// If `true`, add the user to the groups specified in `groups`.
// If `false`, user will only be added to the groups specified in `groups`,
// removing them from all other groups.
// default: false
Append *bool `json:"append,omitempty"`
// Optionally set the user's shell.
// On macOS, before Ansible 2.5, the default shell for non-system users was
// `/usr/bin/false`. Since Ansible 2.5, the default shell for non-system users
// on macOS is `/bin/bash`.
// On other operating systems, the default shell is determined by the
// underlying tool invoked by this module. See Notes for a per platform list of
// invoked tools.
// From Ansible 2.18, the type is changed to `path` from `str`.
Shell *string `json:"shell,omitempty"`
// Optionally set the user's home directory.
Home *string `json:"home,omitempty"`
// Optionally set a home skeleton directory.
// Requires `create_home` option!
Skeleton *string `json:"skeleton,omitempty"`
// If provided, set the user's password to the provided encrypted hash (Linux)
// or plain text password (macOS).
// `Linux/Unix/POSIX:` Enter the hashed password as the value.
// See `FAQ entry,https://docs.ansible.com/ansible/latest/reference_appendices/
// faq.html#how-do-i-generate-encrypted-passwords-for-the-user-module` for
// details on various ways to generate the hash of a password.
// To create an account with a locked/disabled password on Linux systems, set
// this to `'!'` or `'*'`.
// To create an account with a locked/disabled password on OpenBSD, set this to
// `'*************'`.
// `OS X/macOS:` Enter the cleartext password as the value. Be sure to take
// relevant security precautions.
// On macOS, the password specified in the `password` option will always be
// set, regardless of whether the user account already exists or not.
// When the password is passed as an argument, the `ansible.builtin.user`
// module will always return changed to `true` for macOS systems. Since macOS
// no longer provides access to the hashed passwords directly.
Password *string `json:"password,omitempty"`
// Whether the account should exist or not, taking action if the state is
// different from what is stated.
// See this `FAQ entry,https://docs.ansible.com/ansible/latest/reference_append
// ices/faq.html#running-on-macos-as-a-target` for additional requirements when
// removing users on macOS systems.
// default: UserStatePresent
State *UserState `json:"state,omitempty"`
// Unless set to `false`, a home directory will be made for the user when the
// account is created or if the home directory does not exist.
// Changed from `createhome` to `create_home` in Ansible 2.5.
// default: true
CreateHome *bool `json:"create_home,omitempty"`
// If set to `true` when used with `home`, attempt to move the user's old home
// directory to the specified directory if it isn't there already and the old
// home exists.
// default: false
MoveHome *bool `json:"move_home,omitempty"`
// When creating an account `state=present`, setting this to `true` makes the
// user a system account.
// This setting cannot be changed on existing users.
// default: false
System *bool `json:"system,omitempty"`
// This only affects `state=absent`, it forces removal of the user and
// associated directories on supported platforms.
// The behavior is the same as `userdel --force`, check the man page for
// `userdel` on your system for details and support.
// When used with `generate_ssh_key=yes` this forces an existing key to be
// overwritten.
// default: false
Force *bool `json:"force,omitempty"`
// This only affects `state=absent`, it attempts to remove directories
// associated with the user.
// The behavior is the same as `userdel --remove`, check the man page for
// details and support.
// default: false
Remove *bool `json:"remove,omitempty"`
// Optionally sets the user's login class, a feature of most BSD OSs.
LoginClass *string `json:"login_class,omitempty"`
// Whether to generate a SSH key for the user in question.
// This will `not` overwrite an existing SSH key unless used with `force=yes`.
// default: false
GenerateSshKey *bool `json:"generate_ssh_key,omitempty"`
// Optionally specify number of bits in SSH key to create.
// The default value depends on `ssh-keygen`.
SshKeyBits *int `json:"ssh_key_bits,omitempty"`
// Optionally specify the type of SSH key to generate.
// Available SSH key types will depend on implementation present on target
// host.
// default: "rsa"
SshKeyType *string `json:"ssh_key_type,omitempty"`
// Optionally specify the SSH key filename.
// If this is a relative filename then it will be relative to the user's home
// directory.
// This parameter defaults to `.ssh/id_rsa`.
SshKeyFile *string `json:"ssh_key_file,omitempty"`
// Optionally define the comment for the SSH key.
// default: "ansible-generated on $HOSTNAME"
SshKeyComment *string `json:"ssh_key_comment,omitempty"`
// Set a passphrase for the SSH key.
// If no passphrase is provided, the SSH key will default to having no
// passphrase.
SshKeyPassphrase *string `json:"ssh_key_passphrase,omitempty"`
// `always` will update passwords if they differ.
// `on_create` will only set the password for newly created users.
// default: UserUpdatePasswordAlways
UpdatePassword *UserUpdatePassword `json:"update_password,omitempty"`
// An expiry time for the user in epoch, it will be ignored on platforms that
// do not support this.
// Currently supported on GNU/Linux, FreeBSD, and DragonFlyBSD.
// Since Ansible 2.6 you can remove the expiry time by specifying a negative
// value. Currently supported on GNU/Linux and FreeBSD.
Expires *float64 `json:"expires,omitempty"`
// Lock the password (`usermod -L`, `usermod -U`, `pw lock`).
// Implementation differs by platform. This option does not always mean the
// user cannot login using other methods.
// This option does not disable the user, only lock the password.
// This must be set to `false` in order to unlock a currently locked password.
// The absence of this parameter will not unlock a password.
// Currently supported on Linux, FreeBSD, DragonFlyBSD, NetBSD, OpenBSD.
PasswordLock *bool `json:"password_lock,omitempty"`
// Forces the use of "local" command alternatives on platforms that implement
// it.
// This is useful in environments that use centralized authentication when you
// want to manipulate the local users (in other words, it uses `luseradd`
// instead of `useradd`).
// This will check `/etc/passwd` for an existing account before invoking
// commands. If the local account database exists somewhere other than
// `/etc/passwd`, this setting will not work properly.
// This requires that the above commands as well as `/etc/passwd` must exist on
// the target host, otherwise it will be a fatal error.
// default: false
Local *bool `json:"local,omitempty"`
// Sets the profile of the user.
// Can set multiple profiles using comma separation.
// To delete all the profiles, use `profile=”`.
// Currently supported on Illumos/Solaris. Does nothing when used with other
// platforms.
Profile *string `json:"profile,omitempty"`
// Sets the authorization of the user.
// Can set multiple authorizations using comma separation.
// To delete all authorizations, use `authorization=”`.
// Currently supported on Illumos/Solaris. Does nothing when used with other
// platforms.
Authorization *string `json:"authorization,omitempty"`
// Sets the role of the user.
// Can set multiple roles using comma separation.
// To delete all roles, use `role=”`.
// Currently supported on Illumos/Solaris. Does nothing when used with other
// platforms.
Role *string `json:"role,omitempty"`
// Maximum number of days between password change.
// Supported on Linux only.
PasswordExpireMax *int `json:"password_expire_max,omitempty"`
// Minimum number of days between password change.
// Supported on Linux only.
PasswordExpireMin *int `json:"password_expire_min,omitempty"`
// Number of days of warning before password expires.
// Supported on Linux only.
PasswordExpireWarn *int `json:"password_expire_warn,omitempty"`
// Sets the umask of the user.
// Currently supported on Linux. Does nothing when used with other platforms.
// Requires `local` is omitted or `false`.
Umask *string `json:"umask,omitempty"`
// Number of days after a password expires until the account is disabled.
// Currently supported on AIX, Linux, NetBSD, OpenBSD.
PasswordExpireAccountDisable *int `json:"password_expire_account_disable,omitempty"`
// Sets the UID_MIN value for user creation.
// Overwrites /etc/login.defs default value.
// Currently supported on Linux. Does nothing when used with other platforms.
// Requires `local` is omitted or `False`.
UidMin *int `json:"uid_min,omitempty"`
// Sets the UID_MAX value for user creation.
// Overwrites /etc/login.defs default value.
// Currently supported on Linux. Does nothing when used with other platforms.
// Requires `local` is omitted or `False`.
UidMax *int `json:"uid_max,omitempty"`
}
Parameters for the `user` Ansible module.
func (UserParameters) ToRPCCall ¶
func (p UserParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `UserParameters into an `rpc.RPCCall`.
type UserReturn ¶
type UserReturn struct {
AnsibleCommonReturns
// Whether or not to append the user to groups.
Append *bool `json:"append,omitempty"`
// Comment section from passwd file, usually the user name.
Comment *string `json:"comment,omitempty"`
// Whether or not to create the home directory.
CreateHome *bool `json:"create_home,omitempty"`
// Whether or not a user account was forcibly deleted.
Force *bool `json:"force,omitempty"`
// Primary user group ID
Group *int `json:"group,omitempty"`
// List of groups of which the user is a member.
Groups *string `json:"groups,omitempty"`
// Path to user's home directory.
Home *string `json:"home,omitempty"`
// Whether or not to move an existing home directory.
MoveHome *bool `json:"move_home,omitempty"`
// User account name.
Name *string `json:"name,omitempty"`
// Masked value of the password.
Password *string `json:"password,omitempty"`
// Whether or not to remove the user account.
Remove *bool `json:"remove,omitempty"`
// User login shell.
Shell *string `json:"shell,omitempty"`
// Fingerprint of generated SSH key.
SshFingerprint *string `json:"ssh_fingerprint,omitempty"`
// Path to generated SSH private key file.
SshKeyFile *string `json:"ssh_key_file,omitempty"`
// Generated SSH public key file.
SshPublicKey *string `json:"ssh_public_key,omitempty"`
// Standard error from running commands.
Stderr *string `json:"stderr,omitempty"`
// Standard output from running commands.
Stdout *string `json:"stdout,omitempty"`
// Whether or not the account is a system account.
System *bool `json:"system,omitempty"`
// User ID of the user account.
Uid *int `json:"uid,omitempty"`
}
Return values for the `user` Ansible module.
func UserReturnFromRPCResult ¶
func UserReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (UserReturn, error)
Unwrap the `rpc.RPCResult` into an `UserReturn`
type UserState ¶ added in v0.0.7
type UserState string
Whether the account should exist or not, taking action if the state is different from what is stated. See this `FAQ entry,https://docs.ansible.com/ansible/latest/reference_appendi ces/faq.html#running-on-macos-as-a-target` for additional requirements when removing users on macOS systems.
type UserUpdatePassword ¶ added in v0.0.7
type UserUpdatePassword string
`always` will update passwords if they differ. `on_create` will only set the password for newly created users.
const ( UserUpdatePasswordAlways UserUpdatePassword = "always" UserUpdatePasswordOnCreate UserUpdatePassword = "on_create" )
func OptionalUserUpdatePassword ¶ added in v0.0.7
func OptionalUserUpdatePassword[T interface {
*UserUpdatePassword | UserUpdatePassword | *string | string
}](s T) *UserUpdatePassword
Convert a supported type to an optional (pointer) UserUpdatePassword
type VdoCompression ¶ added in v0.0.7
type VdoCompression string
Configures whether compression is enabled. The default for a created volume is `enabled`. Existing volumes maintain their previously configured setting unless a different value is specified in the playbook.
const ( VdoCompressionDisabled VdoCompression = "disabled" VdoCompressionEnabled VdoCompression = "enabled" )
func OptionalVdoCompression ¶ added in v0.0.7
func OptionalVdoCompression[T interface {
*VdoCompression | VdoCompression | *string | string
}](s T) *VdoCompression
Convert a supported type to an optional (pointer) VdoCompression
type VdoDeduplication ¶ added in v0.0.7
type VdoDeduplication string
Configures whether deduplication is enabled. The default for a created volume is `enabled`. Existing volumes maintain their previously configured setting unless a different value is specified in the playbook.
const ( VdoDeduplicationDisabled VdoDeduplication = "disabled" VdoDeduplicationEnabled VdoDeduplication = "enabled" )
func OptionalVdoDeduplication ¶ added in v0.0.7
func OptionalVdoDeduplication[T interface {
*VdoDeduplication | VdoDeduplication | *string | string
}](s T) *VdoDeduplication
Convert a supported type to an optional (pointer) VdoDeduplication
type VdoIndexmode ¶ added in v0.0.7
type VdoIndexmode string
Specifies the index mode of the Albireo index. The default is `dense`, which has a deduplication window of 1 GB of index memory per 1 TB of incoming data, requiring 10 GB of index data on persistent storage. The `sparse` mode has a deduplication window of 1 GB of index memory per 10 TB of incoming data, but requires 100 GB of index data on persistent storage. This option is only available when creating a new volume, and cannot be changed for an existing volume.
const ( VdoIndexmodeDense VdoIndexmode = "dense" VdoIndexmodeSparse VdoIndexmode = "sparse" )
func OptionalVdoIndexmode ¶ added in v0.0.7
func OptionalVdoIndexmode[T interface {
*VdoIndexmode | VdoIndexmode | *string | string
}](s T) *VdoIndexmode
Convert a supported type to an optional (pointer) VdoIndexmode
type VdoParameters ¶ added in v0.0.7
type VdoParameters struct {
// The name of the VDO volume.
Name string `json:"name"`
// Whether this VDO volume should be `present` or `absent`. If a `present` VDO
// volume does not exist, it is created. If a `present` VDO volume already
// exists, it is modified by updating the configuration, which takes effect
// when the VDO volume is restarted. Not all parameters of an existing VDO
// volume can be modified; the `statusparamkeys` list in the code contains the
// parameters that can be modified after creation. If an `absent` VDO volume
// does not exist, it is not removed.
// default: VdoStatePresent
State *VdoState `json:"state,omitempty"`
// The `activate` status for a VDO volume. If this is set to `false`, the VDO
// volume cannot be started, and it will not start on system startup. However,
// on initial creation, a VDO volume with "activated" set to "off" will be
// running, until stopped. This is the default behavior of the `vdo create`
// command; it provides the user an opportunity to write a base amount of
// metadata (filesystem, LVM headers, and so on) to the VDO volume prior to
// stopping the volume, and leaving it deactivated until ready to use.
Activated *bool `json:"activated,omitempty"`
// Whether this VDO volume is running.
// A VDO volume must be activated in order to be started.
Running *bool `json:"running,omitempty"`
// The full path of the device to use for VDO storage.
// This is required if `state=present`.
Device *string `json:"device,omitempty"`
// The logical size of the VDO volume (in megabytes, or LVM suffix format). If
// not specified for a new volume, this defaults to the same size as the
// underlying storage device, which is specified in the `device` parameter.
// Existing volumes maintain their size if the `logicalsize` parameter is not
// specified, or is smaller than or identical to the current size. If the
// specified size is larger than the current size, a `growlogical` operation is
// performed.
Logicalsize *string `json:"logicalsize,omitempty"`
// Configures whether deduplication is enabled. The default for a created
// volume is `enabled`. Existing volumes maintain their previously configured
// setting unless a different value is specified in the playbook.
Deduplication *VdoDeduplication `json:"deduplication,omitempty"`
// Configures whether compression is enabled. The default for a created volume
// is `enabled`. Existing volumes maintain their previously configured setting
// unless a different value is specified in the playbook.
Compression *VdoCompression `json:"compression,omitempty"`
// The amount of memory allocated for caching block map pages, in megabytes (or
// may be issued with an LVM-style suffix of K, M, G, or T). The default (and
// minimum) value is `128M`. The value specifies the size of the cache; there
// is a 15% memory usage overhead. Each 1.25G of block map covers 1T of logical
// blocks, therefore a small amount of block map cache memory can cache a
// significantly large amount of block map data.
// Existing volumes maintain their previously configured setting unless a
// different value is specified in the playbook.
Blockmapcachesize *string `json:"blockmapcachesize,omitempty"`
// Enables or disables the read cache. The default is `disabled`. Choosing
// `enabled` enables a read cache which may improve performance for workloads
// of high deduplication, read workloads with a high level of compression, or
// on hard disk storage. Existing volumes maintain their previously configured
// setting unless a different value is specified in the playbook.
// The read cache feature is available in VDO 6.1 and older.
Readcache *VdoReadcache `json:"readcache,omitempty"`
// Specifies the extra VDO device read cache size in megabytes. This is in
// addition to a system-defined minimum. Using a value with a suffix of K, M,
// G, or T is optional. The default value is `0`. 1.125 MB of memory per bio
// thread is used per 1 MB of read cache specified (for example, a VDO volume
// configured with 4 bio threads has a read cache memory usage overhead of 4.5
// MB per 1 MB of read cache specified). Existing volumes maintain their
// previously configured setting unless a different value is specified in the
// playbook.
// The read cache feature is available in VDO 6.1 and older.
Readcachesize *string `json:"readcachesize,omitempty"`
// Enables 512-byte emulation mode, allowing drivers or filesystems to access
// the VDO volume at 512-byte granularity, instead of the default 4096-byte
// granularity.
// Only recommended when a driver or filesystem requires 512-byte sector level
// access to a device.
// This option is only available when creating a new volume, and cannot be
// changed for an existing volume.
// default: false
Emulate512 *bool `json:"emulate512,omitempty"`
// Specifies whether to attempt to execute a `growphysical` operation, if there
// is enough unused space on the device. A `growphysical` operation is executed
// if there is at least 64 GB of free space, relative to the previous physical
// size of the affected VDO volume.
// default: false
Growphysical *bool `json:"growphysical,omitempty"`
// The size of the increment by which the physical size of a VDO volume is
// grown, in megabytes (or may be issued with an LVM-style suffix of K, M, G,
// or T). Must be a power of two between 128M and 32G. The default is `2G`,
// which supports volumes having a physical size up to 16T. The maximum, `32G`,
// supports a physical size of up to 256T. This option is only available when
// creating a new volume, and cannot be changed for an existing volume.
Slabsize *string `json:"slabsize,omitempty"`
// Specifies the write policy of the VDO volume.
// The `sync` mode acknowledges writes only after data is on stable storage.
// The `async` mode acknowledges writes when data has been cached for writing
// to stable storage.
// The default (and highly recommended) `auto` mode checks the storage device
// to determine whether it supports flushes. Devices that support flushes
// result in a VDO volume in `async` mode, while devices that do not support
// flushes run in `sync` mode.
// Existing volumes maintain their previously configured setting unless a
// different value is specified in the playbook.
Writepolicy *VdoWritepolicy `json:"writepolicy,omitempty"`
// Specifies the amount of index memory in gigabytes. The default is `0.25`.
// The special decimal values `0.25`, `0.5`, and `0.75` can be used, as can any
// positive integer. This option is only available when creating a new volume,
// and cannot be changed for an existing volume.
Indexmem *string `json:"indexmem,omitempty"`
// Specifies the index mode of the Albireo index.
// The default is `dense`, which has a deduplication window of 1 GB of index
// memory per 1 TB of incoming data, requiring 10 GB of index data on
// persistent storage.
// The `sparse` mode has a deduplication window of 1 GB of index memory per 10
// TB of incoming data, but requires 100 GB of index data on persistent
// storage.
// This option is only available when creating a new volume, and cannot be
// changed for an existing volume.
Indexmode *VdoIndexmode `json:"indexmode,omitempty"`
// Specifies the number of threads to use for acknowledging completion of
// requested VDO I/O operations. Valid values are integer values from `1` to
// `100` (lower numbers are preferable due to overhead). The default is `1`.
// Existing volumes maintain their previously configured setting unless a
// different value is specified in the playbook.
Ackthreads *string `json:"ackthreads,omitempty"`
// Specifies the number of threads to use for submitting I/O operations to the
// storage device. Valid values are integer values from `1` to `100` (lower
// numbers are preferable due to overhead). The default is `4`. Existing
// volumes maintain their previously configured setting unless a different
// value is specified in the playbook.
Biothreads *string `json:"biothreads,omitempty"`
// Specifies the number of threads to use for CPU-intensive work such as
// hashing or compression. Valid values are integer values from `1` to `100`
// (lower numbers are preferable due to overhead). The default is `2`. Existing
// volumes maintain their previously configured setting unless a different
// value is specified in the playbook.
Cputhreads *string `json:"cputhreads,omitempty"`
// Specifies the number of threads across which to subdivide parts of the VDO
// processing based on logical block addresses. Valid values are integer values
// from `1` to `100` (lower numbers are preferable due to overhead). The
// default is `1`. Existing volumes maintain their previously configured
// setting unless a different value is specified in the playbook.
Logicalthreads *string `json:"logicalthreads,omitempty"`
// Specifies the number of threads across which to subdivide parts of the VDO
// processing based on physical block addresses. Valid values are integer
// values from `1` to `16` (lower numbers are preferable due to overhead). The
// physical space used by the VDO volume must be larger than (`slabsize` *
// `physicalthreads`). The default is `1`. Existing volumes maintain their
// previously configured setting unless a different value is specified in the
// playbook.
Physicalthreads *string `json:"physicalthreads,omitempty"`
// When creating a volume, ignores any existing file system or VDO signature
// already present in the storage device. When stopping or removing a VDO
// volume, first unmounts the file system stored on the device if mounted.
// `Warning:` Since this parameter removes all safety checks it is important to
// make sure that all parameters provided are accurate and intentional.
// default: false
Force *bool `json:"force,omitempty"`
}
Parameters for the `vdo` Ansible module.
func (VdoParameters) ToRPCCall ¶ added in v0.0.7
func (p VdoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `VdoParameters into an `rpc.RPCCall`.
type VdoReadcache ¶ added in v0.0.7
type VdoReadcache string
Enables or disables the read cache. The default is `disabled`. Choosing `enabled` enables a read cache which may improve performance for workloads of high deduplication, read workloads with a high level of compression, or on hard disk storage. Existing volumes maintain their previously configured setting unless a different value is specified in the playbook. The read cache feature is available in VDO 6.1 and older.
const ( VdoReadcacheDisabled VdoReadcache = "disabled" VdoReadcacheEnabled VdoReadcache = "enabled" )
func OptionalVdoReadcache ¶ added in v0.0.7
func OptionalVdoReadcache[T interface {
*VdoReadcache | VdoReadcache | *string | string
}](s T) *VdoReadcache
Convert a supported type to an optional (pointer) VdoReadcache
type VdoReturn ¶ added in v0.0.7
type VdoReturn struct {
AnsibleCommonReturns
}
Return values for the `vdo` Ansible module.
func VdoReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `VdoReturn`
type VdoState ¶ added in v0.0.7
type VdoState string
Whether this VDO volume should be `present` or `absent`. If a `present` VDO volume does not exist, it is created. If a `present` VDO volume already exists, it is modified by updating the configuration, which takes effect when the VDO volume is restarted. Not all parameters of an existing VDO volume can be modified; the `statusparamkeys` list in the code contains the parameters that can be modified after creation. If an `absent` VDO volume does not exist, it is not removed.
type VdoWritepolicy ¶ added in v0.0.7
type VdoWritepolicy string
Specifies the write policy of the VDO volume. The `sync` mode acknowledges writes only after data is on stable storage. The `async` mode acknowledges writes when data has been cached for writing to stable storage. The default (and highly recommended) `auto` mode checks the storage device to determine whether it supports flushes. Devices that support flushes result in a VDO volume in `async` mode, while devices that do not support flushes run in `sync` mode. Existing volumes maintain their previously configured setting unless a different value is specified in the playbook.
const ( VdoWritepolicyAsync VdoWritepolicy = "async" VdoWritepolicyAuto VdoWritepolicy = "auto" VdoWritepolicySync VdoWritepolicy = "sync" )
func OptionalVdoWritepolicy ¶ added in v0.0.7
func OptionalVdoWritepolicy[T interface {
*VdoWritepolicy | VdoWritepolicy | *string | string
}](s T) *VdoWritepolicy
Convert a supported type to an optional (pointer) VdoWritepolicy
type WaitForParameters ¶
type WaitForParameters struct {
// A resolvable hostname or IP address to wait for.
// default: "127.0.0.1"
Host *string `json:"host,omitempty"`
// Maximum number of seconds to wait for, when used with another condition it
// will force an error.
// When used without other conditions it is equivalent of just sleeping.
// default: 300
Timeout *int `json:"timeout,omitempty"`
// Maximum number of seconds to wait for a connection to happen before closing
// and retrying.
// default: 5
ConnectTimeout *int `json:"connect_timeout,omitempty"`
// Number of seconds to wait before starting to poll.
// default: 0
Delay *int `json:"delay,omitempty"`
// Port number to poll.
// `path` and `port` are mutually exclusive parameters.
Port *int `json:"port,omitempty"`
// The list of TCP connection states which are counted as active connections.
// default: ["ESTABLISHED", "FIN_WAIT1", "FIN_WAIT2", "SYN_RECV", "SYN_SENT",
// "TIME_WAIT"]
ActiveConnectionStates *[]string `json:"active_connection_states,omitempty"`
// Either `present`, `started`, or `stopped`, `absent`, or `drained`.
// When checking a port `started` will ensure the port is open, `stopped` will
// check that it is closed, `drained` will check for active connections.
// When checking for a file or a search string `present` or `started` will
// ensure that the file or string is present before continuing, `absent` will
// check that file is absent or removed.
// default: WaitForStateStarted
State *WaitForState `json:"state,omitempty"`
// Path to a file on the filesystem that must exist before continuing.
// `path` and `port` are mutually exclusive parameters.
Path *string `json:"path,omitempty"`
// Can be used to match a string in either a file or a socket connection.
// Defaults to a multiline regex.
SearchRegex *string `json:"search_regex,omitempty"`
// List of hosts or IPs to ignore when looking for active TCP connections for
// `drained` state.
ExcludeHosts *[]string `json:"exclude_hosts,omitempty"`
// Number of seconds to sleep between checks.
// Before Ansible 2.3 this was hardcoded to 1 second.
// default: 1
Sleep *int `json:"sleep,omitempty"`
// This overrides the normal error message from a failure to meet the required
// conditions.
Msg *string `json:"msg,omitempty"`
}
Parameters for the `wait_for` Ansible module.
func (WaitForParameters) ToRPCCall ¶
func (p WaitForParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `WaitForParameters into an `rpc.RPCCall`.
type WaitForReturn ¶
type WaitForReturn struct {
AnsibleCommonReturns
// The number of seconds that elapsed while waiting
Elapsed *int `json:"elapsed,omitempty"`
// Tuple containing all the subgroups of the match as returned by
// `https://docs.python.org/3/library/re.html#re.MatchObject.groups`
MatchGroups *[]any `json:"match_groups,omitempty"`
// Dictionary containing all the named subgroups of the match, keyed by the
// subgroup name, as returned by
// `https://docs.python.org/3/library/re.html#re.MatchObject.groupdict`
MatchGroupdict *map[string]any `json:"match_groupdict,omitempty"`
}
Return values for the `wait_for` Ansible module.
func WaitForReturnFromRPCResult ¶
func WaitForReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (WaitForReturn, error)
Unwrap the `rpc.RPCResult` into an `WaitForReturn`
type WaitForState ¶ added in v0.0.7
type WaitForState string
Either `present`, `started`, or `stopped`, `absent`, or `drained`. When checking a port `started` will ensure the port is open, `stopped` will check that it is closed, `drained` will check for active connections. When checking for a file or a search string `present` or `started` will ensure that the file or string is present before continuing, `absent` will check that file is absent or removed.
const ( WaitForStateAbsent WaitForState = "absent" WaitForStateDrained WaitForState = "drained" WaitForStatePresent WaitForState = "present" WaitForStateStarted WaitForState = "started" WaitForStateStopped WaitForState = "stopped" )
func OptionalWaitForState ¶ added in v0.0.7
func OptionalWaitForState[T interface {
*WaitForState | WaitForState | *string | string
}](s T) *WaitForState
Convert a supported type to an optional (pointer) WaitForState
type XattrParameters ¶ added in v0.0.7
type XattrParameters struct {
// The full path of the file/object to get the facts of.
Path string `json:"path"`
// Namespace of the named name/key.
// default: "user"
Namespace *string `json:"namespace,omitempty"`
// The name of a specific Extended attribute key to set/retrieve.
Key *string `json:"key,omitempty"`
// The value to set the named name/key to, it automatically sets the `state` to
// `present`.
Value *string `json:"value,omitempty"`
// Defines which state you want to do.
// `read` retrieves the current value for a `key`.
// `present` sets `path` to `value`, default if value is set.
// `all` dumps all data.
// `keys` retrieves all keys.
// `absent` deletes the key.
// default: XattrStateRead
State *XattrState `json:"state,omitempty"`
// If `true`, dereferences symlinks and sets/gets attributes on symlink target,
// otherwise acts on symlink itself.
// default: true
Follow *bool `json:"follow,omitempty"`
}
Parameters for the `xattr` Ansible module.
func (XattrParameters) ToRPCCall ¶ added in v0.0.7
func (p XattrParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `XattrParameters into an `rpc.RPCCall`.
type XattrReturn ¶ added in v0.0.7
type XattrReturn struct {
AnsibleCommonReturns
}
Return values for the `xattr` Ansible module.
func XattrReturnFromRPCResult ¶ added in v0.0.7
func XattrReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (XattrReturn, error)
Unwrap the `rpc.RPCResult` into an `XattrReturn`
type XattrState ¶ added in v0.0.7
type XattrState string
Defines which state you want to do. `read` retrieves the current value for a `key`. `present` sets `path` to `value`, default if value is set. `all` dumps all data. `keys` retrieves all keys. `absent` deletes the key.
const ( XattrStateAbsent XattrState = "absent" XattrStateAll XattrState = "all" XattrStateKeys XattrState = "keys" XattrStatePresent XattrState = "present" XattrStateRead XattrState = "read" )
func OptionalXattrState ¶ added in v0.0.7
func OptionalXattrState[T interface {
*XattrState | XattrState | *string | string
}](s T) *XattrState
Convert a supported type to an optional (pointer) XattrState
type XbpsParameters ¶ added in v0.0.7
type XbpsParameters struct {
// Name of the package to install, upgrade, or remove.
Name *[]string `json:"name,omitempty"`
// Desired state of the package.
// default: XbpsStatePresent
State *XbpsState `json:"state,omitempty"`
// When removing a package, also remove its dependencies, provided that they
// are not required by other packages and were not explicitly installed by a
// user.
// default: false
Recurse *bool `json:"recurse,omitempty"`
// Whether or not to refresh the master package lists. This can be run as part
// of a package installation or as a separate step.
// default: true
UpdateCache *bool `json:"update_cache,omitempty"`
// Whether or not to upgrade whole system.
// default: false
Upgrade *bool `json:"upgrade,omitempty"`
// Whether or not to upgrade the `xbps` package when necessary. Before
// installing new packages, `xbps` requires the user to update itself. Thus
// when this option is set to `false`, upgrades and installations fail when
// `xbps` is not up to date.
// default: true
UpgradeXbps *bool `json:"upgrade_xbps,omitempty"`
// The full path for the target root directory.
Root *string `json:"root,omitempty"`
// Repository UR`s` to prepend to the repository list for the package
// installation. The URL can be remote repositories or paths for local
// repositories.
Repositories *[]string `json:"repositories,omitempty"`
// Whether or not repository signing keys should be automatically accepted.
// default: false
AcceptPubkey *bool `json:"accept_pubkey,omitempty"`
}
Parameters for the `xbps` Ansible module.
func (XbpsParameters) ToRPCCall ¶ added in v0.0.7
func (p XbpsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `XbpsParameters into an `rpc.RPCCall`.
type XbpsReturn ¶ added in v0.0.7
type XbpsReturn struct {
AnsibleCommonReturns
// Message about results.
Msg *string `json:"msg,omitempty"`
// Packages that are affected/would be affected.
Packages *[]any `json:"packages,omitempty"`
}
Return values for the `xbps` Ansible module.
func XbpsReturnFromRPCResult ¶ added in v0.0.7
func XbpsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (XbpsReturn, error)
Unwrap the `rpc.RPCResult` into an `XbpsReturn`
type XdgMimeParameters ¶ added in v0.0.7
type XdgMimeParameters struct {
// One or more MIME types for which a default handler will be set.
MimeTypes []string `json:"mime_types"`
// Sets the default handler for the specified MIME types.
// The desktop file must be installed in the system. If the desktop file is not
// installed, the module does not fail, but the handler is not set either.
// You must pass a handler in the form `*.desktop`, otherwise the module fails.
Handler string `json:"handler"`
}
Parameters for the `xdg_mime` Ansible module.
func (XdgMimeParameters) ToRPCCall ¶ added in v0.0.7
func (p XdgMimeParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `XdgMimeParameters into an `rpc.RPCCall`.
type XdgMimeReturn ¶ added in v0.0.7
type XdgMimeReturn struct {
AnsibleCommonReturns
// Currently set handlers for the passed MIME types.
CurrentHandlers *[]string `json:"current_handlers,omitempty"`
// Version of the `xdg-mime` tool.
Version *string `json:"version,omitempty"`
}
Return values for the `xdg_mime` Ansible module.
func XdgMimeReturnFromRPCResult ¶ added in v0.0.7
func XdgMimeReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (XdgMimeReturn, error)
Unwrap the `rpc.RPCResult` into an `XdgMimeReturn`
type XfconfInfoParameters ¶ added in v0.0.7
type XfconfInfoParameters struct {
// A Xfconf preference channel is a top-level tree key, inside of the Xfconf
// repository that corresponds to the location for which all application
// properties/keys are stored.
// If not provided, the module lists all available channels.
Channel *string `json:"channel,omitempty"`
// A Xfce preference key is an element in the Xfconf repository that
// corresponds to an application preference.
// If provided, then `channel` is required.
// If not provided and a `channel` is provided, then the module lists all
// available properties in that `channel`.
Property *string `json:"property,omitempty"`
}
Parameters for the `xfconf_info` Ansible module.
func (XfconfInfoParameters) ToRPCCall ¶ added in v0.0.7
func (p XfconfInfoParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `XfconfInfoParameters into an `rpc.RPCCall`.
type XfconfInfoReturn ¶ added in v0.0.7
type XfconfInfoReturn struct {
AnsibleCommonReturns
// List of available channels.
// Returned when the module receives no parameter at all.
Channels *[]string `json:"channels,omitempty"`
// List of available properties for a specific channel.
// Returned by passing only the `channel` parameter to the module.
Properties *[]string `json:"properties,omitempty"`
// Flag indicating whether the property is an array or not.
IsArray *bool `json:"is_array,omitempty"`
// The value of the property. Empty if the property is of array type.
Value *string `json:"value,omitempty"`
// The array value of the property. Empty if the property is not of array type.
ValueArray *[]string `json:"value_array,omitempty"`
// The version of the `xfconf-query` command.
Version *string `json:"version,omitempty"`
}
Return values for the `xfconf_info` Ansible module.
func XfconfInfoReturnFromRPCResult ¶ added in v0.0.7
func XfconfInfoReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (XfconfInfoReturn, error)
Unwrap the `rpc.RPCResult` into an `XfconfInfoReturn`
type XfconfParameters ¶ added in v0.0.7
type XfconfParameters struct {
// A Xfconf preference channel is a top-level tree key, inside of the Xfconf
// repository that corresponds to the location for which all application
// properties/keys are stored. See man xfconf-query(1).
Channel string `json:"channel"`
// A Xfce preference key is an element in the Xfconf repository that
// corresponds to an application preference. See man xfconf-query(1).
Property string `json:"property"`
// Preference properties typically have simple values such as strings,
// integers, or lists of strings and integers. See man xfconf-query(1).
Value *[]any `json:"value,omitempty"`
// The type of value being set.
// When providing more than one `value_type`, the length of the list must be
// equal to the length of `value`.
// If only one `value_type` is provided, but `value` contains more than on
// element, that `value_type` is applied to all elements of `value`.
// If the `property` being set is an array and it can possibly have only one
// element in the array, then `force_array=true` must be used to ensure that
// `xfconf-query` interprets the value as an array rather than a scalar.
// Support for `uchar`, `char`, `uint64`, and `int64` has been added in
// community.general 4.8.0.
ValueType *XfconfValueType `json:"value_type,omitempty"`
// The action to take upon the property/value.
// The state `get` has been removed in community.general 5.0.0. Please use the
// module `community.general.xfconf_info` instead.
// default: XfconfStatePresent
State *XfconfState `json:"state,omitempty"`
// Force array even if only one element.
// default: false
ForceArray *bool `json:"force_array,omitempty"`
}
Parameters for the `xfconf` Ansible module.
func (XfconfParameters) ToRPCCall ¶ added in v0.0.7
func (p XfconfParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `XfconfParameters into an `rpc.RPCCall`.
type XfconfReturn ¶ added in v0.0.7
type XfconfReturn struct {
AnsibleCommonReturns
// The channel specified in the module parameters.
Channel *string `json:"channel,omitempty"`
// The property specified in the module parameters.
Property *string `json:"property,omitempty"`
// The type of the value that was changed (`none` for `state=reset`). Either a
// single string value or a list of strings for array types.
// This is a string or a list of strings.
ValueType *any `json:"value_type,omitempty"`
// The value of the preference key after executing the module. Either a single
// string value or a list of strings for array types.
// This is a string or a list of strings.
Value *any `json:"value,omitempty"`
// The value of the preference key before executing the module. Either a single
// string value or a list of strings for array types.
// This is a string or a list of strings.
PreviousValue *any `json:"previous_value,omitempty"`
// A list with the resulting `xfconf-query` command executed by the module.
Cmd *[]string `json:"cmd,omitempty"`
// The version of the `xfconf-query` command.
Version *string `json:"version,omitempty"`
}
Return values for the `xfconf` Ansible module.
func XfconfReturnFromRPCResult ¶ added in v0.0.7
func XfconfReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (XfconfReturn, error)
Unwrap the `rpc.RPCResult` into an `XfconfReturn`
type XfconfState ¶ added in v0.0.7
type XfconfState string
The action to take upon the property/value. The state `get` has been removed in community.general 5.0.0. Please use the module `community.general.xfconf_info` instead.
const ( XfconfStatePresent XfconfState = "present" XfconfStateAbsent XfconfState = "absent" )
func OptionalXfconfState ¶ added in v0.0.7
func OptionalXfconfState[T interface {
*XfconfState | XfconfState | *string | string
}](s T) *XfconfState
Convert a supported type to an optional (pointer) XfconfState
type XfconfValueType ¶ added in v0.0.7
type XfconfValueType string
The type of value being set. When providing more than one `value_type`, the length of the list must be equal to the length of `value`. If only one `value_type` is provided, but `value` contains more than on element, that `value_type` is applied to all elements of `value`. If the `property` being set is an array and it can possibly have only one element in the array, then `force_array=true` must be used to ensure that `xfconf-query` interprets the value as an array rather than a scalar. Support for `uchar`, `char`, `uint64`, and `int64` has been added in community.general 4.8.0.
const ( XfconfValueTypeString XfconfValueType = "string" XfconfValueTypeInt XfconfValueType = "int" XfconfValueTypeDouble XfconfValueType = "double" XfconfValueTypeBool XfconfValueType = "bool" XfconfValueTypeUint XfconfValueType = "uint" XfconfValueTypeUchar XfconfValueType = "uchar" XfconfValueTypeChar XfconfValueType = "char" XfconfValueTypeUint64 XfconfValueType = "uint64" XfconfValueTypeInt64 XfconfValueType = "int64" XfconfValueTypeFloat XfconfValueType = "float" )
func OptionalXfconfValueType ¶ added in v0.0.7
func OptionalXfconfValueType[T interface {
*XfconfValueType | XfconfValueType | *string | string
}](s T) *XfconfValueType
Convert a supported type to an optional (pointer) XfconfValueType
type XfsQuotaParameters ¶ added in v0.0.7
type XfsQuotaParameters struct {
// The XFS quota type.
Type XfsQuotaType `json:"type"`
// The name of the user, group or project to apply the quota to, if other than
// default.
Name *string `json:"name,omitempty"`
// The mount point on which to apply the quotas.
Mountpoint string `json:"mountpoint"`
// Hard blocks quota limit.
// This argument supports human readable sizes.
Bhard *string `json:"bhard,omitempty"`
// Soft blocks quota limit.
// This argument supports human readable sizes.
Bsoft *string `json:"bsoft,omitempty"`
// Hard inodes quota limit.
Ihard *int `json:"ihard,omitempty"`
// Soft inodes quota limit.
Isoft *int `json:"isoft,omitempty"`
// Hard realtime blocks quota limit.
// This argument supports human readable sizes.
Rtbhard *string `json:"rtbhard,omitempty"`
// Soft realtime blocks quota limit.
// This argument supports human readable sizes.
Rtbsoft *string `json:"rtbsoft,omitempty"`
// Whether to apply the limits or remove them.
// When removing limit, they are set to 0, and not quite removed.
// default: XfsQuotaStatePresent
State *XfsQuotaState `json:"state,omitempty"`
}
Parameters for the `xfs_quota` Ansible module.
func (XfsQuotaParameters) ToRPCCall ¶ added in v0.0.7
func (p XfsQuotaParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `XfsQuotaParameters into an `rpc.RPCCall`.
type XfsQuotaReturn ¶ added in v0.0.7
type XfsQuotaReturn struct {
AnsibleCommonReturns
// The current `bhard` setting in bytes.
Bhard *int `json:"bhard,omitempty"`
// The current `bsoft` setting in bytes.
Bsoft *int `json:"bsoft,omitempty"`
// The current `ihard` setting in bytes.
Ihard *int `json:"ihard,omitempty"`
// The current `isoft` setting in bytes.
Isoft *int `json:"isoft,omitempty"`
// The current `rtbhard` setting in bytes.
Rtbhard *int `json:"rtbhard,omitempty"`
// The current `rtbsoft` setting in bytes.
Rtbsoft *int `json:"rtbsoft,omitempty"`
}
Return values for the `xfs_quota` Ansible module.
func XfsQuotaReturnFromRPCResult ¶ added in v0.0.7
func XfsQuotaReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (XfsQuotaReturn, error)
Unwrap the `rpc.RPCResult` into an `XfsQuotaReturn`
type XfsQuotaState ¶ added in v0.0.7
type XfsQuotaState string
Whether to apply the limits or remove them. When removing limit, they are set to 0, and not quite removed.
const ( XfsQuotaStatePresent XfsQuotaState = "present" XfsQuotaStateAbsent XfsQuotaState = "absent" )
func OptionalXfsQuotaState ¶ added in v0.0.7
func OptionalXfsQuotaState[T interface {
*XfsQuotaState | XfsQuotaState | *string | string
}](s T) *XfsQuotaState
Convert a supported type to an optional (pointer) XfsQuotaState
type XfsQuotaType ¶ added in v0.0.7
type XfsQuotaType string
The XFS quota type.
const ( XfsQuotaTypeUser XfsQuotaType = "user" XfsQuotaTypeGroup XfsQuotaType = "group" XfsQuotaTypeProject XfsQuotaType = "project" )
type XmlContent ¶ added in v0.0.7
type XmlContent string
Search for a given `xpath` and get content. This parameter requires `xpath` to be set.
const ( XmlContentAttribute XmlContent = "attribute" XmlContentText XmlContent = "text" )
func OptionalXmlContent ¶ added in v0.0.7
func OptionalXmlContent[T interface {
*XmlContent | XmlContent | *string | string
}](s T) *XmlContent
Convert a supported type to an optional (pointer) XmlContent
type XmlInputType ¶ added in v0.0.7
type XmlInputType string
Type of input for `add_children` and `set_children`.
const ( XmlInputTypeXml XmlInputType = "xml" XmlInputTypeYaml XmlInputType = "yaml" )
func OptionalXmlInputType ¶ added in v0.0.7
func OptionalXmlInputType[T interface {
*XmlInputType | XmlInputType | *string | string
}](s T) *XmlInputType
Convert a supported type to an optional (pointer) XmlInputType
type XmlParameters ¶ added in v0.0.7
type XmlParameters struct {
// Path to the file to operate on.
// This file must exist ahead of time.
// This parameter is required, unless `xmlstring` is given.
Path *string `json:"path,omitempty"`
// A string containing XML on which to operate.
// This parameter is required, unless `path` is given.
Xmlstring *string `json:"xmlstring,omitempty"`
// A valid XPath expression describing the item(s) you want to manipulate.
// Operates on the document root, `/`, by default.
Xpath *string `json:"xpath,omitempty"`
// The namespace `prefix:uri` mapping for the XPath expression.
// Needs to be a `dict`, not a `list` of items.
// default: {}
Namespaces *map[string]any `json:"namespaces,omitempty"`
// Set or remove an xpath selection (node(s), attribute(s)).
// default: XmlStatePresent
State *XmlState `json:"state,omitempty"`
// The attribute to select when using parameter `value`.
// This is a string, not prepended with `@`.
Attribute *any `json:"attribute,omitempty"`
// Desired state of the selected attribute.
// Either a string, or to unset a value, the Python `None` keyword (YAML
// Equivalent, `null`).
// Elements default to no value (but present).
// Attributes default to an empty string.
Value *any `json:"value,omitempty"`
// Add additional child-element(s) to a selected element for a given `xpath`.
// Child elements must be given in a list and each item may be either a string
// (for example `children=ansible` to add an empty `<ansible/>` child element),
// or a hash where the key is an element name and the value is the element
// value.
// This parameter requires `xpath` to be set.
AddChildren *[]any `json:"add_children,omitempty"`
// Set the child-element(s) of a selected element for a given `xpath`.
// Removes any existing children.
// Child elements must be specified as in `add_children`.
// This parameter requires `xpath` to be set.
SetChildren *[]any `json:"set_children,omitempty"`
// Search for a given `xpath` and provide the count of any matches.
// This parameter requires `xpath` to be set.
// default: false
Count *bool `json:"count,omitempty"`
// Search for a given `xpath` and print out any matches.
// This parameter requires `xpath` to be set.
// default: false
PrintMatch *bool `json:"print_match,omitempty"`
// Pretty print XML output.
// default: false
PrettyPrint *bool `json:"pretty_print,omitempty"`
// Search for a given `xpath` and get content.
// This parameter requires `xpath` to be set.
Content *XmlContent `json:"content,omitempty"`
// Type of input for `add_children` and `set_children`.
// default: XmlInputTypeYaml
InputType *XmlInputType `json:"input_type,omitempty"`
// Create a backup file including the timestamp information so you can get the
// original file back if you somehow clobbered it incorrectly.
// default: false
Backup *bool `json:"backup,omitempty"`
// Remove CDATA tags surrounding text values.
// Note that this might break your XML file if text values contain characters
// that could be interpreted as XML.
// default: false
StripCdataTags *bool `json:"strip_cdata_tags,omitempty"`
// Add additional child-element(s) before the first selected element for a
// given `xpath`.
// Child elements must be given in a list and each item may be either a string
// (for example `children=ansible` to add an empty `<ansible/>` child element),
// or a hash where the key is an element name and the value is the element
// value.
// This parameter requires `xpath` to be set.
// default: false
Insertbefore *bool `json:"insertbefore,omitempty"`
// Add additional child-element(s) after the last selected element for a given
// `xpath`.
// Child elements must be given in a list and each item may be either a string
// (for example `children=ansible` to add an empty `<ansible/>` child element),
// or a hash where the key is an element name and the value is the element
// value.
// This parameter requires `xpath` to be set.
// default: false
Insertafter *bool `json:"insertafter,omitempty"`
}
Parameters for the `xml` Ansible module.
func (XmlParameters) ToRPCCall ¶ added in v0.0.7
func (p XmlParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `XmlParameters into an `rpc.RPCCall`.
type XmlReturn ¶ added in v0.0.7
type XmlReturn struct {
AnsibleCommonReturns
// A dictionary with the original xpath, namespaces and state.
Actions *map[string]any `json:"actions,omitempty"`
// The name of the backup file that was created.
BackupFile *string `json:"backup_file,omitempty"`
// The count of xpath matches.
Count *int `json:"count,omitempty"`
// The xpath matches found.
Matches *[]any `json:"matches,omitempty"`
// A message related to the performed action(s).
Msg *string `json:"msg,omitempty"`
// An XML string of the resulting output.
Xmlstring *string `json:"xmlstring,omitempty"`
}
Return values for the `xml` Ansible module.
func XmlReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `XmlReturn`
type XmlState ¶ added in v0.0.7
type XmlState string
Set or remove an xpath selection (node(s), attribute(s)).
type YarnParameters ¶ added in v0.0.7
type YarnParameters struct {
// The name of a Node.js library to install.
// If omitted all packages in package.json are installed.
// To globally install from local Node.js library. Prepend `file:` to the path
// of the Node.js library.
Name *string `json:"name,omitempty"`
// The base path where Node.js installs libraries.
// This is where the `node_modules` folder lives.
Path *string `json:"path,omitempty"`
// The version of the library to be installed.
// Must be in semver format. If "latest" is desired, use `state` arg instead.
Version *string `json:"version,omitempty"`
// Install the Node.js library globally.
// default: false
Global *bool `json:"global,omitempty"`
// The executable location for yarn.
Executable *string `json:"executable,omitempty"`
// Use the `--ignore-scripts` flag when installing.
// default: false
IgnoreScripts *bool `json:"ignore_scripts,omitempty"`
// Install dependencies in production mode.
// `yarn` ignores any dependencies under devDependencies in `package.json`.
// default: false
Production *bool `json:"production,omitempty"`
// The registry to install modules from.
Registry *string `json:"registry,omitempty"`
// Installation state of the named Node.js library.
// If `absent` is selected, a `name` option must be provided.
// default: YarnStatePresent
State *YarnState `json:"state,omitempty"`
}
Parameters for the `yarn` Ansible module.
func (YarnParameters) ToRPCCall ¶ added in v0.0.7
func (p YarnParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `YarnParameters into an `rpc.RPCCall`.
type YarnReturn ¶ added in v0.0.7
type YarnReturn struct {
AnsibleCommonReturns
// Output generated from Yarn.
Out *string `json:"out,omitempty"`
}
Return values for the `yarn` Ansible module.
func YarnReturnFromRPCResult ¶ added in v0.0.7
func YarnReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (YarnReturn, error)
Unwrap the `rpc.RPCResult` into an `YarnReturn`
type YarnState ¶ added in v0.0.7
type YarnState string
Installation state of the named Node.js library. If `absent` is selected, a `name` option must be provided.
type YumRepositoryFailovermethod ¶ added in v0.0.7
type YumRepositoryFailovermethod string
`roundrobin` randomly selects a URL out of the list of URLs to start with and proceeds through each of them as it encounters a failure contacting the host. `priority` starts from the first `baseurl` listed and reads through them sequentially.
const ( YumRepositoryFailovermethodRoundrobin YumRepositoryFailovermethod = "roundrobin" YumRepositoryFailovermethodPriority YumRepositoryFailovermethod = "priority" )
func OptionalYumRepositoryFailovermethod ¶ added in v0.0.7
func OptionalYumRepositoryFailovermethod[T interface {
*YumRepositoryFailovermethod | YumRepositoryFailovermethod | *string | string
}](s T) *YumRepositoryFailovermethod
Convert a supported type to an optional (pointer) YumRepositoryFailovermethod
type YumRepositoryHttpCaching ¶ added in v0.0.7
type YumRepositoryHttpCaching string
Determines how upstream HTTP caches are instructed to handle any HTTP downloads that Yum does. `all` means that all HTTP downloads should be cached. `packages` means that only RPM package downloads should be cached (but not repository metadata downloads). `none` means that no HTTP downloads should be cached. This parameter is deprecated as it has no effect with dnf as an underlying package manager and will be removed in ansible-core 2.22.
const ( YumRepositoryHttpCachingAll YumRepositoryHttpCaching = "all" YumRepositoryHttpCachingPackages YumRepositoryHttpCaching = "packages" YumRepositoryHttpCachingNone YumRepositoryHttpCaching = "none" )
func OptionalYumRepositoryHttpCaching ¶ added in v0.0.7
func OptionalYumRepositoryHttpCaching[T interface {
*YumRepositoryHttpCaching | YumRepositoryHttpCaching | *string | string
}](s T) *YumRepositoryHttpCaching
Convert a supported type to an optional (pointer) YumRepositoryHttpCaching
type YumRepositoryIpResolve ¶ added in v0.0.7
type YumRepositoryIpResolve string
Determines how yum resolves host names. `4` or `IPv4` - resolve to IPv4 addresses only. `6` or `IPv6` - resolve to IPv6 addresses only.
const ( YumRepositoryIpResolve4 YumRepositoryIpResolve = "4" YumRepositoryIpResolve6 YumRepositoryIpResolve = "6" YumRepositoryIpResolveIpv4 YumRepositoryIpResolve = "IPv4" YumRepositoryIpResolveIpv6 YumRepositoryIpResolve = "IPv6" YumRepositoryIpResolveWhatever YumRepositoryIpResolve = "whatever" )
func OptionalYumRepositoryIpResolve ¶ added in v0.0.7
func OptionalYumRepositoryIpResolve[T interface {
*YumRepositoryIpResolve | YumRepositoryIpResolve | *string | string
}](s T) *YumRepositoryIpResolve
Convert a supported type to an optional (pointer) YumRepositoryIpResolve
type YumRepositoryKeepcache ¶ added in v0.0.7
type YumRepositoryKeepcache string
Either `1` or `0`. Determines whether or not yum keeps the cache of headers and packages after successful installation. This parameter is deprecated as it is only valid in the main configuration and will be removed in ansible-core 2.20.
const ( YumRepositoryKeepcache0 YumRepositoryKeepcache = "0" YumRepositoryKeepcache1 YumRepositoryKeepcache = "1" )
func OptionalYumRepositoryKeepcache ¶ added in v0.0.7
func OptionalYumRepositoryKeepcache[T interface {
*YumRepositoryKeepcache | YumRepositoryKeepcache | *string | string
}](s T) *YumRepositoryKeepcache
Convert a supported type to an optional (pointer) YumRepositoryKeepcache
type YumRepositoryMetadataExpireFilter ¶ added in v0.0.7
type YumRepositoryMetadataExpireFilter string
Filter the `metadata_expire` time, allowing a trade of speed for accuracy if a command doesn't require it. Each yum command can specify that it requires a certain level of timeliness quality from the remote repos. from "I'm about to install/upgrade, so this better be current" to "Anything that's available is good enough". `never` - Nothing is filtered, always obey `metadata_expire`. `read-only:past` - Commands that only care about past information are filtered from metadata expiring. Eg. `yum history` info (if history needs to lookup anything about a previous transaction, then by definition the remote package was available in the past). `read-only:present` - Commands that are balanced between past and future. Eg. `yum list yum`. `read-only:future` - Commands that are likely to result in running other commands which will require the latest metadata. Eg. `yum check-update`. Note that this option does not override `yum clean expire-cache`. This parameter is deprecated as it has no effect with dnf as an underlying package manager and will be removed in ansible-core 2.22.
const ( YumRepositoryMetadataExpireFilterNever YumRepositoryMetadataExpireFilter = "never" YumRepositoryMetadataExpireFilterReadOnlyPast YumRepositoryMetadataExpireFilter = "read-only:past" YumRepositoryMetadataExpireFilterReadOnlyPresent YumRepositoryMetadataExpireFilter = "read-only:present" YumRepositoryMetadataExpireFilterReadOnlyFuture YumRepositoryMetadataExpireFilter = "read-only:future" )
func OptionalYumRepositoryMetadataExpireFilter ¶ added in v0.0.7
func OptionalYumRepositoryMetadataExpireFilter[T interface {
*YumRepositoryMetadataExpireFilter | YumRepositoryMetadataExpireFilter | *string | string
}](s T) *YumRepositoryMetadataExpireFilter
Convert a supported type to an optional (pointer) YumRepositoryMetadataExpireFilter
type YumRepositoryParameters ¶
type YumRepositoryParameters struct {
// If set to `true` Yum will download packages and metadata from this repo in
// parallel, if possible.
// In ansible-core 2.11, 2.12, and 2.13 the default value is `true`.
// This option has been removed in RHEL 8. If you're using one of the versions
// listed above, you can set this option to `null` to avoid passing an unknown
// configuration option.
// This parameter is deprecated as it has been removed on systems supported by
// ansible-core and will be removed in ansible-core 2.22.
Async *bool `json:"async,omitempty"`
// Maximum available network bandwidth in bytes/second. Used with the
// `throttle` option.
// If `throttle` is a percentage and bandwidth is `0` then bandwidth throttling
// will be disabled. If `throttle` is expressed as a data rate (bytes/sec) then
// this option is ignored. Default is `0` (no bandwidth throttling).
Bandwidth *string `json:"bandwidth,omitempty"`
// URL to the directory where the yum repository's 'repodata' directory lives.
// It can also be a list of multiple URLs.
// This, the `metalink` or `mirrorlist` parameters are required if `state` is
// set to `present`.
Baseurl *[]string `json:"baseurl,omitempty"`
// Relative cost of accessing this repository. Useful for weighing one repo's
// packages as greater/less than any other.
Cost *string `json:"cost,omitempty"`
// Whether a special flag should be added to a randomly chosen
// metalink/mirrorlist query each week. This allows the repository owner to
// estimate the number of systems consuming it.
// default: nil
Countme *bool `json:"countme,omitempty"`
// When the relative size of deltarpm metadata vs pkgs is larger than this,
// deltarpm metadata is not downloaded from the repo. Note that you can give
// values over `100`, so `200` means that the metadata is required to be half
// the size of the packages. Use `0` to turn off this check, and always
// download metadata.
// This parameter is deprecated as it has no effect with dnf as an underlying
// package manager and will be removed in ansible-core 2.22.
DeltarpmMetadataPercentage *string `json:"deltarpm_metadata_percentage,omitempty"`
// When the relative size of delta vs pkg is larger than this, delta is not
// used. Use `0` to turn off delta rpm processing. Local repositories (with
// file://`baseurl`) have delta rpms turned off by default.
DeltarpmPercentage *string `json:"deltarpm_percentage,omitempty"`
// A human-readable string describing the repository. This option corresponds
// to the `name` property in the repo file.
// This parameter is only required if `state=present`.
Description *string `json:"description,omitempty"`
// This tells yum whether or not use this repository.
// Yum default value is `true`.
Enabled *bool `json:"enabled,omitempty"`
// Determines whether yum will allow the use of package groups for this
// repository.
// Yum default value is `true`.
Enablegroups *bool `json:"enablegroups,omitempty"`
// List of packages to exclude from updates or installs. This should be a space
// separated list. Shell globs using wildcards (for example `*` and `?`) are
// allowed.
// The list can also be a regular YAML array.
// `excludepkgs` alias was added in ansible-core 2.18.
Exclude *[]string `json:"exclude,omitempty"`
// `roundrobin` randomly selects a URL out of the list of URLs to start with
// and proceeds through each of them as it encounters a failure contacting the
// host.
// `priority` starts from the first `baseurl` listed and reads through them
// sequentially.
Failovermethod *YumRepositoryFailovermethod `json:"failovermethod,omitempty"`
// File name without the `.repo` extension to save the repo in. Defaults to the
// value of `name`.
File *string `json:"file,omitempty"`
// A URL pointing to the ASCII-armored CA key file for the repository.
// This parameter is deprecated as it has no effect with dnf as an underlying
// package manager and will be removed in ansible-core 2.22.
Gpgcakey *string `json:"gpgcakey,omitempty"`
// Tells yum whether or not it should perform a GPG signature check on
// packages.
// No default setting. If the value is not set, the system setting from
// `/etc/yum.conf` or system default of `false` will be used.
Gpgcheck *bool `json:"gpgcheck,omitempty"`
// A URL pointing to the ASCII-armored GPG key file for the repository.
// It can also be a list of multiple URLs.
Gpgkey *[]string `json:"gpgkey,omitempty"`
// Disable module RPM filtering and make all RPMs from the repository
// available. The default is `null`.
ModuleHotfixes *bool `json:"module_hotfixes,omitempty"`
// Determines how upstream HTTP caches are instructed to handle any HTTP
// downloads that Yum does.
// `all` means that all HTTP downloads should be cached.
// `packages` means that only RPM package downloads should be cached (but not
// repository metadata downloads).
// `none` means that no HTTP downloads should be cached.
// This parameter is deprecated as it has no effect with dnf as an underlying
// package manager and will be removed in ansible-core 2.22.
HttpCaching *YumRepositoryHttpCaching `json:"http_caching,omitempty"`
// Include external configuration file. Both, local path and URL is supported.
// Configuration file will be inserted at the position of the `include=` line.
// Included files may contain further include lines. Yum will abort with an
// error if an inclusion loop is detected.
Include *string `json:"include,omitempty"`
// List of packages you want to only use from a repository. This should be a
// space separated list. Shell globs using wildcards (for example `*` and `?`)
// are allowed. Substitution variables (for example `$releasever`) are honored
// here.
// The list can also be a regular YAML array.
Includepkgs *[]string `json:"includepkgs,omitempty"`
// Determines how yum resolves host names.
// `4` or `IPv4` - resolve to IPv4 addresses only.
// `6` or `IPv6` - resolve to IPv6 addresses only.
IpResolve *YumRepositoryIpResolve `json:"ip_resolve,omitempty"`
// This tells yum whether or not HTTP/1.1 keepalive should be used with this
// repository. This can improve transfer speeds by using one connection when
// downloading multiple files from a repository.
// This parameter is deprecated as it has no effect with dnf as an underlying
// package manager and will be removed in ansible-core 2.22.
Keepalive *bool `json:"keepalive,omitempty"`
// Either `1` or `0`. Determines whether or not yum keeps the cache of headers
// and packages after successful installation.
// This parameter is deprecated as it is only valid in the main configuration
// and will be removed in ansible-core 2.20.
Keepcache *YumRepositoryKeepcache `json:"keepcache,omitempty"`
// Time (in seconds) after which the metadata will expire.
// Default value is 6 hours.
MetadataExpire *string `json:"metadata_expire,omitempty"`
// Filter the `metadata_expire` time, allowing a trade of speed for accuracy if
// a command doesn't require it. Each yum command can specify that it requires
// a certain level of timeliness quality from the remote repos. from "I'm about
// to install/upgrade, so this better be current" to "Anything that's available
// is good enough".
// `never` - Nothing is filtered, always obey `metadata_expire`.
// `read-only:past` - Commands that only care about past information are
// filtered from metadata expiring. Eg. `yum history` info (if history needs to
// lookup anything about a previous transaction, then by definition the remote
// package was available in the past).
// `read-only:present` - Commands that are balanced between past and future.
// Eg. `yum list yum`.
// `read-only:future` - Commands that are likely to result in running other
// commands which will require the latest metadata. Eg. `yum check-update`.
// Note that this option does not override `yum clean expire-cache`.
// This parameter is deprecated as it has no effect with dnf as an underlying
// package manager and will be removed in ansible-core 2.22.
MetadataExpireFilter *YumRepositoryMetadataExpireFilter `json:"metadata_expire_filter,omitempty"`
// Specifies a URL to a metalink file for the repomd.xml, a list of mirrors for
// the entire repository are generated by converting the mirrors for the
// repomd.xml file to a `baseurl`.
// This, the `baseurl` or `mirrorlist` parameters are required if `state` is
// set to `present`.
Metalink *string `json:"metalink,omitempty"`
// Specifies a URL to a file containing a list of baseurls.
// This, the `baseurl` or `metalink` parameters are required if `state` is set
// to `present`.
Mirrorlist *string `json:"mirrorlist,omitempty"`
// Time (in seconds) after which the mirrorlist locally cached will expire.
// Default value is 6 hours.
// This parameter is deprecated as it has no effect with dnf as an underlying
// package manager and will be removed in ansible-core 2.22.
MirrorlistExpire *string `json:"mirrorlist_expire,omitempty"`
// Unique repository ID. This option builds the section name of the repository
// in the repo file.
// This parameter is only required if `state` is set to `present` or `absent`.
Name string `json:"name"`
// Password to use with the username for basic authentication.
Password *string `json:"password,omitempty"`
// Enforce ordered protection of repositories. The value is an integer from 1
// to 99.
// This option only works if the YUM Priorities plugin is installed.
Priority *string `json:"priority,omitempty"`
// Protect packages from updates from other repositories.
// This parameter is deprecated as it has no effect with dnf as an underlying
// package manager and will be removed in ansible-core 2.22.
Protect *bool `json:"protect,omitempty"`
// URL to the proxy server that yum should use. Set to `_none_` to disable the
// global proxy setting.
Proxy *string `json:"proxy,omitempty"`
// Password for this proxy.
ProxyPassword *string `json:"proxy_password,omitempty"`
// Username to use for proxy.
ProxyUsername *string `json:"proxy_username,omitempty"`
// This tells yum whether or not it should perform a GPG signature check on the
// repodata from this repository.
RepoGpgcheck *bool `json:"repo_gpgcheck,omitempty"`
// Directory where the `.repo` files will be stored.
// default: "/etc/yum.repos.d"
Reposdir *string `json:"reposdir,omitempty"`
// Set the number of times any attempt to retrieve a file should retry before
// returning an error. Setting this to `0` makes yum try forever.
Retries *string `json:"retries,omitempty"`
// Enables support for S3 repositories.
// This option only works if the YUM S3 plugin is installed.
S3Enabled *bool `json:"s3_enabled,omitempty"`
// contacted for any reason. This should be set carefully as all repos are
// consulted for any given command.
SkipIfUnavailable *bool `json:"skip_if_unavailable,omitempty"`
// Whether yum should check the permissions on the paths for the certificates
// on the repository (both remote and local).
// If we can't read any of the files then yum will force `skip_if_unavailable`
// to be `true`. This is most useful for non-root processes which use yum on
// repos that have client cert files which are readable only by root.
// This parameter is deprecated as it has no effect with dnf as an underlying
// package manager and will be removed in ansible-core 2.22.
SslCheckCertPermissions *bool `json:"ssl_check_cert_permissions,omitempty"`
// Path to the directory containing the databases of the certificate
// authorities yum should use to verify SSL certificates.
Sslcacert *string `json:"sslcacert,omitempty"`
// Path to the SSL client certificate yum should use to connect to repos/remote
// sites.
Sslclientcert *string `json:"sslclientcert,omitempty"`
// Path to the SSL client key yum should use to connect to repos/remote sites.
Sslclientkey *string `json:"sslclientkey,omitempty"`
// Defines whether yum should verify SSL certificates/hosts at all.
Sslverify *bool `json:"sslverify,omitempty"`
// State of the repo file.
// default: YumRepositoryStatePresent
State *YumRepositoryState `json:"state,omitempty"`
// Enable bandwidth throttling for downloads.
// This option can be expressed as a absolute data rate in bytes/sec. An SI
// prefix (k, M or G) may be appended to the bandwidth value.
Throttle *string `json:"throttle,omitempty"`
// Number of seconds to wait for a connection before timing out.
Timeout *string `json:"timeout,omitempty"`
// When a repository id is displayed, append these yum variables to the string
// if they are used in the `baseurl`/etc. Variables are appended in the order
// listed (and found).
// This parameter is deprecated as it has no effect with dnf as an underlying
// package manager and will be removed in ansible-core 2.22.
UiRepoidVars *string `json:"ui_repoid_vars,omitempty"`
// Username to use for basic authentication to a repo or really any url.
Username *string `json:"username,omitempty"`
// The permissions the resulting filesystem object should have.
// For those used to `/usr/bin/chmod` remember that modes are actually octal
// numbers. You must give Ansible enough information to parse them correctly.
// For consistent results, quote octal numbers (for example, `'644'` or
// `'1777'`) so Ansible receives a string and can do its own conversion from
// string into number. Adding a leading zero (for example, `0755`) works
// sometimes, but can fail in loops and some other circumstances.
// Giving Ansible a number without following either of these rules will end up
// with a decimal number which will have unexpected results.
// As of Ansible 1.8, the mode may be specified as a symbolic mode (for
// example, `u+rwx` or `u=rw,g=r,o=r`).
// If `mode` is not specified and the destination filesystem object `does not`
// exist, the default `umask` on the system will be used when setting the mode
// for the newly created filesystem object.
// If `mode` is not specified and the destination filesystem object `does`
// exist, the mode of the existing filesystem object will be used.
// Specifying `mode` is the best way to ensure filesystem objects are created
// with the correct permissions. See CVE-2020-1736 for further details.
Mode *any `json:"mode,omitempty"`
// Name of the user that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current user unless you are root, in
// which case it can preserve the previous ownership.
// Specifying a numeric username will be assumed to be a user ID and not a
// username. Avoid numeric usernames to avoid this confusion.
Owner *string `json:"owner,omitempty"`
// Name of the group that should own the filesystem object, as would be fed to
// `chown`.
// When left unspecified, it uses the current group of the current user unless
// you are root, in which case it can preserve the previous ownership.
Group *string `json:"group,omitempty"`
// The user part of the SELinux filesystem object context.
// By default it uses the `system` policy, where applicable.
// When set to `_default`, it will use the `user` portion of the policy if
// available.
Seuser *string `json:"seuser,omitempty"`
// The role part of the SELinux filesystem object context.
// When set to `_default`, it will use the `role` portion of the policy if
// available.
Serole *string `json:"serole,omitempty"`
// The type part of the SELinux filesystem object context.
// When set to `_default`, it will use the `type` portion of the policy if
// available.
Setype *string `json:"setype,omitempty"`
// The level part of the SELinux filesystem object context.
// This is the MLS/MCS attribute, sometimes known as the `range`.
// When set to `_default`, it will use the `level` portion of the policy if
// available.
Selevel *string `json:"selevel,omitempty"`
// Influence when to use atomic operation to prevent data corruption or
// inconsistent reads from the target filesystem object.
// By default this module uses atomic operations to prevent data corruption or
// inconsistent reads from the target filesystem objects, but sometimes systems
// are configured or just broken in ways that prevent this. One example is
// docker mounted filesystem objects, which cannot be updated atomically from
// inside the container and can only be written in an unsafe manner.
// This option allows Ansible to fall back to unsafe methods of updating
// filesystem objects when atomic operations fail (however, it doesn't force
// Ansible to perform unsafe writes).
// IMPORTANT! Unsafe writes are subject to race conditions and can lead to data
// corruption.
// default: false
UnsafeWrites *bool `json:"unsafe_writes,omitempty"`
// The attributes the resulting filesystem object should have.
// To get supported flags look at the man page for `chattr` on the target
// system.
// This string should contain the attributes in the same order as the one
// displayed by `lsattr`.
// The `=` operator is assumed as default, otherwise `+` or `-` operators need
// to be included in the string.
Attributes *string `json:"attributes,omitempty"`
}
Parameters for the `yum_repository` Ansible module.
func (YumRepositoryParameters) ToRPCCall ¶
func (p YumRepositoryParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `YumRepositoryParameters into an `rpc.RPCCall`.
type YumRepositoryReturn ¶
type YumRepositoryReturn struct {
AnsibleCommonReturns
// repository name
Repo *string `json:"repo,omitempty"`
// state of the target, after execution
State *string `json:"state,omitempty"`
}
Return values for the `yum_repository` Ansible module.
func YumRepositoryReturnFromRPCResult ¶
func YumRepositoryReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (YumRepositoryReturn, error)
Unwrap the `rpc.RPCResult` into an `YumRepositoryReturn`
type YumRepositoryState ¶ added in v0.0.7
type YumRepositoryState string
State of the repo file.
const ( YumRepositoryStateAbsent YumRepositoryState = "absent" YumRepositoryStatePresent YumRepositoryState = "present" )
func OptionalYumRepositoryState ¶ added in v0.0.7
func OptionalYumRepositoryState[T interface {
*YumRepositoryState | YumRepositoryState | *string | string
}](s T) *YumRepositoryState
Convert a supported type to an optional (pointer) YumRepositoryState
type YumVersionlockParameters ¶ added in v0.0.7
type YumVersionlockParameters struct {
// Package name or a list of package names with optional version or wildcards.
// Specifying versions is supported since community.general 7.2.0.
Name []string `json:"name"`
// If state is `present`, package(s) is/are added to yum versionlock list.
// If state is `absent`, package(s) is/are removed from yum versionlock list.
// default: YumVersionlockStatePresent
State *YumVersionlockState `json:"state,omitempty"`
}
Parameters for the `yum_versionlock` Ansible module.
func (YumVersionlockParameters) ToRPCCall ¶ added in v0.0.7
func (p YumVersionlockParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `YumVersionlockParameters into an `rpc.RPCCall`.
type YumVersionlockReturn ¶ added in v0.0.7
type YumVersionlockReturn struct {
AnsibleCommonReturns
// A list of package(s) in versionlock list.
Packages *[]string `json:"packages,omitempty"`
// State of package(s).
State *string `json:"state,omitempty"`
}
Return values for the `yum_versionlock` Ansible module.
func YumVersionlockReturnFromRPCResult ¶ added in v0.0.7
func YumVersionlockReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (YumVersionlockReturn, error)
Unwrap the `rpc.RPCResult` into an `YumVersionlockReturn`
type YumVersionlockState ¶ added in v0.0.7
type YumVersionlockState string
If state is `present`, package(s) is/are added to yum versionlock list. If state is `absent`, package(s) is/are removed from yum versionlock list.
const ( YumVersionlockStateAbsent YumVersionlockState = "absent" YumVersionlockStatePresent YumVersionlockState = "present" )
func OptionalYumVersionlockState ¶ added in v0.0.7
func OptionalYumVersionlockState[T interface {
*YumVersionlockState | YumVersionlockState | *string | string
}](s T) *YumVersionlockState
Convert a supported type to an optional (pointer) YumVersionlockState
type ZfsDelegateAdminParameters ¶ added in v0.0.7
type ZfsDelegateAdminParameters struct {
// File system or volume name, for example `rpool/myfs`.
Name string `json:"name"`
// Whether to allow (`present`), or unallow (`absent`) a permission.
// When set to `present`, at least one "entity" param of `users`, `groups`, or
// `everyone` are required.
// When set to `absent`, removes permissions from the specified entities, or
// removes all permissions if no entity params are specified.
// default: ZfsDelegateAdminStatePresent
State *ZfsDelegateAdminState `json:"state,omitempty"`
// List of users to whom permission(s) should be granted.
Users *[]string `json:"users,omitempty"`
// List of groups to whom permission(s) should be granted.
Groups *[]string `json:"groups,omitempty"`
// Apply permissions to everyone.
// default: false
Everyone *bool `json:"everyone,omitempty"`
// The list of permission(s) to delegate (required if `state=present`).
// Supported permissions depend on the ZFS version in use. See for example
// `https://openzfs.github.io/openzfs-docs/man/8/zfs-allow.8.html` for OpenZFS.
Permissions *[]string `json:"permissions,omitempty"`
// Apply permissions to `name` locally (`zfs allow -l`).
Local *bool `json:"local,omitempty"`
// Apply permissions to `name`'s descendents (`zfs allow -d`).
Descendents *bool `json:"descendents,omitempty"`
// Unallow permissions recursively (ignored when `state=present`).
// default: false
Recursive *bool `json:"recursive,omitempty"`
}
Parameters for the `zfs_delegate_admin` Ansible module.
func (ZfsDelegateAdminParameters) ToRPCCall ¶ added in v0.0.7
func (p ZfsDelegateAdminParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ZfsDelegateAdminParameters into an `rpc.RPCCall`.
type ZfsDelegateAdminReturn ¶ added in v0.0.7
type ZfsDelegateAdminReturn struct {
AnsibleCommonReturns
}
Return values for the `zfs_delegate_admin` Ansible module.
func ZfsDelegateAdminReturnFromRPCResult ¶ added in v0.0.7
func ZfsDelegateAdminReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (ZfsDelegateAdminReturn, error)
Unwrap the `rpc.RPCResult` into an `ZfsDelegateAdminReturn`
type ZfsDelegateAdminState ¶ added in v0.0.7
type ZfsDelegateAdminState string
Whether to allow (`present`), or unallow (`absent`) a permission. When set to `present`, at least one "entity" param of `users`, `groups`, or `everyone` are required. When set to `absent`, removes permissions from the specified entities, or removes all permissions if no entity params are specified.
const ( ZfsDelegateAdminStateAbsent ZfsDelegateAdminState = "absent" ZfsDelegateAdminStatePresent ZfsDelegateAdminState = "present" )
func OptionalZfsDelegateAdminState ¶ added in v0.0.7
func OptionalZfsDelegateAdminState[T interface {
*ZfsDelegateAdminState | ZfsDelegateAdminState | *string | string
}](s T) *ZfsDelegateAdminState
Convert a supported type to an optional (pointer) ZfsDelegateAdminState
type ZfsFactsParameters ¶ added in v0.0.7
type ZfsFactsParameters struct {
// ZFS dataset name.
Name string `json:"name"`
// Specifies if properties for any children should be recursively displayed.
// default: false
Recurse *bool `json:"recurse,omitempty"`
// Specifies if property values should be displayed in machine friendly format.
// default: false
Parsable *bool `json:"parsable,omitempty"`
// Specifies which dataset properties should be queried in comma-separated
// format. For more information about dataset properties, check zfs(1M) man
// page.
// default: "all"
Properties *string `json:"properties,omitempty"`
// Specifies which datasets types to display. Multiple values have to be
// provided as a list or in comma-separated form.
// Value `all` cannot be used together with other values.
// default: []ZfsFactsType{ZfsFactsTypeAll}
Type *ZfsFactsType `json:"type,omitempty"`
// Specifies recursion depth.
// default: 0
Depth *int `json:"depth,omitempty"`
}
Parameters for the `zfs_facts` Ansible module.
func (ZfsFactsParameters) ToRPCCall ¶ added in v0.0.7
func (p ZfsFactsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ZfsFactsParameters into an `rpc.RPCCall`.
type ZfsFactsReturn ¶ added in v0.0.7
type ZfsFactsReturn struct {
AnsibleCommonReturns
// ZFS dataset name.
Name *string `json:"name,omitempty"`
// If parsable output should be provided in machine friendly format.
Parsable *bool `json:"parsable,omitempty"`
// If we should recurse over ZFS dataset.
Recurse *bool `json:"recurse,omitempty"`
// ZFS dataset facts.
ZfsDatasets *string `json:"zfs_datasets,omitempty"`
}
Return values for the `zfs_facts` Ansible module.
func ZfsFactsReturnFromRPCResult ¶ added in v0.0.7
func ZfsFactsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (ZfsFactsReturn, error)
Unwrap the `rpc.RPCResult` into an `ZfsFactsReturn`
type ZfsFactsType ¶ added in v0.0.7
type ZfsFactsType string
Specifies which datasets types to display. Multiple values have to be provided as a list or in comma-separated form. Value `all` cannot be used together with other values.
const ( ZfsFactsTypeAll ZfsFactsType = "all" ZfsFactsTypeFilesystem ZfsFactsType = "filesystem" ZfsFactsTypeVolume ZfsFactsType = "volume" ZfsFactsTypeSnapshot ZfsFactsType = "snapshot" ZfsFactsTypeBookmark ZfsFactsType = "bookmark" )
func OptionalZfsFactsType ¶ added in v0.0.7
func OptionalZfsFactsType[T interface {
*ZfsFactsType | ZfsFactsType | *string | string
}](s T) *ZfsFactsType
Convert a supported type to an optional (pointer) ZfsFactsType
type ZfsParameters ¶ added in v0.0.7
type ZfsParameters struct {
// File system, snapshot or volume name, for example `rpool/myfs`.
Name string `json:"name"`
// Whether to create (`present`), or remove (`absent`) a file system, snapshot
// or volume. All parents/children are created/destroyed as needed to reach the
// desired state.
State ZfsState `json:"state"`
// Snapshot from which to create a clone.
Origin *string `json:"origin,omitempty"`
// A dictionary of zfs properties to be set.
// See the zfs(8) man page for more information.
// default: {}
ExtraZfsProperties *map[string]any `json:"extra_zfs_properties,omitempty"`
}
Parameters for the `zfs` Ansible module.
func (ZfsParameters) ToRPCCall ¶ added in v0.0.7
func (p ZfsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ZfsParameters into an `rpc.RPCCall`.
type ZfsReturn ¶ added in v0.0.7
type ZfsReturn struct {
AnsibleCommonReturns
}
Return values for the `zfs` Ansible module.
func ZfsReturnFromRPCResult ¶ added in v0.0.7
Unwrap the `rpc.RPCResult` into an `ZfsReturn`
type ZfsState ¶ added in v0.0.7
type ZfsState string
Whether to create (`present`), or remove (`absent`) a file system, snapshot or volume. All parents/children are created/destroyed as needed to reach the desired state.
type ZpoolFactsParameters ¶ added in v0.0.7
type ZpoolFactsParameters struct {
// ZFS pool name.
Name *string `json:"name,omitempty"`
// Specifies if property values should be displayed in machine friendly format.
// default: false
Parsable *bool `json:"parsable,omitempty"`
// Specifies which dataset properties should be queried in comma-separated
// format. For more information about dataset properties, check zpool(1M) man
// page.
// default: "all"
Properties *string `json:"properties,omitempty"`
}
Parameters for the `zpool_facts` Ansible module.
func (ZpoolFactsParameters) ToRPCCall ¶ added in v0.0.7
func (p ZpoolFactsParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ZpoolFactsParameters into an `rpc.RPCCall`.
type ZpoolFactsReturn ¶ added in v0.0.7
type ZpoolFactsReturn struct {
AnsibleCommonReturns
// Dictionary containing all the detailed information about the ZFS pool facts.
AnsibleFacts *any `json:"ansible_facts,omitempty"`
// ZFS pool name.
Name *string `json:"name,omitempty"`
// If parsable output should be provided in machine friendly format.
Parsable *bool `json:"parsable,omitempty"`
}
Return values for the `zpool_facts` Ansible module.
func ZpoolFactsReturnFromRPCResult ¶ added in v0.0.7
func ZpoolFactsReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (ZpoolFactsReturn, error)
Unwrap the `rpc.RPCResult` into an `ZpoolFactsReturn`
type ZypperParameters ¶ added in v0.0.7
type ZypperParameters struct {
// Package name `name` or package specifier or a list of either.
// Can include a version like `name=1.0`, `name>3.4` or `name<=2.7`. If a
// version is given, `oldpackage` is implied and zypper is allowed to update
// the package within the version range given.
// You can also pass a URL or a local path to a rpm file.
// When using `state=latest`, this can be `*`, which updates all installed
// packages.
Name []string `json:"name"`
// `present` makes sure the package is installed.
// `latest` makes sure the latest version of the package is installed.
// `absent` makes sure the specified package is not installed.
// `dist-upgrade` makes sure the latest version of all installed packages from
// all enabled repositories is installed.
// When using `dist-upgrade`, `name` should be `*`.
// default: ZypperStatePresent
State *ZypperState `json:"state,omitempty"`
// The type of package to be operated on.
// default: ZypperTypePackage
Type *ZypperType `json:"type,omitempty"`
// Add additional global target options to `zypper`.
// Options should be supplied in a single line as if given in the command line.
ExtraArgsPrecommand *string `json:"extra_args_precommand,omitempty"`
// Whether to disable to GPG signature checking of the package signature being
// installed. Has an effect only if `state` is `present` or `latest`.
// default: false
DisableGpgCheck *bool `json:"disable_gpg_check,omitempty"`
// Corresponds to the `--no-recommends` option for `zypper`. Default behavior
// (`true`) modifies zypper's default behavior; `false` does install
// recommended packages.
// default: true
DisableRecommends *bool `json:"disable_recommends,omitempty"`
// Adds `--force` option to `zypper`. Allows to downgrade packages and change
// vendor or architecture.
// default: false
Force *bool `json:"force,omitempty"`
// Adds `--force-resolution` option to `zypper`. Allows to (un)install packages
// with conflicting requirements (resolver chooses a solution).
// default: false
ForceResolution *bool `json:"force_resolution,omitempty"`
// Run the equivalent of `zypper refresh` before the operation. Disabled in
// check mode.
// default: false
UpdateCache *bool `json:"update_cache,omitempty"`
// Adds `--oldpackage` option to `zypper`. Allows to downgrade packages with
// less side-effects than force. This is implied as soon as a version is
// specified as part of the package name.
// default: false
Oldpackage *bool `json:"oldpackage,omitempty"`
// Add additional options to `zypper` command.
// Options should be supplied in a single line as if given in the command line.
ExtraArgs *string `json:"extra_args,omitempty"`
// Adds `--allow_vendor_change` option to `zypper` dist-upgrade command.
// default: false
AllowVendorChange *bool `json:"allow_vendor_change,omitempty"`
// Adds `--replacefiles` option to `zypper` install/update command.
// default: false
Replacefiles *bool `json:"replacefiles,omitempty"`
// Adds `--clean-deps` option to `zypper` remove command.
// default: false
CleanDeps *bool `json:"clean_deps,omitempty"`
// When set to `true`, provide a simplified error output (parses only the
// `<message>` tag text in the XML output).
// default: false
SimpleErrors *bool `json:"simple_errors,omitempty"`
// Adds `--quiet` option to `zypper` install/update command.
// default: true
Quiet *bool `json:"quiet,omitempty"`
// When set to `true`, ignore `zypper` return code 107 (post install script
// errors).
// default: false
SkipPostErrors *bool `json:"skip_post_errors,omitempty"`
}
Parameters for the `zypper` Ansible module.
func (ZypperParameters) ToRPCCall ¶ added in v0.0.7
func (p ZypperParameters) ToRPCCall() (rpc.RPCCall[rpc.AnsibleExecuteArgs], error)
Wrap the `ZypperParameters into an `rpc.RPCCall`.
type ZypperReturn ¶ added in v0.0.7
type ZypperReturn struct {
AnsibleCommonReturns
}
Return values for the `zypper` Ansible module.
func ZypperReturnFromRPCResult ¶ added in v0.0.7
func ZypperReturnFromRPCResult(r rpc.RPCResult[rpc.AnsibleExecuteResult]) (ZypperReturn, error)
Unwrap the `rpc.RPCResult` into an `ZypperReturn`
type ZypperState ¶ added in v0.0.7
type ZypperState string
`present` makes sure the package is installed. `latest` makes sure the latest version of the package is installed. `absent` makes sure the specified package is not installed. `dist-upgrade` makes sure the latest version of all installed packages from all enabled repositories is installed. When using `dist-upgrade`, `name` should be `*`.
const ( ZypperStatePresent ZypperState = "present" ZypperStateLatest ZypperState = "latest" ZypperStateAbsent ZypperState = "absent" ZypperStateDistUpgrade ZypperState = "dist-upgrade" ZypperStateInstalled ZypperState = "installed" ZypperStateRemoved ZypperState = "removed" )
func OptionalZypperState ¶ added in v0.0.7
func OptionalZypperState[T interface {
*ZypperState | ZypperState | *string | string
}](s T) *ZypperState
Convert a supported type to an optional (pointer) ZypperState
type ZypperType ¶ added in v0.0.7
type ZypperType string
The type of package to be operated on.
const ( ZypperTypePackage ZypperType = "package" ZypperTypePatch ZypperType = "patch" ZypperTypePattern ZypperType = "pattern" ZypperTypeProduct ZypperType = "product" ZypperTypeSrcpackage ZypperType = "srcpackage" ZypperTypeApplication ZypperType = "application" )
func OptionalZypperType ¶ added in v0.0.7
func OptionalZypperType[T interface {
*ZypperType | ZypperType | *string | string
}](s T) *ZypperType
Convert a supported type to an optional (pointer) ZypperType
Source Files
¶
- acl.go
- alternatives.go
- android_sdk.go
- ansible_galaxy_install.go
- apk.go
- apt.go
- apt_key.go
- apt_repo.go
- apt_repository.go
- apt_rpm.go
- assemble.go
- at.go
- authorized_key.go
- awall.go
- beadm.go
- blockinfile.go
- bootc_manage.go
- bower.go
- bzr.go
- capabilities.go
- cargo.go
- command.go
- common.go
- copy.go
- cron.go
- crypttab.go
- deb822_repository.go
- debconf.go
- deploy_helper.go
- django_check.go
- django_command.go
- django_createcachetable.go
- django_manage.go
- dnf.go
- dnf5.go
- dnf_config_manager.go
- dnf_versionlock.go
- docker_compose_v2.go
- docker_compose_v2_exec.go
- docker_compose_v2_pull.go
- docker_compose_v2_run.go
- docker_config.go
- docker_container.go
- docker_container_copy_into.go
- docker_container_exec.go
- docker_container_info.go
- docker_context_info.go
- docker_host_info.go
- docker_image.go
- docker_image_build.go
- docker_image_export.go
- docker_image_info.go
- docker_image_load.go
- docker_image_pull.go
- docker_image_push.go
- docker_image_remove.go
- docker_image_tag.go
- docker_login.go
- docker_network.go
- docker_network_info.go
- docker_node.go
- docker_node_info.go
- docker_plugin.go
- docker_prune.go
- docker_secret.go
- docker_stack.go
- docker_stack_info.go
- docker_stack_task_info.go
- docker_swarm.go
- docker_swarm_info.go
- docker_swarm_service.go
- docker_swarm_service_info.go
- docker_volume.go
- docker_volume_info.go
- dpkg_divert.go
- dpkg_selections.go
- expect.go
- facter.go
- facter_facts.go
- file.go
- filesize.go
- filesystem.go
- find.go
- firewalld.go
- firewalld_info.go
- flatpak.go
- gconftool2.go
- gconftool2_info.go
- gem.go
- get_url.go
- getent.go
- git.go
- git_config.go
- git_config_info.go
- group.go
- gunicorn.go
- homebrew.go
- homebrew_cask.go
- homebrew_services.go
- homebrew_tap.go
- homectl.go
- hostname.go
- hponcfg.go
- ini_file.go
- installp.go
- interfaces_file.go
- ip_netns.go
- ipmi_boot.go
- ipmi_power.go
- iptables.go
- iso_create.go
- iso_customize.go
- iso_extract.go
- jboss.go
- kdeconfig.go
- kernel_blacklist.go
- keyring_info.go
- kibana_plugin.go
- known_hosts.go
- lbu.go
- lineinfile.go
- listen_ports_facts.go
- lldp.go
- locale_gen.go
- logentries.go
- lvg.go
- lvg_rename.go
- macports.go
- make.go
- mas.go
- modprobe.go
- mount.go
- mount_facts.go
- nictagadm.go
- nmcli.go
- npm.go
- nsupdate.go
- opkg.go
- package.go
- package_facts.go
- pacman.go
- pam_limits.go
- pamd.go
- parted.go
- patch.go
- pear.go
- pids.go
- ping.go
- pip.go
- pip_package_info.go
- pipx.go
- pipx_info.go
- pkg5.go
- pkg5_publisher.go
- pkgin.go
- pkgng.go
- pkgutil.go
- pmem.go
- pnpm.go
- portage.go
- portinstall.go
- replace.go
- rhel_facts.go
- rhel_rpm_ostree.go
- rhsm_release.go
- rhsm_repository.go
- rpm_key.go
- rpm_ostree_pkg.go
- rpm_ostree_upgrade.go
- seboolean.go
- selinux.go
- selinux_permissive.go
- seport.go
- service.go
- setup.go
- shutdown.go
- slackpkg.go
- slurp.go
- smartos_image_info.go
- snap_alias.go
- sorcery.go
- stat.go
- subversion.go
- svr4pkg.go
- swdepot.go
- swupd.go
- synchronize.go
- sysctl.go
- syspatch.go
- sysrc.go
- systemd_creds_decrypt.go
- systemd_creds_encrypt.go
- systemd_info.go
- systemd_service.go
- sysvinit.go
- tempfile.go
- timezone.go
- unarchive.go
- uri.go
- urpmi.go
- usb_facts.go
- user.go
- vdo.go
- wait_for.go
- xattr.go
- xbps.go
- xdg_mime.go
- xfconf.go
- xfconf_info.go
- xfs_quota.go
- xml.go
- yarn.go
- yum_repository.go
- yum_versionlock.go
- zfs.go
- zfs_delegate_admin.go
- zfs_facts.go
- zpool_facts.go
- zypper.go