| 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_domain_permissions_profile |
| 33 |
short_description: Manages domain-permissions-profile objects on Checkpoint over Web Services API |
| 34 |
description: |
| 35 |
- Manages domain-permissions-profile objects on Checkpoint devices including creating, updating and removing objects. |
| 36 |
- All operations are performed over Web Services API. |
| 37 |
- Available from R81.20 management version. |
| 38 |
version_added: "3.0.0" |
| 39 |
author: "Eden Brillant (@chkp-edenbr)" |
| 40 |
options: |
| 41 |
name: |
| 42 |
description: |
| 43 |
- Object name. |
| 44 |
type: str |
| 45 |
required: True |
| 46 |
permission_type: |
| 47 |
description: |
| 48 |
- The type of the Permissions Profile. |
| 49 |
type: str |
| 50 |
choices: ['read write all', 'read only all', 'customized'] |
| 51 |
edit_common_objects: |
| 52 |
description: |
| 53 |
- Define and manage objects in the Check Point database, Network Objects, Services, Custom Application Site, VPN Community, Users, Servers, |
| 54 |
Resources, Time, UserCheck, and Limit.<br>Only a 'Customized' permission-type profile can edit this permission. |
| 55 |
type: bool |
| 56 |
access_control: |
| 57 |
description: |
| 58 |
- Access Control permissions.<br>Only a 'Customized' permission-type profile can edit these permissions. |
| 59 |
type: dict |
| 60 |
suboptions: |
| 61 |
show_policy: |
| 62 |
description: |
| 63 |
- Select to let administrators work with Access Control rules and NAT rules. If not selected, administrators cannot see these rules. |
| 64 |
type: bool |
| 65 |
policy_layers: |
| 66 |
description: |
| 67 |
- Layer editing permissions.<br>Available only if show-policy is set to true. |
| 68 |
type: dict |
| 69 |
suboptions: |
| 70 |
edit_layers: |
| 71 |
description: |
| 72 |
- a "By Software Blades" - Edit Access Control layers that contain the blades enabled in the Permissions Profile.<br>"By |
| 73 |
Selected Profile In A Layer Editor" - Administrators can only edit the layer if the Access Control layer editor gives editing permission to |
| 74 |
their profiles. |
| 75 |
type: str |
| 76 |
choices: ['By Software Blades', 'By Selected Profile In A Layer Editor'] |
| 77 |
app_control_and_url_filtering: |
| 78 |
description: |
| 79 |
- Use Application and URL Filtering in Access Control rules.<br>Available only if edit-layers is set to "By Software Blades". |
| 80 |
type: bool |
| 81 |
content_awareness: |
| 82 |
description: |
| 83 |
- Use specified data types in Access Control rules.<br>Available only if edit-layers is set to "By Software Blades". |
| 84 |
type: bool |
| 85 |
firewall: |
| 86 |
description: |
| 87 |
- Work with Access Control and other Software Blades that do not have their own Policies.<br>Available only if edit-layers is |
| 88 |
set to "By Software Blades". |
| 89 |
type: bool |
| 90 |
mobile_access: |
| 91 |
description: |
| 92 |
- Work with Mobile Access rules.<br>Available only if edit-layers is set to "By Software Blades". |
| 93 |
type: bool |
| 94 |
dlp_policy: |
| 95 |
description: |
| 96 |
- Configure DLP rules and Policies. |
| 97 |
type: str |
| 98 |
choices: ['read', 'write', 'disabled'] |
| 99 |
geo_control_policy: |
| 100 |
description: |
| 101 |
- Work with Access Control rules that control traffic to and from specified countries. |
| 102 |
type: str |
| 103 |
choices: ['read', 'write', 'disabled'] |
| 104 |
nat_policy: |
| 105 |
description: |
| 106 |
- Work with NAT in Access Control rules. |
| 107 |
type: str |
| 108 |
choices: ['read', 'write', 'disabled'] |
| 109 |
qos_policy: |
| 110 |
description: |
| 111 |
- Work with QoS Policies and rules. |
| 112 |
type: str |
| 113 |
choices: ['read', 'write', 'disabled'] |
| 114 |
access_control_objects_and_settings: |
| 115 |
description: |
| 116 |
- Allow editing of the following objet types, VPN Community, Access Role, Custom application group,Custom application, Custom category, |
| 117 |
Limit, Application - Match Settings, Application Category - Match Settings,Override Categorization, Application and URL filtering blade - Advanced |
| 118 |
Settings, Content Awareness blade - Advanced Settings. |
| 119 |
type: str |
| 120 |
choices: ['read', 'write', 'disabled'] |
| 121 |
app_control_and_url_filtering_update: |
| 122 |
description: |
| 123 |
- Install Application and URL Filtering updates. |
| 124 |
type: bool |
| 125 |
install_policy: |
| 126 |
description: |
| 127 |
- Install Access Control Policies. |
| 128 |
type: bool |
| 129 |
endpoint: |
| 130 |
description: |
| 131 |
- Endpoint permissions. Not supported for Multi-Domain Servers.<br>Only a 'Customized' permission-type profile can edit these permissions. |
| 132 |
type: dict |
| 133 |
suboptions: |
| 134 |
manage_policies_and_software_deployment: |
| 135 |
description: |
| 136 |
- The administrator can work with policies, rules and actions. |
| 137 |
type: bool |
| 138 |
edit_endpoint_policies: |
| 139 |
description: |
| 140 |
- Available only if manage-policies-and-software-deployment is set to true. |
| 141 |
type: bool |
| 142 |
policies_installation: |
| 143 |
description: |
| 144 |
- The administrator can install policies on endpoint computers. |
| 145 |
type: bool |
| 146 |
edit_software_deployment: |
| 147 |
description: |
| 148 |
- The administrator can define deployment rules, create packages for export, and configure advanced package settings.<br>Available only |
| 149 |
if manage-policies-and-software-deployment is set to true. |
| 150 |
type: bool |
| 151 |
software_deployment_installation: |
| 152 |
description: |
| 153 |
- The administrator can deploy packages and install endpoint clients. |
| 154 |
type: bool |
| 155 |
allow_executing_push_operations: |
| 156 |
description: |
| 157 |
- The administrator can start operations that the Security Management Server pushes directly to client computers with no policy |
| 158 |
installation required. |
| 159 |
type: bool |
| 160 |
authorize_preboot_users: |
| 161 |
description: |
| 162 |
- The administrator can add and remove the users who are permitted to log on to Endpoint Security client computers with Full Disk Encryption. |
| 163 |
type: bool |
| 164 |
recovery_media: |
| 165 |
description: |
| 166 |
- The administrator can create recovery media on endpoint computers and devices. |
| 167 |
type: bool |
| 168 |
remote_help: |
| 169 |
description: |
| 170 |
- The administrator can use the Remote Help feature to reset user passwords and give access to locked out users. |
| 171 |
type: bool |
| 172 |
reset_computer_data: |
| 173 |
description: |
| 174 |
- The administrator can reset a computer, which deletes all information about the computer from the Security Management Server. |
| 175 |
type: bool |
| 176 |
events_and_reports: |
| 177 |
description: |
| 178 |
- Events and Reports permissions.<br>Only a 'Customized' permission-type profile can edit these permissions. |
| 179 |
type: dict |
| 180 |
suboptions: |
| 181 |
smart_event: |
| 182 |
description: |
| 183 |
- a 'Custom' - Configure SmartEvent permissions. |
| 184 |
type: str |
| 185 |
choices: ['custom', 'app control and url filtering reports only'] |
| 186 |
events: |
| 187 |
description: |
| 188 |
- Work with event queries on the Events tab. Create custom event queries.<br>Available only if smart-event is set to 'Custom'. |
| 189 |
type: str |
| 190 |
choices: ['read', 'write', 'disabled'] |
| 191 |
policy: |
| 192 |
description: |
| 193 |
- Configure SmartEvent Policy rules and install SmartEvent Policies.<br>Available only if smart-event is set to 'Custom'. |
| 194 |
type: str |
| 195 |
choices: ['read', 'write', 'disabled'] |
| 196 |
reports: |
| 197 |
description: |
| 198 |
- Create and run SmartEvent reports.<br>Available only if smart-event is set to 'Custom'. |
| 199 |
type: bool |
| 200 |
gateways: |
| 201 |
description: |
| 202 |
- Gateways permissions. <br>Only a 'Customized' permission-type profile can edit these permissions. |
| 203 |
type: dict |
| 204 |
suboptions: |
| 205 |
smart_update: |
| 206 |
description: |
| 207 |
- Install, update and delete Check Point licenses. This includes permissions to use SmartUpdate to manage licenses. |
| 208 |
type: str |
| 209 |
choices: ['read', 'write', 'disabled'] |
| 210 |
lsm_gw_db: |
| 211 |
description: |
| 212 |
- Access to objects defined in LSM gateway tables. These objects are managed in the SmartProvisioning GUI or LSMcli |
| 213 |
command-line.<br>Note, 'Write' permission on lsm-gw-db allows administrator to run a script on SmartLSM gateway in Expert mode. |
| 214 |
type: str |
| 215 |
choices: ['read', 'write', 'disabled'] |
| 216 |
manage_provisioning_profiles: |
| 217 |
description: |
| 218 |
- Administrator can add, edit, delete, and assign provisioning profiles to gateways (both LSM and non-LSM).<br>Available for edit only |
| 219 |
if lsm-gw-db is set with 'Write' permission.<br>Note, 'Read' permission on lsm-gw-db enables 'Read' permission for manage-provisioning-profiles. |
| 220 |
type: str |
| 221 |
choices: ['read', 'write', 'disabled'] |
| 222 |
vsx_provisioning: |
| 223 |
description: |
| 224 |
- Create and configure Virtual Systems and other VSX virtual objects. |
| 225 |
type: bool |
| 226 |
system_backup: |
| 227 |
description: |
| 228 |
- Backup Security Gateways. |
| 229 |
type: bool |
| 230 |
system_restore: |
| 231 |
description: |
| 232 |
- Restore Security Gateways from saved backups. |
| 233 |
type: bool |
| 234 |
open_shell: |
| 235 |
description: |
| 236 |
- Use the SmartConsole CLI to run commands. |
| 237 |
type: bool |
| 238 |
run_one_time_script: |
| 239 |
description: |
| 240 |
- Run user scripts from the command line. |
| 241 |
type: bool |
| 242 |
run_repository_script: |
| 243 |
description: |
| 244 |
- Run scripts from the repository. |
| 245 |
type: bool |
| 246 |
manage_repository_scripts: |
| 247 |
description: |
| 248 |
- Add, change and remove scripts in the repository. |
| 249 |
type: str |
| 250 |
choices: ['read', 'write', 'disabled'] |
| 251 |
management: |
| 252 |
description: |
| 253 |
- Management permissions. |
| 254 |
type: dict |
| 255 |
suboptions: |
| 256 |
cme_operations: |
| 257 |
description: |
| 258 |
- Permission to read / edit the Cloud Management Extension (CME) configuration.<br>Not supported for Multi-Domain Servers. |
| 259 |
type: str |
| 260 |
choices: ['read', 'write', 'disabled'] |
| 261 |
manage_admins: |
| 262 |
description: |
| 263 |
- Controls the ability to manage Administrators, Permission Profiles, Trusted clients,API settings and Policy settings.<br>Only a "Read |
| 264 |
Write All" permission-type profile can edit this permission.<br>Not supported for Multi-Domain Servers. |
| 265 |
type: bool |
| 266 |
management_api_login: |
| 267 |
description: |
| 268 |
- Permission to log in to the Security Management Server and run API commands using thesetools, mgmt_cli (Linux and Windows binaries), |
| 269 |
Gaia CLI (clish) and Web Services (REST). Useful if you want to prevent administrators from running automatic scripts on the Management.<br>Note, |
| 270 |
This permission is not required to run commands from within the API terminal in SmartConsole.<br>Not supported for Multi-Domain Servers. |
| 271 |
type: bool |
| 272 |
manage_sessions: |
| 273 |
description: |
| 274 |
- Lets you disconnect, discard, publish, or take over other administrator sessions.<br>Only a "Read Write All" permission-type profile |
| 275 |
can edit this permission. |
| 276 |
type: bool |
| 277 |
high_availability_operations: |
| 278 |
description: |
| 279 |
- Configure and work with Domain High Availability.<br>Only a 'Customized' permission-type profile can edit this permission. |
| 280 |
type: bool |
| 281 |
approve_or_reject_sessions: |
| 282 |
description: |
| 283 |
- Approve / reject other sessions. |
| 284 |
type: bool |
| 285 |
publish_sessions: |
| 286 |
description: |
| 287 |
- Allow session publishing without an approval. |
| 288 |
type: bool |
| 289 |
manage_integration_with_cloud_services: |
| 290 |
description: |
| 291 |
- Manage integration with Cloud Services. |
| 292 |
type: bool |
| 293 |
monitoring_and_logging: |
| 294 |
description: |
| 295 |
- Monitoring and Logging permissions.<br>'Customized' permission-type profile can edit all these permissions. "Read Write All" permission-type |
| 296 |
can edit only dlp-logs-including-confidential-fields and manage-dlp-messages permissions. |
| 297 |
type: dict |
| 298 |
suboptions: |
| 299 |
monitoring: |
| 300 |
description: |
| 301 |
- See monitoring views and reports. |
| 302 |
type: str |
| 303 |
choices: ['read', 'write', 'disabled'] |
| 304 |
management_logs: |
| 305 |
description: |
| 306 |
- See Multi-Domain Server audit logs. |
| 307 |
type: str |
| 308 |
choices: ['read', 'write', 'disabled'] |
| 309 |
track_logs: |
| 310 |
description: |
| 311 |
- Use the log tracking features in SmartConsole. |
| 312 |
type: str |
| 313 |
choices: ['read', 'write', 'disabled'] |
| 314 |
app_and_url_filtering_logs: |
| 315 |
description: |
| 316 |
- Work with Application and URL Filtering logs. |
| 317 |
type: bool |
| 318 |
https_inspection_logs: |
| 319 |
description: |
| 320 |
- See logs generated by HTTPS Inspection. |
| 321 |
type: bool |
| 322 |
packet_capture_and_forensics: |
| 323 |
description: |
| 324 |
- See logs generated by the IPS and Forensics features. |
| 325 |
type: bool |
| 326 |
show_packet_capture_by_default: |
| 327 |
description: |
| 328 |
- Enable packet capture by default. |
| 329 |
type: bool |
| 330 |
identities: |
| 331 |
description: |
| 332 |
- Show user and computer identity information in logs. |
| 333 |
type: bool |
| 334 |
show_identities_by_default: |
| 335 |
description: |
| 336 |
- Show user and computer identity information in logs by default. |
| 337 |
type: bool |
| 338 |
dlp_logs_including_confidential_fields: |
| 339 |
description: |
| 340 |
- Show DLP logs including confidential fields. |
| 341 |
type: bool |
| 342 |
manage_dlp_messages: |
| 343 |
description: |
| 344 |
- View/Release/Discard DLP messages.<br>Available only if dlp-logs-including-confidential-fields is set to true. |
| 345 |
type: bool |
| 346 |
threat_prevention: |
| 347 |
description: |
| 348 |
- Threat Prevention permissions.<br>Only a 'Customized' permission-type profile can edit these permissions. |
| 349 |
type: dict |
| 350 |
suboptions: |
| 351 |
policy_layers: |
| 352 |
description: |
| 353 |
- Configure Threat Prevention Policy rules.<br>Note, To have policy-layers permissions you must set policy-exceptionsand profiles |
| 354 |
permissions. To have 'Write' permissions for policy-layers, policy-exceptions must be set with 'Write' permission as well. |
| 355 |
type: str |
| 356 |
choices: ['read', 'write', 'disabled'] |
| 357 |
edit_layers: |
| 358 |
description: |
| 359 |
- a 'ALL' - Gives permission to edit all layers.<br>"By Selected Profile In A Layer Editor" - Administrators can only edit the layer |
| 360 |
if the Threat Prevention layer editor gives editing permission to their profiles.<br>Available only if policy-layers is set to 'Write'. |
| 361 |
type: str |
| 362 |
choices: ['By Selected Profile In A Layer Editor', 'All'] |
| 363 |
edit_settings: |
| 364 |
description: |
| 365 |
- Work with general Threat Prevention settings. |
| 366 |
type: bool |
| 367 |
policy_exceptions: |
| 368 |
description: |
| 369 |
- Configure exceptions to Threat Prevention rules.<br>Note, To have policy-exceptions you must set the protections permission. |
| 370 |
type: str |
| 371 |
choices: ['read', 'write', 'disabled'] |
| 372 |
profiles: |
| 373 |
description: |
| 374 |
- Configure Threat Prevention profiles. |
| 375 |
type: str |
| 376 |
choices: ['read', 'write', 'disabled'] |
| 377 |
protections: |
| 378 |
description: |
| 379 |
- Work with malware protections. |
| 380 |
type: str |
| 381 |
choices: ['read', 'write', 'disabled'] |
| 382 |
install_policy: |
| 383 |
description: |
| 384 |
- Install Policies. |
| 385 |
type: bool |
| 386 |
ips_update: |
| 387 |
description: |
| 388 |
- Update IPS protections.<br>Note, You do not have to log into the User Center to receive IPS updates. |
| 389 |
type: bool |
| 390 |
others: |
| 391 |
description: |
| 392 |
- Additional permissions.<br>Only a 'Customized' permission-type profile can edit these permissions. |
| 393 |
type: dict |
| 394 |
suboptions: |
| 395 |
client_certificates: |
| 396 |
description: |
| 397 |
- Create and manage client certificates for Mobile Access. |
| 398 |
type: bool |
| 399 |
edit_cp_users_db: |
| 400 |
description: |
| 401 |
- Work with user accounts and groups. |
| 402 |
type: bool |
| 403 |
https_inspection: |
| 404 |
description: |
| 405 |
- Enable and configure HTTPS Inspection rules. |
| 406 |
type: str |
| 407 |
choices: ['read', 'write', 'disabled'] |
| 408 |
ldap_users_db: |
| 409 |
description: |
| 410 |
- Work with the LDAP database and user accounts, groups and OUs. |
| 411 |
type: str |
| 412 |
choices: ['read', 'write', 'disabled'] |
| 413 |
user_authority_access: |
| 414 |
description: |
| 415 |
- Work with Check Point User Authority authentication. |
| 416 |
type: str |
| 417 |
choices: ['read', 'write', 'disabled'] |
| 418 |
user_device_mgmt_conf: |
| 419 |
description: |
| 420 |
- Gives access to the UDM (User & Device Management) web-based application that handles security challenges in a "bring your own device" |
| 421 |
(BYOD) workspace. |
| 422 |
type: str |
| 423 |
choices: ['read', 'write', 'disabled'] |
| 424 |
tags: |
| 425 |
description: |
| 426 |
- Collection of tag identifiers. |
| 427 |
type: list |
| 428 |
elements: str |
| 429 |
color: |
| 430 |
description: |
| 431 |
- Color of the object. Should be one of existing colors. |
| 432 |
type: str |
| 433 |
choices: ['aquamarine', 'black', 'blue', 'crete blue', 'burlywood', 'cyan', 'dark green', 'khaki', 'orchid', 'dark orange', 'dark sea green', |
| 434 |
'pink', 'turquoise', 'dark blue', 'firebrick', 'brown', 'forest green', 'gold', 'dark gold', 'gray', 'dark gray', 'light green', 'lemon chiffon', |
| 435 |
'coral', 'sea green', 'sky blue', 'magenta', 'purple', 'slate blue', 'violet red', 'navy blue', 'olive', 'orange', 'red', 'sienna', 'yellow'] |
| 436 |
comments: |
| 437 |
description: |
| 438 |
- Comments string. |
| 439 |
type: str |
| 440 |
details_level: |
| 441 |
description: |
| 442 |
- The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed |
| 443 |
representation of the object. |
| 444 |
type: str |
| 445 |
choices: ['uid', 'standard', 'full'] |
| 446 |
ignore_warnings: |
| 447 |
description: |
| 448 |
- Apply changes ignoring warnings. |
| 449 |
type: bool |
| 450 |
ignore_errors: |
| 451 |
description: |
| 452 |
- Apply changes ignoring errors. You won't be able to publish such a changes. If ignore-warnings flag was omitted - warnings will also be ignored. |
| 453 |
type: bool |
| 454 |
extends_documentation_fragment: check_point.mgmt.checkpoint_objects |
| 455 |
""" |
| 456 |
|
| 457 |
EXAMPLES = """ |
| 458 |
- name: add-domain-permissions-profile |
| 459 |
cp_mgmt_domain_permissions_profile: |
| 460 |
name: customized profile |
| 461 |
state: present |
| 462 |
|
| 463 |
- name: set-domain-permissions-profile |
| 464 |
cp_mgmt_domain_permissions_profile: |
| 465 |
access_control: |
| 466 |
policy_layers: By Selected Profile In A Layer Editor |
| 467 |
name: read profile |
| 468 |
permission_type: customized |
| 469 |
state: present |
| 470 |
|
| 471 |
- name: delete-domain-permissions-profile |
| 472 |
cp_mgmt_domain_permissions_profile: |
| 473 |
name: profile |
| 474 |
state: absent |
| 475 |
""" |
| 476 |
|
| 477 |
RETURN = """ |
| 478 |
cp_mgmt_domain_permissions_profile: |
| 479 |
description: The checkpoint object created or updated. |
| 480 |
returned: always, except when deleting the object. |
| 481 |
type: dict |
| 482 |
""" |
| 483 |
|
| 484 |
from ansible.module_utils.basic import AnsibleModule |
| 485 |
from ansible_collections.check_point.mgmt.plugins.module_utils.checkpoint import ( |
| 486 |
checkpoint_argument_spec_for_objects, |
| 487 |
api_call, |
| 488 |
) |
| 489 |
|
| 490 |
|
| 491 |
def main(): |
| 492 |
argument_spec = dict( |
| 493 |
name=dict(type="str", required=True), |
| 494 |
permission_type=dict( |
| 495 |
type="str", |
| 496 |
choices=["read write all", "read only all", "customized"], |
| 497 |
), |
| 498 |
edit_common_objects=dict(type="bool"), |
| 499 |
access_control=dict( |
| 500 |
type="dict", |
| 501 |
options=dict( |
| 502 |
show_policy=dict(type="bool"), |
| 503 |
policy_layers=dict( |
| 504 |
type="dict", |
| 505 |
options=dict( |
| 506 |
edit_layers=dict( |
| 507 |
type="str", |
| 508 |
choices=[ |
| 509 |
"By Software Blades", |
| 510 |
"By Selected Profile In A Layer Editor", |
| 511 |
], |
| 512 |
), |
| 513 |
app_control_and_url_filtering=dict(type="bool"), |
| 514 |
content_awareness=dict(type="bool"), |
| 515 |
firewall=dict(type="bool"), |
| 516 |
mobile_access=dict(type="bool"), |
| 517 |
), |
| 518 |
), |
| 519 |
dlp_policy=dict( |
| 520 |
type="str", choices=["read", "write", "disabled"] |
| 521 |
), |
| 522 |
geo_control_policy=dict( |
| 523 |
type="str", choices=["read", "write", "disabled"] |
| 524 |
), |
| 525 |
nat_policy=dict( |
| 526 |
type="str", choices=["read", "write", "disabled"] |
| 527 |
), |
| 528 |
qos_policy=dict( |
| 529 |
type="str", choices=["read", "write", "disabled"] |
| 530 |
), |
| 531 |
access_control_objects_and_settings=dict( |
| 532 |
type="str", choices=["read", "write", "disabled"] |
| 533 |
), |
| 534 |
app_control_and_url_filtering_update=dict(type="bool"), |
| 535 |
install_policy=dict(type="bool"), |
| 536 |
), |
| 537 |
), |
| 538 |
endpoint=dict( |
| 539 |
type="dict", |
| 540 |
options=dict( |
| 541 |
manage_policies_and_software_deployment=dict(type="bool"), |
| 542 |
edit_endpoint_policies=dict(type="bool"), |
| 543 |
policies_installation=dict(type="bool"), |
| 544 |
edit_software_deployment=dict(type="bool"), |
| 545 |
software_deployment_installation=dict(type="bool"), |
| 546 |
allow_executing_push_operations=dict(type="bool"), |
| 547 |
authorize_preboot_users=dict(type="bool"), |
| 548 |
recovery_media=dict(type="bool"), |
| 549 |
remote_help=dict(type="bool"), |
| 550 |
reset_computer_data=dict(type="bool"), |
| 551 |
), |
| 552 |
), |
| 553 |
events_and_reports=dict( |
| 554 |
type="dict", |
| 555 |
options=dict( |
| 556 |
smart_event=dict( |
| 557 |
type="str", |
| 558 |
choices=[ |
| 559 |
"custom", |
| 560 |
"app control and url filtering reports only", |
| 561 |
], |
| 562 |
), |
| 563 |
events=dict(type="str", choices=["read", "write", "disabled"]), |
| 564 |
policy=dict(type="str", choices=["read", "write", "disabled"]), |
| 565 |
reports=dict(type="bool"), |
| 566 |
), |
| 567 |
), |
| 568 |
gateways=dict( |
| 569 |
type="dict", |
| 570 |
options=dict( |
| 571 |
smart_update=dict( |
| 572 |
type="str", choices=["read", "write", "disabled"] |
| 573 |
), |
| 574 |
lsm_gw_db=dict( |
| 575 |
type="str", choices=["read", "write", "disabled"] |
| 576 |
), |
| 577 |
manage_provisioning_profiles=dict( |
| 578 |
type="str", choices=["read", "write", "disabled"] |
| 579 |
), |
| 580 |
vsx_provisioning=dict(type="bool"), |
| 581 |
system_backup=dict(type="bool"), |
| 582 |
system_restore=dict(type="bool"), |
| 583 |
open_shell=dict(type="bool"), |
| 584 |
run_one_time_script=dict(type="bool"), |
| 585 |
run_repository_script=dict(type="bool"), |
| 586 |
manage_repository_scripts=dict( |
| 587 |
type="str", choices=["read", "write", "disabled"] |
| 588 |
), |
| 589 |
), |
| 590 |
), |
| 591 |
management=dict( |
| 592 |
type="dict", |
| 593 |
options=dict( |
| 594 |
cme_operations=dict( |
| 595 |
type="str", choices=["read", "write", "disabled"] |
| 596 |
), |
| 597 |
manage_admins=dict(type="bool"), |
| 598 |
management_api_login=dict(type="bool"), |
| 599 |
manage_sessions=dict(type="bool"), |
| 600 |
high_availability_operations=dict(type="bool"), |
| 601 |
approve_or_reject_sessions=dict(type="bool"), |
| 602 |
publish_sessions=dict(type="bool"), |
| 603 |
manage_integration_with_cloud_services=dict(type="bool"), |
| 604 |
), |
| 605 |
), |
| 606 |
monitoring_and_logging=dict( |
| 607 |
type="dict", |
| 608 |
options=dict( |
| 609 |
monitoring=dict( |
| 610 |
type="str", choices=["read", "write", "disabled"] |
| 611 |
), |
| 612 |
management_logs=dict( |
| 613 |
type="str", choices=["read", "write", "disabled"] |
| 614 |
), |
| 615 |
track_logs=dict( |
| 616 |
type="str", choices=["read", "write", "disabled"] |
| 617 |
), |
| 618 |
app_and_url_filtering_logs=dict(type="bool"), |
| 619 |
https_inspection_logs=dict(type="bool"), |
| 620 |
packet_capture_and_forensics=dict(type="bool"), |
| 621 |
show_packet_capture_by_default=dict(type="bool"), |
| 622 |
identities=dict(type="bool"), |
| 623 |
show_identities_by_default=dict(type="bool"), |
| 624 |
dlp_logs_including_confidential_fields=dict(type="bool"), |
| 625 |
manage_dlp_messages=dict(type="bool"), |
| 626 |
), |
| 627 |
), |
| 628 |
threat_prevention=dict( |
| 629 |
type="dict", |
| 630 |
options=dict( |
| 631 |
policy_layers=dict( |
| 632 |
type="str", choices=["read", "write", "disabled"] |
| 633 |
), |
| 634 |
edit_layers=dict( |
| 635 |
type="str", |
| 636 |
choices=["By Selected Profile In A Layer Editor", "All"], |
| 637 |
), |
| 638 |
edit_settings=dict(type="bool"), |
| 639 |
policy_exceptions=dict( |
| 640 |
type="str", choices=["read", "write", "disabled"] |
| 641 |
), |
| 642 |
profiles=dict( |
| 643 |
type="str", choices=["read", "write", "disabled"] |
| 644 |
), |
| 645 |
protections=dict( |
| 646 |
type="str", choices=["read", "write", "disabled"] |
| 647 |
), |
| 648 |
install_policy=dict(type="bool"), |
| 649 |
ips_update=dict(type="bool"), |
| 650 |
), |
| 651 |
), |
| 652 |
others=dict( |
| 653 |
type="dict", |
| 654 |
options=dict( |
| 655 |
client_certificates=dict(type="bool"), |
| 656 |
edit_cp_users_db=dict(type="bool"), |
| 657 |
https_inspection=dict( |
| 658 |
type="str", choices=["read", "write", "disabled"] |
| 659 |
), |
| 660 |
ldap_users_db=dict( |
| 661 |
type="str", choices=["read", "write", "disabled"] |
| 662 |
), |
| 663 |
user_authority_access=dict( |
| 664 |
type="str", choices=["read", "write", "disabled"] |
| 665 |
), |
| 666 |
user_device_mgmt_conf=dict( |
| 667 |
type="str", choices=["read", "write", "disabled"] |
| 668 |
), |
| 669 |
), |
| 670 |
), |
| 671 |
tags=dict(type="list", elements="str"), |
| 672 |
color=dict( |
| 673 |
type="str", |
| 674 |
choices=[ |
| 675 |
"aquamarine", |
| 676 |
"black", |
| 677 |
"blue", |
| 678 |
"crete blue", |
| 679 |
"burlywood", |
| 680 |
"cyan", |
| 681 |
"dark green", |
| 682 |
"khaki", |
| 683 |
"orchid", |
| 684 |
"dark orange", |
| 685 |
"dark sea green", |
| 686 |
"pink", |
| 687 |
"turquoise", |
| 688 |
"dark blue", |
| 689 |
"firebrick", |
| 690 |
"brown", |
| 691 |
"forest green", |
| 692 |
"gold", |
| 693 |
"dark gold", |
| 694 |
"gray", |
| 695 |
"dark gray", |
| 696 |
"light green", |
| 697 |
"lemon chiffon", |
| 698 |
"coral", |
| 699 |
"sea green", |
| 700 |
"sky blue", |
| 701 |
"magenta", |
| 702 |
"purple", |
| 703 |
"slate blue", |
| 704 |
"violet red", |
| 705 |
"navy blue", |
| 706 |
"olive", |
| 707 |
"orange", |
| 708 |
"red", |
| 709 |
"sienna", |
| 710 |
"yellow", |
| 711 |
], |
| 712 |
), |
| 713 |
comments=dict(type="str"), |
| 714 |
details_level=dict(type="str", choices=["uid", "standard", "full"]), |
| 715 |
ignore_warnings=dict(type="bool"), |
| 716 |
ignore_errors=dict(type="bool"), |
| 717 |
) |
| 718 |
argument_spec.update(checkpoint_argument_spec_for_objects) |
| 719 |
|
| 720 |
module = AnsibleModule( |
| 721 |
argument_spec=argument_spec, supports_check_mode=True |
| 722 |
) |
| 723 |
api_call_object = "domain-permissions-profile" |
| 724 |
|
| 725 |
result = api_call(module, api_call_object) |
| 726 |
module.exit_json(**result) |
| 727 |
|
| 728 |
|
| 729 |
if __name__ == "__main__": |
| 730 |
main() |