Renaming inconsistent module name (#54513)

This commit is contained in:
Zim Kalinowski 2019-03-29 14:43:18 +08:00 committed by GitHub
parent 20ac19bf2e
commit af2e5fc761
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 5 deletions

View file

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

View file

@ -15,7 +15,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = '''
---
module: azure_rm_virtualmachine_extension
module: azure_rm_virtualmachineextension
version_added: "2.4"
@ -24,6 +24,9 @@ short_description: Managed Azure Virtual Machine extension
description:
- Create, update and delete Azure Virtual Machine Extension
notes:
- This module was called C(azure_rm_virtualmachine_extension) before Ansible 2.8. The usage did not change.
options:
resource_group:
description:
@ -77,7 +80,7 @@ author:
EXAMPLES = '''
- name: Create VM Extension
azure_rm_virtualmachine_extension:
azure_rm_virtualmachineextension:
name: myvmextension
location: eastus
resource_group: myResourceGroup
@ -89,7 +92,7 @@ EXAMPLES = '''
auto_upgrade_minor_version: true
- name: Delete VM Extension
azure_rm_virtualmachine_extension:
azure_rm_virtualmachineextension:
name: myvmextension
location: eastus
resource_group: myResourceGroup
@ -208,6 +211,9 @@ class AzureRMVMExtension(AzureRMModuleBase):
for key in list(self.module_arg_spec.keys()):
setattr(self, key, kwargs[key])
if self.module._name == 'azure_rm_virtualmachine_extension':
self.module.deprecate("The 'azure_rm_virtualmachine_extension' module has been renamed to 'azure_rm_virtualmachineextension'", version='2.12')
resource_group = None
response = None
to_be_updated = False

View file

@ -68,7 +68,7 @@
version: latest
- name: Create VM Extension
azure_rm_virtualmachine_extension:
azure_rm_virtualmachineextension:
resource_group: "{{ resource_group }}"
name: testVMExtension
virtual_machine_name: testVM
@ -125,7 +125,7 @@
- results.extensions[0]['provisioning_state'] != None
- name: Delete VM Extension
azure_rm_virtualmachine_extension:
azure_rm_virtualmachineextension:
resource_group: "{{ resource_group }}"
name: testVMExtension
virtual_machine_name: testVM