Renaming azure_rm_managed_disk for consistency (#54825)

This commit is contained in:
Zim Kalinowski 2019-04-04 12:24:03 +08:00 committed by GitHub
parent c5f666907e
commit 69ca89858c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 57 additions and 48 deletions

View file

@ -524,9 +524,9 @@ groupings:
- azure
azure_rm_loadbalancer_facts:
- azure
azure_rm_managed_disk:
azure_rm_manageddisk:
- azure
azure_rm_managed_disk_facts:
azure_rm_manageddisk_facts:
- azure
azure_rm_mysqldatabase:
- azure

View file

@ -0,0 +1 @@
azure_rm_manageddisk.py

View file

@ -0,0 +1 @@
azure_rm_manageddisk_facts.py

View file

@ -15,7 +15,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = '''
---
module: azure_rm_managed_disk
module: azure_rm_manageddisk
version_added: "2.4"
@ -24,6 +24,9 @@ short_description: Manage Azure Manage Disks
description:
- Create, update and delete an Azure Managed Disk
notes:
- This module was called C(azure_rm_managed_disk) before Ansible 2.8. The usage did not change.
options:
resource_group:
description:
@ -112,14 +115,14 @@ author:
EXAMPLES = '''
- name: Create managed disk
azure_rm_managed_disk:
azure_rm_manageddisk:
name: mymanageddisk
location: eastus
resource_group: myResourceGroup
disk_size_gb: 4
- name: Create managed operating system disk from page blob
azure_rm_managed_disk:
azure_rm_manageddisk:
name: mymanageddisk
location: eastus2
resource_group: myResourceGroup
@ -129,7 +132,7 @@ EXAMPLES = '''
storage_account_type: Premium_LRS
- name: Mount the managed disk to VM
azure_rm_managed_disk:
azure_rm_manageddisk:
name: mymanageddisk
location: eastus
resource_group: myResourceGroup
@ -137,7 +140,7 @@ EXAMPLES = '''
managed_by: testvm001
- name: Unmount the managed disk to VM
azure_rm_managed_disk:
azure_rm_manageddisk:
name: mymanageddisk
location: eastus
resource_group: myResourceGroup
@ -178,7 +181,7 @@ except ImportError:
pass
# duplicated in azure_rm_managed_disk_facts
# duplicated in azure_rm_manageddisk_facts
def managed_disk_to_dict(managed_disk):
create_data = managed_disk.creation_data
return dict(

View file

@ -14,7 +14,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = r'''
---
module: azure_rm_managed_disk_facts
module: azure_rm_manageddisk_facts
version_added: "2.4"
@ -23,6 +23,9 @@ short_description: Get managed disk facts
description:
- Get facts for a specific managed disk or all managed disks.
notes:
- This module was called C(azure_rm_managed_disk_facts) before Ansible 2.8. The usage did not change.
options:
name:
description:
@ -48,15 +51,15 @@ author:
EXAMPLES = r'''
- name: Get facts for one managed disk
azure_rm_managed_disk_facts:
azure_rm_manageddisk_facts:
name: Testing
resource_group: myResourceGroup
- name: Get facts for all managed disks
azure_rm_managed_disk_facts:
azure_rm_manageddisk_facts:
- name: Get facts by tags
azure_rm_managed_disk_facts:
azure_rm_manageddisk_facts:
tags:
- testing
'''
@ -122,7 +125,7 @@ except Exception:
pass
# duplicated in azure_rm_managed_disk
# duplicated in azure_rm_manageddisk
def managed_disk_to_dict(managed_disk):
create_data = managed_disk.creation_data
return dict(

View file

@ -56,7 +56,7 @@
register: vm
- name: Create new empty managed disk
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "{{ empty_disk_name }}"
storage_account_type: "Standard_LRS"
@ -150,7 +150,7 @@
- not output.changed
- name: Delete empty disk
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "{{ empty_disk_name }}"
state: absent

View file

@ -2,3 +2,4 @@ cloud/azure
shippable/azure/group3
destructive
disabled
azure_rm_manageddisk_facts

View file

@ -5,7 +5,7 @@
run_once: yes
- name: Clearing (if) previous disks were created
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "{{ item }}"
state: absent
@ -16,7 +16,7 @@
- "md{{ rpfx }}1"
- name: Create managed disk (Check Mode)
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
storage_account_type: "Standard_LRS"
@ -34,7 +34,7 @@
- output.state
- name: Test invalid account name (should give error)
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "invalid_char$"
disk_size_gb: 1
@ -46,7 +46,7 @@
assert: { that: "output['failed'] == True" }
- name: Create new managed disk succesfully
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
storage_account_type: "Standard_LRS"
@ -66,7 +66,7 @@
- output.state.storage_account_type == "Standard_LRS"
- name: Create new managed disk with zone
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}3"
storage_account_type: "Standard_LRS"
@ -84,7 +84,7 @@
- output.state.zone == ["1"]
- name: Change the operating system type of the managed disk to linux
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 1
@ -101,7 +101,7 @@
- output.state.os_type == 'linux'
- name: Create new managed disk with an os_type specified at creation
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}os"
storage_account_type: "Standard_LRS"
@ -116,13 +116,13 @@
- win.state.os_type == 'windows'
- name: Clean up managed disk created with os_type
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}os"
state: absent
- name: Copy disk to a new managed disk
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}2"
create_option: "copy"
@ -137,7 +137,7 @@
- copy.state.id is defined
- name: Update a new disk without changes
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
storage_account_type: "Standard_LRS"
@ -151,7 +151,7 @@
- output.state.id is defined
- name: Change storage account type to an invalid type
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
storage_account_type: "PremiumL"
@ -163,7 +163,7 @@
assert: { that: "output['failed'] == True" }
- name: Change disk size to incompatible size
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 3000000
@ -174,7 +174,7 @@
assert: { that: "output['failed'] == True" }
- name: Change disk to bigger size
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 2
@ -187,7 +187,7 @@
- output.state.disk_size_gb == 2
- name: Change disk to Standard SSD
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
storage_account_type: "StandardSSD_LRS"
@ -201,7 +201,7 @@
- output.state.storage_account_type == "StandardSSD_LRS"
- name: Gather facts to one specific disk
azure_rm_managed_disk_facts:
azure_rm_manageddisk_facts:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
@ -211,7 +211,7 @@
- azure_managed_disk[0].storage_account_type == "StandardSSD_LRS"
- name: Change disk to Premium (SSD)
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
storage_account_type: "Premium_LRS"
@ -225,7 +225,7 @@
- output.state.storage_account_type == "Premium_LRS"
- name: Update disk tags
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 2
@ -242,7 +242,7 @@
- "output.state.tags.galaxy == 'no'"
- name: Update disk tags
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 2
@ -259,7 +259,7 @@
- "output.state.tags.delete == 'never'"
- name: Gather facts to one specific disk
azure_rm_managed_disk_facts:
azure_rm_manageddisk_facts:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
@ -271,7 +271,7 @@
- "azure_managed_disk[0].os_type == 'linux'"
- name: Gather facts
azure_rm_managed_disk_facts:
azure_rm_manageddisk_facts:
resource_group: "{{ resource_group }}"
- assert:
@ -284,7 +284,7 @@
with_dict: "{{ azure_managed_disk[0] }}"
- name: Create disk with facts return value
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
location: "{{ parameter.location }}"
name: "{{ parameter.name }}"
@ -348,7 +348,7 @@
version: latest
- name: Mount the disk to virtual machine (check mode)
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 2
@ -364,7 +364,7 @@
- not mounted.state.managed_by
- name: Mount the disk to virtual machine
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 2
@ -379,7 +379,7 @@
- "'tr{{ rpfx }}' in mounted.state.managed_by"
- name: Mount the disk to virtual machine (idempotent)
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 2
@ -394,7 +394,7 @@
- "'tr{{ rpfx }}' in mounted.state.managed_by"
- name: Unmount the disk to virtual machine (check mode)
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 2
@ -410,7 +410,7 @@
- mounted.changed
- name: Unmount the disk to virtual machine
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 2
@ -426,7 +426,7 @@
- not mounted.state.managed_by
- name: Unmount the disk to virtual machine (idempotent)
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
managed_by: ''
@ -442,7 +442,7 @@
- not mounted.state.managed_by
- name: Update disk size
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 4
@ -456,7 +456,7 @@
- output.state.disk_size_gb == 4
- name: Attach the disk to virtual machine again
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
disk_size_gb: 4
@ -472,7 +472,7 @@
- "'tr{{ rpfx }}' in mounted.state.managed_by"
- name: Change disk size to incompatible size
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
state: absent
@ -484,7 +484,7 @@
assert: { that: "output['failed'] == True" }
- name: Delete managed disk (Check Mode)
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}1"
state: absent
@ -498,7 +498,7 @@
- output.state
- name: Delete all managed disk
azure_rm_managed_disk:
azure_rm_manageddisk:
resource_group: "{{ resource_group }}"
name: "md{{ rpfx }}{{ item }}"
managed_by: ''

View file

@ -85,7 +85,7 @@ lib/ansible/modules/cloud/amazon/s3_website.py E324
lib/ansible/modules/cloud/amazon/sts_assume_role.py E317
lib/ansible/modules/cloud/atomic/atomic_container.py E317
lib/ansible/modules/cloud/azure/azure_rm_dnszone_facts.py E325
lib/ansible/modules/cloud/azure/azure_rm_managed_disk_facts.py E325
lib/ansible/modules/cloud/azure/azure_rm_manageddisk_facts.py E325
lib/ansible/modules/cloud/centurylink/clc_aa_policy.py E335
lib/ansible/modules/cloud/centurylink/clc_alert_policy.py E317
lib/ansible/modules/cloud/centurylink/clc_blueprint_package.py E335