Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Automated Integration]Merge Azure module changes from Ansible repo #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions files/sha.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lib/ansible/module_utils/azure_rm_common.py": "52a665e224a82b09cb26436d29a753dc8f7facad",
"lib/ansible/modules/cloud/azure": "dfc023209fc7460c449b2e97feb1b5e6d79d1491",
"lib/ansible/module_utils/azure_rm_common.py": "926e423690162b3bdf3ab255b0d50f0a9ae48e1a",
"lib/ansible/modules/cloud/azure": "8df03a6f6e5eb8696b5a8514535093c53b3f512d",
"packaging/requirements/requirements-azure.txt": "68fa03138c719377b754dc1bbd083529297d38b3",
"test/integration/targets": "ff53ca76b83d151fb05ba0c69def6089dc893135"
"test/integration/targets": "2d074f2a31e8ba80643e3f4feef9c31d60919b55"
}
2 changes: 1 addition & 1 deletion library/_azure_rm_applicationsecuritygroup_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationSecurityGroups/MyAsg"
location:
description:
- Loation of the application security group.
- Location of the application security group.
type: str
returned: always
sample: eastus
Expand Down
2 changes: 1 addition & 1 deletion library/_azure_rm_automationaccount_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
limit:
description:
- Max limit, C(-1) for unlimited.
type: long
type: int
returned: always
sample: -1
name:
Expand Down
2 changes: 1 addition & 1 deletion library/_azure_rm_cdnendpoint_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
sample: xxxxxxxx.blob.core.windows.net
origin_path:
description:
- A directory path on the origin that CDN can use to retreive content from.
- A directory path on the origin that CDN can use to retrieve content from.
type: str
sample: /pic/
tags:
Expand Down
2 changes: 1 addition & 1 deletion library/_azure_rm_containerregistry_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
credentials:
description:
- Credentials, fields will be empty if admin user is not enabled for ACR.
return: when C(retrieve_credentials) is set and C(admin_user_enabled) is set on ACR
returned: when C(retrieve_credentials) is set and C(admin_user_enabled) is set on ACR
type: complex
contains:
username:
Expand Down
3 changes: 1 addition & 2 deletions library/_azure_rm_deployment_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@
- The identifier of the resource.
returned: always
type: str
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Resources/deployments/myD
eployment"
sample: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Resources/deployments/myDeployment"
resource_group:
description:
- Resource group name.
Expand Down
2 changes: 1 addition & 1 deletion library/_azure_rm_devtestlabvirtualmachine_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
- Virtual machine expiration date.
returned: always
type: str
sample: 2029-02-22T01:49:12.117974Z
sample: "2029-02-22T01:49:12.117974Z"
image:
description:
- Gallery image reference.
Expand Down
2 changes: 1 addition & 1 deletion library/_azure_rm_hdinsightcluster_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
description:
- The list of roles in the cluster.
type: list
suboptions:
contains:
name:
description:
- The name of the role.
Expand Down
4 changes: 2 additions & 2 deletions library/_azure_rm_lock_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
description:
- ID of the resource where need to manage the lock.
- Get this via facts module.
- Cannot be set mutal with I(resource_group).
- Cannot be set mutual with I(resource_group).
- Manage subscription if both I(managed_resource_id) and I(resource_group) not defined.
- "'/subscriptions/{subscriptionId}' for subscriptions."
- "'/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}' for resource groups."
Expand All @@ -41,7 +41,7 @@
description:
- Resource group name where need to manage the lock.
- The lock is in the resource group level.
- Cannot be set mutal with I(managed_resource_id).
- Cannot be set mutual with I(managed_resource_id).
- Query subscription if both I(managed_resource_id) and I(resource_group) not defined.
- Can get all locks with 'child scope' in this resource group, use the I(managed_resource_id) in response for further management.
type: str
Expand Down
2 changes: 1 addition & 1 deletion library/_azure_rm_managed_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
disk_size_gb: 4

- name: Delete managed disk
azure_rm_manage_disk:
azure_rm_manageddisk:
name: mymanageddisk
location: eastus
resource_group: myResourceGroup
Expand Down
10 changes: 5 additions & 5 deletions library/_azure_rm_resource_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
allowExtensionOperations:
description:
- Specifies whether extension operations should be allowed on the virtual machine.
- This may only be set to False when no extentions are present on the virtual machine.
- This may only be set to False when no extensions are present on the virtual machine.
type: bool
returned: always
sample: true
Expand All @@ -176,7 +176,7 @@
sample: myVM
requireGuestProvisionSignale:
description:
- Specifies the host require guest provision siganl or not.
- Specifies the host require guest provision signal or not.
type: bool
returned: always
sample: true
Expand All @@ -188,7 +188,7 @@
sample: []
linuxConfiguration:
description:
- Specifies the Linux operatiing system settings on the virtual machine.
- Specifies the Linux operating system settings on the virtual machine.
type: dict
returned: when OS type is Linux
sample: {
Expand All @@ -203,14 +203,14 @@
sample: Succeeded
vmID:
description:
- Specifies the VM unique ID whic is a 128-bits identifier that is encoded and stored in all Azure laaS VMs SMBIOS.
- Specifies the VM unique ID which is a 128-bits identifier that is encoded and stored in all Azure laaS VMs SMBIOS.
- It can be read using platform BIOS commands.
type: str
returned: always
sample: "eb86d9bb-6725-4787-a487-2e497d5b340c"
storageProfile:
description:
- Specifies the storae account type for the managed disk.
- Specifies the storage account type for the managed disk.
type: complex
returned: always
contains:
Expand Down
2 changes: 1 addition & 1 deletion library/_azure_rm_roleassignment_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
returned: always
sample: myRoleAssignment
type:
descripition:
description:
- Type of role assignment.
type: str
returned: always
Expand Down
2 changes: 1 addition & 1 deletion library/_azure_rm_roledefinition_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
options:
scope:
description:
- The scope of role defintion.
- The scope of role definition.
required: True
id:
description:
Expand Down
2 changes: 1 addition & 1 deletion library/_azure_rm_securitygroup_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"securityRules": []
}
tags:
descripition:
description:
- Tags to assign to the security group.
returned: always
type: dict
Expand Down
2 changes: 1 addition & 1 deletion library/_azure_rm_servicebus_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
sample: 1
count_details:
description:
- Message count deatils.
- Message count details.
returned: always
type: complex
contains:
Expand Down
2 changes: 1 addition & 1 deletion library/_azure_rm_storageaccount_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def list_resource_group(self):
def list_all(self):
self.log('List all items')
try:
response = self.storage_client.storage_accounts.list_by_resource_group(self.resource_group)
response = self.storage_client.storage_accounts.list()
except Exception as exc:
self.fail("Error listing all items - {0}".format(str(exc)))

