- name:Create VMSS with security group in same resource group, with accelerated networking.
azure_rm_virtualmachine_scaleset:
resource_group:"{{ resource_group }}"
name:testVMSS{{ rpfx }}2
vm_size:Standard_D3_v2
capacity:1
virtual_network_name:testVnet
subnet_name:testSubnet
admin_username:testuser
ssh_password_enabled:true
admin_password:"Password1234!"
image:
name:testimagea
resource_group:"{{ resource_group }}"
upgrade_policy:Manual
security_group:testNetworkSecurityGroup
enable_accelerated_networking:yes
register:results
- name:Assert that nothing has changed
assert:
that:
- not results.changed
- name:Create VMSS with security group in same resource group, with accelerated networking.
azure_rm_virtualmachine_scaleset:
resource_group:"{{ resource_group }}"
name:testVMSS{{ rpfx }}2
vm_size:Standard_D3_v2
capacity:1
virtual_network_name:testVnet
subnet_name:testSubnet
admin_username:testuser
ssh_password_enabled:true
admin_password:"Password1234!"
image:
name:testimageb
resource_group:"{{ resource_group }}"
upgrade_policy:Manual
security_group:testNetworkSecurityGroup
enable_accelerated_networking:yes
register:results
- name:Assert that something has changed
assert:
that:
- results.changed
- name:update VMSS with security group in different resource group.
- name:update VMSS with security group in different resource group.
azure_rm_virtualmachine_scaleset:
azure_rm_virtualmachine_scaleset:
resource_group:"{{ resource_group }}"
resource_group:"{{ resource_group }}"
@ -260,21 +345,20 @@
ssh_password_enabled:true
ssh_password_enabled:true
admin_password:"Password1234!"
admin_password:"Password1234!"
image:
image:
offer:CoreOS
name:testimageb
publisher:CoreOS
resource_group:"{{ resource_group }}"
sku:Stable
version:latest
upgrade_policy:Manual
upgrade_policy:Manual
security_group:
security_group:
name:testNetworkSecurityGroup2
name:testNetworkSecurityGroup2
resource_group:"{{ resource_group_secondary }}"
resource_group:"{{ resource_group_secondary }}"
register:results
register:results
- name:Assert that security group is correct
# disable for now
assert:
#- name: Assert that security group is correct
that:
# assert:
- 'results.changed'
# that:
- '"testNetworkSecurityGroup2" in results.ansible_facts.azure_vmss.properties.virtualMachineProfile.networkProfile.networkInterfaceConfigurations.0.properties.networkSecurityGroup.id'
# - 'results.changed'
# - '"testNetworkSecurityGroup2" in results.ansible_facts.azure_vmss.properties.virtualMachineProfile.networkProfile.networkInterfaceConfigurations.0.properties.networkSecurityGroup.id'