Documentation ¶
Index ¶
Constants ¶
const ( // APIKeyFlag represent the API key to use to authenticate against the galaxy server. Same as --token APIKeyFlag = "--api-key" // ForceFlag represents the command line flag for forcing overwriting an existing role or role file. ForceFlag = "--force" // ForceWithDepsFlag represents the command line flag for forcing overwriting an existing role, role file, or dependencies. ForceWithDepsFlag = "--force-with-deps" // IgnoreCertsFlag represent the flag to ignore SSL certificate validation errors IgnoreCertsFlag = "--ignore-certs" // IgnoreErrorsFlag represents the command line flag for continuing processing even if a role fails to install. IgnoreErrorsFlag = "--ignore-errors" // KeepSCMMetaFlag represent the flag to use tar instead of the scm archive option when packaging the role. KeepSCMMetaFlag = "--keep-scm-meta" // NoDepsFlag represents the command line flag for not installing dependencies. NoDepsFlag = "--no-deps" // RoleFileFlag represents the command line flag for specifying the path to a file containing a list of roles to install. RoleFileFlag = "--role-file" // RolesPathFlag represents the command line flag for specifying where roles should be installed on the local filesystem. RolesPathFlag = "--roles-path" // ServerFlag represent the flag to specify the galaxy server to use ServerFlag = "--server" // TimeoutFlag represent 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" // VerboseFlag verbose mode enabled VerboseFlag = "-vvvv" // VerboseVFlag verbose with -v is enabled VerboseVFlag = "-v" // VerboseVVFlag verbose with -vv is enabled VerboseVVFlag = "-vv" // VerboseVVVFlag verbose with -vvv is enabled VerboseVVVFlag = "-vvv" // VerboseVVVVFlag verbose with -vvvv is enabled VerboseVVVVFlag = "-vvvv" // VersionFlag show program's version number, config file location, configured module search path, module location, executable location and exit VersionFlag = "--version" )
const (
// AnsibleGalaxyRoleInstallSubCommand is the ansible-galaxy role install subcommand
AnsibleGalaxyRoleInstallSubCommand = "install"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnsibleGalaxyRoleInstallCmd ¶
type AnsibleGalaxyRoleInstallCmd struct { // Binary is the ansible-galaxy binary file Binary string // RoleNames is the ansible-galaxy's role names to be installed RoleNames []string // GalaxyRoleInstallOptions are the ansible-galaxy's role install options GalaxyRoleInstallOptions *AnsibleGalaxyRoleInstallOptions }
AnsibleGalaxyRoleInstallCmd object is the main object which defines the `ansible-galaxy` command to install roles.
func NewAnsibleGalaxyRoleInstallCmd ¶
func NewAnsibleGalaxyRoleInstallCmd(options ...AnsibleGalaxyRoleInstallOptionsFunc) *AnsibleGalaxyRoleInstallCmd
NewAnsibleGalaxyRoleInstallCmd creates a new AnsibleGalaxyRoleInstallCmd instance
func (*AnsibleGalaxyRoleInstallCmd) Command ¶
func (p *AnsibleGalaxyRoleInstallCmd) Command() ([]string, error)
Command generate the ansible-galaxy role install command which will be executed
func (*AnsibleGalaxyRoleInstallCmd) String ¶
func (p *AnsibleGalaxyRoleInstallCmd) String() string
String returns the ansible-galaxy role install command as a string
type AnsibleGalaxyRoleInstallOptions ¶
type AnsibleGalaxyRoleInstallOptions struct { // ApiKey represent the API key to use to authenticate against the galaxy server. Same as --token ApiKey string // Force represents whether to force overwriting an existing role or role file. Force bool // ForceWithDeps represents whether to force overwriting an existing role, role file, or dependencies. ForceWithDeps bool // IgnoreCerts represent the flag to ignore SSL certificate validation errors IgnoreCerts bool // IgnoreErrors represents whether to continue processing even if a role fails to install. IgnoreErrors bool // KeepSCMMeta represent the flag to use tar instead of the scm archive option when packaging the role. KeepSCMMeta bool // NoDeps represents whether to install dependencies. NoDeps bool // RoleFile represents the path to a file containing a list of roles to install. RoleFile string // RolesPath represents the path where roles should be installed on the local filesystem. RolesPath string // Server represent the flag to specify the galaxy server to use Server string // Timeout represent the time to wait for operations against the galaxy server, defaults to 60s Timeout string // Token represent the token to use to authenticate against the galaxy server. Same as --api-key Token string // Verbose verbose mode enabled Verbose bool // Verbose verbose mode -v enabled VerboseV bool // Verbose verbose mode -vv enabled VerboseVV bool // Verbose verbose mode -vvv enabled VerboseVVV bool // Verbose verbose mode -vvvv enabled VerboseVVVV bool // Version show program's version number, config file location, configured module search path, module location, executable location and exit Version bool }
AnsibleGalaxyRoleInstallOptions represents the options that can be passed to the ansible-galaxy role install command.
func (*AnsibleGalaxyRoleInstallOptions) GenerateCommandOptions ¶
func (o *AnsibleGalaxyRoleInstallOptions) GenerateCommandOptions() ([]string, error)
GenerateCommandOptions generates the command line options for the ansible-galaxy role install command.
func (*AnsibleGalaxyRoleInstallOptions) String ¶
func (o *AnsibleGalaxyRoleInstallOptions) String() string
String returns a string representation of the ansible-galaxy role install options.
type AnsibleGalaxyRoleInstallOptionsFunc ¶
type AnsibleGalaxyRoleInstallOptionsFunc func(*AnsibleGalaxyRoleInstallCmd)
AnsibleGalaxyRoleInstallOptionsFunc is a function to set executor options
func WithBinary ¶
func WithBinary(binary string) AnsibleGalaxyRoleInstallOptionsFunc
WithBinary set the ansible-galaxy binary file
func WithGalaxyRoleInstallOptions ¶
func WithGalaxyRoleInstallOptions(options *AnsibleGalaxyRoleInstallOptions) AnsibleGalaxyRoleInstallOptionsFunc
WithGalaxyRoleInstallOptions set the ansible-galaxy role install options
func WithRoleNames ¶
func WithRoleNames(roleNames ...string) AnsibleGalaxyRoleInstallOptionsFunc
WithRoleNames set the ansible-galaxy role names