mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[stable-1] added supports_check_mode=True to info/facts modules (#3101)
* [stable-2] added supports_check_mode=True to info/facts modules (#3095) * added supports_check_mode=True to info/facts modules (#3084) * added supports_check_mode=True to info/facts modules * added changelog fragment * rolled back vertica_info * rolled back utm_proxy_*_info * updated changelog fragment with latest adjustments * Update changelogs/fragments/3084-info-checkmode.yaml Co-authored-by: Felix Fontein <felix@fontein.de> * added check mode to xenserver_facts + oneview_*_info * added check mode to utm_proxy_*_info * updated changelog Co-authored-by: Felix Fontein <felix@fontein.de> (cherry picked from commit7da2c16b4a
) * Also fix modules removed in 3.0.0. Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> (cherry picked from commit0fda418702
) * Fix some more modules.
This commit is contained in:
parent
5cba378c75
commit
5336872b3e
54 changed files with 146 additions and 54 deletions
56
changelogs/fragments/3084-info-checkmode.yaml
Normal file
56
changelogs/fragments/3084-info-checkmode.yaml
Normal file
|
@ -0,0 +1,56 @@
|
|||
bugfixes:
|
||||
- ali_instance_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- memset_memstore_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- memset_server_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- xenserver_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- rax_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- smartos_image_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- snmp_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_datacenter_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_enclosure_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_ethernet_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_fc_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_fcoe_network_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_logical_interconnect_group_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_network_set_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- oneview_san_manager_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- idrac_redfish_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- redfish_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- xfconf_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_aaa_group_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_ca_host_key_cert_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_network_interface_address_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_proxy_frontend_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
- utm_proxy_location_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3084).
|
||||
# Added in backport:
|
||||
- ovirt_affinity_label_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_api_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_cluster_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_datacenter_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_disk_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_event_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_external_provider_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_group_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_host_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_host_storage_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_network_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_nic_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_permission_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_quota_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_scheduling_policy_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_snapshot_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_storage_domain_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_storage_template_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_storage_vm_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_tag_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_template_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_user_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_vm_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ovirt_vmpool_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- gluster_heal_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- ome_device_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
- purefa_facts - added support to check mode (https://github.com/ansible-collections/community.general/pull/3095).
|
||||
# Added in stable-1 backport:
|
||||
- docker_stack_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3101).
|
||||
- docker_stack_task_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3101).
|
||||
- gcpubsub_info - added support to check mode (https://github.com/ansible-collections/community.general/pull/3101).
|
|
@ -201,7 +201,7 @@ class OneViewModuleBase(object):
|
|||
|
||||
resource_client = None
|
||||
|
||||
def __init__(self, additional_arg_spec=None, validate_etag_support=False):
|
||||
def __init__(self, additional_arg_spec=None, validate_etag_support=False, supports_check_mode=False):
|
||||
"""
|
||||
OneViewModuleBase constructor.
|
||||
|
||||
|
@ -210,7 +210,7 @@ class OneViewModuleBase(object):
|
|||
"""
|
||||
argument_spec = self._build_argument_spec(additional_arg_spec, validate_etag_support)
|
||||
|
||||
self.module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=False)
|
||||
self.module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=supports_check_mode)
|
||||
|
||||
self._check_hpe_oneview_sdk()
|
||||
self._create_oneview_client()
|
||||
|
|
|
@ -382,7 +382,10 @@ def main():
|
|||
filters=dict(type='dict')
|
||||
)
|
||||
)
|
||||
module = AnsibleModule(argument_spec=argument_spec)
|
||||
module = AnsibleModule(
|
||||
argument_spec=argument_spec,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
if module._name in ('ali_instance_facts', 'community.general.ali_instance_facts'):
|
||||
module.deprecate("The 'ali_instance_facts' module has been renamed to 'ali_instance_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
|
|
@ -56,7 +56,7 @@ def main():
|
|||
module = AnsibleModule(
|
||||
argument_spec={
|
||||
},
|
||||
supports_check_mode=False
|
||||
supports_check_mode=True
|
||||
)
|
||||
|
||||
rc, out, err = docker_stack_list(module)
|
||||
|
|
|
@ -65,7 +65,7 @@ def main():
|
|||
argument_spec={
|
||||
'name': dict(type='str', required=True)
|
||||
},
|
||||
supports_check_mode=False
|
||||
supports_check_mode=True
|
||||
)
|
||||
|
||||
name = module.params['name']
|
||||
|
|
|
@ -120,7 +120,7 @@ def main():
|
|||
state=dict(choices=['list'], default='list'),
|
||||
service_account_email=dict(),
|
||||
credentials_file=dict(),
|
||||
project_id=dict(), ),)
|
||||
project_id=dict(), ), supports_check_mode=True)
|
||||
if module._name in ('gcpubsub_facts', 'community.general.gcpubsub_facts'):
|
||||
module.deprecate("The 'gcpubsub_facts' module has been renamed to 'gcpubsub_info'",
|
||||
version='3.0.0', collection_name='community.general') # was Ansible 2.13
|
||||
|
|
|
@ -149,7 +149,7 @@ def main():
|
|||
api_key=dict(required=True, type='str', no_log=True),
|
||||
name=dict(required=True, type='str')
|
||||
),
|
||||
supports_check_mode=False
|
||||
supports_check_mode=True,
|
||||
)
|
||||
if module._name in ('memset_memstore_facts', 'community.general.memset_memstore_facts'):
|
||||
module.deprecate("The 'memset_memstore_facts' module has been renamed to 'memset_memstore_info'",
|
||||
|
|
|
@ -274,7 +274,7 @@ def main():
|
|||
api_key=dict(required=True, type='str', no_log=True),
|
||||
name=dict(required=True, type='str')
|
||||
),
|
||||
supports_check_mode=False
|
||||
supports_check_mode=True,
|
||||
)
|
||||
if module._name in ('memset_server_facts', 'community.general.memset_server_facts'):
|
||||
module.deprecate("The 'memset_server_facts' module has been renamed to 'memset_server_info'",
|
||||
|
|
|
@ -160,7 +160,9 @@ def get_srs(session):
|
|||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule({})
|
||||
module = AnsibleModule(
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
if not HAVE_XENAPI:
|
||||
module.fail_json(changed=False, msg="python xen api required for this module")
|
||||
|
|
|
@ -127,7 +127,7 @@ def main():
|
|||
host=dict(default=None),
|
||||
vm=dict(default=None),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_affinity_label_facts', 'community.general.ovirt_affinity_label_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_affinity_label_facts' module has been renamed to 'ovirt_affinity_label_info', "
|
||||
|
|
|
@ -63,7 +63,7 @@ from ansible_collections.community.general.plugins.module_utils._ovirt import (
|
|||
|
||||
def main():
|
||||
argument_spec = ovirt_info_full_argument_spec()
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_api_facts', 'community.general.ovirt_api_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_api_facts' module has been renamed to 'ovirt_api_info', "
|
||||
|
|
|
@ -86,7 +86,7 @@ def main():
|
|||
argument_spec = ovirt_info_full_argument_spec(
|
||||
pattern=dict(default='', required=False),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_cluster_facts', 'community.general.ovirt_cluster_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_cluster_facts' module has been renamed to 'ovirt_cluster_info', "
|
||||
|
|
|
@ -69,7 +69,7 @@ def main():
|
|||
argument_spec = ovirt_info_full_argument_spec(
|
||||
pattern=dict(default='', required=False),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_datacenter_facts', 'community.general.ovirt_datacenter_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_datacenter_facts' module has been renamed to 'ovirt_datacenter_info', "
|
||||
|
|
|
@ -85,7 +85,7 @@ def main():
|
|||
argument_spec = ovirt_info_full_argument_spec(
|
||||
pattern=dict(default='', required=False),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_disk_facts', 'community.general.ovirt_disk_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_disk_facts' module has been renamed to 'ovirt_disk_info', "
|
||||
|
|
|
@ -122,7 +122,7 @@ def main():
|
|||
query=dict(default='', required=False),
|
||||
wait=dict(default=True, type='bool', required=False)
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_event_facts', 'community.general.ovirt_event_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_event_facts' module has been renamed to 'ovirt_event_info', "
|
||||
|
|
|
@ -116,7 +116,7 @@ def main():
|
|||
aliases=['provider'],
|
||||
),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_external_provider_facts', 'community.general.ovirt_external_provider_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_external_provider_facts' module has been renamed to 'ovirt_external_provider_info', "
|
||||
|
|
|
@ -84,7 +84,7 @@ def main():
|
|||
argument_spec = ovirt_info_full_argument_spec(
|
||||
pattern=dict(default='', required=False),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_group_facts', 'community.general.ovirt_group_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_group_facts' module has been renamed to 'ovirt_group_info', "
|
||||
|
|
|
@ -104,7 +104,7 @@ def main():
|
|||
all_content=dict(default=False, type='bool'),
|
||||
cluster_version=dict(default=None, type='str'),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_host_facts', 'community.general.ovirt_host_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', "
|
||||
|
|
|
@ -126,7 +126,7 @@ def main():
|
|||
iscsi=dict(default=None, type='dict'),
|
||||
fcp=dict(default=None, type='dict'),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_host_storage_facts', 'community.general.ovirt_host_storage_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_host_storage_facts' module has been renamed to 'ovirt_host_storage_info', "
|
||||
|
|
|
@ -86,7 +86,7 @@ def main():
|
|||
argument_spec = ovirt_info_full_argument_spec(
|
||||
pattern=dict(default='', required=False),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_network_facts', 'community.general.ovirt_network_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_network_facts' module has been renamed to 'ovirt_network_info', "
|
||||
|
|
|
@ -91,7 +91,7 @@ def main():
|
|||
vm=dict(required=True),
|
||||
name=dict(default=None),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_nic_facts', 'community.general.ovirt_nic_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_nic_facts' module has been renamed to 'ovirt_nic_info', "
|
||||
|
|
|
@ -128,7 +128,7 @@ def main():
|
|||
group_name=dict(default=None),
|
||||
namespace=dict(default=None),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_permission_facts', 'community.general.ovirt_permission_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_permission_facts' module has been renamed to 'ovirt_permission_info', "
|
||||
|
|
|
@ -91,7 +91,7 @@ def main():
|
|||
data_center=dict(required=True),
|
||||
name=dict(default=None),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_quota_facts', 'community.general.ovirt_quota_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_quota_facts' module has been renamed to 'ovirt_quota_info', "
|
||||
|
|
|
@ -90,7 +90,7 @@ def main():
|
|||
id=dict(default=None),
|
||||
name=dict(default=None),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_scheduling_policy_facts', 'community.general.ovirt_scheduling_policy_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_scheduling_policy_facts' module has been renamed to 'ovirt_scheduling_policy_info', "
|
||||
|
|
|
@ -81,7 +81,7 @@ def main():
|
|||
description=dict(default=None),
|
||||
snapshot_id=dict(default=None),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_snapshot_facts', 'community.general.ovirt_snapshot_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_snapshot_facts' module has been renamed to 'ovirt_snapshot_info', "
|
||||
|
|
|
@ -87,7 +87,7 @@ def main():
|
|||
argument_spec = ovirt_info_full_argument_spec(
|
||||
pattern=dict(default='', required=False),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_storage_domain_facts', 'community.general.ovirt_storage_domain_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_storage_domain_facts' module has been renamed to 'ovirt_storage_domain_info', "
|
||||
|
|
|
@ -95,7 +95,7 @@ def main():
|
|||
max=dict(default=None, type='int'),
|
||||
unregistered=dict(default=False, type='bool'),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_storage_template_facts', 'community.general.ovirt_storage_template_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_storage_template_facts' module has been renamed to 'ovirt_storage_template_info', "
|
||||
|
|
|
@ -95,7 +95,7 @@ def main():
|
|||
max=dict(default=None, type='int'),
|
||||
unregistered=dict(default=False, type='bool'),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_storage_vm_facts', 'community.general.ovirt_storage_vm_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_storage_vm_facts' module has been renamed to 'ovirt_storage_vm_info', "
|
||||
|
|
|
@ -111,7 +111,7 @@ def main():
|
|||
host=dict(default=None),
|
||||
vm=dict(default=None),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_tag_facts', 'community.general.ovirt_tag_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_tag_facts' module has been renamed to 'ovirt_tag_info', "
|
||||
|
|
|
@ -85,7 +85,7 @@ def main():
|
|||
argument_spec = ovirt_info_full_argument_spec(
|
||||
pattern=dict(default='', required=False),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_template_facts', 'community.general.ovirt_template_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_template_facts' module has been renamed to 'ovirt_template_info', "
|
||||
|
|
|
@ -84,7 +84,7 @@ def main():
|
|||
argument_spec = ovirt_info_full_argument_spec(
|
||||
pattern=dict(default='', required=False),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_user_facts', 'community.general.ovirt_user_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_user_facts' module has been renamed to 'ovirt_user_info', "
|
||||
|
|
|
@ -119,7 +119,7 @@ def main():
|
|||
case_sensitive=dict(default=True, type='bool'),
|
||||
max=dict(default=None, type='int'),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_vm_facts', 'community.general.ovirt_vm_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_vm_facts' module has been renamed to 'ovirt_vm_info', "
|
||||
|
|
|
@ -84,7 +84,7 @@ def main():
|
|||
argument_spec = ovirt_info_full_argument_spec(
|
||||
pattern=dict(default='', required=False),
|
||||
)
|
||||
module = AnsibleModule(argument_spec)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
is_old_facts = module._name in ('ovirt_vmpool_facts', 'community.general.ovirt_vmpool_facts')
|
||||
if is_old_facts:
|
||||
module.deprecate("The 'ovirt_vmpool_facts' module has been renamed to 'ovirt_vmpool_info', "
|
||||
|
|
|
@ -124,6 +124,7 @@ def main():
|
|||
required_together=rax_required_together(),
|
||||
mutually_exclusive=[['address', 'id', 'name']],
|
||||
required_one_of=[['address', 'id', 'name']],
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
if not HAS_PYRAX:
|
||||
|
|
|
@ -99,7 +99,7 @@ def main():
|
|||
argument_spec=dict(
|
||||
filters=dict(default=None),
|
||||
),
|
||||
supports_check_mode=False,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
is_old_facts = module._name in ('smartos_image_facts', 'community.general.smartos_image_facts')
|
||||
if is_old_facts:
|
||||
|
|
|
@ -276,7 +276,7 @@ def main():
|
|||
['username', 'level', 'integrity', 'authkey'],
|
||||
['privacy', 'privkey'],
|
||||
),
|
||||
supports_check_mode=False,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
m_args = module.params
|
||||
|
|
|
@ -374,7 +374,7 @@ def main():
|
|||
},
|
||||
required_if=[['fact_subset', 'detailed_inventory', ['system_query_options']],
|
||||
['fact_subset', 'subsystem_health', ['system_query_options']], ],
|
||||
supports_check_mode=False)
|
||||
supports_check_mode=True)
|
||||
|
||||
try:
|
||||
_validate_inputs(module.params)
|
||||
|
|
|
@ -114,7 +114,10 @@ class DatacenterInfoModule(OneViewModuleBase):
|
|||
)
|
||||
|
||||
def __init__(self):
|
||||
super(DatacenterInfoModule, self).__init__(additional_arg_spec=self.argument_spec)
|
||||
super(DatacenterInfoModule, self).__init__(
|
||||
additional_arg_spec=self.argument_spec,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
self.is_old_facts = self.module._name in ('oneview_datacenter_facts', 'community.general.oneview_datacenter_facts')
|
||||
if self.is_old_facts:
|
||||
self.module.deprecate("The 'oneview_datacenter_facts' module has been renamed to 'oneview_datacenter_info', "
|
||||
|
|
|
@ -157,7 +157,10 @@ class EnclosureInfoModule(OneViewModuleBase):
|
|||
argument_spec = dict(name=dict(type='str'), options=dict(type='list'), params=dict(type='dict'))
|
||||
|
||||
def __init__(self):
|
||||
super(EnclosureInfoModule, self).__init__(additional_arg_spec=self.argument_spec)
|
||||
super(EnclosureInfoModule, self).__init__(
|
||||
additional_arg_spec=self.argument_spec,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
self.is_old_facts = self.module._name in ('oneview_enclosure_facts', 'community.general.oneview_enclosure_facts')
|
||||
if self.is_old_facts:
|
||||
self.module.deprecate("The 'oneview_enclosure_facts' module has been renamed to 'oneview_enclosure_info', "
|
||||
|
|
|
@ -112,7 +112,10 @@ class EthernetNetworkInfoModule(OneViewModuleBase):
|
|||
)
|
||||
|
||||
def __init__(self):
|
||||
super(EthernetNetworkInfoModule, self).__init__(additional_arg_spec=self.argument_spec)
|
||||
super(EthernetNetworkInfoModule, self).__init__(
|
||||
additional_arg_spec=self.argument_spec,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
self.is_old_facts = self.module._name in ('oneview_ethernet_network_facts', 'community.general.oneview_ethernet_network_facts')
|
||||
if self.is_old_facts:
|
||||
self.module.deprecate("The 'oneview_ethernet_network_facts' module has been renamed to 'oneview_ethernet_network_info', "
|
||||
|
|
|
@ -83,7 +83,10 @@ class FcNetworkInfoModule(OneViewModuleBase):
|
|||
params=dict(required=False, type='dict')
|
||||
)
|
||||
|
||||
super(FcNetworkInfoModule, self).__init__(additional_arg_spec=argument_spec)
|
||||
super(FcNetworkInfoModule, self).__init__(
|
||||
additional_arg_spec=argument_spec,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
self.is_old_facts = self.module._name in ('oneview_fc_network_facts', 'community.general.oneview_fc_network_facts')
|
||||
if self.is_old_facts:
|
||||
self.module.deprecate("The 'oneview_fc_network_facts' module has been renamed to 'oneview_fc_network_info', "
|
||||
|
|
|
@ -82,7 +82,10 @@ class FcoeNetworkInfoModule(OneViewModuleBase):
|
|||
params=dict(type='dict'),
|
||||
)
|
||||
|
||||
super(FcoeNetworkInfoModule, self).__init__(additional_arg_spec=argument_spec)
|
||||
super(FcoeNetworkInfoModule, self).__init__(
|
||||
additional_arg_spec=argument_spec,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
self.is_old_facts = self.module._name in ('oneview_fcoe_network_facts', 'community.general.oneview_fcoe_network_facts')
|
||||
if self.is_old_facts:
|
||||
self.module.deprecate("The 'oneview_fcoe_network_facts' module has been renamed to 'oneview_fcoe_network_info', "
|
||||
|
|
|
@ -96,7 +96,10 @@ class LogicalInterconnectGroupInfoModule(OneViewModuleBase):
|
|||
params=dict(type='dict'),
|
||||
)
|
||||
|
||||
super(LogicalInterconnectGroupInfoModule, self).__init__(additional_arg_spec=argument_spec)
|
||||
super(LogicalInterconnectGroupInfoModule, self).__init__(
|
||||
additional_arg_spec=argument_spec,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
self.is_old_facts = self.module._name in ('oneview_logical_interconnect_group_facts', 'community.general.oneview_logical_interconnect_group_facts')
|
||||
if self.is_old_facts:
|
||||
self.module.deprecate("The 'oneview_logical_interconnect_group_facts' module has been renamed to 'oneview_logical_interconnect_group_info', "
|
||||
|
|
|
@ -133,7 +133,10 @@ class NetworkSetInfoModule(OneViewModuleBase):
|
|||
)
|
||||
|
||||
def __init__(self):
|
||||
super(NetworkSetInfoModule, self).__init__(additional_arg_spec=self.argument_spec)
|
||||
super(NetworkSetInfoModule, self).__init__(
|
||||
additional_arg_spec=self.argument_spec,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
self.is_old_facts = self.module._name in ('oneview_network_set_facts', 'community.general.oneview_network_set_facts')
|
||||
if self.is_old_facts:
|
||||
self.module.deprecate("The 'oneview_network_set_facts' module has been renamed to 'oneview_network_set_info', "
|
||||
|
|
|
@ -90,7 +90,10 @@ class SanManagerInfoModule(OneViewModuleBase):
|
|||
)
|
||||
|
||||
def __init__(self):
|
||||
super(SanManagerInfoModule, self).__init__(additional_arg_spec=self.argument_spec)
|
||||
super(SanManagerInfoModule, self).__init__(
|
||||
additional_arg_spec=self.argument_spec,
|
||||
supports_check_mode=True,
|
||||
)
|
||||
self.resource_client = self.oneview_client.san_managers
|
||||
self.is_old_facts = self.module._name in ('oneview_san_manager_facts', 'community.general.oneview_san_manager_facts')
|
||||
if self.is_old_facts:
|
||||
|
|
|
@ -178,7 +178,7 @@ def main():
|
|||
password=dict(required=True, no_log=True),
|
||||
timeout=dict(type='int', default=10)
|
||||
),
|
||||
supports_check_mode=False
|
||||
supports_check_mode=True,
|
||||
)
|
||||
is_old_facts = module._name in ('idrac_redfish_facts', 'community.general.idrac_redfish_facts')
|
||||
if is_old_facts:
|
||||
|
|
|
@ -305,7 +305,7 @@ def main():
|
|||
password=dict(required=True, no_log=True),
|
||||
timeout=dict(type='int', default=10)
|
||||
),
|
||||
supports_check_mode=False
|
||||
supports_check_mode=True,
|
||||
)
|
||||
is_old_facts = module._name in ('redfish_facts', 'community.general.redfish_facts')
|
||||
if is_old_facts:
|
||||
|
|
|
@ -159,6 +159,7 @@ def main():
|
|||
name=dict(type='str', required=True, aliases=['volume']),
|
||||
status_filter=dict(type='str', default='self-heal', choices=['self-heal', 'rebalance']),
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
is_old_facts = module._name in ('gluster_heal_facts', 'community.general.gluster_heal_facts')
|
||||
if is_old_facts:
|
||||
|
|
|
@ -797,7 +797,7 @@ def main():
|
|||
gather_subset=dict(default='minimum', type='list',)
|
||||
))
|
||||
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=False)
|
||||
module = AnsibleModule(argument_spec, supports_check_mode=True)
|
||||
|
||||
array = get_system(module)
|
||||
|
||||
|
|
|
@ -110,7 +110,8 @@ def main():
|
|||
module = UTMModule(
|
||||
argument_spec=dict(
|
||||
name=dict(type='str', required=True)
|
||||
)
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
try:
|
||||
UTM(module, endpoint, key_to_check_for_changes, info_only=True).execute()
|
||||
|
|
|
@ -88,7 +88,8 @@ def main():
|
|||
module = UTMModule(
|
||||
argument_spec=dict(
|
||||
name=dict(type='str', required=True)
|
||||
)
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
try:
|
||||
# This is needed because the bool value only accepts int values in the backend
|
||||
|
|
|
@ -84,7 +84,8 @@ def main():
|
|||
module = UTMModule(
|
||||
argument_spec=dict(
|
||||
name=dict(type='str', required=True)
|
||||
)
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
try:
|
||||
UTM(module, endpoint, key_to_check_for_changes, info_only=True).execute()
|
||||
|
|
|
@ -128,8 +128,9 @@ def main():
|
|||
key_to_check_for_changes = []
|
||||
module = UTMModule(
|
||||
argument_spec=dict(
|
||||
name=dict(type='str', required=True)
|
||||
)
|
||||
name=dict(type='str', required=True),
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
try:
|
||||
UTM(module, endpoint, key_to_check_for_changes, info_only=True).execute()
|
||||
|
|
|
@ -109,8 +109,9 @@ def main():
|
|||
key_to_check_for_changes = []
|
||||
module = UTMModule(
|
||||
argument_spec=dict(
|
||||
name=dict(type='str', required=True)
|
||||
)
|
||||
name=dict(type='str', required=True),
|
||||
),
|
||||
supports_check_mode=True,
|
||||
)
|
||||
try:
|
||||
UTM(module, endpoint, key_to_check_for_changes, info_only=True).execute()
|
||||
|
|
Loading…
Reference in a new issue