diff --git a/changelogs/fragments/3084-info-checkmode.yaml b/changelogs/fragments/3084-info-checkmode.yaml new file mode 100644 index 0000000000..4f068a9162 --- /dev/null +++ b/changelogs/fragments/3084-info-checkmode.yaml @@ -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). diff --git a/plugins/module_utils/oneview.py b/plugins/module_utils/oneview.py index bfa5f09102..a2031a01bc 100644 --- a/plugins/module_utils/oneview.py +++ b/plugins/module_utils/oneview.py @@ -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() diff --git a/plugins/modules/cloud/alicloud/ali_instance_info.py b/plugins/modules/cloud/alicloud/ali_instance_info.py index 33b3f8a6ad..a0aca042d8 100644 --- a/plugins/modules/cloud/alicloud/ali_instance_info.py +++ b/plugins/modules/cloud/alicloud/ali_instance_info.py @@ -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 diff --git a/plugins/modules/cloud/docker/docker_stack_info.py b/plugins/modules/cloud/docker/docker_stack_info.py index 74a3648df2..5af101eb72 100644 --- a/plugins/modules/cloud/docker/docker_stack_info.py +++ b/plugins/modules/cloud/docker/docker_stack_info.py @@ -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) diff --git a/plugins/modules/cloud/docker/docker_stack_task_info.py b/plugins/modules/cloud/docker/docker_stack_task_info.py index 966a42660c..bd3c8d5401 100644 --- a/plugins/modules/cloud/docker/docker_stack_task_info.py +++ b/plugins/modules/cloud/docker/docker_stack_task_info.py @@ -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'] diff --git a/plugins/modules/cloud/google/gcpubsub_info.py b/plugins/modules/cloud/google/gcpubsub_info.py index dbb8d359cd..60ff53ac62 100644 --- a/plugins/modules/cloud/google/gcpubsub_info.py +++ b/plugins/modules/cloud/google/gcpubsub_info.py @@ -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 diff --git a/plugins/modules/cloud/memset/memset_memstore_info.py b/plugins/modules/cloud/memset/memset_memstore_info.py index 5eea6ab191..ea94376420 100644 --- a/plugins/modules/cloud/memset/memset_memstore_info.py +++ b/plugins/modules/cloud/memset/memset_memstore_info.py @@ -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'", diff --git a/plugins/modules/cloud/memset/memset_server_info.py b/plugins/modules/cloud/memset/memset_server_info.py index d8943c1454..612b37bc4d 100644 --- a/plugins/modules/cloud/memset/memset_server_info.py +++ b/plugins/modules/cloud/memset/memset_server_info.py @@ -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'", diff --git a/plugins/modules/cloud/misc/xenserver_facts.py b/plugins/modules/cloud/misc/xenserver_facts.py index 25923cb288..bc01c56ecb 100644 --- a/plugins/modules/cloud/misc/xenserver_facts.py +++ b/plugins/modules/cloud/misc/xenserver_facts.py @@ -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") diff --git a/plugins/modules/cloud/ovirt/ovirt_affinity_label_facts.py b/plugins/modules/cloud/ovirt/ovirt_affinity_label_facts.py index da791d71ca..c3b4121edc 100644 --- a/plugins/modules/cloud/ovirt/ovirt_affinity_label_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_affinity_label_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_api_facts.py b/plugins/modules/cloud/ovirt/ovirt_api_facts.py index 5d2bcd5d69..ca9b1a5ea9 100644 --- a/plugins/modules/cloud/ovirt/ovirt_api_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_api_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_cluster_facts.py b/plugins/modules/cloud/ovirt/ovirt_cluster_facts.py index ebbb8f4d7c..f99bb6aac0 100644 --- a/plugins/modules/cloud/ovirt/ovirt_cluster_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_cluster_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_datacenter_facts.py b/plugins/modules/cloud/ovirt/ovirt_datacenter_facts.py index 7532055145..822eafef22 100644 --- a/plugins/modules/cloud/ovirt/ovirt_datacenter_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_datacenter_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_disk_facts.py b/plugins/modules/cloud/ovirt/ovirt_disk_facts.py index c634c629d3..68064d0007 100644 --- a/plugins/modules/cloud/ovirt/ovirt_disk_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_disk_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_event_facts.py b/plugins/modules/cloud/ovirt/ovirt_event_facts.py index 06278566d5..c09cef0e38 100644 --- a/plugins/modules/cloud/ovirt/ovirt_event_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_event_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_external_provider_facts.py b/plugins/modules/cloud/ovirt/ovirt_external_provider_facts.py index 981e5fbd8b..eaf58e6619 100644 --- a/plugins/modules/cloud/ovirt/ovirt_external_provider_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_external_provider_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_group_facts.py b/plugins/modules/cloud/ovirt/ovirt_group_facts.py index 40b636af2b..e8bffddf66 100644 --- a/plugins/modules/cloud/ovirt/ovirt_group_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_group_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_host_facts.py b/plugins/modules/cloud/ovirt/ovirt_host_facts.py index 2d3c746040..727336a657 100644 --- a/plugins/modules/cloud/ovirt/ovirt_host_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_host_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_host_storage_facts.py b/plugins/modules/cloud/ovirt/ovirt_host_storage_facts.py index 8c866fe0de..7268dced72 100644 --- a/plugins/modules/cloud/ovirt/ovirt_host_storage_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_host_storage_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_network_facts.py b/plugins/modules/cloud/ovirt/ovirt_network_facts.py index 30e55fcbd5..8e34d1c18f 100644 --- a/plugins/modules/cloud/ovirt/ovirt_network_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_network_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_nic_facts.py b/plugins/modules/cloud/ovirt/ovirt_nic_facts.py index e2643aae5c..bb70bf3ff2 100644 --- a/plugins/modules/cloud/ovirt/ovirt_nic_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_nic_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_permission_facts.py b/plugins/modules/cloud/ovirt/ovirt_permission_facts.py index 48da0c9286..83ed3f5ebc 100644 --- a/plugins/modules/cloud/ovirt/ovirt_permission_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_permission_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_quota_facts.py b/plugins/modules/cloud/ovirt/ovirt_quota_facts.py index e9b3fc6287..f0c9af55cc 100644 --- a/plugins/modules/cloud/ovirt/ovirt_quota_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_quota_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py b/plugins/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py index eeaeb61051..5771d93c6e 100644 --- a/plugins/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_scheduling_policy_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_snapshot_facts.py b/plugins/modules/cloud/ovirt/ovirt_snapshot_facts.py index 573cb35769..86544a8a7e 100644 --- a/plugins/modules/cloud/ovirt/ovirt_snapshot_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_snapshot_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_storage_domain_facts.py b/plugins/modules/cloud/ovirt/ovirt_storage_domain_facts.py index 4f16ae4d1e..e5d0b1fc28 100644 --- a/plugins/modules/cloud/ovirt/ovirt_storage_domain_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_storage_domain_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_storage_template_facts.py b/plugins/modules/cloud/ovirt/ovirt_storage_template_facts.py index 5a92fadd78..29a3414a25 100644 --- a/plugins/modules/cloud/ovirt/ovirt_storage_template_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_storage_template_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_storage_vm_facts.py b/plugins/modules/cloud/ovirt/ovirt_storage_vm_facts.py index caed0faee0..020079b658 100644 --- a/plugins/modules/cloud/ovirt/ovirt_storage_vm_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_storage_vm_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_tag_facts.py b/plugins/modules/cloud/ovirt/ovirt_tag_facts.py index d23387ab96..c00e4ca109 100644 --- a/plugins/modules/cloud/ovirt/ovirt_tag_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_tag_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_template_facts.py b/plugins/modules/cloud/ovirt/ovirt_template_facts.py index 279b849d9d..52e7b01b85 100644 --- a/plugins/modules/cloud/ovirt/ovirt_template_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_template_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_user_facts.py b/plugins/modules/cloud/ovirt/ovirt_user_facts.py index 4213e03bcc..d465ff90c8 100644 --- a/plugins/modules/cloud/ovirt/ovirt_user_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_user_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_vm_facts.py b/plugins/modules/cloud/ovirt/ovirt_vm_facts.py index 711c8f6f01..b2b7721869 100644 --- a/plugins/modules/cloud/ovirt/ovirt_vm_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_vm_facts.py @@ -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', " diff --git a/plugins/modules/cloud/ovirt/ovirt_vmpool_facts.py b/plugins/modules/cloud/ovirt/ovirt_vmpool_facts.py index 29944ca96f..adc7795577 100644 --- a/plugins/modules/cloud/ovirt/ovirt_vmpool_facts.py +++ b/plugins/modules/cloud/ovirt/ovirt_vmpool_facts.py @@ -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', " diff --git a/plugins/modules/cloud/rackspace/rax_facts.py b/plugins/modules/cloud/rackspace/rax_facts.py index 386ca7cfa9..f9fd89556f 100644 --- a/plugins/modules/cloud/rackspace/rax_facts.py +++ b/plugins/modules/cloud/rackspace/rax_facts.py @@ -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: diff --git a/plugins/modules/cloud/smartos/smartos_image_info.py b/plugins/modules/cloud/smartos/smartos_image_info.py index 20e0e76eac..b4532f6919 100644 --- a/plugins/modules/cloud/smartos/smartos_image_info.py +++ b/plugins/modules/cloud/smartos/smartos_image_info.py @@ -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: diff --git a/plugins/modules/net_tools/snmp_facts.py b/plugins/modules/net_tools/snmp_facts.py index 661db46060..b534f02da3 100644 --- a/plugins/modules/net_tools/snmp_facts.py +++ b/plugins/modules/net_tools/snmp_facts.py @@ -276,7 +276,7 @@ def main(): ['username', 'level', 'integrity', 'authkey'], ['privacy', 'privkey'], ), - supports_check_mode=False, + supports_check_mode=True, ) m_args = module.params diff --git a/plugins/modules/remote_management/dellemc/ome_device_info.py b/plugins/modules/remote_management/dellemc/ome_device_info.py index 68fbb1e680..b67550c648 100644 --- a/plugins/modules/remote_management/dellemc/ome_device_info.py +++ b/plugins/modules/remote_management/dellemc/ome_device_info.py @@ -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) diff --git a/plugins/modules/remote_management/oneview/oneview_datacenter_info.py b/plugins/modules/remote_management/oneview/oneview_datacenter_info.py index 2da93c7d2f..b5ea13a4e2 100644 --- a/plugins/modules/remote_management/oneview/oneview_datacenter_info.py +++ b/plugins/modules/remote_management/oneview/oneview_datacenter_info.py @@ -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', " diff --git a/plugins/modules/remote_management/oneview/oneview_enclosure_info.py b/plugins/modules/remote_management/oneview/oneview_enclosure_info.py index a0dc984b80..33d4c314ce 100644 --- a/plugins/modules/remote_management/oneview/oneview_enclosure_info.py +++ b/plugins/modules/remote_management/oneview/oneview_enclosure_info.py @@ -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', " diff --git a/plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py b/plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py index 4dcd9077b7..246cda8ef5 100644 --- a/plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py +++ b/plugins/modules/remote_management/oneview/oneview_ethernet_network_info.py @@ -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', " diff --git a/plugins/modules/remote_management/oneview/oneview_fc_network_info.py b/plugins/modules/remote_management/oneview/oneview_fc_network_info.py index db48f19f84..3df0119b23 100644 --- a/plugins/modules/remote_management/oneview/oneview_fc_network_info.py +++ b/plugins/modules/remote_management/oneview/oneview_fc_network_info.py @@ -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', " diff --git a/plugins/modules/remote_management/oneview/oneview_fcoe_network_info.py b/plugins/modules/remote_management/oneview/oneview_fcoe_network_info.py index e5e1bc08e4..a73386208c 100644 --- a/plugins/modules/remote_management/oneview/oneview_fcoe_network_info.py +++ b/plugins/modules/remote_management/oneview/oneview_fcoe_network_info.py @@ -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', " diff --git a/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group_info.py b/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group_info.py index 3488be92a6..0caae963ea 100644 --- a/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group_info.py +++ b/plugins/modules/remote_management/oneview/oneview_logical_interconnect_group_info.py @@ -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', " diff --git a/plugins/modules/remote_management/oneview/oneview_network_set_info.py b/plugins/modules/remote_management/oneview/oneview_network_set_info.py index f02d5b6c4a..8da0a2b713 100644 --- a/plugins/modules/remote_management/oneview/oneview_network_set_info.py +++ b/plugins/modules/remote_management/oneview/oneview_network_set_info.py @@ -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', " diff --git a/plugins/modules/remote_management/oneview/oneview_san_manager_info.py b/plugins/modules/remote_management/oneview/oneview_san_manager_info.py index 2e462b966d..f0f5fa072a 100644 --- a/plugins/modules/remote_management/oneview/oneview_san_manager_info.py +++ b/plugins/modules/remote_management/oneview/oneview_san_manager_info.py @@ -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: diff --git a/plugins/modules/remote_management/redfish/idrac_redfish_info.py b/plugins/modules/remote_management/redfish/idrac_redfish_info.py index 42a5efcba9..002b6e9125 100644 --- a/plugins/modules/remote_management/redfish/idrac_redfish_info.py +++ b/plugins/modules/remote_management/redfish/idrac_redfish_info.py @@ -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: diff --git a/plugins/modules/remote_management/redfish/redfish_info.py b/plugins/modules/remote_management/redfish/redfish_info.py index 7bf209b7f6..de9ef1e07a 100644 --- a/plugins/modules/remote_management/redfish/redfish_info.py +++ b/plugins/modules/remote_management/redfish/redfish_info.py @@ -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: diff --git a/plugins/modules/storage/glusterfs/gluster_heal_info.py b/plugins/modules/storage/glusterfs/gluster_heal_info.py index 46306585fc..92f02c5496 100644 --- a/plugins/modules/storage/glusterfs/gluster_heal_info.py +++ b/plugins/modules/storage/glusterfs/gluster_heal_info.py @@ -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: diff --git a/plugins/modules/storage/purestorage/purefa_facts.py b/plugins/modules/storage/purestorage/purefa_facts.py index 5e8b593260..64660e5cd2 100644 --- a/plugins/modules/storage/purestorage/purefa_facts.py +++ b/plugins/modules/storage/purestorage/purefa_facts.py @@ -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) diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py index 6d230c1a71..e17af5ee06 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py @@ -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() diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py index ad315df9a0..19d7c62e2f 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py @@ -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 diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py index c1d0f7d880..4bfd3b9217 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py @@ -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() diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py index 450bd16168..643515fd08 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py @@ -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() diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py index 1125c4fada..7488720c9a 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py @@ -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()