external help file | Module Name | online version | schema |
---|---|---|---|
Jagabata.psm.dll-Help.xml |
Jagabata.psm |
2.0.0 |
Invoke (launch) a JobTemplate.
Start-AnsibleJobTemplate [-Id] <UInt64> [-Inventory <UInt64>] [-JobType <JobType>] [-ScmBranch <String>]
[-Credentials <UInt64[]>] [-Limit <String>] [-Labels <UInt64[]>] [-Tags <String[]>] [-SkipTags <String[]>]
[-ExtraVars <String>] [-DiffMode <Boolean>] [-Verbosity <JobVerbosity>] [-Forks <Int32>]
[-ExecutionEnvironment <UInt64>] [-JobSliceCount <Int32>] [-Timeout <Int32>] [-Interactive]
[<CommonParameters>]
Start-AnsibleJobTemplate [-JobTemplate] <IResource> [-Inventory <UInt64>] [-JobType <JobType>]
[-ScmBranch <String>] [-Credentials <UInt64[]>] [-Limit <String>] [-Labels <UInt64[]>] [-Tags <String[]>]
[-SkipTags <String[]>] [-ExtraVars <String>] [-DiffMode <Boolean>] [-Verbosity <JobVerbosity>]
[-Forks <Int32>] [-ExecutionEnvironment <UInt64>] [-JobSliceCount <Int32>] [-Timeout <Int32>] [-Interactive]
[<CommonParameters>]
Launch a JobTemplate.
This command only sends a request to start JobTemplate, not wait for the job is completed.
So, the returned job object will be non-completed status.
Use Wait-AnsibleUnifiedJob
command to wait for the job to complete later.
Implementation of following API:
/api/v2/job_templates/{id}/launch/
PS C:\> > Start-AnsibleJobtemplate -Id 7
Id Type Name JobType LaunchType Status Finished Elapsed LaunchedBy Template Note
-- ---- ---- ------- ---------- ------ -------- ------- ---------- -------- ----
101 Job Demo Job Template Run Manual Pending 2024/08/06 15:19:01 1.983 [user][1]admin [7]Demo Job Template {[Playbook, hello_world.yml], [Artifacts, {}], [Labels, ]}
Launch JobTemplate ID 7.
PS C:\> > Start-AnsibleJobtemplate -Id 7 | Wait-AnsibleUnifiedJob
[7] Demo Job Template -
Inventory : [1] Demo Inventory
Extra vars : ---
Diff Mode : False
Job Type : Run
Verbosity : 0 (Normal)
Credentials : [1] Demo Credential
Forks : 0
Job Slice Count : 1
Timeout : 0
====== [102] Demo Job Template ======
PLAY [Hello World Sample] ******************************************************
TASK [Gathering Facts] *********************************************************
ok: [localhost]
TASK [Hello Message] ***********************************************************
ok: [localhost] => {
"msg": "Hello World!"
}
PLAY RECAP *********************************************************************
localhost : ok=2 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Id Type Name JobType LaunchType Status Finished Elapsed LaunchedBy Template Note
-- ---- ---- ------- ---------- ------ -------- ------- ---------- -------- ----
102 Job Demo Job Template Run Manual Successful 2024/08/07 9:53:56 1.968 [user][1]admin [7]Demo Job Template {[Playbook, hello_world.yml], [Artifacts, {}], [Labels, ]}
Launch JobTemplate ID 7, and wait unti for the job is finished.
This is almost same as Invoke-AnsibleJobTemplate
command.
Specify credential IDs.
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: UInt64[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify diff mode.
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify ExecutionEnvironment ID.
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: UInt64
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify extra variables.
Specify in JSON or YAML format.
You can also specify an object of type IDictionary
as a parameter value.
Example: -ExtraVars @{ key1 = "string"; key2 = 10; key3 = Get-Date }
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the number of forks.
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
JobTemplate ID to be launched.
Type: UInt64
Parameter Sets: Id
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
"Prompt on launch" prompts for checked items. (However, it will not prompt for items that have already been given as parameters.)
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Inventory ID
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: UInt64
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the number of job slice count.
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
JobTempalte object to be launched.
Type: IResource
Parameter Sets: JobTemplate
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specify JobType ("Run" or "Check")
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: JobType
Parameter Sets: (All)
Aliases:
Accepted values: Run, Check
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Label IDs
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: UInt64[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Further limit selected hosts to an additional pattern.
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify branch to use in job run. Project default is used if omitted.
Note
This parameter will be ignored if the Project's AllowOverride
flag is on and "Ask" flag is off, although the request will be sent.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify skip tags. (commas ,
separated)
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify tags. (commas ,
separated)
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify timeout value (seconds).
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify job verbosity.
Note
This parameter will be ignored if "Ask" flag is off, although the request will be sent.
Type: JobVerbosity
Parameter Sets: (All)
Aliases:
Accepted values: Normal, Verbose, MoreVerbose, Debug, ConnectionDebug, WinRMDebug
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
JobTemplate ID to be launched.
JobTemplate object to be launched.
The result job object of lanched the JobTemplate (non-completed status)