diff --git a/changelogs/fragments/61417-azure-facts-info-rename.yml b/changelogs/fragments/61417-azure-facts-info-rename.yml new file mode 100644 index 00000000000..6d28c20f4e7 --- /dev/null +++ b/changelogs/fragments/61417-azure-facts-info-rename.yml @@ -0,0 +1,8 @@ +minor_changes: +- The ``azure_rm_automationaccount_facts`` module has been renamed to ``azure_rm_automationaccount_info``. +- The ``azure_rm_containerinstance_facts`` module has been renamed to ``azure_rm_containerinstance_info``. +- The ``azure_rm_cdnendpoint_facts`` module has been renamed to ``azure_rm_cdnendpoint_info``. +- The ``azure_rm_cdnprofile_facts`` module has been renamed to ``azure_rm_cdnprofile_info``. +- The ``azure_rm_containerregistry_facts`` module has been renamed to ``azure_rm_containerregistry_info``. +- The ``azure_rm_cosmosdbaccount_facts`` module has been renamed to ``azure_rm_cosmosdbaccount_info``. +- The ``azure_rm_deployment_facts`` module has been renamed to ``azure_rm_deployment_info``. diff --git a/docs/docsite/rst/porting_guides/porting_guide_2.9.rst b/docs/docsite/rst/porting_guides/porting_guide_2.9.rst index cf3944120ba..4eeef7941ea 100644 --- a/docs/docsite/rst/porting_guides/porting_guide_2.9.rst +++ b/docs/docsite/rst/porting_guides/porting_guide_2.9.rst @@ -554,7 +554,13 @@ be removed in Ansible 2.13. Please update update your playbooks accordingly. * The ``azure_rm_appserviceplan_facts`` module was renamed to :ref:`azure_rm_appserviceplan_info `. * The ``azure_rm_autoscale_facts`` module was renamed to :ref:`azure_rm_autoscale_info `. * The ``azure_rm_availabilityset_facts`` module was renamed to :ref:`azure_rm_availabilityset `. - +* The ``azure_rm_automationaccount_facts`` module was renamed to :ref:`azure_rm_automationaccount_info `. +* The ``azure_rm_cdnprofile_facts`` module was renamed to :ref:`azure_rm_cdnprofile_info `. +* The ``azure_rm_cdnendpoint_facts`` module was renamed to :ref:`azure_rm_cdnendpoint_info `. +* The ``azure_rm_containerinstance_facts`` module was renamed to :ref:`azure_rm_containerinstance_info `. +* The ``azure_rm_containerregistry_facts`` module was renamed to :ref:`azure_rm_containerregistry_info `. +* The ``azure_rm_cosmosdbaccount_facts`` module was renamed to :ref:`azure_rm_cosmosdbaccount_info `. +* The ``azure_rm_deployment_facts`` module was renamed to :ref:`azure_rm_deployment_info `. Noteworthy module changes ------------------------- diff --git a/lib/ansible/modules/cloud/azure/_azure_rm_automationaccount_facts.py b/lib/ansible/modules/cloud/azure/_azure_rm_automationaccount_facts.py new file mode 120000 index 00000000000..237669a3053 --- /dev/null +++ b/lib/ansible/modules/cloud/azure/_azure_rm_automationaccount_facts.py @@ -0,0 +1 @@ +azure_rm_automationaccount_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/azure/_azure_rm_cdnendpoint_facts.py b/lib/ansible/modules/cloud/azure/_azure_rm_cdnendpoint_facts.py new file mode 120000 index 00000000000..f6d505f1121 --- /dev/null +++ b/lib/ansible/modules/cloud/azure/_azure_rm_cdnendpoint_facts.py @@ -0,0 +1 @@ +azure_rm_cdnendpoint_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/azure/_azure_rm_cdnprofile_facts.py b/lib/ansible/modules/cloud/azure/_azure_rm_cdnprofile_facts.py new file mode 120000 index 00000000000..6be70363766 --- /dev/null +++ b/lib/ansible/modules/cloud/azure/_azure_rm_cdnprofile_facts.py @@ -0,0 +1 @@ +azure_rm_cdnprofile_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/azure/_azure_rm_containerinstance_facts.py b/lib/ansible/modules/cloud/azure/_azure_rm_containerinstance_facts.py new file mode 120000 index 00000000000..94b9e1007b6 --- /dev/null +++ b/lib/ansible/modules/cloud/azure/_azure_rm_containerinstance_facts.py @@ -0,0 +1 @@ +azure_rm_containerinstance_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/azure/_azure_rm_containerregistry_facts.py b/lib/ansible/modules/cloud/azure/_azure_rm_containerregistry_facts.py new file mode 120000 index 00000000000..537fdbb9619 --- /dev/null +++ b/lib/ansible/modules/cloud/azure/_azure_rm_containerregistry_facts.py @@ -0,0 +1 @@ +azure_rm_containerregistry_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/azure/_azure_rm_cosmosdbaccount_facts.py b/lib/ansible/modules/cloud/azure/_azure_rm_cosmosdbaccount_facts.py new file mode 120000 index 00000000000..657cd53add9 --- /dev/null +++ b/lib/ansible/modules/cloud/azure/_azure_rm_cosmosdbaccount_facts.py @@ -0,0 +1 @@ +azure_rm_cosmosdbaccount_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/azure/_azure_rm_deployment_facts.py b/lib/ansible/modules/cloud/azure/_azure_rm_deployment_facts.py new file mode 120000 index 00000000000..f25f858d168 --- /dev/null +++ b/lib/ansible/modules/cloud/azure/_azure_rm_deployment_facts.py @@ -0,0 +1 @@ +azure_rm_deployment_info.py \ No newline at end of file diff --git a/lib/ansible/modules/cloud/azure/azure_rm_aks_info.py b/lib/ansible/modules/cloud/azure/azure_rm_aks_info.py index 36b1c0dd6d1..3eb0ef1230a 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_aks_info.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_aks_info.py @@ -71,7 +71,6 @@ azure_aks: type: list ''' -from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.azure_rm_common import AzureRMModuleBase try: @@ -107,11 +106,6 @@ class AzureRMManagedClusterInfo(AzureRMModuleBase): self.tags = None self.show_kubeconfig = None - module = AnsibleModule(self.module_args) - is_old_facts = module._name == 'azure_rm_aks_facts' - if is_old_facts: - module.deprecate("The 'azure_rm_aks_facts' module has been renamed to 'azure_rm_aks_info'", version='2.13') - super(AzureRMManagedClusterInfo, self).__init__( derived_arg_spec=self.module_args, supports_tags=False, @@ -120,6 +114,10 @@ class AzureRMManagedClusterInfo(AzureRMModuleBase): def exec_module(self, **kwargs): + is_old_facts = self.module._name == 'azure_rm_aks_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_aks_facts' module has been renamed to 'azure_rm_aks_info'", version='2.13') + for key in self.module_args: setattr(self, key, kwargs[key]) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_aksversion_info.py b/lib/ansible/modules/cloud/azure/azure_rm_aksversion_info.py index 515ea48e41c..462ee785525 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_aksversion_info.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_aksversion_info.py @@ -56,7 +56,6 @@ azure_aks_versions: type: list ''' -from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.azure_rm_common import AzureRMModuleBase try: @@ -84,11 +83,6 @@ class AzureRMAKSVersion(AzureRMModuleBase): self.location = None self.version = None - module = AnsibleModule(self.module_args) - is_old_facts = module._name == 'azure_rm_aksversion_facts' - if is_old_facts: - module.deprecate("The 'azure_rm_aksversion_facts' module has been renamed to 'azure_rm_aksversion_info'", version='2.13') - super(AzureRMAKSVersion, self).__init__( derived_arg_spec=self.module_args, supports_tags=False, @@ -97,6 +91,10 @@ class AzureRMAKSVersion(AzureRMModuleBase): def exec_module(self, **kwargs): + is_old_facts = self.module._name == 'azure_rm_aksversion_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_aksversion_facts' module has been renamed to 'azure_rm_aksversion_info'", version='2.13') + for key in self.module_args: setattr(self, key, kwargs[key]) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_applicationsecuritygroup_info.py b/lib/ansible/modules/cloud/azure/azure_rm_applicationsecuritygroup_info.py index bdf757a3fb6..97b1e6e6345 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_applicationsecuritygroup_info.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_applicationsecuritygroup_info.py @@ -89,7 +89,6 @@ applicationsecuritygroups: sample: Succeeded ''' -from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.azure_rm_common import AzureRMModuleBase try: @@ -130,12 +129,6 @@ class AzureRMApplicationSecurityGroupInfo(AzureRMModuleBase): self.results = dict(changed=False) - module = AnsibleModule(self.module_arg_spec) - is_old_facts = module._name == 'azure_rm_applicationsecuritygroup_facts' - if is_old_facts: - module.deprecate("The 'azure_rm_applicationsecuritygroup_facts' module has been renamed to 'azure_rm_applicationsecuritygroup_info'", - version='2.13') - super(AzureRMApplicationSecurityGroupInfo, self).__init__(derived_arg_spec=self.module_arg_spec, supports_check_mode=False, supports_tags=False) @@ -143,6 +136,11 @@ class AzureRMApplicationSecurityGroupInfo(AzureRMModuleBase): def exec_module(self, **kwargs): """Main module execution method""" + is_old_facts = self.module._name == 'azure_rm_applicationsecuritygroup_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_applicationsecuritygroup_facts' module has been renamed to 'azure_rm_applicationsecuritygroup_info'", + version='2.13') + for key in list(self.module_arg_spec.keys()) + ['tags']: if hasattr(self, key): setattr(self, key, kwargs[key]) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_appserviceplan_info.py b/lib/ansible/modules/cloud/azure/azure_rm_appserviceplan_info.py index ac72145d10d..3309dc17735 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_appserviceplan_info.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_appserviceplan_info.py @@ -126,7 +126,6 @@ except Exception: # This is handled in azure_rm_common pass -from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.azure_rm_common import AzureRMModuleBase AZURE_OBJECT_CLASS = 'AppServicePlan' @@ -149,17 +148,16 @@ class AzureRMAppServicePlanInfo(AzureRMModuleBase): self.tags = None self.info_level = None - module = AnsibleModule(self.module_arg_spec) - is_old_facts = module._name == 'azure_rm_appserviceplan_facts' - if is_old_facts: - module.deprecate("The 'azure_rm_appserviceplan_facts' module has been renamed to 'azure_rm_appserviceplan_info'", version='2.13') - super(AzureRMAppServicePlanInfo, self).__init__(self.module_arg_spec, supports_tags=False, facts_module=True) def exec_module(self, **kwargs): + is_old_facts = self.module._name == 'azure_rm_appserviceplan_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_appserviceplan_facts' module has been renamed to 'azure_rm_appserviceplan_info'", version='2.13') + for key in self.module_arg_spec: setattr(self, key, kwargs[key]) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_automationaccount_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_automationaccount_info.py similarity index 95% rename from lib/ansible/modules/cloud/azure/azure_rm_automationaccount_facts.py rename to lib/ansible/modules/cloud/azure/azure_rm_automationaccount_info.py index 1520f4b95dd..e46357956ee 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_automationaccount_facts.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_automationaccount_info.py @@ -15,7 +15,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: azure_rm_automationaccount_facts +module: azure_rm_automationaccount_info version_added: '2.9' short_description: Get Azure automation account facts description: @@ -61,7 +61,7 @@ author: EXAMPLES = ''' - name: Get details of an automation account - azure_rm_automationaccount_facts: + azure_rm_automationaccount_info: name: Testing resource_group: myResourceGroup list_statistics: yes @@ -69,11 +69,11 @@ EXAMPLES = ''' list_keys: yes - name: List automation account in a resource group - azure_rm_automationaccount_facts: + azure_rm_automationaccount_info: resource_group: myResourceGroup - name: List automation account in a resource group - azure_rm_automationaccount_facts: + azure_rm_automationaccount_info: ''' RETURN = ''' @@ -246,7 +246,7 @@ except ImportError: pass -class AzureRMAutomationAccountFacts(AzureRMModuleBase): +class AzureRMAutomationAccountInfo(AzureRMModuleBase): def __init__(self): # define user inputs into argument self.module_arg_spec = dict( @@ -278,9 +278,15 @@ class AzureRMAutomationAccountFacts(AzureRMModuleBase): self.list_statistics = None self.list_usages = None self.list_keys = None - super(AzureRMAutomationAccountFacts, self).__init__(self.module_arg_spec, supports_tags=False, facts_module=True) + + super(AzureRMAutomationAccountInfo, self).__init__(self.module_arg_spec, supports_tags=False, facts_module=True) def exec_module(self, **kwargs): + + is_old_facts = self.module._name == 'azure_rm_automationaccount_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_automationaccount_facts' module has been renamed to 'azure_rm_automationaccount_info'", version='2.13') + for key in list(self.module_arg_spec): setattr(self, key, kwargs[key]) @@ -370,7 +376,7 @@ class AzureRMAutomationAccountFacts(AzureRMModuleBase): def main(): - AzureRMAutomationAccountFacts() + AzureRMAutomationAccountInfo() if __name__ == '__main__': diff --git a/lib/ansible/modules/cloud/azure/azure_rm_autoscale_info.py b/lib/ansible/modules/cloud/azure/azure_rm_autoscale_info.py index 5db394736a3..995556ac583 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_autoscale_info.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_autoscale_info.py @@ -114,7 +114,6 @@ autoscales: ''' -from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.azure_rm_common import AzureRMModuleBase from ansible.module_utils._text import to_native @@ -228,14 +227,14 @@ class AzureRMAutoScaleInfo(AzureRMModuleBase): self.name = None self.tags = None - module = AnsibleModule(self.module_arg_spec) - is_old_facts = module._name == 'azure_rm_autoscale_facts' - if is_old_facts: - module.deprecate("The 'azure_rm_autoscale_facts' module has been renamed to 'azure_rm_autoscale_info'", version='2.13') - super(AzureRMAutoScaleInfo, self).__init__(self.module_arg_spec, supports_tags=False) def exec_module(self, **kwargs): + + is_old_facts = self.module._name == 'azure_rm_autoscale_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_autoscale_facts' module has been renamed to 'azure_rm_autoscale_info'", version='2.13') + for key in list(self.module_arg_spec): setattr(self, key, kwargs[key]) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_availabilityset_info.py b/lib/ansible/modules/cloud/azure/azure_rm_availabilityset_info.py index 8f10c64a98c..6a61deaafe7 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_availabilityset_info.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_availabilityset_info.py @@ -105,7 +105,6 @@ azure_availabilityset: sample: { env: sandbox } ''' -from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.azure_rm_common import AzureRMModuleBase try: @@ -139,11 +138,6 @@ class AzureRMAvailabilitySetInfo(AzureRMModuleBase): self.resource_group = None self.tags = None - module = AnsibleModule(self.module_args) - is_old_facts = module._name == 'azure_rm_availabilityset_facts' - if is_old_facts: - module.deprecate("The 'azure_rm_availabilityset_facts' module has been renamed to 'azure_rm_availabilityset_info'", version='2.13') - super(AzureRMAvailabilitySetInfo, self).__init__( derived_arg_spec=self.module_args, supports_tags=False, @@ -152,6 +146,10 @@ class AzureRMAvailabilitySetInfo(AzureRMModuleBase): def exec_module(self, **kwargs): + is_old_facts = self.module._name == 'azure_rm_availabilityset_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_availabilityset_facts' module has been renamed to 'azure_rm_availabilityset_info'", version='2.13') + for key in self.module_args: setattr(self, key, kwargs[key]) diff --git a/lib/ansible/modules/cloud/azure/azure_rm_cdnendpoint_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_cdnendpoint_info.py similarity index 95% rename from lib/ansible/modules/cloud/azure/azure_rm_cdnendpoint_facts.py rename to lib/ansible/modules/cloud/azure/azure_rm_cdnendpoint_info.py index 02fc721dd05..de2d869fabc 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_cdnendpoint_facts.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_cdnendpoint_info.py @@ -14,9 +14,9 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: azure_rm_cdnendpoint_facts +module: azure_rm_cdnendpoint_info -version_added: "2.8" +version_added: "2.9" short_description: Get Azure CDN endpoint facts @@ -49,12 +49,12 @@ author: EXAMPLES = ''' - name: Get facts for all endpoints in CDN profile - azure_rm_cdnendpoint_facts: + azure_rm_cdnendpoint_info: resource_group: myResourceGroup profile_name: myCDNProfile - name: Get facts of specific CDN endpoint - azure_rm_cdnendpoint_facts: + azure_rm_cdnendpoint_info: resource_group: myResourceGroup profile_name: myCDNProfile name: myEndpoint1 @@ -180,7 +180,7 @@ import re AZURE_OBJECT_CLASS = 'endpoints' -class AzureRMCdnEndpointFacts(AzureRMModuleBase): +class AzureRMCdnEndpointInfo(AzureRMModuleBase): """Utility class to get Azure Azure CDN endpoint facts""" def __init__(self): @@ -208,7 +208,7 @@ class AzureRMCdnEndpointFacts(AzureRMModuleBase): self.profile_name = None self.tags = None - super(AzureRMCdnEndpointFacts, self).__init__( + super(AzureRMCdnEndpointInfo, self).__init__( derived_arg_spec=self.module_args, supports_tags=False, facts_module=True @@ -216,6 +216,10 @@ class AzureRMCdnEndpointFacts(AzureRMModuleBase): def exec_module(self, **kwargs): + is_old_facts = self.module._name == 'azure_rm_cdnendpoint_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_cdnendpoint_facts' module has been renamed to 'azure_rm_cdnendpoint_info'", version='2.13') + for key in self.module_args: setattr(self, key, kwargs[key]) @@ -304,7 +308,7 @@ class AzureRMCdnEndpointFacts(AzureRMModuleBase): def main(): """Main module execution code path""" - AzureRMCdnEndpointFacts() + AzureRMCdnEndpointInfo() if __name__ == '__main__': diff --git a/lib/ansible/modules/cloud/azure/azure_rm_cdnprofile_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_cdnprofile_info.py similarity index 93% rename from lib/ansible/modules/cloud/azure/azure_rm_cdnprofile_facts.py rename to lib/ansible/modules/cloud/azure/azure_rm_cdnprofile_info.py index e336e2e3b0e..3de696727be 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_cdnprofile_facts.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_cdnprofile_info.py @@ -14,9 +14,9 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: azure_rm_cdnprofile_facts +module: azure_rm_cdnprofile_info -version_added: "2.8" +version_added: "2.9" short_description: Get Azure CDN profile facts @@ -44,15 +44,15 @@ author: EXAMPLES = ''' - name: Get facts for one CDN profile - azure_rm_cdnprofile_facts: + azure_rm_cdnprofile_info: name: Testing resource_group: myResourceGroup - name: Get facts for all CDN profiles - azure_rm_cdnprofile_facts: + azure_rm_cdnprofile_info: - name: Get facts by tags - azure_rm_cdnprofile_facts: + azure_rm_cdnprofile_info: tags: - Environment:Test ''' @@ -129,7 +129,7 @@ import re AZURE_OBJECT_CLASS = 'profiles' -class AzureRMCdnprofileFacts(AzureRMModuleBase): +class AzureRMCdnprofileInfo(AzureRMModuleBase): """Utility class to get Azure CDN profile facts""" def __init__(self): @@ -150,7 +150,7 @@ class AzureRMCdnprofileFacts(AzureRMModuleBase): self.tags = None self.cdn_client = None - super(AzureRMCdnprofileFacts, self).__init__( + super(AzureRMCdnprofileInfo, self).__init__( derived_arg_spec=self.module_args, supports_tags=False, facts_module=True @@ -158,6 +158,10 @@ class AzureRMCdnprofileFacts(AzureRMModuleBase): def exec_module(self, **kwargs): + is_old_facts = self.module._name == 'azure_rm_cdnprofile_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_cdnprofile_facts' module has been renamed to 'azure_rm_cdnprofile_info'", version='2.13') + for key in self.module_args: setattr(self, key, kwargs[key]) @@ -257,7 +261,7 @@ class AzureRMCdnprofileFacts(AzureRMModuleBase): def main(): """Main module execution code path""" - AzureRMCdnprofileFacts() + AzureRMCdnprofileInfo() if __name__ == '__main__': diff --git a/lib/ansible/modules/cloud/azure/azure_rm_containerinstance_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_containerinstance_info.py similarity index 94% rename from lib/ansible/modules/cloud/azure/azure_rm_containerinstance_facts.py rename to lib/ansible/modules/cloud/azure/azure_rm_containerinstance_info.py index eb25e3ba995..e918e89f318 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_containerinstance_facts.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_containerinstance_info.py @@ -15,8 +15,8 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: azure_rm_containerinstance_facts -version_added: "2.8" +module: azure_rm_containerinstance_info +version_added: "2.9" short_description: Get Azure Container Instance facts description: - Get facts of Container Instance. @@ -43,12 +43,12 @@ author: EXAMPLES = ''' - name: Get specific Container Instance facts - azure_rm_containerinstance_facts: + azure_rm_containerinstance_info: resource_group: myResourceGroup name: myContainer - name: List Container Instances in a specified resource group name - azure_rm_containerinstance_facts: + azure_rm_containerinstance_info: resource_group: myResourceGroup ''' @@ -184,7 +184,7 @@ except ImportError: pass -class AzureRMContainerInstanceFacts(AzureRMModuleBase): +class AzureRMContainerInstanceInfo(AzureRMModuleBase): def __init__(self): # define user inputs into argument self.module_arg_spec = dict( @@ -206,9 +206,15 @@ class AzureRMContainerInstanceFacts(AzureRMModuleBase): ) self.resource_group = None self.name = None - super(AzureRMContainerInstanceFacts, self).__init__(self.module_arg_spec, supports_tags=False) + + super(AzureRMContainerInstanceInfo, self).__init__(self.module_arg_spec, supports_tags=False) def exec_module(self, **kwargs): + + is_old_facts = self.module._name == 'azure_rm_containerinstance_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_containerinstance_facts' module has been renamed to 'azure_rm_containerinstance_info'", version='2.13') + for key in self.module_arg_spec: setattr(self, key, kwargs[key]) @@ -308,7 +314,7 @@ class AzureRMContainerInstanceFacts(AzureRMModuleBase): def main(): - AzureRMContainerInstanceFacts() + AzureRMContainerInstanceInfo() if __name__ == '__main__': diff --git a/lib/ansible/modules/cloud/azure/azure_rm_containerregistry_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_containerregistry_info.py similarity index 93% rename from lib/ansible/modules/cloud/azure/azure_rm_containerregistry_facts.py rename to lib/ansible/modules/cloud/azure/azure_rm_containerregistry_info.py index f66cd138335..c1a83343712 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_containerregistry_facts.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_containerregistry_info.py @@ -15,8 +15,8 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: azure_rm_containerregistry_facts -version_added: "2.7" +module: azure_rm_containerregistry_info +version_added: "2.9" short_description: Get Azure Container Registry facts description: - Get facts for Container Registry. @@ -48,12 +48,12 @@ author: EXAMPLES = ''' - name: Get instance of Registry - azure_rm_containerregistry_facts: + azure_rm_containerregistry_info: resource_group: myResourceGroup name: myRegistry - name: List instances of Registry - azure_rm_containerregistry_facts: + azure_rm_containerregistry_info: resource_group: myResourceGroup ''' @@ -150,7 +150,7 @@ except ImportError: pass -class AzureRMContainerRegistryFacts(AzureRMModuleBase): +class AzureRMContainerRegistryInfo(AzureRMModuleBase): def __init__(self): # define user inputs into argument self.module_arg_spec = dict( @@ -176,9 +176,15 @@ class AzureRMContainerRegistryFacts(AzureRMModuleBase): self.resource_group = None self.name = None self.retrieve_credentials = False - super(AzureRMContainerRegistryFacts, self).__init__(self.module_arg_spec, supports_tags=False) + + super(AzureRMContainerRegistryInfo, self).__init__(self.module_arg_spec, supports_tags=False) def exec_module(self, **kwargs): + + is_old_facts = self.module._name == 'azure_rm_containerregistry_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_containerregistry_facts' module has been renamed to 'azure_rm_containerregistry_info'", version='2.13') + for key in self.module_arg_spec: setattr(self, key, kwargs[key]) @@ -270,7 +276,7 @@ class AzureRMContainerRegistryFacts(AzureRMModuleBase): def main(): - AzureRMContainerRegistryFacts() + AzureRMContainerRegistryInfo() if __name__ == '__main__': diff --git a/lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount_info.py similarity index 97% rename from lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount_facts.py rename to lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount_info.py index d350dd2b02b..f247e91fb6c 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount_facts.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount_info.py @@ -15,8 +15,8 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: azure_rm_cosmosdbaccount_facts -version_added: "2.8" +module: azure_rm_cosmosdbaccount_info +version_added: "2.9" short_description: Get Azure Cosmos DB Account facts description: - Get facts of Azure Cosmos DB Account. @@ -53,12 +53,12 @@ author: EXAMPLES = ''' - name: Get instance of Database Account - azure_rm_cosmosdbaccount_facts: + azure_rm_cosmosdbaccount_info: resource_group: myResourceGroup name: testaccount - name: List instances of Database Account - azure_rm_cosmosdbaccousnt_facts: + azure_rm_cosmosdbaccousnt_info: resource_group: myResourceGroup ''' @@ -357,7 +357,7 @@ except ImportError: pass -class AzureRMCosmosDBAccountFacts(AzureRMModuleBase): +class AzureRMCosmosDBAccountInfo(AzureRMModuleBase): def __init__(self): # define user inputs into argument self.module_arg_spec = dict( @@ -389,9 +389,14 @@ class AzureRMCosmosDBAccountFacts(AzureRMModuleBase): self.retrieve_keys = None self.retrieve_connection_strings = None - super(AzureRMCosmosDBAccountFacts, self).__init__(self.module_arg_spec, supports_tags=False) + super(AzureRMCosmosDBAccountInfo, self).__init__(self.module_arg_spec, supports_tags=False) def exec_module(self, **kwargs): + + is_old_facts = self.module._name == 'azure_rm_cosmosdbaccount_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_cosmosdbaccount_facts' module has been renamed to 'azure_rm_cosmosdbaccount_info'", version='2.13') + for key in self.module_arg_spec: setattr(self, key, kwargs[key]) self.mgmt_client = self.get_mgmt_svc_client(CosmosDB, @@ -508,7 +513,7 @@ class AzureRMCosmosDBAccountFacts(AzureRMModuleBase): def main(): - AzureRMCosmosDBAccountFacts() + AzureRMCosmosDBAccountInfo() if __name__ == '__main__': diff --git a/lib/ansible/modules/cloud/azure/azure_rm_deployment_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_deployment_info.py similarity index 93% rename from lib/ansible/modules/cloud/azure/azure_rm_deployment_facts.py rename to lib/ansible/modules/cloud/azure/azure_rm_deployment_info.py index 44d5a0c3186..9b6ac714a72 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_deployment_facts.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_deployment_info.py @@ -15,8 +15,8 @@ ANSIBLE_METADATA = {'metadata_version': '1.1', DOCUMENTATION = ''' --- -module: azure_rm_deployment_facts -version_added: "2.8" +module: azure_rm_deployment_info +version_added: "2.9" short_description: Get Azure Deployment facts description: - Get facts of Azure Deployment. @@ -40,7 +40,7 @@ author: EXAMPLES = ''' - name: Get instance of Deployment - azure_rm_deployment_facts: + azure_rm_deployment_info: resource_group: myResourceGroup name: myDeployment ''' @@ -135,7 +135,7 @@ except ImportError: pass -class AzureRMDeploymentFacts(AzureRMModuleBase): +class AzureRMDeploymentInfo(AzureRMModuleBase): def __init__(self): self.module_arg_spec = dict( resource_group=dict( @@ -151,9 +151,15 @@ class AzureRMDeploymentFacts(AzureRMModuleBase): ) self.resource_group = None self.name = None - super(AzureRMDeploymentFacts, self).__init__(self.module_arg_spec, supports_tags=False) + + super(AzureRMDeploymentInfo, self).__init__(self.module_arg_spec, supports_tags=False) def exec_module(self, **kwargs): + + is_old_facts = self.module._name == 'azure_rm_deployment_facts' + if is_old_facts: + self.module.deprecate("The 'azure_rm_deployment_facts' module has been renamed to 'azure_rm_deployment_info'", version='2.13') + for key in self.module_arg_spec: setattr(self, key, kwargs[key]) @@ -237,7 +243,7 @@ class AzureRMDeploymentFacts(AzureRMModuleBase): def main(): - AzureRMDeploymentFacts() + AzureRMDeploymentInfo() if __name__ == '__main__': diff --git a/test/integration/targets/azure_rm_cdnprofile/aliases b/test/integration/targets/azure_rm_cdnprofile/aliases index f5c7265cda9..ea347fa4070 100644 --- a/test/integration/targets/azure_rm_cdnprofile/aliases +++ b/test/integration/targets/azure_rm_cdnprofile/aliases @@ -1,5 +1,5 @@ cloud/azure shippable/azure/group2 destructive -azure_rm_cdnprofile_facts +azure_rm_cdnprofile_info azure_rm_cdnendpoint diff --git a/test/integration/targets/azure_rm_cdnprofile/tasks/main.yml b/test/integration/targets/azure_rm_cdnprofile/tasks/main.yml index 69550d9e2df..657881a5070 100644 --- a/test/integration/targets/azure_rm_cdnprofile/tasks/main.yml +++ b/test/integration/targets/azure_rm_cdnprofile/tasks/main.yml @@ -17,7 +17,7 @@ check_mode: yes - name: Check there is no CDN profile created - azure_rm_cdnprofile_facts: + azure_rm_cdnprofile_info: resource_group: "{{ resource_group }}" name: "{{ cdnprofilename }}" register: fact @@ -43,7 +43,7 @@ - output.id != '' - name: Gather CDN profile facts - azure_rm_cdnprofile_facts: + azure_rm_cdnprofile_info: resource_group: "{{ resource_group }}" name: "{{ cdnprofilename }}" register: fact @@ -96,7 +96,7 @@ check_mode: yes - name: Gather CDN profile facts - azure_rm_cdnprofile_facts: + azure_rm_cdnprofile_info: resource_group: "{{ resource_group }}" name: "{{ cdnprofilename }}" register: fact @@ -144,7 +144,7 @@ - output.id - name: Get facts of a Azure CDN endpoint - azure_rm_cdnendpoint_facts: + azure_rm_cdnendpoint_info: resource_group: "{{ resource_group }}" name: "{{ endpointname }}" profile_name: "{{ cdnprofilename }}" @@ -265,7 +265,7 @@ - output.changed - name: Get CDN profile fact - azure_rm_cdnprofile_facts: + azure_rm_cdnprofile_info: resource_group: "{{ resource_group }}" name: "{{ cdnprofilename }}" register: fact diff --git a/test/integration/targets/azure_rm_containerinstance/aliases b/test/integration/targets/azure_rm_containerinstance/aliases index 11625e8b1b2..93066dcc2d0 100644 --- a/test/integration/targets/azure_rm_containerinstance/aliases +++ b/test/integration/targets/azure_rm_containerinstance/aliases @@ -1,4 +1,4 @@ cloud/azure destructive shippable/azure/group2 -azure_rm_containerinstance_facts +azure_rm_containerinstance_info diff --git a/test/integration/targets/azure_rm_containerinstance/tasks/main.yml b/test/integration/targets/azure_rm_containerinstance/tasks/main.yml index 13ce1a7a7bd..a76e387a30b 100644 --- a/test/integration/targets/azure_rm_containerinstance/tasks/main.yml +++ b/test/integration/targets/azure_rm_containerinstance/tasks/main.yml @@ -100,7 +100,7 @@ register: output - name: Gather facts for single Container Instance - azure_rm_containerinstance_facts: + azure_rm_containerinstance_info: resource_group: "{{ resource_group }}" name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}sec" register: output @@ -124,7 +124,7 @@ - output.containerinstances[0]['restart_policy'] == 'on_failure' - name: Gather facts for all Container Instances in the resource group - azure_rm_containerinstance_facts: + azure_rm_containerinstance_info: resource_group: "{{ resource_group }}" register: output diff --git a/test/integration/targets/azure_rm_containerregistry/aliases b/test/integration/targets/azure_rm_containerregistry/aliases index 394d641e441..2615d3fe02d 100644 --- a/test/integration/targets/azure_rm_containerregistry/aliases +++ b/test/integration/targets/azure_rm_containerregistry/aliases @@ -1,4 +1,4 @@ cloud/azure shippable/azure/group2 destructive -azure_rm_containerregistry_facts +azure_rm_containerregistry_info diff --git a/test/integration/targets/azure_rm_containerregistry/tasks/main.yml b/test/integration/targets/azure_rm_containerregistry/tasks/main.yml index 92a5fcc686c..7c83c5c5dae 100644 --- a/test/integration/targets/azure_rm_containerregistry/tasks/main.yml +++ b/test/integration/targets/azure_rm_containerregistry/tasks/main.yml @@ -59,7 +59,7 @@ - output.credentials['password2'] is not defined - name: Gather facts for single Container Registry - azure_rm_containerregistry_facts: + azure_rm_containerregistry_info: resource_group: "{{ resource_group }}" name: "acr{{ resource_group | hash('md5') | truncate(7, True, '') }}" register: output @@ -78,7 +78,7 @@ - output.registries[0]['credentials'] != None - name: Gather facts for all Container Registries in the resource group - azure_rm_containerregistry_facts: + azure_rm_containerregistry_info: resource_group: "{{ resource_group }}" register: output diff --git a/test/integration/targets/azure_rm_cosmosdbaccount/aliases b/test/integration/targets/azure_rm_cosmosdbaccount/aliases index 4d64b78207f..8a081bd43ef 100644 --- a/test/integration/targets/azure_rm_cosmosdbaccount/aliases +++ b/test/integration/targets/azure_rm_cosmosdbaccount/aliases @@ -1,4 +1,4 @@ cloud/azure destructive shippable/azure/group1 -azure_rm_cosmosdbaccount_facts +azure_rm_cosmosdbaccount_info diff --git a/test/integration/targets/azure_rm_cosmosdbaccount/tasks/main.yml b/test/integration/targets/azure_rm_cosmosdbaccount/tasks/main.yml index cebf4e80fd1..f50aa47c55f 100644 --- a/test/integration/targets/azure_rm_cosmosdbaccount/tasks/main.yml +++ b/test/integration/targets/azure_rm_cosmosdbaccount/tasks/main.yml @@ -116,7 +116,7 @@ - output.changed - name: Get facts of single account - azure_rm_cosmosdbaccount_facts: + azure_rm_cosmosdbaccount_info: resource_group: "{{ resource_group }}" name: "{{ dbname }}" register: output @@ -148,7 +148,7 @@ - output.accounts[0]['tags'] != None - name: Get facts with keys - azure_rm_cosmosdbaccount_facts: + azure_rm_cosmosdbaccount_info: resource_group: "{{ resource_group }}" name: "{{ dbname }}" retrieve_keys: all @@ -164,7 +164,7 @@ - output.accounts[0]['secondary_readonly_master_key'] != None - name: Get facts with readonly keys - azure_rm_cosmosdbaccount_facts: + azure_rm_cosmosdbaccount_info: resource_group: "{{ resource_group }}" name: "{{ dbname }}" retrieve_keys: readonly @@ -182,7 +182,7 @@ - output.accounts[0]['connection_strings'] | length > 0 - name: List acounts by resource group - azure_rm_cosmosdbaccount_facts: + azure_rm_cosmosdbaccount_info: resource_group: "{{ resource_group }}" name: "{{ dbname }}" register: output diff --git a/test/integration/targets/azure_rm_deployment/tasks/main.yml b/test/integration/targets/azure_rm_deployment/tasks/main.yml index e24b1472f0d..fb3d1951512 100644 --- a/test/integration/targets/azure_rm_deployment/tasks/main.yml +++ b/test/integration/targets/azure_rm_deployment/tasks/main.yml @@ -29,7 +29,7 @@ with_items: "{{ output.deployment.instances }}" - name: Get Deployment Facts - azure_rm_deployment_facts: + azure_rm_deployment_info: resource_group: "{{ resource_group }}" name: "{{ dns_label }}" register: output diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt index 3aa414e6cfc..21f707c06ef 100644 --- a/test/sanity/ignore.txt +++ b/test/sanity/ignore.txt @@ -1092,43 +1092,37 @@ lib/ansible/modules/cloud/azure/azure_rm_aks.py validate-modules:E324 lib/ansible/modules/cloud/azure/azure_rm_aks.py validate-modules:E326 lib/ansible/modules/cloud/azure/azure_rm_aks.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_aks_info.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_aks_info.py validate-modules:E323 lib/ansible/modules/cloud/azure/azure_rm_aksversion_info.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_aksversion_info.py validate-modules:E323 lib/ansible/modules/cloud/azure/azure_rm_appgateway.py validate-modules:E326 lib/ansible/modules/cloud/azure/azure_rm_appgateway.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_applicationsecuritygroup.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_applicationsecuritygroup_info.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_applicationsecuritygroup_info.py validate-modules:E323 lib/ansible/modules/cloud/azure/azure_rm_appserviceplan.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_appserviceplan_info.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_appserviceplan_info.py validate-modules:E323 lib/ansible/modules/cloud/azure/azure_rm_autoscale.py validate-modules:E322 lib/ansible/modules/cloud/azure/azure_rm_autoscale.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_autoscale_info.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_autoscale_info.py validate-modules:E323 lib/ansible/modules/cloud/azure/azure_rm_availabilityset.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_availabilityset_info.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_availabilityset_info.py validate-modules:E323 lib/ansible/modules/cloud/azure/azure_rm_azurefirewall.py validate-modules:E322 lib/ansible/modules/cloud/azure/azure_rm_azurefirewall.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_azurefirewall.py validate-modules:E340 lib/ansible/modules/cloud/azure/azure_rm_batchaccount.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_cdnendpoint.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_cdnendpoint_facts.py validate-modules:E337 +lib/ansible/modules/cloud/azure/azure_rm_cdnendpoint_info.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_cdnprofile.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_cdnprofile_facts.py validate-modules:E337 +lib/ansible/modules/cloud/azure/azure_rm_cdnprofile_info.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_containerinstance.py validate-modules:E325 lib/ansible/modules/cloud/azure/azure_rm_containerinstance.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_containerinstance_facts.py validate-modules:E337 +lib/ansible/modules/cloud/azure/azure_rm_containerinstance_info.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_containerregistry.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_containerregistry_facts.py validate-modules:E337 +lib/ansible/modules/cloud/azure/azure_rm_containerregistry_info.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py validate-modules:E322 lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py validate-modules:E323 lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount_facts.py validate-modules:E337 +lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount_info.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_deployment.py validate-modules:E337 -lib/ansible/modules/cloud/azure/azure_rm_deployment_facts.py validate-modules:E337 +lib/ansible/modules/cloud/azure/azure_rm_deployment_info.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_devtestlab.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_devtestlab_facts.py validate-modules:E337 lib/ansible/modules/cloud/azure/azure_rm_devtestlabarmtemplate_facts.py validate-modules:E337