mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
* vmss has parameter load balancer * fix lint * fix indent * fix as pull request comment * fix yaml
This commit is contained in:
parent
5089122a32
commit
dc1b8e9a31
2 changed files with 156 additions and 26 deletions
|
@ -14,9 +14,15 @@
|
|||
- name: Create public IP address
|
||||
azure_rm_publicipaddress:
|
||||
resource_group: "{{ resource_group }}"
|
||||
allocation_method: Dynamic
|
||||
allocation_method: Static
|
||||
name: testPublicIP
|
||||
|
||||
- name: Create load balancer
|
||||
azure_rm_loadbalancer:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: testLB
|
||||
public_ip_address_name: testPublicIP
|
||||
|
||||
- name: Create VMSS
|
||||
azure_rm_virtualmachine_scaleset:
|
||||
resource_group: "{{ resource_group }}"
|
||||
|
@ -73,10 +79,105 @@
|
|||
caching: ReadWrite
|
||||
managed_disk_type: Standard_LRS
|
||||
|
||||
- name: Create VMSS (check mode)
|
||||
azure_rm_virtualmachine_scaleset:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: testVMSS1
|
||||
vm_size: Standard_DS1_v2
|
||||
admin_username: testuser
|
||||
ssh_password_enabled: true
|
||||
admin_password: "Password1234!"
|
||||
capacity: 2
|
||||
virtual_network_name: testVnet
|
||||
subnet_name: testSubnet
|
||||
load_balancer: testLB
|
||||
upgrade_policy: Manual
|
||||
tier: Standard
|
||||
managed_disk_type: Standard_LRS
|
||||
os_disk_caching: ReadWrite
|
||||
image:
|
||||
offer: CoreOS
|
||||
publisher: CoreOS
|
||||
sku: Stable
|
||||
version: latest
|
||||
data_disks:
|
||||
- lun: 0
|
||||
disk_size_gb: 64
|
||||
caching: ReadWrite
|
||||
managed_disk_type: Standard_LRS
|
||||
register: results
|
||||
check_mode: yes
|
||||
|
||||
- name: Assert that VMSS can be created
|
||||
assert:
|
||||
that: results.changed
|
||||
|
||||
- name: Create VMSS (check mode)
|
||||
azure_rm_virtualmachine_scaleset:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: testVMSS1
|
||||
vm_size: Standard_DS1_v2
|
||||
admin_username: testuser
|
||||
ssh_password_enabled: true
|
||||
admin_password: "Password1234!"
|
||||
capacity: 2
|
||||
virtual_network_name: testVnet
|
||||
subnet_name: testSubnet
|
||||
load_balancer: testLB
|
||||
upgrade_policy: Manual
|
||||
tier: Standard
|
||||
managed_disk_type: Standard_LRS
|
||||
os_disk_caching: ReadWrite
|
||||
image:
|
||||
offer: CoreOS
|
||||
publisher: CoreOS
|
||||
sku: Stable
|
||||
version: latest
|
||||
data_disks:
|
||||
- lun: 0
|
||||
disk_size_gb: 64
|
||||
caching: ReadWrite
|
||||
managed_disk_type: Standard_LRS
|
||||
register: results
|
||||
|
||||
- name: Assert that VMSS ran
|
||||
assert:
|
||||
that: results.changed
|
||||
|
||||
- name: Delete VMSS
|
||||
azure_rm_virtualmachine_scaleset:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: testVMSS1
|
||||
state: absent
|
||||
remove_on_absent: ['all']
|
||||
vm_size: Standard_DS1_v2
|
||||
admin_username: testuser
|
||||
capacity: 2
|
||||
virtual_network_name: testVnet
|
||||
subnet_name: testSubnet
|
||||
upgrade_policy: Manual
|
||||
tier: Standard
|
||||
os_disk_caching: ReadWrite
|
||||
image:
|
||||
offer: CoreOS
|
||||
publisher: CoreOS
|
||||
sku: Stable
|
||||
version: latest
|
||||
data_disks:
|
||||
- lun: 0
|
||||
disk_size_gb: 64
|
||||
caching: ReadWrite
|
||||
managed_disk_type: Standard_LRS
|
||||
|
||||
- name: Delete load balancer
|
||||
azure_rm_loadbalancer:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: testLB
|
||||
state: absent
|
||||
|
||||
- name: Delete public IP address
|
||||
azure_rm_publicipaddress:
|
||||
resource_group: "{{ resource_group }}"
|
||||
allocation_method: Dynamic
|
||||
state: absent
|
||||
name: testPublicIP
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue