| 1 |
|
| 2 |
from __future__ import absolute_import, division, print_function |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
__metaclass__ = type |
| 7 |
|
| 8 |
ANSIBLE_METADATA = {'status': ['preview'], |
| 9 |
'supported_by': 'community', |
| 10 |
'metadata_version': '1.1'} |
| 11 |
|
| 12 |
DOCUMENTATION = ''' |
| 13 |
--- |
| 14 |
module: fmgr_system_admin_profile |
| 15 |
short_description: Admin profile. |
| 16 |
version_added: "2.0.0" |
| 17 |
extends_documentation_fragment: |
| 18 |
- fortinet.fortimanager.general |
| 19 |
- fortinet.fortimanager.general.full_crud |
| 20 |
options: |
| 21 |
system_admin_profile: |
| 22 |
description: The top level parameters set. |
| 23 |
required: false |
| 24 |
type: dict |
| 25 |
suboptions: |
| 26 |
adom_lock: |
| 27 |
aliases: ['adom-lock'] |
| 28 |
type: str |
| 29 |
description: |
| 30 |
- ADOM locking |
| 31 |
- none - No permission. |
| 32 |
- read - Read permission. |
| 33 |
- read-write - Read-write permission. |
| 34 |
choices: ['none', 'read', 'read-write'] |
| 35 |
adom_policy_packages: |
| 36 |
aliases: ['adom-policy-packages'] |
| 37 |
type: str |
| 38 |
description: |
| 39 |
- ADOM policy packages. |
| 40 |
- none - No permission. |
| 41 |
- read - Read permission. |
| 42 |
- read-write - Read-write permission. |
| 43 |
choices: ['none', 'read', 'read-write'] |
| 44 |
adom_switch: |
| 45 |
aliases: ['adom-switch'] |
| 46 |
type: str |
| 47 |
description: |
| 48 |
- Administrator domain. |
| 49 |
- none - No permission. |
| 50 |
- read - Read permission. |
| 51 |
- read-write - Read-write permission. |
| 52 |
choices: ['none', 'read', 'read-write'] |
| 53 |
app_filter: |
| 54 |
aliases: ['app-filter'] |
| 55 |
type: str |
| 56 |
description: |
| 57 |
- App filter. |
| 58 |
- disable - Disable setting. |
| 59 |
- enable - Enable setting. |
| 60 |
choices: ['disable', 'enable'] |
| 61 |
assignment: |
| 62 |
type: str |
| 63 |
description: |
| 64 |
- Assignment permission. |
| 65 |
- none - No permission. |
| 66 |
- read - Read permission. |
| 67 |
- read-write - Read-write permission. |
| 68 |
choices: ['none', 'read', 'read-write'] |
| 69 |
change_password: |
| 70 |
aliases: ['change-password'] |
| 71 |
type: str |
| 72 |
description: |
| 73 |
- Enable/disable restricted user to change self password. |
| 74 |
- disable - Disable setting. |
| 75 |
- enable - Enable setting. |
| 76 |
choices: ['disable', 'enable'] |
| 77 |
config_retrieve: |
| 78 |
aliases: ['config-retrieve'] |
| 79 |
type: str |
| 80 |
description: |
| 81 |
- Configuration retrieve. |
| 82 |
- none - No permission. |
| 83 |
- read - Read permission. |
| 84 |
- read-write - Read-write permission. |
| 85 |
choices: ['none', 'read', 'read-write'] |
| 86 |
config_revert: |
| 87 |
aliases: ['config-revert'] |
| 88 |
type: str |
| 89 |
description: |
| 90 |
- Revert Configuration from Revision History |
| 91 |
- none - No permission. |
| 92 |
- read - Read permission. |
| 93 |
- read-write - Read-write permission. |
| 94 |
choices: ['none', 'read', 'read-write'] |
| 95 |
consistency_check: |
| 96 |
aliases: ['consistency-check'] |
| 97 |
type: str |
| 98 |
description: |
| 99 |
- Consistency check. |
| 100 |
- none - No permission. |
| 101 |
- read - Read permission. |
| 102 |
- read-write - Read-write permission. |
| 103 |
choices: ['none', 'read', 'read-write'] |
| 104 |
datamask: |
| 105 |
type: str |
| 106 |
description: |
| 107 |
- Enable/disable data masking. |
| 108 |
- disable - Disable data masking. |
| 109 |
- enable - Enable data masking. |
| 110 |
choices: ['disable', 'enable'] |
| 111 |
datamask_custom_fields: |
| 112 |
aliases: ['datamask-custom-fields'] |
| 113 |
type: list |
| 114 |
elements: dict |
| 115 |
description: Datamask custom fields. |
| 116 |
suboptions: |
| 117 |
field_category: |
| 118 |
aliases: ['field-category'] |
| 119 |
type: list |
| 120 |
elements: str |
| 121 |
description: |
| 122 |
- Field categories. |
| 123 |
- log - Log. |
| 124 |
- fortiview - FortiView. |
| 125 |
- alert - Event management. |
| 126 |
- ueba - UEBA. |
| 127 |
- all - All. |
| 128 |
choices: ['log', 'fortiview', 'alert', 'ueba', 'all'] |
| 129 |
field_name: |
| 130 |
aliases: ['field-name'] |
| 131 |
type: str |
| 132 |
description: Field name. |
| 133 |
field_status: |
| 134 |
aliases: ['field-status'] |
| 135 |
type: str |
| 136 |
description: |
| 137 |
- Field status. |
| 138 |
- disable - Disable field. |
| 139 |
- enable - Enable field. |
| 140 |
choices: ['disable', 'enable'] |
| 141 |
field_type: |
| 142 |
aliases: ['field-type'] |
| 143 |
type: str |
| 144 |
description: |
| 145 |
- Field type. |
| 146 |
- string - String. |
| 147 |
- ip - IP. |
| 148 |
- mac - MAC address. |
| 149 |
- email - Email address. |
| 150 |
- unknown - Unknown. |
| 151 |
choices: ['string', 'ip', 'mac', 'email', 'unknown'] |
| 152 |
datamask_custom_priority: |
| 153 |
aliases: ['datamask-custom-priority'] |
| 154 |
type: str |
| 155 |
description: |
| 156 |
- Prioritize custom fields. |
| 157 |
- disable - Disable custom field search priority. |
| 158 |
- enable - Enable custom field search priority. |
| 159 |
choices: ['disable', 'enable'] |
| 160 |
datamask_fields: |
| 161 |
aliases: ['datamask-fields'] |
| 162 |
type: list |
| 163 |
elements: str |
| 164 |
description: |
| 165 |
- Data masking fields. |
| 166 |
- user - User name. |
| 167 |
- srcip - Source IP. |
| 168 |
- srcname - Source name. |
| 169 |
- srcmac - Source MAC. |
| 170 |
- dstip - Destination IP. |
| 171 |
- dstname - Dst name. |
| 172 |
- email - Email. |
| 173 |
- message - Message. |
| 174 |
- domain - Domain. |
| 175 |
choices: ['user', 'srcip', 'srcname', 'srcmac', 'dstip', 'dstname', 'email', |
| 176 |
'message', 'domain'] |
| 177 |
datamask_key: |
| 178 |
aliases: ['datamask-key'] |
| 179 |
type: raw |
| 180 |
description: (list) Data masking encryption key. |
| 181 |
deploy_management: |
| 182 |
aliases: ['deploy-management'] |
| 183 |
type: str |
| 184 |
description: |
| 185 |
- Install to devices. |
| 186 |
- none - No permission. |
| 187 |
- read - Read permission. |
| 188 |
- read-write - Read-write permission. |
| 189 |
choices: ['none', 'read', 'read-write'] |
| 190 |
description: |
| 191 |
type: str |
| 192 |
description: Description. |
| 193 |
device_ap: |
| 194 |
aliases: ['device-ap'] |
| 195 |
type: str |
| 196 |
description: |
| 197 |
- Manage AP. |
| 198 |
- none - No permission. |
| 199 |
- read - Read permission. |
| 200 |
- read-write - Read-write permission. |
| 201 |
choices: ['none', 'read', 'read-write'] |
| 202 |
device_config: |
| 203 |
aliases: ['device-config'] |
| 204 |
type: str |
| 205 |
description: |
| 206 |
- Manage device configurations. |
| 207 |
- none - No permission. |
| 208 |
- read - Read permission. |
| 209 |
- read-write - Read-write permission. |
| 210 |
choices: ['none', 'read', 'read-write'] |
| 211 |
device_forticlient: |
| 212 |
aliases: ['device-forticlient'] |
| 213 |
type: str |
| 214 |
description: |
| 215 |
- Manage FortiClient. |
| 216 |
- none - No permission. |
| 217 |
- read - Read permission. |
| 218 |
- read-write - Read-write permission. |
| 219 |
choices: ['none', 'read', 'read-write'] |
| 220 |
device_fortiswitch: |
| 221 |
aliases: ['device-fortiswitch'] |
| 222 |
type: str |
| 223 |
description: |
| 224 |
- Manage FortiSwitch. |
| 225 |
- none - No permission. |
| 226 |
- read - Read permission. |
| 227 |
- read-write - Read-write permission. |
| 228 |
choices: ['none', 'read', 'read-write'] |
| 229 |
device_manager: |
| 230 |
aliases: ['device-manager'] |
| 231 |
type: str |
| 232 |
description: |
| 233 |
- Device manager. |
| 234 |
- none - No permission. |
| 235 |
- read - Read permission. |
| 236 |
- read-write - Read-write permission. |
| 237 |
choices: ['none', 'read', 'read-write'] |
| 238 |
device_op: |
| 239 |
aliases: ['device-op'] |
| 240 |
type: str |
| 241 |
description: |
| 242 |
- Device add/delete/edit. |
| 243 |
- none - No permission. |
| 244 |
- read - Read permission. |
| 245 |
- read-write - Read-write permission. |
| 246 |
choices: ['none', 'read', 'read-write'] |
| 247 |
device_policy_package_lock: |
| 248 |
aliases: ['device-policy-package-lock'] |
| 249 |
type: str |
| 250 |
description: |
| 251 |
- Device/Policy Package locking |
| 252 |
- none - No permission. |
| 253 |
- read - Read permission. |
| 254 |
- read-write - Read-write permission. |
| 255 |
choices: ['none', 'read', 'read-write'] |
| 256 |
device_profile: |
| 257 |
aliases: ['device-profile'] |
| 258 |
type: str |
| 259 |
description: |
| 260 |
- Device profile permission. |
| 261 |
- none - No permission. |
| 262 |
- read - Read permission. |
| 263 |
- read-write - Read-write permission. |
| 264 |
choices: ['none', 'read', 'read-write'] |
| 265 |
device_revision_deletion: |
| 266 |
aliases: ['device-revision-deletion'] |
| 267 |
type: str |
| 268 |
description: |
| 269 |
- Delete device revision. |
| 270 |
- none - No permission. |
| 271 |
- read - Read permission. |
| 272 |
- read-write - Read-write permission. |
| 273 |
choices: ['none', 'read', 'read-write'] |
| 274 |
device_wan_link_load_balance: |
| 275 |
aliases: ['device-wan-link-load-balance'] |
| 276 |
type: str |
| 277 |
description: |
| 278 |
- Manage WAN link load balance. |
| 279 |
- none - No permission. |
| 280 |
- read - Read permission. |
| 281 |
- read-write - Read-write permission. |
| 282 |
choices: ['none', 'read', 'read-write'] |
| 283 |
event_management: |
| 284 |
aliases: ['event-management'] |
| 285 |
type: str |
| 286 |
description: |
| 287 |
- Event management. |
| 288 |
- none - No permission. |
| 289 |
- read - Read permission. |
| 290 |
- read-write - Read-write permission. |
| 291 |
choices: ['none', 'read', 'read-write'] |
| 292 |
fgd_center_advanced: |
| 293 |
aliases: ['fgd-center-advanced'] |
| 294 |
type: str |
| 295 |
description: |
| 296 |
- FortiGuard Center Advanced. |
| 297 |
- none - No permission. |
| 298 |
- read - Read permission. |
| 299 |
- read-write - Read-write permission. |
| 300 |
choices: ['none', 'read', 'read-write'] |
| 301 |
fgd_center_fmw_mgmt: |
| 302 |
aliases: ['fgd-center-fmw-mgmt'] |
| 303 |
type: str |
| 304 |
description: |
| 305 |
- FortiGuard Center Firmware Management. |
| 306 |
- none - No permission. |
| 307 |
- read - Read permission. |
| 308 |
- read-write - Read-write permission. |
| 309 |
choices: ['none', 'read', 'read-write'] |
| 310 |
fgd_center_licensing: |
| 311 |
aliases: ['fgd-center-licensing'] |
| 312 |
type: str |
| 313 |
description: |
| 314 |
- FortiGuard Center Licensing. |
| 315 |
- none - No permission. |
| 316 |
- read - Read permission. |
| 317 |
- read-write - Read-write permission. |
| 318 |
choices: ['none', 'read', 'read-write'] |
| 319 |
fgd_center: |
| 320 |
type: str |
| 321 |
description: |
| 322 |
- FortiGuard Center. |
| 323 |
- none - No permission. |
| 324 |
- read - Read permission. |
| 325 |
- read-write - Read-write permission. |
| 326 |
choices: ['none', 'read', 'read-write'] |
| 327 |
global_policy_packages: |
| 328 |
aliases: ['global-policy-packages'] |
| 329 |
type: str |
| 330 |
description: |
| 331 |
- Global policy packages. |
| 332 |
- none - No permission. |
| 333 |
- read - Read permission. |
| 334 |
- read-write - Read-write permission. |
| 335 |
choices: ['none', 'read', 'read-write'] |
| 336 |
import_policy_packages: |
| 337 |
aliases: ['import-policy-packages'] |
| 338 |
type: str |
| 339 |
description: |
| 340 |
- Import Policy Package. |
| 341 |
- none - No permission. |
| 342 |
- read - Read permission. |
| 343 |
- read-write - Read-write permission. |
| 344 |
choices: ['none', 'read', 'read-write'] |
| 345 |
intf_mapping: |
| 346 |
aliases: ['intf-mapping'] |
| 347 |
type: str |
| 348 |
description: |
| 349 |
- Interface Mapping |
| 350 |
- none - No permission. |
| 351 |
- read - Read permission. |
| 352 |
- read-write - Read-write permission. |
| 353 |
choices: ['none', 'read', 'read-write'] |
| 354 |
ips_filter: |
| 355 |
aliases: ['ips-filter'] |
| 356 |
type: str |
| 357 |
description: |
| 358 |
- IPS filter. |
| 359 |
- disable - Disable setting. |
| 360 |
- enable - Enable setting. |
| 361 |
choices: ['disable', 'enable'] |
| 362 |
log_viewer: |
| 363 |
aliases: ['log-viewer'] |
| 364 |
type: str |
| 365 |
description: |
| 366 |
- Log viewer. |
| 367 |
- none - No permission. |
| 368 |
- read - Read permission. |
| 369 |
- read-write - Read-write permission. |
| 370 |
choices: ['none', 'read', 'read-write'] |
| 371 |
policy_objects: |
| 372 |
aliases: ['policy-objects'] |
| 373 |
type: str |
| 374 |
description: |
| 375 |
- Policy objects permission. |
| 376 |
- none - No permission. |
| 377 |
- read - Read permission. |
| 378 |
- read-write - Read-write permission. |
| 379 |
choices: ['none', 'read', 'read-write'] |
| 380 |
profileid: |
| 381 |
type: str |
| 382 |
description: Profile ID. |
| 383 |
required: true |
| 384 |
read_passwd: |
| 385 |
aliases: ['read-passwd'] |
| 386 |
type: str |
| 387 |
description: |
| 388 |
- View password in clear text. |
| 389 |
- none - No permission. |
| 390 |
- read - Read permission. |
| 391 |
- read-write - Read-write permission. |
| 392 |
choices: ['none', 'read', 'read-write'] |
| 393 |
realtime_monitor: |
| 394 |
aliases: ['realtime-monitor'] |
| 395 |
type: str |
| 396 |
description: |
| 397 |
- Realtime monitor. |
| 398 |
- none - No permission. |
| 399 |
- read - Read permission. |
| 400 |
- read-write - Read-write permission. |
| 401 |
choices: ['none', 'read', 'read-write'] |
| 402 |
report_viewer: |
| 403 |
aliases: ['report-viewer'] |
| 404 |
type: str |
| 405 |
description: |
| 406 |
- Report viewer. |
| 407 |
- none - No permission. |
| 408 |
- read - Read permission. |
| 409 |
- read-write - Read-write permission. |
| 410 |
choices: ['none', 'read', 'read-write'] |
| 411 |
scope: |
| 412 |
type: str |
| 413 |
description: |
| 414 |
- Scope. |
| 415 |
- global - Global scope. |
| 416 |
- adom - ADOM scope. |
| 417 |
choices: ['global', 'adom'] |
| 418 |
set_install_targets: |
| 419 |
aliases: ['set-install-targets'] |
| 420 |
type: str |
| 421 |
description: |
| 422 |
- Edit installation targets. |
| 423 |
- none - No permission. |
| 424 |
- read - Read permission. |
| 425 |
- read-write - Read-write permission. |
| 426 |
choices: ['none', 'read', 'read-write'] |
| 427 |
system_setting: |
| 428 |
aliases: ['system-setting'] |
| 429 |
type: str |
| 430 |
description: |
| 431 |
- System setting. |
| 432 |
- none - No permission. |
| 433 |
- read - Read permission. |
| 434 |
- read-write - Read-write permission. |
| 435 |
choices: ['none', 'read', 'read-write'] |
| 436 |
term_access: |
| 437 |
aliases: ['term-access'] |
| 438 |
type: str |
| 439 |
description: |
| 440 |
- Terminal access. |
| 441 |
- none - No permission. |
| 442 |
- read - Read permission. |
| 443 |
- read-write - Read-write permission. |
| 444 |
choices: ['none', 'read', 'read-write'] |
| 445 |
type: |
| 446 |
type: str |
| 447 |
description: |
| 448 |
- profile type. |
| 449 |
- system - System admin. |
| 450 |
- restricted - Restricted admin. |
| 451 |
choices: ['system', 'restricted'] |
| 452 |
vpn_manager: |
| 453 |
aliases: ['vpn-manager'] |
| 454 |
type: str |
| 455 |
description: |
| 456 |
- VPN manager. |
| 457 |
- none - No permission. |
| 458 |
- read - Read permission. |
| 459 |
- read-write - Read-write permission. |
| 460 |
choices: ['none', 'read', 'read-write'] |
| 461 |
web_filter: |
| 462 |
aliases: ['web-filter'] |
| 463 |
type: str |
| 464 |
description: |
| 465 |
- Web filter. |
| 466 |
- disable - Disable setting. |
| 467 |
- enable - Enable setting. |
| 468 |
choices: ['disable', 'enable'] |
| 469 |
datamask_unmasked_time: |
| 470 |
aliases: ['datamask-unmasked-time'] |
| 471 |
type: int |
| 472 |
description: Time in days without data masking. |
| 473 |
super_user_profile: |
| 474 |
aliases: ['super-user-profile'] |
| 475 |
type: str |
| 476 |
description: |
| 477 |
- Enable/disable super user profile |
| 478 |
- disable - Disable super user profile |
| 479 |
- enable - Enable super user profile |
| 480 |
choices: ['disable', 'enable'] |
| 481 |
allow_to_install: |
| 482 |
aliases: ['allow-to-install'] |
| 483 |
type: str |
| 484 |
description: |
| 485 |
- Enable/disable the restricted user to install objects to the devices. |
| 486 |
- disable - Disable setting. |
| 487 |
- enable - Enable setting. |
| 488 |
choices: ['disable', 'enable'] |
| 489 |
extension_access: |
| 490 |
aliases: ['extension-access'] |
| 491 |
type: str |
| 492 |
description: |
| 493 |
- Manage extension access. |
| 494 |
- none - No permission. |
| 495 |
- read - Read permission. |
| 496 |
- read-write - Read-write permission. |
| 497 |
choices: ['none', 'read', 'read-write'] |
| 498 |
fabric_viewer: |
| 499 |
aliases: ['fabric-viewer'] |
| 500 |
type: str |
| 501 |
description: |
| 502 |
- Fabric viewer. |
| 503 |
- none - No permission. |
| 504 |
- read - Read permission. |
| 505 |
- read-write - Read-write permission. |
| 506 |
choices: ['none', 'read', 'read-write'] |
| 507 |
run_report: |
| 508 |
aliases: ['run-report'] |
| 509 |
type: str |
| 510 |
description: |
| 511 |
- Run reports. |
| 512 |
- none - No permission. |
| 513 |
- read - Read permission. |
| 514 |
- read-write - Read-write permission. |
| 515 |
choices: ['none', 'read', 'read-write'] |
| 516 |
script_access: |
| 517 |
aliases: ['script-access'] |
| 518 |
type: str |
| 519 |
description: |
| 520 |
- Script access. |
| 521 |
- none - No permission. |
| 522 |
- read - Read permission. |
| 523 |
- read-write - Read-write permission. |
| 524 |
choices: ['none', 'read', 'read-write'] |
| 525 |
triage_events: |
| 526 |
aliases: ['triage-events'] |
| 527 |
type: str |
| 528 |
description: |
| 529 |
- Triage events. |
| 530 |
- none - No permission. |
| 531 |
- read - Read permission. |
| 532 |
- read-write - Read-write permission. |
| 533 |
choices: ['none', 'read', 'read-write'] |
| 534 |
update_incidents: |
| 535 |
aliases: ['update-incidents'] |
| 536 |
type: str |
| 537 |
description: |
| 538 |
- Create/update incidents. |
| 539 |
- none - No permission. |
| 540 |
- read - Read permission. |
| 541 |
- read-write - Read-write permission. |
| 542 |
choices: ['none', 'read', 'read-write'] |
| 543 |
ips_objects: |
| 544 |
aliases: ['ips-objects'] |
| 545 |
type: str |
| 546 |
description: |
| 547 |
- Ips objects configuration. |
| 548 |
- none - No permission. |
| 549 |
- read - Read permission. |
| 550 |
- read-write - Read-write permission. |
| 551 |
choices: ['none', 'read', 'read-write'] |
| 552 |
ipv6_trusthost1: |
| 553 |
type: str |
| 554 |
description: Admin user trusted host IPv6, default |
| 555 |
ipv6_trusthost10: |
| 556 |
type: str |
| 557 |
description: Admin user trusted host IPv6, default ffff |
| 558 |
ipv6_trusthost2: |
| 559 |
type: str |
| 560 |
description: Admin user trusted host IPv6, default ffff |
| 561 |
ipv6_trusthost3: |
| 562 |
type: str |
| 563 |
description: Admin user trusted host IPv6, default ffff |
| 564 |
ipv6_trusthost4: |
| 565 |
type: str |
| 566 |
description: Admin user trusted host IPv6, default ffff |
| 567 |
ipv6_trusthost5: |
| 568 |
type: str |
| 569 |
description: Admin user trusted host IPv6, default ffff |
| 570 |
ipv6_trusthost6: |
| 571 |
type: str |
| 572 |
description: Admin user trusted host IPv6, default ffff |
| 573 |
ipv6_trusthost7: |
| 574 |
type: str |
| 575 |
description: Admin user trusted host IPv6, default ffff |
| 576 |
ipv6_trusthost8: |
| 577 |
type: str |
| 578 |
description: Admin user trusted host IPv6, default ffff |
| 579 |
ipv6_trusthost9: |
| 580 |
type: str |
| 581 |
description: Admin user trusted host IPv6, default ffff |
| 582 |
rpc_permit: |
| 583 |
aliases: ['rpc-permit'] |
| 584 |
type: str |
| 585 |
description: |
| 586 |
- Set none/read/read-write rpc-permission |
| 587 |
- read-write - Read-write permission. |
| 588 |
- none - No permission. |
| 589 |
- read - Read-only permission. |
| 590 |
choices: ['read-write', 'none', 'read'] |
| 591 |
trusthost1: |
| 592 |
type: str |
| 593 |
description: Admin user trusted host IP, default 0. |
| 594 |
trusthost10: |
| 595 |
type: str |
| 596 |
description: Admin user trusted host IP, default 255. |
| 597 |
trusthost2: |
| 598 |
type: str |
| 599 |
description: Admin user trusted host IP, default 255. |
| 600 |
trusthost3: |
| 601 |
type: str |
| 602 |
description: Admin user trusted host IP, default 255. |
| 603 |
trusthost4: |
| 604 |
type: str |
| 605 |
description: Admin user trusted host IP, default 255. |
| 606 |
trusthost5: |
| 607 |
type: str |
| 608 |
description: Admin user trusted host IP, default 255. |
| 609 |
trusthost6: |
| 610 |
type: str |
| 611 |
description: Admin user trusted host IP, default 255. |
| 612 |
trusthost7: |
| 613 |
type: str |
| 614 |
description: Admin user trusted host IP, default 255. |
| 615 |
trusthost8: |
| 616 |
type: str |
| 617 |
description: Admin user trusted host IP, default 255. |
| 618 |
trusthost9: |
| 619 |
type: str |
| 620 |
description: Admin user trusted host IP, default 255. |
| 621 |
ips_baseline_cfg: |
| 622 |
aliases: ['ips-baseline-cfg'] |
| 623 |
type: str |
| 624 |
description: |
| 625 |
- Ips baseline sensor configration. |
| 626 |
- none - No permission. |
| 627 |
- read - Read permission. |
| 628 |
- read-write - Read-write permission. |
| 629 |
choices: ['none', 'read', 'read-write'] |
| 630 |
ips_baseline_ovrd: |
| 631 |
aliases: ['ips-baseline-ovrd'] |
| 632 |
type: str |
| 633 |
description: |
| 634 |
- Enable/disable override baseline ips sensor. |
| 635 |
- disable - Disable setting. |
| 636 |
- enable - Enable setting. |
| 637 |
choices: ['disable', 'enable'] |
| 638 |
device_fortiextender: |
| 639 |
aliases: ['device-fortiextender'] |
| 640 |
type: str |
| 641 |
description: |
| 642 |
- Manage FortiExtender. |
| 643 |
- none - No permission. |
| 644 |
- read - Read permission. |
| 645 |
- read-write - Read-write permission. |
| 646 |
choices: ['none', 'read', 'read-write'] |
| 647 |
ips_lock: |
| 648 |
aliases: ['ips-lock'] |
| 649 |
type: str |
| 650 |
description: |
| 651 |
- IPS locking |
| 652 |
- none - No permission. |
| 653 |
- read - Read permission. |
| 654 |
- read-write - Read-write permission. |
| 655 |
choices: ['none', 'read', 'read-write'] |
| 656 |
fgt_gui_proxy: |
| 657 |
aliases: ['fgt-gui-proxy'] |
| 658 |
type: str |
| 659 |
description: |
| 660 |
- FortiGate GUI proxy. |
| 661 |
- disable - No permission. |
| 662 |
- enable - With permission. |
| 663 |
choices: ['disable', 'enable'] |
| 664 |
policy_ips_attrs: |
| 665 |
aliases: ['policy-ips-attrs'] |
| 666 |
type: str |
| 667 |
description: |
| 668 |
- Policy ips attributes configuration. |
| 669 |
- none - No permission. |
| 670 |
- read - Read permission. |
| 671 |
- read-write - Read-write permission. |
| 672 |
choices: ['none', 'read', 'read-write'] |
| 673 |
write_passwd_access: |
| 674 |
aliases: ['write-passwd-access'] |
| 675 |
type: str |
| 676 |
description: |
| 677 |
- set all/specify-by-user/specify-by-profile write password access mode. |
| 678 |
- all - All except super users. |
| 679 |
- specify-by-user - Specify by user. |
| 680 |
- specify-by-profile - Specify by profile. |
| 681 |
choices: ['all', 'specify-by-user', 'specify-by-profile'] |
| 682 |
write_passwd_profiles: |
| 683 |
aliases: ['write-passwd-profiles'] |
| 684 |
type: list |
| 685 |
elements: dict |
| 686 |
description: Write passwd profiles. |
| 687 |
suboptions: |
| 688 |
profileid: |
| 689 |
type: str |
| 690 |
description: Profile ID. |
| 691 |
write_passwd_user_list: |
| 692 |
aliases: ['write-passwd-user-list'] |
| 693 |
type: list |
| 694 |
elements: dict |
| 695 |
description: Write passwd user list. |
| 696 |
suboptions: |
| 697 |
userid: |
| 698 |
type: str |
| 699 |
description: User ID. |
| 700 |
adom_admin: |
| 701 |
aliases: ['adom-admin'] |
| 702 |
type: str |
| 703 |
description: |
| 704 |
- Enable Adom Admin. |
| 705 |
- disable - Disable setting. |
| 706 |
- enable - Enable setting. |
| 707 |
choices: ['disable', 'enable'] |
| 708 |
device_fwm_profile: |
| 709 |
aliases: ['device-fwm-profile'] |
| 710 |
type: str |
| 711 |
description: |
| 712 |
- Device firmware profile permission. |
| 713 |
- none - No permission. |
| 714 |
- read - Read permission. |
| 715 |
- read-write - Read-write permission. |
| 716 |
choices: ['none', 'read', 'read-write'] |
| 717 |
device_assignment: |
| 718 |
aliases: ['device-assignment'] |
| 719 |
type: str |
| 720 |
description: Device assignment. |
| 721 |
choices: ['none', 'read', 'read-write'] |
| 722 |
script_run: |
| 723 |
aliases: ['script-run'] |
| 724 |
type: str |
| 725 |
description: Script run. |
| 726 |
choices: ['none', 'read', 'read-write'] |
| 727 |
''' |
| 728 |
|
| 729 |
EXAMPLES = ''' |
| 730 |
- name: Example playbook |
| 731 |
hosts: fortimanagers |
| 732 |
gather_facts: false |
| 733 |
connection: httpapi |
| 734 |
vars: |
| 735 |
ansible_httpapi_use_ssl: true |
| 736 |
ansible_httpapi_validate_certs: false |
| 737 |
ansible_httpapi_port: 443 |
| 738 |
tasks: |
| 739 |
- name: Admin profile. |
| 740 |
fortinet.fortimanager.fmgr_system_admin_profile: |
| 741 |
bypass_validation: false |
| 742 |
state: present |
| 743 |
system_admin_profile: |
| 744 |
description: ansible-test-description |
| 745 |
profileid: ansible-test-profile |
| 746 |
scope: adom # <value in [global, adom]> |
| 747 |
type: system # <value in [system, restricted]> |
| 748 |
|
| 749 |
- name: Gathering fortimanager facts |
| 750 |
hosts: fortimanagers |
| 751 |
gather_facts: false |
| 752 |
connection: httpapi |
| 753 |
vars: |
| 754 |
ansible_httpapi_use_ssl: true |
| 755 |
ansible_httpapi_validate_certs: false |
| 756 |
ansible_httpapi_port: 443 |
| 757 |
tasks: |
| 758 |
- name: Retrieve all the admin profiles |
| 759 |
fortinet.fortimanager.fmgr_fact: |
| 760 |
facts: |
| 761 |
selector: "system_admin_profile" |
| 762 |
params: |
| 763 |
profile: "your_value" |
| 764 |
''' |
| 765 |
|
| 766 |
RETURN = ''' |
| 767 |
meta: |
| 768 |
description: The result of the request. |
| 769 |
type: dict |
| 770 |
returned: always |
| 771 |
contains: |
| 772 |
request_url: |
| 773 |
description: The full url requested. |
| 774 |
returned: always |
| 775 |
type: str |
| 776 |
sample: /sys/login/user |
| 777 |
response_code: |
| 778 |
description: The status of api request. |
| 779 |
returned: always |
| 780 |
type: int |
| 781 |
sample: 0 |
| 782 |
response_data: |
| 783 |
description: The api response. |
| 784 |
type: list |
| 785 |
returned: always |
| 786 |
response_message: |
| 787 |
description: The descriptive message of the api response. |
| 788 |
type: str |
| 789 |
returned: always |
| 790 |
sample: OK. |
| 791 |
system_information: |
| 792 |
description: The information of the target system. |
| 793 |
type: dict |
| 794 |
returned: always |
| 795 |
rc: |
| 796 |
description: The status the request. |
| 797 |
type: int |
| 798 |
returned: always |
| 799 |
sample: 0 |
| 800 |
version_check_warning: |
| 801 |
description: Warning if the parameters used in the playbook are not supported by the current FortiManager version. |
| 802 |
type: list |
| 803 |
returned: complex |
| 804 |
''' |
| 805 |
from ansible.module_utils.basic import AnsibleModule |
| 806 |
from ansible.module_utils.connection import Connection |
| 807 |
from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager, check_galaxy_version, check_parameter_bypass |
| 808 |
from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec |
| 809 |
|
| 810 |
|
| 811 |
def main(): |
| 812 |
urls_list = [ |
| 813 |
'/cli/global/system/admin/profile' |
| 814 |
] |
| 815 |
module_arg_spec = { |
| 816 |
'system_admin_profile': { |
| 817 |
'type': 'dict', 'v_range': [['6.0.0', '']], |
| 818 |
'options': { |
| 819 |
'adom-lock': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 820 |
'adom-policy-packages': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 821 |
'adom-switch': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 822 |
'app-filter': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 823 |
'assignment': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 824 |
'change-password': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 825 |
'config-retrieve': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 826 |
'config-revert': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 827 |
'consistency-check': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 828 |
'datamask': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 829 |
'datamask-custom-fields': { |
| 830 |
'type': 'list', |
| 831 |
'options': { |
| 832 |
'field-category': {'type': 'list', 'choices': ['log', 'fortiview', 'alert', 'ueba', 'all'], 'elements': 'str'}, |
| 833 |
'field-name': {'type': 'str'}, |
| 834 |
'field-status': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 835 |
'field-type': {'choices': ['string', 'ip', 'mac', 'email', 'unknown'], 'type': 'str'} |
| 836 |
}, |
| 837 |
'elements': 'dict' |
| 838 |
}, |
| 839 |
'datamask-custom-priority': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 840 |
'datamask-fields': { |
| 841 |
'type': 'list', |
| 842 |
'choices': ['user', 'srcip', 'srcname', 'srcmac', 'dstip', 'dstname', 'email', 'message', 'domain'], |
| 843 |
'elements': 'str' |
| 844 |
}, |
| 845 |
'datamask-key': {'no_log': True, 'type': 'raw'}, |
| 846 |
'deploy-management': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 847 |
'description': {'type': 'str'}, |
| 848 |
'device-ap': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 849 |
'device-config': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 850 |
'device-forticlient': {'v_range': [['6.0.0', '7.4.2']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 851 |
'device-fortiswitch': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 852 |
'device-manager': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 853 |
'device-op': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 854 |
'device-policy-package-lock': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 855 |
'device-profile': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 856 |
'device-revision-deletion': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 857 |
'device-wan-link-load-balance': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 858 |
'event-management': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 859 |
'fgd-center-advanced': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 860 |
'fgd-center-fmw-mgmt': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 861 |
'fgd-center-licensing': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 862 |
'fgd_center': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 863 |
'global-policy-packages': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 864 |
'import-policy-packages': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 865 |
'intf-mapping': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 866 |
'ips-filter': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 867 |
'log-viewer': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 868 |
'policy-objects': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 869 |
'profileid': {'required': True, 'type': 'str'}, |
| 870 |
'read-passwd': {'v_range': [['6.0.0', '7.4.2'], ['7.4.9', '7.4.10']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 871 |
'realtime-monitor': {'v_range': [['6.0.0', '7.4.2']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 872 |
'report-viewer': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 873 |
'scope': {'choices': ['global', 'adom'], 'type': 'str'}, |
| 874 |
'set-install-targets': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 875 |
'system-setting': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 876 |
'term-access': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 877 |
'type': {'choices': ['system', 'restricted'], 'type': 'str'}, |
| 878 |
'vpn-manager': {'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 879 |
'web-filter': {'choices': ['disable', 'enable'], 'type': 'str'}, |
| 880 |
'datamask-unmasked-time': {'v_range': [['6.2.2', '']], 'type': 'int'}, |
| 881 |
'super-user-profile': {'v_range': [['6.2.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 882 |
'allow-to-install': {'v_range': [['6.4.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 883 |
'extension-access': { |
| 884 |
'v_range': [['6.4.2', '7.0.14'], ['7.2.0', '7.2.10'], ['7.4.0', '7.4.7'], ['7.6.0', '7.6.3']], |
| 885 |
'choices': ['none', 'read', 'read-write'], |
| 886 |
'type': 'str' |
| 887 |
}, |
| 888 |
'fabric-viewer': {'v_range': [['6.4.6', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 889 |
'run-report': {'v_range': [['7.0.0', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 890 |
'script-access': {'v_range': [['7.0.0', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 891 |
'triage-events': {'v_range': [['7.0.0', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 892 |
'update-incidents': {'v_range': [['7.0.0', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 893 |
'ips-objects': {'v_range': [['7.2.0', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 894 |
'ipv6_trusthost1': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 895 |
'ipv6_trusthost10': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 896 |
'ipv6_trusthost2': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 897 |
'ipv6_trusthost3': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 898 |
'ipv6_trusthost4': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 899 |
'ipv6_trusthost5': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 900 |
'ipv6_trusthost6': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 901 |
'ipv6_trusthost7': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 902 |
'ipv6_trusthost8': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 903 |
'ipv6_trusthost9': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 904 |
'rpc-permit': {'v_range': [['7.0.3', '']], 'choices': ['read-write', 'none', 'read'], 'type': 'str'}, |
| 905 |
'trusthost1': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 906 |
'trusthost10': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 907 |
'trusthost2': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 908 |
'trusthost3': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 909 |
'trusthost4': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 910 |
'trusthost5': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 911 |
'trusthost6': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 912 |
'trusthost7': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 913 |
'trusthost8': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 914 |
'trusthost9': {'v_range': [['7.0.3', '']], 'type': 'str'}, |
| 915 |
'ips-baseline-cfg': {'v_range': [['7.0.1', '7.0.2']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 916 |
'ips-baseline-ovrd': {'v_range': [['7.0.1', '7.0.2']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 917 |
'device-fortiextender': {'v_range': [['7.0.4', '7.0.16'], ['7.2.1', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 918 |
'ips-lock': {'v_range': [['7.2.2', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 919 |
'fgt-gui-proxy': {'v_range': [['7.4.2', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 920 |
'policy-ips-attrs': {'v_range': [['7.4.2', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 921 |
'write-passwd-access': {'v_range': [['7.4.2', '']], 'choices': ['all', 'specify-by-user', 'specify-by-profile'], 'type': 'str'}, |
| 922 |
'write-passwd-profiles': { |
| 923 |
'v_range': [['7.4.2', '']], |
| 924 |
'no_log': True, |
| 925 |
'type': 'list', |
| 926 |
'options': {'profileid': {'v_range': [['7.4.2', '']], 'type': 'str'}}, |
| 927 |
'elements': 'dict' |
| 928 |
}, |
| 929 |
'write-passwd-user-list': { |
| 930 |
'v_range': [['7.4.2', '']], |
| 931 |
'no_log': True, |
| 932 |
'type': 'list', |
| 933 |
'options': {'userid': {'v_range': [['7.4.2', '']], 'type': 'str'}}, |
| 934 |
'elements': 'dict' |
| 935 |
}, |
| 936 |
'adom-admin': {'v_range': [['7.6.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'}, |
| 937 |
'device-fwm-profile': {'v_range': [['7.4.7', '7.4.10'], ['7.6.4', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 938 |
'device-assignment': {'v_range': [['7.6.4', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'}, |
| 939 |
'script-run': {'v_range': [['7.6.4', '']], 'choices': ['none', 'read', 'read-write'], 'type': 'str'} |
| 940 |
} |
| 941 |
} |
| 942 |
} |
| 943 |
|
| 944 |
module_option_spec = get_module_arg_spec('full crud') |
| 945 |
module_arg_spec.update(module_option_spec) |
| 946 |
check_galaxy_version(module_arg_spec) |
| 947 |
module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'system_admin_profile'), |
| 948 |
supports_check_mode=True) |
| 949 |
if not module._socket_path: |
| 950 |
module.fail_json(msg='MUST RUN IN HTTPAPI MODE') |
| 951 |
connection = Connection(module._socket_path) |
| 952 |
fmgr = NAPIManager('full crud', module_arg_spec, urls_list, |
| 953 |
'profileid', 'data', module, connection) |
| 954 |
fmgr.process_crud() |
| 955 |
module.exit_json(meta=module.params) |
| 956 |
|
| 957 |
|
| 958 |
if __name__ == '__main__': |
| 959 |
main() |