From af769b88aee09a398a089e41836b2827f3318561 Mon Sep 17 00:00:00 2001 From: chkp-edenbr <94056191+chkp-edenbr@users.noreply.github.com> Date: Sun, 28 Jan 2024 12:17:39 +0200 Subject: [PATCH] ansible tests bug fixes (#122) * v5.1.3 * ansible-lint bug fixes * ansible-lint bug fixes * ansible-lint bug fixes * ansible test bug-fixes --- CHANGELOG.rst | 8 +++ changelogs/changelog.yaml | 7 +++ galaxy.yml | 10 ++-- meta/runtime.yml | 50 +++++++++++++++++++ plugins/doc_fragments/checkpoint_commands.py | 5 ++ plugins/doc_fragments/checkpoint_objects.py | 10 ++-- .../checkpoint_objects_action_module.py | 1 + plugins/module_utils/checkpoint.py | 27 ++++++---- plugins/modules/cp_mgmt_access_layer.py | 2 +- .../cp_mgmt_access_point_name_facts.py | 2 +- plugins/modules/cp_mgmt_add_nat_rule.py | 2 +- .../modules/cp_mgmt_checkpoint_host_facts.py | 2 +- plugins/modules/cp_mgmt_delete_nat_rule.py | 2 +- ...gmt_dynamic_global_network_object_facts.py | 2 +- .../cp_mgmt_gsn_handover_group_facts.py | 2 +- plugins/modules/cp_mgmt_host.py | 2 +- plugins/modules/cp_mgmt_hosts.py | 2 +- plugins/modules/cp_mgmt_https_layer_facts.py | 2 +- plugins/modules/cp_mgmt_import_management.py | 2 +- ...ips_protection_extended_attribute_facts.py | 4 +- plugins/modules/cp_mgmt_lock_object.py | 6 +-- plugins/modules/cp_mgmt_lsv_profile.py | 3 +- plugins/modules/cp_mgmt_lsv_profile_facts.py | 2 +- plugins/modules/cp_mgmt_radius_group_facts.py | 2 +- .../modules/cp_mgmt_radius_server_facts.py | 4 +- .../cp_mgmt_repository_package_facts.py | 2 +- .../cp_mgmt_service_citrix_tcp_facts.py | 2 +- .../cp_mgmt_service_compound_tcp_facts.py | 2 +- plugins/modules/cp_mgmt_set_login_message.py | 6 +-- plugins/modules/cp_mgmt_set_nat_rule.py | 2 +- .../modules/cp_mgmt_show_layer_structure.py | 2 +- plugins/modules/cp_mgmt_show_task.py | 2 +- plugins/modules/cp_mgmt_show_tasks.py | 2 +- plugins/modules/cp_mgmt_smart_task.py | 2 +- plugins/modules/cp_mgmt_smart_task_facts.py | 2 +- .../cp_mgmt_smart_task_trigger_facts.py | 2 +- plugins/modules/cp_mgmt_tacacs_group_facts.py | 2 +- .../modules/cp_mgmt_tacacs_server_facts.py | 2 +- plugins/modules/cp_mgmt_task_facts.py | 2 +- plugins/modules/cp_mgmt_threat_layer.py | 2 +- plugins/modules/cp_mgmt_threat_layers.py | 2 +- plugins/modules/cp_mgmt_time_group_facts.py | 2 +- .../modules/cp_mgmt_updatable_object_facts.py | 2 +- plugins/modules/cp_mgmt_user_group_facts.py | 2 +- ..._mgmt_vpn_community_remote_access_facts.py | 2 +- plugins/modules/cp_mgmt_vpn_community_star.py | 8 +-- 46 files changed, 144 insertions(+), 69 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 093a8ae..1593ac2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,14 @@ Check_Point.Mgmt Release Notes .. contents:: Topics +v5.2.2 +====== + +Release Summary +--------------- + +This is release 5.2.2 of ``check_point.mgmt``, released on 2024-01-28. + v5.2.1 ====== diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 06ce186..6066c56 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -956,3 +956,10 @@ releases: fragments: - 5.2.1.yml release_date: "2024-01-16" + 5.2.2: + changes: + release_summary: This is release 5.2.2 of ``check_point.mgmt``, released on + 2024-01-28. + fragments: + - 5.2.2.yml + release_date: '2024-01-28' diff --git a/galaxy.yml b/galaxy.yml index 0ade724..423e617 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -9,7 +9,7 @@ namespace: check_point name: mgmt # The version of the collection. Must be compatible with semantic versioning -version: 5.2.1 +version: 5.2.2 # The path to the Markdown (.md) readme file. This path is relative to the root of the collection readme: README.md @@ -17,9 +17,9 @@ readme: README.md # A list of the collection's content authors. Can be just the name or in the format 'Full Name (url) # @nicks:irc/im.site#channel' authors: -- Or Soffer -- Shiran Golzar -- Eden Brillant + - Or Soffer + - Shiran Golzar + - Eden Brillant ### OPTIONAL but strongly recommended @@ -30,7 +30,7 @@ description: Check Point collection for the Management Server # Either a single license or a list of licenses for content inside of a collection. Ansible Galaxy currently only # accepts L(SPDX,https://spdx.org/licenses/) licenses. This key is mutually exclusive with 'license_file' license: -- GPL-2.0-or-later + - GPL-2.0-or-later # The path to the license file for the collection. This path is relative to the root of the collection. This key is # mutually exclusive with 'license' diff --git a/meta/runtime.yml b/meta/runtime.yml index ce6befd..93a159c 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,2 +1,52 @@ --- requires_ansible: ">=2.14.0" +plugin_routing: + modules: + cp_mgmt_add_nat_rule: + deprecation: + removal_date: "2024-11-01" + warning_text: > + cp_mgmt_add_nat_rule will be removed in a future release of this collection. + Use newer and updated module cp_mgmt_nat_rule with more functionality instead. + cp_mgmt_set_nat_rule: + deprecation: + removal_date: "2024-11-01" + warning_text: > + cp_mgmt_set_nat_rule will be removed in a future release of this collection. + Use newer and updated module cp_mgmt_nat_rule with more functionality instead. + cp_mgmt_delete_nat_rule: + deprecation: + removal_date: "2024-11-01" + warning_text: > + cp_mgmt_delete_nat_rule will be removed in a future release of this collection. + Use newer and updated module cp_mgmt_nat_rule with more functionality instead. + cp_mgmt_access_layer: + deprecation: + removal_date: "2024-11-01" + warning_text: > + cp_mgmt_access_layer will be removed in a future release of this collection. + Use newer and updated module cp_mgmt_access_layers with more functionality instead. + cp_mgmt_show_task: + deprecation: + removal_date: "2024-11-01" + warning_text: > + cp_mgmt_show_task will be removed in a future release of this collection. + Use newer and updated module cp_mgmt_task_facts instead. + cp_mgmt_show_tasks: + deprecation: + removal_date: "2024-11-01" + warning_text: > + cp_mgmt_show_tasks will be removed in a future release of this collection. + Use newer and updated module cp_mgmt_task_facts instead. + cp_mgmt_host: + deprecation: + removal_date: "2024-11-01" + warning_text: > + cp_mgmt_host will be removed in a future release of this collection. + Use newer and updated module cp_mgmt_hosts with more functionality instead. + cp_mgmt_threat_layer: + deprecation: + removal_date: "2024-11-01" + warning_text: > + cp_mgmt_threat_layer will be removed in a future release of this collection. + Use newer and updated module cp_mgmt_threat_layers with more functionality instead. diff --git a/plugins/doc_fragments/checkpoint_commands.py b/plugins/doc_fragments/checkpoint_commands.py index d8846a8..a117496 100644 --- a/plugins/doc_fragments/checkpoint_commands.py +++ b/plugins/doc_fragments/checkpoint_commands.py @@ -27,4 +27,9 @@ class ModuleDocFragment(object): description: - Version of checkpoint. If not given one, the latest version taken. type: str + auto_publish_session: + description: + - Publish the current session if changes have been performed after task completes. + type: bool + default: False """ diff --git a/plugins/doc_fragments/checkpoint_objects.py b/plugins/doc_fragments/checkpoint_objects.py index ebbf4d4..351656b 100644 --- a/plugins/doc_fragments/checkpoint_objects.py +++ b/plugins/doc_fragments/checkpoint_objects.py @@ -15,17 +15,15 @@ class ModuleDocFragment(object): options: state: description: - - State of the access rule (present or absent). Defaults to present. + - State of the access rule (present or absent). type: str default: present - choices: - - 'present' - - 'absent' + choices: ['present', 'absent'] auto_publish_session: description: - - Publish the current session if changes have been performed - after task completes. + - Publish the current session if changes have been performed after task completes. type: bool + default: False wait_for_task: description: - Wait for the task to end. Such as publish task. diff --git a/plugins/doc_fragments/checkpoint_objects_action_module.py b/plugins/doc_fragments/checkpoint_objects_action_module.py index ad74ebe..62d8d5f 100644 --- a/plugins/doc_fragments/checkpoint_objects_action_module.py +++ b/plugins/doc_fragments/checkpoint_objects_action_module.py @@ -18,6 +18,7 @@ class ModuleDocFragment(object): - Publish the current session if changes have been performed after task completes. type: bool + default: False wait_for_task_timeout: description: - How many minutes to wait until throwing a timeout error. diff --git a/plugins/module_utils/checkpoint.py b/plugins/module_utils/checkpoint.py index bc2ad43..8481036 100644 --- a/plugins/module_utils/checkpoint.py +++ b/plugins/module_utils/checkpoint.py @@ -46,13 +46,13 @@ } checkpoint_argument_spec_for_action_module = dict( - auto_publish_session=dict(type="bool"), + auto_publish_session=dict(type="bool", default=False), wait_for_task_timeout=dict(type="int", default=30), version=dict(type="str"), ) checkpoint_argument_spec_for_objects = dict( - auto_publish_session=dict(type="bool"), + auto_publish_session=dict(type="bool", default=False), wait_for_task=dict(type="bool", default=True), wait_for_task_timeout=dict(type="int", default=30), state=dict(type="str", choices=["present", "absent"], default="present"), @@ -65,7 +65,7 @@ wait_for_task=dict(type="bool", default=True), wait_for_task_timeout=dict(type="int", default=30), version=dict(type="str"), - auto_publish_session=dict(type="bool"), + auto_publish_session=dict(type="bool", default=False), ) delete_params = [ @@ -76,7 +76,8 @@ "rule-name", "package", "ignore-errors", - "ignore-warnings" + "ignore-warnings", + "gateway-uid" ] remove_from_set_payload = { @@ -304,6 +305,10 @@ def get_payload_from_parameters(params): ): parameter = "version" + # message & syslog_facility are internally used by Ansible, so need to avoid param duplicity + elif parameter == "login_message": + parameter = "message" + payload[parameter.replace("_", "-")] = parameter_value return payload @@ -579,7 +584,7 @@ def api_call_facts(module, api_call_object, api_call_object_plural_version): False, False, ) - result = {api_call_object: response} + result = {api_call_object.replace("-", "_"): response} return result @@ -1431,12 +1436,12 @@ def api_call_facts_for_rule( # The code from here till EOF will be deprecated when Rikis' modules will be deprecated -checkpoint_argument_spec = dict( - auto_publish_session=dict(type="bool", default=True), - policy_package=dict(type="str", default="standard"), - auto_install_policy=dict(type="bool", default=True), - targets=dict(type="list"), -) +# checkpoint_argument_spec = dict( +# auto_publish_session=dict(type="bool", default=True), +# policy_package=dict(type="str", default="standard"), +# auto_install_policy=dict(type="bool", default=True), +# targets=dict(type="list"), +# ) def publish(connection, uid=None): diff --git a/plugins/modules/cp_mgmt_access_layer.py b/plugins/modules/cp_mgmt_access_layer.py index 6aee2a6..46bdab5 100644 --- a/plugins/modules/cp_mgmt_access_layer.py +++ b/plugins/modules/cp_mgmt_access_layer.py @@ -23,7 +23,7 @@ ANSIBLE_METADATA = { "metadata_version": "1.1", - "status": ["preview"], + "status": ["deprecated"], "supported_by": "community", } diff --git a/plugins/modules/cp_mgmt_access_point_name_facts.py b/plugins/modules/cp_mgmt_access_point_name_facts.py index 675533e..7a242d8 100644 --- a/plugins/modules/cp_mgmt_access_point_name_facts.py +++ b/plugins/modules/cp_mgmt_access_point_name_facts.py @@ -131,7 +131,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "access-point-name" api_call_object_plural_version = "access-point-names" diff --git a/plugins/modules/cp_mgmt_add_nat_rule.py b/plugins/modules/cp_mgmt_add_nat_rule.py index e520738..badb278 100644 --- a/plugins/modules/cp_mgmt_add_nat_rule.py +++ b/plugins/modules/cp_mgmt_add_nat_rule.py @@ -23,7 +23,7 @@ ANSIBLE_METADATA = { "metadata_version": "1.1", - "status": ["preview"], + "status": ["deprecated"], "supported_by": "community", } diff --git a/plugins/modules/cp_mgmt_checkpoint_host_facts.py b/plugins/modules/cp_mgmt_checkpoint_host_facts.py index 863aa58..2ec9f88 100644 --- a/plugins/modules/cp_mgmt_checkpoint_host_facts.py +++ b/plugins/modules/cp_mgmt_checkpoint_host_facts.py @@ -131,7 +131,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "checkpoint-host" api_call_object_plural_version = "checkpoint-hosts" diff --git a/plugins/modules/cp_mgmt_delete_nat_rule.py b/plugins/modules/cp_mgmt_delete_nat_rule.py index 56964a6..88416c8 100644 --- a/plugins/modules/cp_mgmt_delete_nat_rule.py +++ b/plugins/modules/cp_mgmt_delete_nat_rule.py @@ -23,7 +23,7 @@ ANSIBLE_METADATA = { "metadata_version": "1.1", - "status": ["preview"], + "status": ["deprecated"], "supported_by": "community", } diff --git a/plugins/modules/cp_mgmt_dynamic_global_network_object_facts.py b/plugins/modules/cp_mgmt_dynamic_global_network_object_facts.py index 16f8729..c850a61 100644 --- a/plugins/modules/cp_mgmt_dynamic_global_network_object_facts.py +++ b/plugins/modules/cp_mgmt_dynamic_global_network_object_facts.py @@ -131,7 +131,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "dynamic-global-network-object" api_call_object_plural_version = "dynamic-global-network-objects" diff --git a/plugins/modules/cp_mgmt_gsn_handover_group_facts.py b/plugins/modules/cp_mgmt_gsn_handover_group_facts.py index 3cba632..0d01bbf 100644 --- a/plugins/modules/cp_mgmt_gsn_handover_group_facts.py +++ b/plugins/modules/cp_mgmt_gsn_handover_group_facts.py @@ -136,7 +136,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "gsn-handover-group" api_call_object_plural_version = "gsn-handover-groups" diff --git a/plugins/modules/cp_mgmt_host.py b/plugins/modules/cp_mgmt_host.py index 0f61540..acceffd 100644 --- a/plugins/modules/cp_mgmt_host.py +++ b/plugins/modules/cp_mgmt_host.py @@ -23,7 +23,7 @@ ANSIBLE_METADATA = { "metadata_version": "1.1", - "status": ["preview"], + "status": ["deprecated"], "supported_by": "community", } diff --git a/plugins/modules/cp_mgmt_hosts.py b/plugins/modules/cp_mgmt_hosts.py index cd532e7..61d0ae5 100644 --- a/plugins/modules/cp_mgmt_hosts.py +++ b/plugins/modules/cp_mgmt_hosts.py @@ -19,6 +19,7 @@ - This resource module allows for addition, deletion, or modification of CP MGMT Hosts. - This resource module also takes care of gathering Hosts config facts version_added: "5.0.0" +author: Ansible Security Automation Team (@justjais) - options: config: description: A dictionary of HOSTS options @@ -349,7 +350,6 @@ - replaced - gathered - deleted -author: Ansible Team """ EXAMPLES = """ diff --git a/plugins/modules/cp_mgmt_https_layer_facts.py b/plugins/modules/cp_mgmt_https_layer_facts.py index 7242d46..0b74766 100644 --- a/plugins/modules/cp_mgmt_https_layer_facts.py +++ b/plugins/modules/cp_mgmt_https_layer_facts.py @@ -128,7 +128,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "https-layer" api_call_object_plural_version = "https-layers" diff --git a/plugins/modules/cp_mgmt_import_management.py b/plugins/modules/cp_mgmt_import_management.py index 1032329..fbc45a1 100644 --- a/plugins/modules/cp_mgmt_import_management.py +++ b/plugins/modules/cp_mgmt_import_management.py @@ -112,7 +112,7 @@ def main(): argument_spec = dict( - file_path=dict(type='str'), + file_path=dict(type='str', required=True), domain_name=dict(type='str'), domain_ip_address=dict(type='str'), domain_server_name=dict(type='str'), diff --git a/plugins/modules/cp_mgmt_ips_protection_extended_attribute_facts.py b/plugins/modules/cp_mgmt_ips_protection_extended_attribute_facts.py index 087157f..de8103d 100644 --- a/plugins/modules/cp_mgmt_ips_protection_extended_attribute_facts.py +++ b/plugins/modules/cp_mgmt_ips_protection_extended_attribute_facts.py @@ -111,14 +111,14 @@ def main(): filter=dict(type='str'), limit=dict(type='int'), offset=dict(type='int'), - order=dict(type='list', elememnts='dict', options=dict( + order=dict(type='list', elements='dict', options=dict( ASC=dict(type='str', choices=['name']), DESC=dict(type='str', choices=['name']) )) ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "ips-protection-extended-attribute" api_call_object_plural_version = "ips-protection-extended-attributes" diff --git a/plugins/modules/cp_mgmt_lock_object.py b/plugins/modules/cp_mgmt_lock_object.py index c984d8f..b55b50d 100644 --- a/plugins/modules/cp_mgmt_lock_object.py +++ b/plugins/modules/cp_mgmt_lock_object.py @@ -28,10 +28,10 @@ DOCUMENTATION = """ --- module: cp_mgmt_lock_object -short_description: Lock object using uid or {name and type}. +short_description: Lock object using name and type. description: - - Lock object using uid or {name and type}. Can lock object only if the object is not locked by another session. - - The object can be unlocked by the following commands: unlock, publish or discard. + - Lock object using name and type. Can lock object only if the object is not locked by another session. + - The object can be unlocked by the unlock, publish or discard commands. - All operations are performed over Web Services API. version_added: "5.0.0" author: "Eden Brillant (@chkp-edenbr)" diff --git a/plugins/modules/cp_mgmt_lsv_profile.py b/plugins/modules/cp_mgmt_lsv_profile.py index 519ae1d..eb43a20 100644 --- a/plugins/modules/cp_mgmt_lsv_profile.py +++ b/plugins/modules/cp_mgmt_lsv_profile.py @@ -72,7 +72,6 @@ - Maximum number of IP addresses in the VPN Domain of each peer. This value will be enforced only when limit-peer-domain-size field is set to true. Select a value between 1 and 256. Default value is 256. type: int - choices: ['1-256'] color: description: - Color of the object. Should be one of existing colors. @@ -148,7 +147,7 @@ def main(): tags=dict(type='list', elements='str'), vpn_domain=dict(type='dict', options=dict( limit_peer_domain_size=dict(type='bool'), - max_allowed_addresses=dict(type='int', choices=['1-256']) + max_allowed_addresses=dict(type='int') )), color=dict(type='str', choices=['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green', 'khaki', 'orchid', 'dark orange', 'dark sea green', 'pink', 'turquoise', 'dark blue', 'firebrick', 'brown', diff --git a/plugins/modules/cp_mgmt_lsv_profile_facts.py b/plugins/modules/cp_mgmt_lsv_profile_facts.py index c013f98..d755a4a 100644 --- a/plugins/modules/cp_mgmt_lsv_profile_facts.py +++ b/plugins/modules/cp_mgmt_lsv_profile_facts.py @@ -128,7 +128,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "lsv-profile" api_call_object_plural_version = "lsv-profiles" diff --git a/plugins/modules/cp_mgmt_radius_group_facts.py b/plugins/modules/cp_mgmt_radius_group_facts.py index 8068b30..af0ab88 100644 --- a/plugins/modules/cp_mgmt_radius_group_facts.py +++ b/plugins/modules/cp_mgmt_radius_group_facts.py @@ -144,7 +144,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "radius-group" api_call_object_plural_version = "radius-groups" diff --git a/plugins/modules/cp_mgmt_radius_server_facts.py b/plugins/modules/cp_mgmt_radius_server_facts.py index cb036d4..988cd88 100644 --- a/plugins/modules/cp_mgmt_radius_server_facts.py +++ b/plugins/modules/cp_mgmt_radius_server_facts.py @@ -69,6 +69,7 @@ - Sorts the results by search criteria. Automatically sorts the results by Name, in the ascending order. This parameter is relevant only for getting few objects. type: list + elements: dict suboptions: ASC: description: @@ -89,6 +90,7 @@ - Indicates which domains to process the commands on. It cannot be used with the details-level full, must be run from the System Domain only and with ignore-warnings true. Valid values are, CURRENT_DOMAIN, ALL_DOMAINS_ON_THIS_SERVER. type: list + elements: str extends_documentation_fragment: check_point.mgmt.checkpoint_facts """ @@ -132,7 +134,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "radius-server" api_call_object_plural_version = "radius-servers" diff --git a/plugins/modules/cp_mgmt_repository_package_facts.py b/plugins/modules/cp_mgmt_repository_package_facts.py index ef5e26b..a7c50e9 100644 --- a/plugins/modules/cp_mgmt_repository_package_facts.py +++ b/plugins/modules/cp_mgmt_repository_package_facts.py @@ -122,7 +122,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "repository-package" api_call_object_plural_version = "repository-packages" diff --git a/plugins/modules/cp_mgmt_service_citrix_tcp_facts.py b/plugins/modules/cp_mgmt_service_citrix_tcp_facts.py index 96fad89..fd61801 100644 --- a/plugins/modules/cp_mgmt_service_citrix_tcp_facts.py +++ b/plugins/modules/cp_mgmt_service_citrix_tcp_facts.py @@ -131,7 +131,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "service-citrix-tcp" api_call_object_plural_version = "services-citrix-tcp" diff --git a/plugins/modules/cp_mgmt_service_compound_tcp_facts.py b/plugins/modules/cp_mgmt_service_compound_tcp_facts.py index ad980b8..d2b72a3 100644 --- a/plugins/modules/cp_mgmt_service_compound_tcp_facts.py +++ b/plugins/modules/cp_mgmt_service_compound_tcp_facts.py @@ -131,7 +131,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "service-compound-tcp" api_call_object_plural_version = "services-compound-tcp" diff --git a/plugins/modules/cp_mgmt_set_login_message.py b/plugins/modules/cp_mgmt_set_login_message.py index 463442d..8be27ee 100644 --- a/plugins/modules/cp_mgmt_set_login_message.py +++ b/plugins/modules/cp_mgmt_set_login_message.py @@ -39,7 +39,7 @@ description: - Login message header. type: str - message: + login_message: description: - Login message body. type: str @@ -64,7 +64,7 @@ - name: set-login-message cp_mgmt_set_login_message: header: Warning - message: Unauthorized access of this server is prohibited and punished by law + login_message: Unauthorized access of this server is prohibited and punished by law show_message: 'true' warning: 'true' """ @@ -83,7 +83,7 @@ def main(): argument_spec = dict( header=dict(type='str'), - message=dict(type='str'), + login_message=dict(type='str'), show_message=dict(type='bool'), warning=dict(type='bool'), details_level=dict(type='str', choices=['uid', 'standard', 'full']) diff --git a/plugins/modules/cp_mgmt_set_nat_rule.py b/plugins/modules/cp_mgmt_set_nat_rule.py index 3ae0a10..60204a8 100644 --- a/plugins/modules/cp_mgmt_set_nat_rule.py +++ b/plugins/modules/cp_mgmt_set_nat_rule.py @@ -23,7 +23,7 @@ ANSIBLE_METADATA = { "metadata_version": "1.1", - "status": ["preview"], + "status": ["deprecated"], "supported_by": "community", } diff --git a/plugins/modules/cp_mgmt_show_layer_structure.py b/plugins/modules/cp_mgmt_show_layer_structure.py index 5b8892c..d3156cf 100644 --- a/plugins/modules/cp_mgmt_show_layer_structure.py +++ b/plugins/modules/cp_mgmt_show_layer_structure.py @@ -31,7 +31,7 @@ short_description: Shows the entire layer structure. description: - Shows the entire layer structure. The layer structure is divided into sections and each section has its own entities. - - Supported layer types: Access Control, NAT, Custom Threat Prevention, Threat Exception and HTTPS Inspection. + - Supported layer types include Access Control, NAT, Custom Threat Prevention, Threat Exception and HTTPS Inspection. - All operations are performed over Web Services API. version_added: "5.0.0" author: "Eden Brillant (@chkp-edenbr)" diff --git a/plugins/modules/cp_mgmt_show_task.py b/plugins/modules/cp_mgmt_show_task.py index e3790db..bf6cab2 100644 --- a/plugins/modules/cp_mgmt_show_task.py +++ b/plugins/modules/cp_mgmt_show_task.py @@ -23,7 +23,7 @@ ANSIBLE_METADATA = { "metadata_version": "1.1", - "status": ["preview"], + "status": ["deprecated"], "supported_by": "community", } diff --git a/plugins/modules/cp_mgmt_show_tasks.py b/plugins/modules/cp_mgmt_show_tasks.py index 2b7ce78..77a7a91 100644 --- a/plugins/modules/cp_mgmt_show_tasks.py +++ b/plugins/modules/cp_mgmt_show_tasks.py @@ -23,7 +23,7 @@ ANSIBLE_METADATA = { "metadata_version": "1.1", - "status": ["preview"], + "status": ["deprecated"], "supported_by": "community", } diff --git a/plugins/modules/cp_mgmt_smart_task.py b/plugins/modules/cp_mgmt_smart_task.py index 278d3c9..c491bf7 100644 --- a/plugins/modules/cp_mgmt_smart_task.py +++ b/plugins/modules/cp_mgmt_smart_task.py @@ -245,7 +245,7 @@ def main(): fingerprint=dict(type='str'), override_proxy=dict(type='bool'), proxy_url=dict(type='str'), - shared_secret=dict(type='str'), + shared_secret=dict(type='str', no_log=True), time_out=dict(type='int') )), run_script=dict(type='dict', options=dict( diff --git a/plugins/modules/cp_mgmt_smart_task_facts.py b/plugins/modules/cp_mgmt_smart_task_facts.py index cfca4de..ee5abde 100644 --- a/plugins/modules/cp_mgmt_smart_task_facts.py +++ b/plugins/modules/cp_mgmt_smart_task_facts.py @@ -128,7 +128,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "smart-task" api_call_object_plural_version = "smart-tasks" diff --git a/plugins/modules/cp_mgmt_smart_task_trigger_facts.py b/plugins/modules/cp_mgmt_smart_task_trigger_facts.py index ca440bd..cbdc3f7 100644 --- a/plugins/modules/cp_mgmt_smart_task_trigger_facts.py +++ b/plugins/modules/cp_mgmt_smart_task_trigger_facts.py @@ -128,7 +128,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "smart-task-trigger" api_call_object_plural_version = "smart-task-triggers" diff --git a/plugins/modules/cp_mgmt_tacacs_group_facts.py b/plugins/modules/cp_mgmt_tacacs_group_facts.py index 6bf7e15..00f8302 100644 --- a/plugins/modules/cp_mgmt_tacacs_group_facts.py +++ b/plugins/modules/cp_mgmt_tacacs_group_facts.py @@ -128,7 +128,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "tacacs-group" api_call_object_plural_version = "tacacs-groups" diff --git a/plugins/modules/cp_mgmt_tacacs_server_facts.py b/plugins/modules/cp_mgmt_tacacs_server_facts.py index 64c82d7..3a5868a 100644 --- a/plugins/modules/cp_mgmt_tacacs_server_facts.py +++ b/plugins/modules/cp_mgmt_tacacs_server_facts.py @@ -128,7 +128,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "tacacs-server" api_call_object_plural_version = "tacacs-servers" diff --git a/plugins/modules/cp_mgmt_task_facts.py b/plugins/modules/cp_mgmt_task_facts.py index 501853d..f76eba0 100644 --- a/plugins/modules/cp_mgmt_task_facts.py +++ b/plugins/modules/cp_mgmt_task_facts.py @@ -137,7 +137,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "task" api_call_object_plural_version = "tasks" diff --git a/plugins/modules/cp_mgmt_threat_layer.py b/plugins/modules/cp_mgmt_threat_layer.py index 094ae3c..45d4e8e 100644 --- a/plugins/modules/cp_mgmt_threat_layer.py +++ b/plugins/modules/cp_mgmt_threat_layer.py @@ -23,7 +23,7 @@ ANSIBLE_METADATA = { "metadata_version": "1.1", - "status": ["preview"], + "status": ["deprecated"], "supported_by": "community", } diff --git a/plugins/modules/cp_mgmt_threat_layers.py b/plugins/modules/cp_mgmt_threat_layers.py index 0d35e8e..fdf6055 100644 --- a/plugins/modules/cp_mgmt_threat_layers.py +++ b/plugins/modules/cp_mgmt_threat_layers.py @@ -19,6 +19,7 @@ - This resource module allows for addition, deletion, or modification of CP Threat Layers. - This resource module also takes care of gathering Threat Layers config facts version_added: "5.0.0" +author: Ansible Security Automation Team (@justjais) - options: config: description: A dictionary of THREAT LAYERS options @@ -150,7 +151,6 @@ - replaced - gathered - deleted -author: Ansible Team """ EXAMPLES = """ diff --git a/plugins/modules/cp_mgmt_time_group_facts.py b/plugins/modules/cp_mgmt_time_group_facts.py index 8b5bda2..49146d9 100644 --- a/plugins/modules/cp_mgmt_time_group_facts.py +++ b/plugins/modules/cp_mgmt_time_group_facts.py @@ -128,7 +128,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "time-group" api_call_object_plural_version = "time-groups" diff --git a/plugins/modules/cp_mgmt_updatable_object_facts.py b/plugins/modules/cp_mgmt_updatable_object_facts.py index 6740207..626794a 100644 --- a/plugins/modules/cp_mgmt_updatable_object_facts.py +++ b/plugins/modules/cp_mgmt_updatable_object_facts.py @@ -130,7 +130,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "updatable-object" api_call_object_plural_version = "updatable-objects" diff --git a/plugins/modules/cp_mgmt_user_group_facts.py b/plugins/modules/cp_mgmt_user_group_facts.py index 0441eea..97af747 100644 --- a/plugins/modules/cp_mgmt_user_group_facts.py +++ b/plugins/modules/cp_mgmt_user_group_facts.py @@ -136,7 +136,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "user-group" api_call_object_plural_version = "user-groups" diff --git a/plugins/modules/cp_mgmt_vpn_community_remote_access_facts.py b/plugins/modules/cp_mgmt_vpn_community_remote_access_facts.py index b13a5be..78da989 100644 --- a/plugins/modules/cp_mgmt_vpn_community_remote_access_facts.py +++ b/plugins/modules/cp_mgmt_vpn_community_remote_access_facts.py @@ -125,7 +125,7 @@ def main(): ) argument_spec.update(checkpoint_argument_spec_for_facts) - module = AnsibleModule(argument_spec=argument_spec) + module = AnsibleModule(argument_spec=argument_spec, supports_check_mode=True) api_call_object = "vpn-community-remote-access" api_call_object_plural_version = "vpn-communities-remote-access" diff --git a/plugins/modules/cp_mgmt_vpn_community_star.py b/plugins/modules/cp_mgmt_vpn_community_star.py index 3aac3bf..a5a1030 100644 --- a/plugins/modules/cp_mgmt_vpn_community_star.py +++ b/plugins/modules/cp_mgmt_vpn_community_star.py @@ -379,7 +379,7 @@ def main(): 'group-14', 'group-15', 'group-16', 'group-17', 'group-18', 'group-19', 'group-20', 'group-24']), - ike_p1_rekey_time=dict(type='int'), + ike_p1_rekey_time=dict(type='int', no_log=False), ike_p1_rekey_time_unit=dict(type='str', choices=['days', 'hours', 'minutes', 'seconds']) )), ike_phase_2=dict(type='dict', options=dict( @@ -391,7 +391,7 @@ def main(): ike_p2_pfs_dh_grp=dict(type='str', choices=['group-1', 'group-2', 'group-5', 'group-14', 'group-15', 'group-16', 'group-17', 'group-18', 'group-19', 'group-20', 'group-24']), - ike_p2_rekey_time=dict(type='int'), + ike_p2_rekey_time=dict(type='int', no_log=False), ike_p2_rekey_time_unit=dict(type='str', choices=['days', 'hours', 'minutes', 'seconds']), )) )), @@ -417,7 +417,7 @@ def main(): type="str", choices=["cast", "aes-256", "des", "aes-128", "3des"], ), - ike_p1_rekey_time=dict(type='int'), + ike_p1_rekey_time=dict(type='int', no_log=False), ike_p1_rekey_time_unit=dict(type='str', choices=['days', 'hours', 'minutes', 'seconds']), ), ), @@ -447,7 +447,7 @@ def main(): ike_p2_pfs_dh_grp=dict(type='str', choices=['group-1', 'group-2', 'group-5', 'group-14', 'group-15', 'group-16', 'group-17', 'group-18', 'group-19', 'group-20', 'group-24']), - ike_p2_rekey_time=dict(type='int'), + ike_p2_rekey_time=dict(type='int', no_log=False), ike_p2_rekey_time_unit=dict(type='str', choices=['days', 'hours', 'minutes', 'seconds']), ), ),