|
|
@ -21,67 +21,68 @@ short_description: Create or destroy Azure Resource Manager template deployments
|
|
|
|
version_added: "2.1"
|
|
|
|
version_added: "2.1"
|
|
|
|
|
|
|
|
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- "Create or destroy Azure Resource Manager template deployments via the Azure SDK for Python.
|
|
|
|
- Create or destroy Azure Resource Manager template deployments via the Azure SDK for Python.
|
|
|
|
You can find some quick start templates in GitHub here https://github.com/azure/azure-quickstart-templates.
|
|
|
|
- You can find some quick start templates in GitHub here U(https://github.com/azure/azure-quickstart-templates).
|
|
|
|
For more information on Azure Resource Manager templates see https://azure.microsoft.com/en-us/documentation/articles/resource-group-template-deploy/."
|
|
|
|
- For more information on Azure Resource Manager templates see U(https://azure.microsoft.com/en-us/documentation/articles/resource-group-template-deploy/).
|
|
|
|
|
|
|
|
|
|
|
|
options:
|
|
|
|
options:
|
|
|
|
resource_group:
|
|
|
|
resource_group:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The resource group name to use or create to host the deployed template
|
|
|
|
- The resource group name to use or create to host the deployed template.
|
|
|
|
required: true
|
|
|
|
required: true
|
|
|
|
aliases:
|
|
|
|
aliases:
|
|
|
|
- resource_group_name
|
|
|
|
- resource_group_name
|
|
|
|
name:
|
|
|
|
name:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The name of the deployment to be tracked in the resource group deployment history. Re-using a deployment name
|
|
|
|
- The name of the deployment to be tracked in the resource group deployment history.
|
|
|
|
will overwrite the previous value in the resource group's deployment history.
|
|
|
|
- Re-using a deployment name will overwrite the previous value in the resource group's deployment history.
|
|
|
|
default: ansible-arm
|
|
|
|
default: ansible-arm
|
|
|
|
aliases:
|
|
|
|
aliases:
|
|
|
|
- deployment_name
|
|
|
|
- deployment_name
|
|
|
|
location:
|
|
|
|
location:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- The geo-locations in which the resource group will be located.
|
|
|
|
- The geo-locations in which the resource group will be located.
|
|
|
|
default: westus
|
|
|
|
default: westus
|
|
|
|
deployment_mode:
|
|
|
|
deployment_mode:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- In incremental mode, resources are deployed without deleting existing resources that are not included in the template.
|
|
|
|
- In incremental mode, resources are deployed without deleting existing resources that are not included in the template.
|
|
|
|
In complete mode resources are deployed and existing resources in the resource group not included in the template are deleted.
|
|
|
|
- In complete mode resources are deployed and existing resources in the resource group not included in the template are deleted.
|
|
|
|
default: incremental
|
|
|
|
default: incremental
|
|
|
|
choices:
|
|
|
|
choices:
|
|
|
|
- complete
|
|
|
|
- complete
|
|
|
|
- incremental
|
|
|
|
- incremental
|
|
|
|
template:
|
|
|
|
template:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- A hash containing the templates inline. This parameter is mutually exclusive with 'template_link'.
|
|
|
|
- A hash containing the templates inline. This parameter is mutually exclusive with I(template_link).
|
|
|
|
Either one of them is required if "state" parameter is "present".
|
|
|
|
- Either I(template) or I(template_link) is required if I(state=present).
|
|
|
|
type: dict
|
|
|
|
type: dict
|
|
|
|
template_link:
|
|
|
|
template_link:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Uri of file containing the template body. This parameter is mutually exclusive with 'template'. Either one
|
|
|
|
- Uri of file containing the template body. This parameter is mutually exclusive with I(template).
|
|
|
|
of them is required if "state" parameter is "present".
|
|
|
|
- Either I(template) or I(template_link) is required if I(state=present).
|
|
|
|
parameters:
|
|
|
|
parameters:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- A hash of all the required template variables for the deployment template. This parameter is mutually exclusive
|
|
|
|
- A hash of all the required template variables for the deployment template. This parameter is mutually exclusive with I(parameters_link).
|
|
|
|
with 'parameters_link'. Either one of them is required if "state" parameter is "present".
|
|
|
|
- Either I(parameters_link) or I(parameters) is required if I(state=present).
|
|
|
|
type: dict
|
|
|
|
type: dict
|
|
|
|
parameters_link:
|
|
|
|
parameters_link:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Uri of file containing the parameters body. This parameter is mutually exclusive with 'parameters'. Either
|
|
|
|
- Uri of file containing the parameters body. This parameter is mutually exclusive with I(parameters).
|
|
|
|
one of them is required if "state" parameter is "present".
|
|
|
|
- Either I(parameters_link) or I(parameters) is required if I(state=present).
|
|
|
|
wait_for_deployment_completion:
|
|
|
|
wait_for_deployment_completion:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Whether or not to block until the deployment has completed.
|
|
|
|
- Whether or not to block until the deployment has completed.
|
|
|
|
type: bool
|
|
|
|
type: bool
|
|
|
|
default: 'yes'
|
|
|
|
default: 'yes'
|
|
|
|
wait_for_deployment_polling_period:
|
|
|
|
wait_for_deployment_polling_period:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Time (in seconds) to wait between polls when waiting for deployment completion.
|
|
|
|
- Time (in seconds) to wait between polls when waiting for deployment completion.
|
|
|
|
default: 10
|
|
|
|
default: 10
|
|
|
|
state:
|
|
|
|
state:
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- If state is C(present), template will be created. If state is C(present) and deployment exists, it will be
|
|
|
|
- If I(state=present), template will be created.
|
|
|
|
updated. If state is C(absent), stack will be removed.
|
|
|
|
- If I(state=present) and deployment exists, it will be updated.
|
|
|
|
|
|
|
|
- If I(state=absent), stack will be removed.
|
|
|
|
default: present
|
|
|
|
default: present
|
|
|
|
choices:
|
|
|
|
choices:
|
|
|
|
- present
|
|
|
|
- present
|
|
|
@ -311,79 +312,93 @@ EXAMPLES = '''
|
|
|
|
|
|
|
|
|
|
|
|
RETURN = '''
|
|
|
|
RETURN = '''
|
|
|
|
deployment:
|
|
|
|
deployment:
|
|
|
|
description: Deployment details
|
|
|
|
description: Deployment details.
|
|
|
|
type: complex
|
|
|
|
type: complex
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
contains:
|
|
|
|
contains:
|
|
|
|
group_name:
|
|
|
|
group_name:
|
|
|
|
description: Name of the resource group
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Name of the resource group.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
sample: myResourceGroup
|
|
|
|
sample: myResourceGroup
|
|
|
|
id:
|
|
|
|
id:
|
|
|
|
description: The Azure ID of the deployment
|
|
|
|
description:
|
|
|
|
|
|
|
|
- The Azure ID of the deployment.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Resources/deployments/myD
|
|
|
|
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Resources/deployments/myD
|
|
|
|
eployment"
|
|
|
|
eployment"
|
|
|
|
instances:
|
|
|
|
instances:
|
|
|
|
description: Provides the public IP addresses for each VM instance.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Provides the public IP addresses for each VM instance.
|
|
|
|
type: list
|
|
|
|
type: list
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
contains:
|
|
|
|
contains:
|
|
|
|
ips:
|
|
|
|
ips:
|
|
|
|
description: List of Public IP addresses.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- List of Public IP addresses.
|
|
|
|
type: list
|
|
|
|
type: list
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
contains:
|
|
|
|
contains:
|
|
|
|
dns_settings:
|
|
|
|
dns_settings:
|
|
|
|
description: DNS Settings
|
|
|
|
description:
|
|
|
|
|
|
|
|
- DNS Settings.
|
|
|
|
type: complex
|
|
|
|
type: complex
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
contains:
|
|
|
|
contains:
|
|
|
|
domain_name_label:
|
|
|
|
domain_name_label:
|
|
|
|
description: Domain Name Label
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Domain Name Label.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
sample: myvirtualmachine
|
|
|
|
sample: myvirtualmachine
|
|
|
|
fqdn:
|
|
|
|
fqdn:
|
|
|
|
description: Fully Qualified Domain Name.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Fully Qualified Domain Name.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
sample: myvirtualmachine.eastus2.cloudapp.azure.com
|
|
|
|
sample: myvirtualmachine.eastus2.cloudapp.azure.com
|
|
|
|
id:
|
|
|
|
id:
|
|
|
|
description: Public IP resource id.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Public IP resource id.
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/p
|
|
|
|
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/p
|
|
|
|
ublicIPAddresses/myPublicIP"
|
|
|
|
ublicIPAddresses/myPublicIP"
|
|
|
|
name:
|
|
|
|
name:
|
|
|
|
decription: Public IP resource name.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Public IP resource name.
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
sample: myPublicIP
|
|
|
|
sample: myPublicIP
|
|
|
|
public_ip:
|
|
|
|
public_ip:
|
|
|
|
description: Public IP address value.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Public IP address value.
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
sample: 104.209.244.123
|
|
|
|
sample: 104.209.244.123
|
|
|
|
public_ip_allocation_method:
|
|
|
|
public_ip_allocation_method:
|
|
|
|
description: Public IP allocation method.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Public IP allocation method.
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
sample: Dynamic
|
|
|
|
sample: Dynamic
|
|
|
|
vm_name:
|
|
|
|
vm_name:
|
|
|
|
description: Virtual machine name.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Virtual machine name.
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
sample: myvirtualmachine
|
|
|
|
sample: myvirtualmachine
|
|
|
|
name:
|
|
|
|
name:
|
|
|
|
description: Name of the deployment
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Name of the deployment.
|
|
|
|
type: str
|
|
|
|
type: str
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
sample: myDeployment
|
|
|
|
sample: myDeployment
|
|
|
|
outputs:
|
|
|
|
outputs:
|
|
|
|
description: Dictionary of outputs received from the deployment.
|
|
|
|
description:
|
|
|
|
|
|
|
|
- Dictionary of outputs received from the deployment.
|
|
|
|
type: complex
|
|
|
|
type: complex
|
|
|
|
returned: always
|
|
|
|
returned: always
|
|
|
|
sample: { "hostname": { "type": "String", "value": "myvirtualmachine.eastus2.cloudapp.azure.com" } }
|
|
|
|
sample: { "hostname": { "type": "String", "value": "myvirtualmachine.eastus2.cloudapp.azure.com" } }
|
|
|
|