Skip to content

Latest commit

 

History

History
186 lines (139 loc) · 3.28 KB

New-AnsibleHost.md

File metadata and controls

186 lines (139 loc) · 3.28 KB
external help file Module Name online version schema
Jagabata.psm.dll-Help.xml
Jagabata.psm
2.0.0

New-AnsibleHost

SYNOPSIS

Create a Host.

SYNTAX

New-AnsibleHost [-Inventory] <UInt64> [-Name] <String> [-Description <String>] [-InstanceId <String>]
 [-Variables <String>] [-Disabled] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Create a Host.

Implements following Rest API:

  • /api/v2/hosts/ (POST)

EXAMPLES

Example 1

PS C:\> New-AnsibleHost -Inventory 1 -Name host_name

Create a new Host into the Inventory of ID 1.

PARAMETERS

-Description

Optional description of the host.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disabled

Create a Host as disabled state.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InstanceId

Used by the remote inventory source to uniquely identify the host.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Inventory

Inventory ID.

Type: UInt64
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Name

Name of the host.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Variables

Specify in JSON or YAML format. You can also specify an object of type IDictionary as a parameter value.

Example: -Variables @{ ansible_host = "192.168.0.10"; ansible_connection = "ssh"; }

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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.

INPUTS

None

OUTPUTS

Jagabata.Resources.Host

New created Host object.

NOTES

RELATED LINKS

Get-AnsibleHost

Find-AnsibleHost

Update-AnsibleHost

Register-AnsibleHost

Unregister-AnsibleHost

Remove-AnsibleHost