Expand Down
1 change: 0 additions & 1 deletion library/_azure_rm_subnet_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
- The type of the endpoint service.
returned: always
type: str
required: True
sample: Microsoft.Sql
locations:
description:
Expand Down
20 changes: 10 additions & 10 deletions library/_azure_rm_virtualmachine_scaleset.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,10 +733,6 @@ def exec_module(self, **kwargs):
self.log("Create virtual machine scale set {0}".format(self.name))
self.results['actions'].append('Created VMSS {0}'.format(self.name))

# Validate parameters
if not self.admin_username:
self.fail("Parameter error: admin_username required when creating a virtual machine scale set.")

if self.os_type == 'Linux':
if disable_ssh_password and not self.ssh_public_keys:
self.fail("Parameter error: ssh_public_keys required when disabling SSH password.")
Expand All @@ -762,6 +758,14 @@ def exec_module(self, **kwargs):
if nsg:
self.security_group = self.network_models.NetworkSecurityGroup(id=nsg.get('id'))

os_profile = None
if self.admin_username or self.custom_data or self.ssh_public_keys:
os_profile = self.compute_models.VirtualMachineScaleSetOSProfile(
admin_username=self.admin_username,
computer_name_prefix=self.short_hostname,
custom_data=self.custom_data
)

vmss_resource = self.compute_models.VirtualMachineScaleSet(
location=self.location,
overprovision=self.overprovision,
Expand All @@ -776,11 +780,7 @@ def exec_module(self, **kwargs):
tier=self.tier,
),
virtual_machine_profile=self.compute_models.VirtualMachineScaleSetVMProfile(
os_profile=self.compute_models.VirtualMachineScaleSetOSProfile(
admin_username=self.admin_username,
computer_name_prefix=self.short_hostname,
custom_data=self.custom_data
),
os_profile=os_profile,
storage_profile=self.compute_models.VirtualMachineScaleSetStorageProfile(
os_disk=self.compute_models.VirtualMachineScaleSetOSDisk(
managed_disk=managed_disk,
Expand Down Expand Up @@ -818,7 +818,7 @@ def exec_module(self, **kwargs):
if self.admin_password:
vmss_resource.virtual_machine_profile.os_profile.admin_password = self.admin_password

if self.os_type == 'Linux':
if self.os_type == 'Linux' and os_profile:
vmss_resource.virtual_machine_profile.os_profile.linux_configuration = self.compute_models.LinuxConfiguration(
disable_password_authentication=disable_ssh_password
)
Expand Down
5 changes: 3 additions & 2 deletions library/_azure_rm_virtualmachinescalesetinstance_facts.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

EXAMPLES = '''
- name: List VM instances in Virtual Machine ScaleSet
azure_rm_computevirtualmachinescalesetinstance_info:
azure_rm_virtualmachinescalesetinstance_info:
resource_group: myResourceGroup
vmss_name: myVMSS
'''
Expand Down Expand Up @@ -221,7 +221,8 @@ def format_response(self, item):
'name': d.get('name', None),
'provisioning_state': d.get('provisioning_state', None),
'power_state': power_state,
'vm_id': d.get('vm_id', None)
'vm_id': d.get('vm_id', None),
'computer_name': d.get('os_profile').get('computer_name', None)
}
return d

Expand Down
2 changes: 1 addition & 1 deletion library/azure_rm_aks.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
type: bool
subnet_resource_id:
description:
- Subnet associdated to the cluster.
- Subnet associated to the cluster.
version_added: "2.8"

extends_documentation_fragment:
Expand Down
2 changes: 1 addition & 1 deletion library/azure_rm_appgateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
- Frontend port resource of an application gateway.
protocol:
description:
- Protocol of the c(http) listener.
- Protocol of the C(http) listener.
choices:
- 'http'
- 'https'
Expand Down
2 changes: 1 addition & 1 deletion library/azure_rm_applicationsecuritygroup_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Network/applicationSecurityGroups/MyAsg"
location:
description:
- Loation of the application security group.
- Location of the application security group.
type: str
returned: always
sample: eastus
Expand Down
2 changes: 1 addition & 1 deletion library/azure_rm_automationaccount_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
limit:
description:
- Max limit, C(-1) for unlimited.
type: long
type: int
returned: always
sample: -1
name:
Expand Down
2 changes: 1 addition & 1 deletion library/azure_rm_autoscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
name: scale
resource_group: myResourceGroup

- name: Create an auto scale with compicated profile
- name: Create an auto scale with complicated profile
azure_rm_autoscale:
target: "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Compute/virtualMachineScaleSets
/myVmss"
Expand Down
Loading