Documentation ¶
Index ¶
Constants ¶
const ( // APIKeyFlag represent the API key to use to authenticate against the galaxy server. Same as --token APIKeyFlag = "--api-key" // ClearResponseCacheFlag clears the existing server response cache. ClearResponseCacheFlag = "--clear-response-cache" // CollectionsPathFlag is the path to the directory containing your collections. CollectionsPathFlag = "--collections-path" // DisableGPGVerifyFlag disables GPG signature verification when installing collections from a Galaxy server. DisableGPGVerifyFlag = "--disable-gpg-verify" // ForceFlag forces overwriting an existing role or collection. ForceFlag = "--force" // ForceWithDepsFlag forces overwriting an existing collection and its dependencies. ForceWithDepsFlag = "--force-with-deps" // IgnoreCertsFlag ignores SSL certificate validation errors. IgnoreCertsFlag = "--ignore-certs" // IgnoreErrorsFlag ignores errors during installation and continue with the next specified collection. IgnoreErrorsFlag = "--ignore-errors" // IgnoreSignatureStatusCodeFlag suppresses this argument. It may be specified multiple times. IgnoreSignatureStatusCodeFlag = "--ignore-signature-status-code" // IgnoreSignatureStatusCodesFlag is a space separated list of status codes to ignore during signature verification. IgnoreSignatureStatusCodesFlag = "--ignore-signature-status-codes" // KeyringFlag is the keyring used during signature verification. KeyringFlag = "--keyring" // NoCacheFlag does not use the server response cache. NoCacheFlag = "--no-cache" // NoDepsFlag doesn’t download collections listed as dependencies. NoDepsFlag = "--no-deps" // OfflineFlag installs collection artifacts (tarballs) without contacting any distribution servers. OfflineFlag = "--offline" // PreFlag includes pre-release versions. Semantic versioning pre-releases are ignored by default. PreFlag = "--pre" // RequiredValidSignatureCountFlag is the number of signatures that must successfully verify the collection. RequiredValidSignatureCountFlag = "--required-valid-signature-count" // RequirementsFileFlag is a file containing a list of collections to be installed. RequirementsFileFlag = "--requirements-file" // ServerFlag is the Galaxy API server URL. ServerFlag = "--server" // SignatureFlag is an additional signature source to verify the authenticity of the MANIFEST.json. SignatureFlag = "--signature" // TimeoutFlag is the time to wait for operations against the galaxy server, defaults to 60s. TimeoutFlag = "--timeout" // TokenFlag represent the token to use to authenticate against the galaxy server. Same as --api-key TokenFlag = "--token" // UpgradeFlag upgrades installed collection artifacts. This will also update dependencies unless –no-deps is provided. UpgradeFlag = "--upgrade" // VerboseFlag verbose mode enabled VerboseFlag = "--verbose" // VersionFlag show program's version number, config file location, configured module search path, module location, executable location and exit VersionFlag = "--version" )
const (
// AnsibleGalaxyCollectionInstallSubCommand is the ansible-galaxy collection install subcommand
AnsibleGalaxyCollectionInstallSubCommand = "install"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnsibleGalaxyCollectionInstallCmd ¶
type AnsibleGalaxyCollectionInstallCmd struct { // Binary is the ansible-galaxy binary file Binary string // CollectionNames is the ansible-galaxy's collection names to be installed CollectionNames []string // GalaxyCollectionInstallOptions are the ansible-galaxy's collection install options GalaxyCollectionInstallOptions *AnsibleGalaxyCollectionInstallOptions }
AnsibleGalaxyCollectionInstallCmd object is the main object which defines the `ansible-galaxy` command to install collections.
func NewAnsibleGalaxyCollectionInstallCmd ¶
func NewAnsibleGalaxyCollectionInstallCmd(options ...AnsibleGalaxyCollectionInstallOptionsFunc) *AnsibleGalaxyCollectionInstallCmd
NewAnsibleGalaxyCollectionInstallCmd creates a new AnsibleGalaxyCollectionInstallCmd instance
func (*AnsibleGalaxyCollectionInstallCmd) Command ¶
func (p *AnsibleGalaxyCollectionInstallCmd) Command() ([]string, error)
Command generate the ansible-galaxy role install command which will be executed
func (*AnsibleGalaxyCollectionInstallCmd) String ¶
func (p *AnsibleGalaxyCollectionInstallCmd) String() string
String returns the ansible-galaxy role install command as a string
type AnsibleGalaxyCollectionInstallOptions ¶
type AnsibleGalaxyCollectionInstallOptions struct { // APIKey is the Ansible Galaxy API key. APIKey string // ClearResponseCache clears the existing server response cache. ClearResponseCache bool // DisableGPGVerify disables GPG signature verification when installing collections from a Galaxy server. DisableGPGVerify bool // ForceWithDeps forces overwriting an existing collection and its dependencies. ForceWithDeps bool // IgnoreSignatureStatusCode suppresses this argument. It may be specified multiple times. IgnoreSignatureStatusCode bool // IgnoreSignatureStatusCodes is a space separated list of status codes to ignore during signature verification. IgnoreSignatureStatusCodes string // Keyring is the keyring used during signature verification. Keyring string // NoCache does not use the server response cache. NoCache bool // Offline installs collection artifacts (tarballs) without contacting any distribution servers. Offline bool // Pre includes pre-release versions. Semantic versioning pre-releases are ignored by default. Pre bool // RequiredValidSignatureCount is the number of signatures that must successfully verify the collection. RequiredValidSignatureCount int // Signature is an additional signature source to verify the authenticity of the MANIFEST.json. Signature string // Timeout is the time to wait for operations against the galaxy server, defaults to 60s. Timeout string // Token is the Ansible Galaxy API key. Token string // Upgrade upgrades installed collection artifacts. This will also update dependencies unless –no-deps is provided. Upgrade bool // IgnoreCerts ignores SSL certificate validation errors. IgnoreCerts bool // Force forces overwriting an existing role or collection. Force bool // IgnoreErrors ignores errors during installation and continue with the next specified collection. IgnoreErrors bool // NoDeps doesn’t download collections listed as dependencies. NoDeps bool // CollectionsPath is the path to the directory containing your collections. CollectionsPath string // RequirementsFile is a file containing a list of collections to be installed. RequirementsFile string // Server is the Galaxy API server URL. Server string // Verbose verbose mode enabled Verbose bool // Version show program's version number, config file location, configured module search path, module location, executable location and exit Version bool }
func (*AnsibleGalaxyCollectionInstallOptions) GenerateCommandOptions ¶
func (o *AnsibleGalaxyCollectionInstallOptions) GenerateCommandOptions() ([]string, error)
func (*AnsibleGalaxyCollectionInstallOptions) String ¶
func (o *AnsibleGalaxyCollectionInstallOptions) String() string
String return a string representation of the AnsibleGalaxyCollectionInstallOptions
type AnsibleGalaxyCollectionInstallOptionsFunc ¶
type AnsibleGalaxyCollectionInstallOptionsFunc func(*AnsibleGalaxyCollectionInstallCmd)
AnsibleGalaxyCollectionInstallOptionsFunc is a function to set executor options
func WithBinary ¶
func WithBinary(binary string) AnsibleGalaxyCollectionInstallOptionsFunc
WithBinary set the ansible-galaxy binary file
func WithCollectionNames ¶
func WithCollectionNames(roleNames ...string) AnsibleGalaxyCollectionInstallOptionsFunc
WithCollectionNames set the ansible-galaxy role names
func WithGalaxyCollectionInstallOptions ¶
func WithGalaxyCollectionInstallOptions(options *AnsibleGalaxyCollectionInstallOptions) AnsibleGalaxyCollectionInstallOptionsFunc
WithGalaxyCollectionInstallOptions set the ansible-galaxy collection install options