Parameter |
Choices/Defaults |
Comments |
ad_user
|
|
Active Directory username. Use when authenticating with an Active Directory user rather than service principal.
|
adfs_authority_url
(added in 2.6) |
Default:
null
|
Azure AD authority url. Use when authenticating with Username/password, and has your own ADFS authority.
|
api_profile
(added in 2.5) |
Default:
"latest"
|
Selects an API profile to use when communicating with Azure services. Default value of latest is appropriate for public clouds; future values will allow use with Azure Stack.
|
append_tags
bool |
|
Use to control if tags field is canonical or just appends to existing tags. When canonical, any tags not found in the tags parameter will be removed from the object's metadata.
|
auth_source
(added in 2.5) |
Choices:
- auto
- cli
- credential_file
- env
- msi
|
Controls the source of the credentials to use for authentication.
If not specified, ANSIBLE_AZURE_AUTH_SOURCE environment variable will be used and default to auto if variable is not defined.
auto will follow the default precedence of module parameters -> environment variables -> default profile in credential file ~/.azure/credentials .
When set to cli , the credentials will be sources from the default Azure CLI profile.
Can also be set via the ANSIBLE_AZURE_AUTH_SOURCE environment variable.
When set to msi , the host machine must be an azure resource with an enabled MSI extension. subscription_id or the environment variable AZURE_SUBSCRIPTION_ID can be used to identify the subscription ID if the resource is granted access to more than one subscription, otherwise the first subscription is chosen.
The msi was added in Ansible 2.6.
|
cert_validation_mode
(added in 2.5) |
|
Controls the certificate validation behavior for Azure endpoints. By default, all modules will validate the server certificate, but when an HTTPS proxy is in use, or against Azure Stack, it may be necessary to disable this behavior by passing ignore . Can also be set via credential file profile or the AZURE_CERT_VALIDATION environment variable.
|
client_id
|
|
Azure client ID. Use when authenticating with a Service Principal.
|
cloud_environment
(added in 2.4) |
Default:
"AzureCloud"
|
For cloud environments other than the US public cloud, the environment name (as defined by Azure Python SDK, eg, AzureChinaCloud , AzureUSGovernment ), or a metadata discovery endpoint URL (required for Azure Stack). Can also be set via credential file profile or the AZURE_CLOUD_ENVIRONMENT environment variable.
|
create_with_security_group
bool
(added in 2.6) |
|
Specifies whether a default security group should be be created with the NIC. Only applies when creating a new NIC.
|
ip_configurations
(added in 2.5) |
|
List of ip configuration if contains mutilple configuration, should contain configuration object include field private_ip_address, private_ip_allocation_method, public_ip_address_name, public_ip, public_ip_allocation_method, name
|
|
public_ip_address_name
|
|
Name of the public ip address. None for disable ip address.
|
|
private_ip_address
|
|
Private ip address for the ip configuration.
|
|
load_balancer_backend_address_pools
(added in 2.6) |
|
List of an existing load-balancer backend address pool id to associate with the network interface.
It can be write as a resource id.
Also can be a dict of name and load_balancer.
|
|
name
required |
|
Name of the ip configuration.
|
|
private_ip_allocation_method
|
Choices:
Dynamic ←
- Static
|
private ip allocation method.
|
|
public_ip_allocation_method
|
Choices:
Dynamic ←
- Static
|
public ip allocation method.
|
|
primary
bool |
|
Whether the ip configuration is the primary one in the list.
|
location
|
|
Valid azure location. Defaults to location of the resource group.
|
name
required |
|
Name of the network interface.
|
open_ports
|
|
When a default security group is created for a Linux host a rule will be added allowing inbound TCP connections to the default SSH port 22, and for a Windows host rules will be added allowing inbound access to RDP ports 3389 and 5986. Override the default ports by providing a list of open ports.
|
os_type
|
|
Determines any rules to be added to a default security group. When creating a network interface, if no security group name is provided, a default security group will be created. If the os_type is 'Windows', a rule will be added allowing RDP access. If the os_type is 'Linux', a rule allowing SSH access will be added.
|
password
|
|
Active Directory user password. Use when authenticating with an Active Directory user rather than service principal.
|
private_ip_address
|
|
(Deprecate) Valid IPv4 address that falls within the specified subnet.
This option will be deprecated in 2.9, use ip_configurations instead.
|
private_ip_allocation_method
|
Choices:
Dynamic ←
- Static
|
(Deprecate) Specify whether or not the assigned IP address is permanent. NOTE: when creating a network interface specifying a value of 'Static' requires that a private_ip_address value be provided. You can update the allocation method to 'Static' after a dynamic private ip address has been assigned.
This option will be deprecated in 2.9, use ip_configurations instead.
|
profile
|
|
Security profile found in ~/.azure/credentials file.
|
public_ip
bool |
|
(Deprecate) When creating a network interface, if no public IP address name is provided a default public IP address will be created. Set to false, if you do not want a public IP address automatically created.
This option will be deprecated in 2.9, use ip_configurations instead.
|
public_ip_address_name
|
|
(Deprecate) Name of an existing public IP address object to associate with the security group.
This option will be deprecated in 2.9, use ip_configurations instead.
aliases: public_ip_address, public_ip_name
|
public_ip_allocation_method
|
Choices:
Dynamic ←
- Static
|
(Deprecate) If a public_ip_address_name is not provided, a default public IP address will be created. The allocation method determines whether or not the public IP address assigned to the network interface is permanent.
This option will be deprecated in 2.9, use ip_configurations instead.
|
resource_group
required |
|
Name of a resource group where the network interface exists or will be created.
|
secret
|
|
Azure client secret. Use when authenticating with a Service Principal.
|
security_group
|
|
An existing security group with which to associate the network interface. If not provided, a default security group will be created when create_with_security_group is true.
It can be the name of security group.
Make sure the security group is in the same resource group when you only give its name.
It can be the resource id.
It can be a dict contains security_group's name and resource_group .
aliases: security_group_name
|
state
|
Choices:
- absent
present ←
|
Assert the state of the network interface. Use 'present' to create or update an interface and 'absent' to delete an interface.
|
subnet_name
required |
|
Name of an existing subnet within the specified virtual network. Required when creating a network interface
Use the virtual_network 's resource group.
aliases: subnet
|
subscription_id
|
|
Your Azure subscription Id.
|
tags
|
|
Dictionary of string:string pairs to assign as metadata to the object. Metadata tags on the object will be updated with any provided values. To remove tags set append_tags option to false.
|
tenant
|
|
Azure tenant ID. Use when authenticating with a Service Principal.
|
virtual_network
required |
|
An existing virtual network with which the network interface will be associated. Required when creating a network interface.
It can be the virtual network's name.
Make sure your virtual network is in the same resource group as NIC when you give only the name.
It can be the virtual network's resource id.
It can be a dict which contains name and resource_group of the virtual network.
aliases: virtual_network_name
|