Rename Azure modules: "facts"->"info" (#61417)

* rename

* add symlink

* add the log

* fix the ignore file

* fix

* fix
This commit is contained in:
smile37773 2019-08-28 19:01:10 +08:00 committed by Zim Kalinowski
parent a6f6256a0a
commit 161c1ce17e
32 changed files with 158 additions and 117 deletions

View file

@ -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``.

View file

@ -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 <azure_rm_appserviceplan_info_module>`. * The ``azure_rm_appserviceplan_facts`` module was renamed to :ref:`azure_rm_appserviceplan_info <azure_rm_appserviceplan_info_module>`.
* The ``azure_rm_autoscale_facts`` module was renamed to :ref:`azure_rm_autoscale_info <azure_rm_autoscale_info_module>`. * The ``azure_rm_autoscale_facts`` module was renamed to :ref:`azure_rm_autoscale_info <azure_rm_autoscale_info_module>`.
* The ``azure_rm_availabilityset_facts`` module was renamed to :ref:`azure_rm_availabilityset <azure_rm_availabilityset_info_module>`. * The ``azure_rm_availabilityset_facts`` module was renamed to :ref:`azure_rm_availabilityset <azure_rm_availabilityset_info_module>`.
* The ``azure_rm_automationaccount_facts`` module was renamed to :ref:`azure_rm_automationaccount_info <azure_rm_automationaccount_info_module>`.
* The ``azure_rm_cdnprofile_facts`` module was renamed to :ref:`azure_rm_cdnprofile_info <azure_rm_cdnprofile_info_module>`.
* The ``azure_rm_cdnendpoint_facts`` module was renamed to :ref:`azure_rm_cdnendpoint_info <azure_rm_cdnendpoint_info_module>`.
* The ``azure_rm_containerinstance_facts`` module was renamed to :ref:`azure_rm_containerinstance_info <azure_rm_containerinstance_info_module>`.
* The ``azure_rm_containerregistry_facts`` module was renamed to :ref:`azure_rm_containerregistry_info <azure_rm_containerregistry_info_module>`.
* The ``azure_rm_cosmosdbaccount_facts`` module was renamed to :ref:`azure_rm_cosmosdbaccount_info <azure_rm_cosmosdbaccount_info_module>`.
* The ``azure_rm_deployment_facts`` module was renamed to :ref:`azure_rm_deployment_info <azure_rm_deployment_info_module>`.
Noteworthy module changes Noteworthy module changes
------------------------- -------------------------

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -71,7 +71,6 @@ azure_aks:
type: list type: list
''' '''
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.azure_rm_common import AzureRMModuleBase from ansible.module_utils.azure_rm_common import AzureRMModuleBase
try: try:
@ -107,11 +106,6 @@ class AzureRMManagedClusterInfo(AzureRMModuleBase):
self.tags = None self.tags = None
self.show_kubeconfig = 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__( super(AzureRMManagedClusterInfo, self).__init__(
derived_arg_spec=self.module_args, derived_arg_spec=self.module_args,
supports_tags=False, supports_tags=False,
@ -120,6 +114,10 @@ class AzureRMManagedClusterInfo(AzureRMModuleBase):
def exec_module(self, **kwargs): 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: for key in self.module_args:
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])

View file

@ -56,7 +56,6 @@ azure_aks_versions:
type: list type: list
''' '''
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.azure_rm_common import AzureRMModuleBase from ansible.module_utils.azure_rm_common import AzureRMModuleBase
try: try:
@ -84,11 +83,6 @@ class AzureRMAKSVersion(AzureRMModuleBase):
self.location = None self.location = None
self.version = 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__( super(AzureRMAKSVersion, self).__init__(
derived_arg_spec=self.module_args, derived_arg_spec=self.module_args,
supports_tags=False, supports_tags=False,
@ -97,6 +91,10 @@ class AzureRMAKSVersion(AzureRMModuleBase):
def exec_module(self, **kwargs): 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: for key in self.module_args:
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])

View file

@ -89,7 +89,6 @@ applicationsecuritygroups:
sample: Succeeded sample: Succeeded
''' '''
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.azure_rm_common import AzureRMModuleBase from ansible.module_utils.azure_rm_common import AzureRMModuleBase
try: try:
@ -130,12 +129,6 @@ class AzureRMApplicationSecurityGroupInfo(AzureRMModuleBase):
self.results = dict(changed=False) 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, super(AzureRMApplicationSecurityGroupInfo, self).__init__(derived_arg_spec=self.module_arg_spec,
supports_check_mode=False, supports_check_mode=False,
supports_tags=False) supports_tags=False)
@ -143,6 +136,11 @@ class AzureRMApplicationSecurityGroupInfo(AzureRMModuleBase):
def exec_module(self, **kwargs): def exec_module(self, **kwargs):
"""Main module execution method""" """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']: for key in list(self.module_arg_spec.keys()) + ['tags']:
if hasattr(self, key): if hasattr(self, key):
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])

View file

@ -126,7 +126,6 @@ except Exception:
# This is handled in azure_rm_common # This is handled in azure_rm_common
pass pass
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.azure_rm_common import AzureRMModuleBase from ansible.module_utils.azure_rm_common import AzureRMModuleBase
AZURE_OBJECT_CLASS = 'AppServicePlan' AZURE_OBJECT_CLASS = 'AppServicePlan'
@ -149,17 +148,16 @@ class AzureRMAppServicePlanInfo(AzureRMModuleBase):
self.tags = None self.tags = None
self.info_level = 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, super(AzureRMAppServicePlanInfo, self).__init__(self.module_arg_spec,
supports_tags=False, supports_tags=False,
facts_module=True) facts_module=True)
def exec_module(self, **kwargs): 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: for key in self.module_arg_spec:
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])

View file

@ -15,7 +15,7 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: azure_rm_automationaccount_facts module: azure_rm_automationaccount_info
version_added: '2.9' version_added: '2.9'
short_description: Get Azure automation account facts short_description: Get Azure automation account facts
description: description:
@ -61,7 +61,7 @@ author:
EXAMPLES = ''' EXAMPLES = '''
- name: Get details of an automation account - name: Get details of an automation account
azure_rm_automationaccount_facts: azure_rm_automationaccount_info:
name: Testing name: Testing
resource_group: myResourceGroup resource_group: myResourceGroup
list_statistics: yes list_statistics: yes
@ -69,11 +69,11 @@ EXAMPLES = '''
list_keys: yes list_keys: yes
- name: List automation account in a resource group - name: List automation account in a resource group
azure_rm_automationaccount_facts: azure_rm_automationaccount_info:
resource_group: myResourceGroup resource_group: myResourceGroup
- name: List automation account in a resource group - name: List automation account in a resource group
azure_rm_automationaccount_facts: azure_rm_automationaccount_info:
''' '''
RETURN = ''' RETURN = '''
@ -246,7 +246,7 @@ except ImportError:
pass pass
class AzureRMAutomationAccountFacts(AzureRMModuleBase): class AzureRMAutomationAccountInfo(AzureRMModuleBase):
def __init__(self): def __init__(self):
# define user inputs into argument # define user inputs into argument
self.module_arg_spec = dict( self.module_arg_spec = dict(
@ -278,9 +278,15 @@ class AzureRMAutomationAccountFacts(AzureRMModuleBase):
self.list_statistics = None self.list_statistics = None
self.list_usages = None self.list_usages = None
self.list_keys = 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): 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): for key in list(self.module_arg_spec):
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])
@ -370,7 +376,7 @@ class AzureRMAutomationAccountFacts(AzureRMModuleBase):
def main(): def main():
AzureRMAutomationAccountFacts() AzureRMAutomationAccountInfo()
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -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.azure_rm_common import AzureRMModuleBase
from ansible.module_utils._text import to_native from ansible.module_utils._text import to_native
@ -228,14 +227,14 @@ class AzureRMAutoScaleInfo(AzureRMModuleBase):
self.name = None self.name = None
self.tags = 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) super(AzureRMAutoScaleInfo, self).__init__(self.module_arg_spec, supports_tags=False)
def exec_module(self, **kwargs): 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): for key in list(self.module_arg_spec):
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])

View file

@ -105,7 +105,6 @@ azure_availabilityset:
sample: { env: sandbox } sample: { env: sandbox }
''' '''
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.azure_rm_common import AzureRMModuleBase from ansible.module_utils.azure_rm_common import AzureRMModuleBase
try: try:
@ -139,11 +138,6 @@ class AzureRMAvailabilitySetInfo(AzureRMModuleBase):
self.resource_group = None self.resource_group = None
self.tags = 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__( super(AzureRMAvailabilitySetInfo, self).__init__(
derived_arg_spec=self.module_args, derived_arg_spec=self.module_args,
supports_tags=False, supports_tags=False,
@ -152,6 +146,10 @@ class AzureRMAvailabilitySetInfo(AzureRMModuleBase):
def exec_module(self, **kwargs): 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: for key in self.module_args:
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])

View file

@ -14,9 +14,9 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' 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 short_description: Get Azure CDN endpoint facts
@ -49,12 +49,12 @@ author:
EXAMPLES = ''' EXAMPLES = '''
- name: Get facts for all endpoints in CDN profile - name: Get facts for all endpoints in CDN profile
azure_rm_cdnendpoint_facts: azure_rm_cdnendpoint_info:
resource_group: myResourceGroup resource_group: myResourceGroup
profile_name: myCDNProfile profile_name: myCDNProfile
- name: Get facts of specific CDN endpoint - name: Get facts of specific CDN endpoint
azure_rm_cdnendpoint_facts: azure_rm_cdnendpoint_info:
resource_group: myResourceGroup resource_group: myResourceGroup
profile_name: myCDNProfile profile_name: myCDNProfile
name: myEndpoint1 name: myEndpoint1
@ -180,7 +180,7 @@ import re
AZURE_OBJECT_CLASS = 'endpoints' AZURE_OBJECT_CLASS = 'endpoints'
class AzureRMCdnEndpointFacts(AzureRMModuleBase): class AzureRMCdnEndpointInfo(AzureRMModuleBase):
"""Utility class to get Azure Azure CDN endpoint facts""" """Utility class to get Azure Azure CDN endpoint facts"""
def __init__(self): def __init__(self):
@ -208,7 +208,7 @@ class AzureRMCdnEndpointFacts(AzureRMModuleBase):
self.profile_name = None self.profile_name = None
self.tags = None self.tags = None
super(AzureRMCdnEndpointFacts, self).__init__( super(AzureRMCdnEndpointInfo, self).__init__(
derived_arg_spec=self.module_args, derived_arg_spec=self.module_args,
supports_tags=False, supports_tags=False,
facts_module=True facts_module=True
@ -216,6 +216,10 @@ class AzureRMCdnEndpointFacts(AzureRMModuleBase):
def exec_module(self, **kwargs): 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: for key in self.module_args:
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])
@ -304,7 +308,7 @@ class AzureRMCdnEndpointFacts(AzureRMModuleBase):
def main(): def main():
"""Main module execution code path""" """Main module execution code path"""
AzureRMCdnEndpointFacts() AzureRMCdnEndpointInfo()
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -14,9 +14,9 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' 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 short_description: Get Azure CDN profile facts
@ -44,15 +44,15 @@ author:
EXAMPLES = ''' EXAMPLES = '''
- name: Get facts for one CDN profile - name: Get facts for one CDN profile
azure_rm_cdnprofile_facts: azure_rm_cdnprofile_info:
name: Testing name: Testing
resource_group: myResourceGroup resource_group: myResourceGroup
- name: Get facts for all CDN profiles - name: Get facts for all CDN profiles
azure_rm_cdnprofile_facts: azure_rm_cdnprofile_info:
- name: Get facts by tags - name: Get facts by tags
azure_rm_cdnprofile_facts: azure_rm_cdnprofile_info:
tags: tags:
- Environment:Test - Environment:Test
''' '''
@ -129,7 +129,7 @@ import re
AZURE_OBJECT_CLASS = 'profiles' AZURE_OBJECT_CLASS = 'profiles'
class AzureRMCdnprofileFacts(AzureRMModuleBase): class AzureRMCdnprofileInfo(AzureRMModuleBase):
"""Utility class to get Azure CDN profile facts""" """Utility class to get Azure CDN profile facts"""
def __init__(self): def __init__(self):
@ -150,7 +150,7 @@ class AzureRMCdnprofileFacts(AzureRMModuleBase):
self.tags = None self.tags = None
self.cdn_client = None self.cdn_client = None
super(AzureRMCdnprofileFacts, self).__init__( super(AzureRMCdnprofileInfo, self).__init__(
derived_arg_spec=self.module_args, derived_arg_spec=self.module_args,
supports_tags=False, supports_tags=False,
facts_module=True facts_module=True
@ -158,6 +158,10 @@ class AzureRMCdnprofileFacts(AzureRMModuleBase):
def exec_module(self, **kwargs): 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: for key in self.module_args:
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])
@ -257,7 +261,7 @@ class AzureRMCdnprofileFacts(AzureRMModuleBase):
def main(): def main():
"""Main module execution code path""" """Main module execution code path"""
AzureRMCdnprofileFacts() AzureRMCdnprofileInfo()
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -15,8 +15,8 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: azure_rm_containerinstance_facts module: azure_rm_containerinstance_info
version_added: "2.8" version_added: "2.9"
short_description: Get Azure Container Instance facts short_description: Get Azure Container Instance facts
description: description:
- Get facts of Container Instance. - Get facts of Container Instance.
@ -43,12 +43,12 @@ author:
EXAMPLES = ''' EXAMPLES = '''
- name: Get specific Container Instance facts - name: Get specific Container Instance facts
azure_rm_containerinstance_facts: azure_rm_containerinstance_info:
resource_group: myResourceGroup resource_group: myResourceGroup
name: myContainer name: myContainer
- name: List Container Instances in a specified resource group name - name: List Container Instances in a specified resource group name
azure_rm_containerinstance_facts: azure_rm_containerinstance_info:
resource_group: myResourceGroup resource_group: myResourceGroup
''' '''
@ -184,7 +184,7 @@ except ImportError:
pass pass
class AzureRMContainerInstanceFacts(AzureRMModuleBase): class AzureRMContainerInstanceInfo(AzureRMModuleBase):
def __init__(self): def __init__(self):
# define user inputs into argument # define user inputs into argument
self.module_arg_spec = dict( self.module_arg_spec = dict(
@ -206,9 +206,15 @@ class AzureRMContainerInstanceFacts(AzureRMModuleBase):
) )
self.resource_group = None self.resource_group = None
self.name = 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): 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: for key in self.module_arg_spec:
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])
@ -308,7 +314,7 @@ class AzureRMContainerInstanceFacts(AzureRMModuleBase):
def main(): def main():
AzureRMContainerInstanceFacts() AzureRMContainerInstanceInfo()
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -15,8 +15,8 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: azure_rm_containerregistry_facts module: azure_rm_containerregistry_info
version_added: "2.7" version_added: "2.9"
short_description: Get Azure Container Registry facts short_description: Get Azure Container Registry facts
description: description:
- Get facts for Container Registry. - Get facts for Container Registry.
@ -48,12 +48,12 @@ author:
EXAMPLES = ''' EXAMPLES = '''
- name: Get instance of Registry - name: Get instance of Registry
azure_rm_containerregistry_facts: azure_rm_containerregistry_info:
resource_group: myResourceGroup resource_group: myResourceGroup
name: myRegistry name: myRegistry
- name: List instances of Registry - name: List instances of Registry
azure_rm_containerregistry_facts: azure_rm_containerregistry_info:
resource_group: myResourceGroup resource_group: myResourceGroup
''' '''
@ -150,7 +150,7 @@ except ImportError:
pass pass
class AzureRMContainerRegistryFacts(AzureRMModuleBase): class AzureRMContainerRegistryInfo(AzureRMModuleBase):
def __init__(self): def __init__(self):
# define user inputs into argument # define user inputs into argument
self.module_arg_spec = dict( self.module_arg_spec = dict(
@ -176,9 +176,15 @@ class AzureRMContainerRegistryFacts(AzureRMModuleBase):
self.resource_group = None self.resource_group = None
self.name = None self.name = None
self.retrieve_credentials = False 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): 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: for key in self.module_arg_spec:
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])
@ -270,7 +276,7 @@ class AzureRMContainerRegistryFacts(AzureRMModuleBase):
def main(): def main():
AzureRMContainerRegistryFacts() AzureRMContainerRegistryInfo()
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -15,8 +15,8 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: azure_rm_cosmosdbaccount_facts module: azure_rm_cosmosdbaccount_info
version_added: "2.8" version_added: "2.9"
short_description: Get Azure Cosmos DB Account facts short_description: Get Azure Cosmos DB Account facts
description: description:
- Get facts of Azure Cosmos DB Account. - Get facts of Azure Cosmos DB Account.
@ -53,12 +53,12 @@ author:
EXAMPLES = ''' EXAMPLES = '''
- name: Get instance of Database Account - name: Get instance of Database Account
azure_rm_cosmosdbaccount_facts: azure_rm_cosmosdbaccount_info:
resource_group: myResourceGroup resource_group: myResourceGroup
name: testaccount name: testaccount
- name: List instances of Database Account - name: List instances of Database Account
azure_rm_cosmosdbaccousnt_facts: azure_rm_cosmosdbaccousnt_info:
resource_group: myResourceGroup resource_group: myResourceGroup
''' '''
@ -357,7 +357,7 @@ except ImportError:
pass pass
class AzureRMCosmosDBAccountFacts(AzureRMModuleBase): class AzureRMCosmosDBAccountInfo(AzureRMModuleBase):
def __init__(self): def __init__(self):
# define user inputs into argument # define user inputs into argument
self.module_arg_spec = dict( self.module_arg_spec = dict(
@ -389,9 +389,14 @@ class AzureRMCosmosDBAccountFacts(AzureRMModuleBase):
self.retrieve_keys = None self.retrieve_keys = None
self.retrieve_connection_strings = 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): 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: for key in self.module_arg_spec:
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])
self.mgmt_client = self.get_mgmt_svc_client(CosmosDB, self.mgmt_client = self.get_mgmt_svc_client(CosmosDB,
@ -508,7 +513,7 @@ class AzureRMCosmosDBAccountFacts(AzureRMModuleBase):
def main(): def main():
AzureRMCosmosDBAccountFacts() AzureRMCosmosDBAccountInfo()
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -15,8 +15,8 @@ ANSIBLE_METADATA = {'metadata_version': '1.1',
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: azure_rm_deployment_facts module: azure_rm_deployment_info
version_added: "2.8" version_added: "2.9"
short_description: Get Azure Deployment facts short_description: Get Azure Deployment facts
description: description:
- Get facts of Azure Deployment. - Get facts of Azure Deployment.
@ -40,7 +40,7 @@ author:
EXAMPLES = ''' EXAMPLES = '''
- name: Get instance of Deployment - name: Get instance of Deployment
azure_rm_deployment_facts: azure_rm_deployment_info:
resource_group: myResourceGroup resource_group: myResourceGroup
name: myDeployment name: myDeployment
''' '''
@ -135,7 +135,7 @@ except ImportError:
pass pass
class AzureRMDeploymentFacts(AzureRMModuleBase): class AzureRMDeploymentInfo(AzureRMModuleBase):
def __init__(self): def __init__(self):
self.module_arg_spec = dict( self.module_arg_spec = dict(
resource_group=dict( resource_group=dict(
@ -151,9 +151,15 @@ class AzureRMDeploymentFacts(AzureRMModuleBase):
) )
self.resource_group = None self.resource_group = None
self.name = 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): 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: for key in self.module_arg_spec:
setattr(self, key, kwargs[key]) setattr(self, key, kwargs[key])
@ -237,7 +243,7 @@ class AzureRMDeploymentFacts(AzureRMModuleBase):
def main(): def main():
AzureRMDeploymentFacts() AzureRMDeploymentInfo()
if __name__ == '__main__': if __name__ == '__main__':

View file

@ -1,5 +1,5 @@
cloud/azure cloud/azure
shippable/azure/group2 shippable/azure/group2
destructive destructive
azure_rm_cdnprofile_facts azure_rm_cdnprofile_info
azure_rm_cdnendpoint azure_rm_cdnendpoint

View file

@ -17,7 +17,7 @@
check_mode: yes check_mode: yes
- name: Check there is no CDN profile created - name: Check there is no CDN profile created
azure_rm_cdnprofile_facts: azure_rm_cdnprofile_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "{{ cdnprofilename }}" name: "{{ cdnprofilename }}"
register: fact register: fact
@ -43,7 +43,7 @@
- output.id != '' - output.id != ''
- name: Gather CDN profile facts - name: Gather CDN profile facts
azure_rm_cdnprofile_facts: azure_rm_cdnprofile_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "{{ cdnprofilename }}" name: "{{ cdnprofilename }}"
register: fact register: fact
@ -96,7 +96,7 @@
check_mode: yes check_mode: yes
- name: Gather CDN profile facts - name: Gather CDN profile facts
azure_rm_cdnprofile_facts: azure_rm_cdnprofile_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "{{ cdnprofilename }}" name: "{{ cdnprofilename }}"
register: fact register: fact
@ -144,7 +144,7 @@
- output.id - output.id
- name: Get facts of a Azure CDN endpoint - name: Get facts of a Azure CDN endpoint
azure_rm_cdnendpoint_facts: azure_rm_cdnendpoint_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "{{ endpointname }}" name: "{{ endpointname }}"
profile_name: "{{ cdnprofilename }}" profile_name: "{{ cdnprofilename }}"
@ -265,7 +265,7 @@
- output.changed - output.changed
- name: Get CDN profile fact - name: Get CDN profile fact
azure_rm_cdnprofile_facts: azure_rm_cdnprofile_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "{{ cdnprofilename }}" name: "{{ cdnprofilename }}"
register: fact register: fact

View file

@ -1,4 +1,4 @@
cloud/azure cloud/azure
destructive destructive
shippable/azure/group2 shippable/azure/group2
azure_rm_containerinstance_facts azure_rm_containerinstance_info

View file

@ -100,7 +100,7 @@
register: output register: output
- name: Gather facts for single Container Instance - name: Gather facts for single Container Instance
azure_rm_containerinstance_facts: azure_rm_containerinstance_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}sec" name: "aci{{ resource_group | hash('md5') | truncate(7, True, '') }}sec"
register: output register: output
@ -124,7 +124,7 @@
- output.containerinstances[0]['restart_policy'] == 'on_failure' - output.containerinstances[0]['restart_policy'] == 'on_failure'
- name: Gather facts for all Container Instances in the resource group - name: Gather facts for all Container Instances in the resource group
azure_rm_containerinstance_facts: azure_rm_containerinstance_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
register: output register: output

View file

@ -1,4 +1,4 @@
cloud/azure cloud/azure
shippable/azure/group2 shippable/azure/group2
destructive destructive
azure_rm_containerregistry_facts azure_rm_containerregistry_info

View file

@ -59,7 +59,7 @@
- output.credentials['password2'] is not defined - output.credentials['password2'] is not defined
- name: Gather facts for single Container Registry - name: Gather facts for single Container Registry
azure_rm_containerregistry_facts: azure_rm_containerregistry_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "acr{{ resource_group | hash('md5') | truncate(7, True, '') }}" name: "acr{{ resource_group | hash('md5') | truncate(7, True, '') }}"
register: output register: output
@ -78,7 +78,7 @@
- output.registries[0]['credentials'] != None - output.registries[0]['credentials'] != None
- name: Gather facts for all Container Registries in the resource group - name: Gather facts for all Container Registries in the resource group
azure_rm_containerregistry_facts: azure_rm_containerregistry_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
register: output register: output

View file

@ -1,4 +1,4 @@
cloud/azure cloud/azure
destructive destructive
shippable/azure/group1 shippable/azure/group1
azure_rm_cosmosdbaccount_facts azure_rm_cosmosdbaccount_info

View file

@ -116,7 +116,7 @@
- output.changed - output.changed
- name: Get facts of single account - name: Get facts of single account
azure_rm_cosmosdbaccount_facts: azure_rm_cosmosdbaccount_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "{{ dbname }}" name: "{{ dbname }}"
register: output register: output
@ -148,7 +148,7 @@
- output.accounts[0]['tags'] != None - output.accounts[0]['tags'] != None
- name: Get facts with keys - name: Get facts with keys
azure_rm_cosmosdbaccount_facts: azure_rm_cosmosdbaccount_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "{{ dbname }}" name: "{{ dbname }}"
retrieve_keys: all retrieve_keys: all
@ -164,7 +164,7 @@
- output.accounts[0]['secondary_readonly_master_key'] != None - output.accounts[0]['secondary_readonly_master_key'] != None
- name: Get facts with readonly keys - name: Get facts with readonly keys
azure_rm_cosmosdbaccount_facts: azure_rm_cosmosdbaccount_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "{{ dbname }}" name: "{{ dbname }}"
retrieve_keys: readonly retrieve_keys: readonly
@ -182,7 +182,7 @@
- output.accounts[0]['connection_strings'] | length > 0 - output.accounts[0]['connection_strings'] | length > 0
- name: List acounts by resource group - name: List acounts by resource group
azure_rm_cosmosdbaccount_facts: azure_rm_cosmosdbaccount_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "{{ dbname }}" name: "{{ dbname }}"
register: output register: output

View file

@ -29,7 +29,7 @@
with_items: "{{ output.deployment.instances }}" with_items: "{{ output.deployment.instances }}"
- name: Get Deployment Facts - name: Get Deployment Facts
azure_rm_deployment_facts: azure_rm_deployment_info:
resource_group: "{{ resource_group }}" resource_group: "{{ resource_group }}"
name: "{{ dns_label }}" name: "{{ dns_label }}"
register: output register: output

View file

@ -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:E326
lib/ansible/modules/cloud/azure/azure_rm_aks.py validate-modules:E337 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: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: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:E326
lib/ansible/modules/cloud/azure/azure_rm_appgateway.py validate-modules:E337 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.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: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.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: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:E322
lib/ansible/modules/cloud/azure/azure_rm_autoscale.py validate-modules:E337 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: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.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: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:E322
lib/ansible/modules/cloud/azure/azure_rm_azurefirewall.py validate-modules:E337 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_azurefirewall.py validate-modules:E340
lib/ansible/modules/cloud/azure/azure_rm_batchaccount.py validate-modules:E337 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.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.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:E325
lib/ansible/modules/cloud/azure/azure_rm_containerinstance.py validate-modules:E337 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.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:E322
lib/ansible/modules/cloud/azure/azure_rm_cosmosdbaccount.py validate-modules:E323 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.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.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.py validate-modules:E337
lib/ansible/modules/cloud/azure/azure_rm_devtestlab_facts.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 lib/ansible/modules/cloud/azure/azure_rm_devtestlabarmtemplate_facts.py validate-modules:E337