external help file | Module Name | online version | schema |
---|---|---|---|
Jagabata.psm.dll-Help.xml |
Jagabata.psm |
2.0.0 |
Invoke (update) InventorySources.
Start-AnsibleInventoryUpdate [-Id] <UInt64> [<CommonParameters>]
Start-AnsibleInventoryUpdate [-Id] <UInt64> [-Check] [<CommonParameters>]
Start-AnsibleInventoryUpdate [-Source] <IResource> [<CommonParameters>]
Start-AnsibleInventoryUpdate [-Source] <IResource> [-Check] [<CommonParameters>]
Update InventorySources.
Multiple InventorySources in the Inventory may be udpated, when an Inventory is specified bye -Inventory
parameter.
This command only sends a request to update InventorySources, 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/inventory_sources/{id}/update/
/api/v2/inventries/{id}/update_inventory_sources/
PS C:\> Start-AnsibleInventoryUpdate -Id 11
Id Type Name JobType LaunchType Status Finished Elapsed LaunchedBy Template Note
-- ---- ---- ------- ---------- ------ -------- ------- ---------- -------- ----
130 InventoryUpdate TestInventory - test_source Manual Pending 0 [user][1]admin [11]test_source {[Inventory, [2]TestInventory], [Source, Scm], [SourcePath, inventory/hosts.ini]}
Update an InventorySource ID 11.
Check wheter InventorySource(s) can be updated.
Type: SwitchParameter
Parameter Sets: CheckId, CheckResource
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
InventorySource ID to be updated.
Type: UInt64
Parameter Sets: Id, CheckId
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
A Inventory
or InventorySource
object.
If the value is Inventory
, all of InventorySources in the Inventory will be updated or checked.
Type: IResource
Parameter Sets: Resource, CheckResource
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
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.
InventorySource ID
InventorySource object
Inventory object containing the InventorySources to be updated.
InventoryUpdate job object (non-completed status)
Results of checked wheter the InventorySources can be updated.