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 = ''' DOCUMENTATION = '''
--- ---
module: azure_rm_virtualmachine_extension module: azure_rm_virtualmachineextension
version_added: "2.4" version_added: "2.4"
@ -24,6 +24,9 @@ short_description: Managed Azure Virtual Machine extension
description: description:
- Create, update and delete Azure Virtual Machine Extension - 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: options:
resource_group: resource_group:
description: description:
@ -77,7 +80,7 @@ author:
EXAMPLES = ''' EXAMPLES = '''
- name: Create VM Extension - name: Create VM Extension
azure_rm_virtualmachine_extension: azure_rm_virtualmachineextension:
name: myvmextension name: myvmextension
location: eastus location: eastus
resource_group: myResourceGroup resource_group: myResourceGroup
@ -89,7 +92,7 @@ EXAMPLES = '''
auto_upgrade_minor_version: true auto_upgrade_minor_version: true
- name: Delete VM Extension - name: Delete VM Extension
azure_rm_virtualmachine_extension: azure_rm_virtualmachineextension:
name: myvmextension name: myvmextension
location: eastus location: eastus
resource_group: myResourceGroup resource_group: myResourceGroup
@ -208,6 +211,9 @@ class AzureRMVMExtension(AzureRMModuleBase):
for key in list(self.module_arg_spec.keys()): for key in list(self.module_arg_spec.keys()):
setattr(self, key, kwargs[key]) 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 resource_group = None
response = None response = None
to_be_updated = False to_be_updated = False

View file

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