Debian Codegraph @

ansible_collections/check_point/mgmt/plugins/modules/cp_mgmt_install_lsm_settings.py

raw
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3 #
4 # Ansible module to manage CheckPoint Firewall (c) 2019
5 #
6 # Ansible is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
10 #
11 # Ansible is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
18 #
19
20 from __future__ import absolute_import, division, print_function
21
22 __metaclass__ = type
23
24 ANSIBLE_METADATA = {
25 "metadata_version": "1.1",
26 "status": ["preview"],
27 "supported_by": "community",
28 }
29
30 DOCUMENTATION = """
31 ---
32 module: cp_mgmt_install_lsm_settings
33 short_description: Executes the lsm-install-settings on a given list of targets. Install the provisioning settings that defined on the object on the targets
34 devices.
35 description:
36 - Executes the lsm-install-settings on a given list of targets. Install the provisioning settings that defined on the object on the targets devices.
37 - All operations are performed over Web Services API.
38 - Available from R81.20 management version.
39 version_added: "3.0.0"
40 author: "Shiran Golzar (@chkp-shirango)"
41 options:
42 targets:
43 description:
44 - On what targets to execute this command. Targets may be identified by their name, or object unique identifier.
45 type: list
46 elements: str
47 extends_documentation_fragment: check_point.mgmt.checkpoint_commands
48 """
49
50 EXAMPLES = """
51 - name: install-lsm-settings
52 cp_mgmt_install_lsm_settings:
53 targets:
54 - lsm_gateway
55 """
56
57 RETURN = """
58 cp_mgmt_install_lsm_settings:
59 description: The checkpoint install-lsm-settings output.
60 returned: always.
61 type: dict
62 """
63
64 from ansible.module_utils.basic import AnsibleModule
65 from ansible_collections.check_point.mgmt.plugins.module_utils.checkpoint import (
66 checkpoint_argument_spec_for_commands,
67 api_command,
68 )
69
70
71 def main():
72 argument_spec = dict(targets=dict(type="list", elements="str"))
73 argument_spec.update(checkpoint_argument_spec_for_commands)
74
75 module = AnsibleModule(argument_spec=argument_spec)
76
77 command = "install-lsm-settings"
78
79 result = api_command(module, command)
80 module.exit_json(**result)
81
82
83 if __name__ == "__main__":
84 main()