Debian Codegraph @

ansible_collections/fortinet/fortimanager/plugins/modules/fmgr_system_admin_user.py

raw symbols SCIP
1 #!/usr/bin/python
2 from __future__ import absolute_import, division, print_function
3 # Copyright 2019-2024 Fortinet, Inc.
4 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
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_user
15 short_description: Admin user.
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_user:
22 description: The top level parameters set.
23 required: false
24 type: dict
25 suboptions:
26 adom:
27 type: list
28 elements: dict
29 description: Adom.
30 suboptions:
31 adom_name:
32 aliases: ['adom-name']
33 type: str
34 description: Admin domain names.
35 adom_exclude:
36 aliases: ['adom-exclude']
37 type: list
38 elements: dict
39 description: Adom exclude.
40 suboptions:
41 adom_name:
42 aliases: ['adom-name']
43 type: str
44 description: Admin domain names.
45 app_filter:
46 aliases: ['app-filter']
47 type: list
48 elements: dict
49 description: App filter.
50 suboptions:
51 app_filter_name:
52 aliases: ['app-filter-name']
53 type: str
54 description: App filter name.
55 avatar:
56 type: str
57 description: Image file for avatar
58 ca:
59 type: str
60 description: PKI user certificate CA
61 change_password:
62 aliases: ['change-password']
63 type: str
64 description:
65 - Enable/disable restricted user to change self password.
66 - disable - Disable setting.
67 - enable - Enable setting.
68 choices: ['disable', 'enable']
69 dashboard:
70 type: list
71 elements: dict
72 description: Dashboard.
73 suboptions:
74 column:
75 type: int
76 description: Widgets column ID.
77 diskio_content_type:
78 aliases: ['diskio-content-type']
79 type: str
80 description:
81 - Disk I/O Monitor widgets chart type.
82 - util - bandwidth utilization.
83 - iops - the number of I/O requests.
84 - blks - the amount of data of I/O requests.
85 choices: ['util', 'iops', 'blks']
86 diskio_period:
87 aliases: ['diskio-period']
88 type: str
89 description:
90 - Disk I/O Monitor widgets data period.
91 - 1hour - 1 hour.
92 - 8hour - 8 hour.
93 - 24hour - 24 hour.
94 choices: ['1hour', '8hour', '24hour']
95 log_rate_period:
96 aliases: ['log-rate-period']
97 type: str
98 description:
99 - Log receive monitor widgets data period.
100 - 2min - 2 minutes.
101 - 1hour - 1 hour.
102 - 6hours - 6 hours.
103 choices: ['2min', '1hour', '6hours']
104 log_rate_topn:
105 aliases: ['log-rate-topn']
106 type: str
107 description:
108 - Log receive monitor widgets number of top items to display.
109 - 1 - Top 1.
110 - 2 - Top 2.
111 - 3 - Top 3.
112 - 4 - Top 4.
113 - 5 - Top 5.
114 choices: ['1', '2', '3', '4', '5']
115 log_rate_type:
116 aliases: ['log-rate-type']
117 type: str
118 description:
119 - Log receive monitor widgets statistics breakdown options.
120 - log - Show log rates for each log type.
121 - device - Show log rates for each device.
122 choices: ['log', 'device']
123 moduleid:
124 type: int
125 description: Widget ID.
126 name:
127 type: str
128 description: Widget name.
129 num_entries:
130 aliases: ['num-entries']
131 type: int
132 description: Number of entries.
133 refresh_interval:
134 aliases: ['refresh-interval']
135 type: int
136 description: Widgets refresh interval.
137 res_cpu_display:
138 aliases: ['res-cpu-display']
139 type: str
140 description:
141 - Widgets CPU display type.
142 - average - Average usage of CPU.
143 - each - Each usage of CPU.
144 choices: ['average', 'each']
145 res_period:
146 aliases: ['res-period']
147 type: str
148 description:
149 - Widgets data period.
150 - 10min - Last 10 minutes.
151 - hour - Last hour.
152 - day - Last day.
153 choices: ['10min', 'hour', 'day']
154 res_view_type:
155 aliases: ['res-view-type']
156 type: str
157 description:
158 - Widgets data view type.
159 - real-time - Real-time view.
160 - history - History view.
161 choices: ['real-time', 'history']
162 status:
163 type: str
164 description:
165 - Widgets opened/closed state.
166 - close - Widget closed.
167 - open - Widget opened.
168 choices: ['close', 'open']
169 tabid:
170 type: int
171 description: ID of tab where widget is displayed.
172 time_period:
173 aliases: ['time-period']
174 type: str
175 description:
176 - Log Database Monitor widgets data period.
177 - 1hour - 1 hour.
178 - 8hour - 8 hour.
179 - 24hour - 24 hour.
180 choices: ['1hour', '8hour', '24hour']
181 widget_type:
182 aliases: ['widget-type']
183 type: str
184 description:
185 - Widget type.
186 - top-lograte - Log Receive Monitor.
187 - sysres - System resources.
188 - sysinfo - System Information.
189 - licinfo - License Information.
190 - jsconsole - CLI Console.
191 - sysop - Unit Operation.
192 - alert - Alert Message Console.
193 - statistics - Statistics.
194 - rpteng - Report Engine.
195 - raid - Disk Monitor.
196 - logrecv - Logs/Data Received.
197 - devsummary - Device Summary.
198 - logdb-perf - Log Database Performance Monitor.
199 - logdb-lag - Log Database Lag Time.
200 - disk-io - Disk I/O.
201 - log-rcvd-fwd - Log receive and forwarding Monitor.
202 choices: ['top-lograte', 'sysres', 'sysinfo', 'licinfo', 'jsconsole',
203 'sysop', 'alert', 'statistics', 'rpteng', 'raid', 'logrecv',
204 'devsummary', 'logdb-perf', 'logdb-lag', 'disk-io',
205 'log-rcvd-fwd']
206 dashboard_tabs:
207 aliases: ['dashboard-tabs']
208 type: list
209 elements: dict
210 description: Dashboard tabs.
211 suboptions:
212 name:
213 type: str
214 description: Tab name.
215 tabid:
216 type: int
217 description: Tab ID.
218 description:
219 type: str
220 description: Description.
221 dev_group:
222 aliases: ['dev-group']
223 type: str
224 description: Device group.
225 email_address:
226 aliases: ['email-address']
227 type: str
228 description: Email address.
229 ext_auth_accprofile_override:
230 aliases: ['ext-auth-accprofile-override']
231 type: str
232 description:
233 - Allow to use the access profile provided by the remote authentication server.
234 - disable - Disable access profile override.
235 - enable - Enable access profile override.
236 choices: ['disable', 'enable']
237 ext_auth_adom_override:
238 aliases: ['ext-auth-adom-override']
239 type: str
240 description:
241 - Allow to use the ADOM provided by the remote authentication server.
242 - disable - Disable ADOM override.
243 - enable - Enable ADOM override.
244 choices: ['disable', 'enable']
245 ext_auth_group_match:
246 aliases: ['ext-auth-group-match']
247 type: str
248 description: Only administrators belonging to this group can login.
249 first_name:
250 aliases: ['first-name']
251 type: str
252 description: First name.
253 force_password_change:
254 aliases: ['force-password-change']
255 type: str
256 description:
257 - Enable/disable force password change on next login.
258 - disable - Disable setting.
259 - enable - Enable setting.
260 choices: ['disable', 'enable']
261 group:
262 type: str
263 description: Group name.
264 hidden:
265 type: int
266 description: Hidden administrator.
267 ips_filter:
268 aliases: ['ips-filter']
269 type: list
270 elements: dict
271 description: Ips filter.
272 suboptions:
273 ips_filter_name:
274 aliases: ['ips-filter-name']
275 type: str
276 description: IPS filter name.
277 ipv6_trusthost1:
278 type: str
279 description: Admin user trusted host IPv6, default
280 ipv6_trusthost10:
281 type: str
282 description: Admin user trusted host IPv6, default ffff
283 ipv6_trusthost2:
284 type: str
285 description: Admin user trusted host IPv6, default ffff
286 ipv6_trusthost3:
287 type: str
288 description: Admin user trusted host IPv6, default ffff
289 ipv6_trusthost4:
290 type: str
291 description: Admin user trusted host IPv6, default ffff
292 ipv6_trusthost5:
293 type: str
294 description: Admin user trusted host IPv6, default ffff
295 ipv6_trusthost6:
296 type: str
297 description: Admin user trusted host IPv6, default ffff
298 ipv6_trusthost7:
299 type: str
300 description: Admin user trusted host IPv6, default ffff
301 ipv6_trusthost8:
302 type: str
303 description: Admin user trusted host IPv6, default ffff
304 ipv6_trusthost9:
305 type: str
306 description: Admin user trusted host IPv6, default ffff
307 last_name:
308 aliases: ['last-name']
309 type: str
310 description: Last name.
311 ldap_server:
312 aliases: ['ldap-server']
313 type: str
314 description: LDAP server name.
315 meta_data:
316 aliases: ['meta-data']
317 type: list
318 elements: dict
319 description: Meta data.
320 suboptions:
321 fieldlength:
322 type: int
323 description: Field length.
324 fieldname:
325 type: str
326 description: Field name.
327 fieldvalue:
328 type: str
329 description: Field value.
330 importance:
331 type: str
332 description:
333 - Importance.
334 - optional - This field is optional.
335 - required - This field is required.
336 choices: ['optional', 'required']
337 status:
338 type: str
339 description:
340 - Status.
341 - disabled - This field is disabled.
342 - enabled - This field is enabled.
343 choices: ['disabled', 'enabled']
344 mobile_number:
345 aliases: ['mobile-number']
346 type: str
347 description: Mobile number.
348 pager_number:
349 aliases: ['pager-number']
350 type: str
351 description: Pager number.
352 password:
353 type: raw
354 description: (list) Password.
355 password_expire:
356 aliases: ['password-expire']
357 type: raw
358 description: (list or str) Password expire time in GMT.
359 phone_number:
360 aliases: ['phone-number']
361 type: str
362 description: Phone number.
363 policy_package:
364 aliases: ['policy-package']
365 type: list
366 elements: dict
367 description: Policy package.
368 suboptions:
369 policy_package_name:
370 aliases: ['policy-package-name']
371 type: str
372 description: Policy package names.
373 profileid:
374 type: str
375 description: Profile ID.
376 radius_server:
377 type: str
378 description: RADIUS server name.
379 restrict_access:
380 aliases: ['restrict-access']
381 type: str
382 description:
383 - Enable/disable restricted access to development VDOM.
384 - disable - Disable setting.
385 - enable - Enable setting.
386 choices: ['disable', 'enable']
387 restrict_dev_vdom:
388 aliases: ['restrict-dev-vdom']
389 type: list
390 elements: dict
391 description: Restrict dev vdom.
392 suboptions:
393 dev_vdom:
394 aliases: ['dev-vdom']
395 type: str
396 description: Device or device VDOM.
397 rpc_permit:
398 aliases: ['rpc-permit']
399 type: str
400 description:
401 - set none/read/read-write rpc-permission.
402 - read-write - Read-write permission.
403 - none - No permission.
404 - read - Read-only permission.
405 choices: ['read-write', 'none', 'read', 'from-profile']
406 ssh_public_key1:
407 aliases: ['ssh-public-key1']
408 type: raw
409 description: (list) SSH public key 1.
410 ssh_public_key2:
411 aliases: ['ssh-public-key2']
412 type: raw
413 description: (list) SSH public key 2.
414 ssh_public_key3:
415 aliases: ['ssh-public-key3']
416 type: raw
417 description: (list) SSH public key 3.
418 subject:
419 type: str
420 description: PKI user certificate name constraints.
421 tacacs_plus_server:
422 aliases: ['tacacs-plus-server']
423 type: str
424 description: TACACS+ server name.
425 trusthost1:
426 type: str
427 description: Admin user trusted host IP, default 0.
428 trusthost10:
429 type: str
430 description: Admin user trusted host IP, default 255.
431 trusthost2:
432 type: str
433 description: Admin user trusted host IP, default 255.
434 trusthost3:
435 type: str
436 description: Admin user trusted host IP, default 255.
437 trusthost4:
438 type: str
439 description: Admin user trusted host IP, default 255.
440 trusthost5:
441 type: str
442 description: Admin user trusted host IP, default 255.
443 trusthost6:
444 type: str
445 description: Admin user trusted host IP, default 255.
446 trusthost7:
447 type: str
448 description: Admin user trusted host IP, default 255.
449 trusthost8:
450 type: str
451 description: Admin user trusted host IP, default 255.
452 trusthost9:
453 type: str
454 description: Admin user trusted host IP, default 255.
455 two_factor_auth:
456 aliases: ['two-factor-auth']
457 type: str
458 description:
459 - Enable 2-factor authentication
460 - disable - Disable 2-factor authentication.
461 - enable - Enable 2-factor authentication.
462 choices: ['disable', 'enable', 'password', 'ftc-ftm', 'ftc-email', 'ftc-sms']
463 user_type:
464 type: str
465 description:
466 - User type.
467 - local - Local user.
468 - radius - RADIUS user.
469 - ldap - LDAP user.
470 - tacacs-plus - TACACS+ user.
471 - pki-auth - PKI user.
472 - group - Group user.
473 choices: ['local', 'radius', 'ldap', 'tacacs-plus', 'pki-auth', 'group', 'sso',
474 'api']
475 userid:
476 type: str
477 description: User name.
478 required: true
479 web_filter:
480 aliases: ['web-filter']
481 type: list
482 elements: dict
483 description: Web filter.
484 suboptions:
485 web_filter_name:
486 aliases: ['web-filter-name']
487 type: str
488 description: Web filter name.
489 wildcard:
490 type: str
491 description:
492 - Enable/disable wildcard remote authentication.
493 - disable - Disable username wildcard.
494 - enable - Enable username wildcard.
495 choices: ['disable', 'enable']
496 login_max:
497 aliases: ['login-max']
498 type: int
499 description: Max login session for this user.
500 use_global_theme:
501 aliases: ['use-global-theme']
502 type: str
503 description:
504 - Enable/disble global theme for administration GUI.
505 - disable - Disable setting.
506 - enable - Enable setting.
507 choices: ['disable', 'enable']
508 user_theme:
509 aliases: ['user-theme']
510 type: str
511 description:
512 - Color scheme to use for the admin user GUI.
513 - blue - Blueberry
514 - green - Kiwi
515 - red - Cherry
516 - melongene - Plum
517 - spring - Spring
518 - summer - Summer
519 - autumn - Autumn
520 - winter - Winter
521 - circuit-board - Circuit Board
522 - calla-lily - Calla Lily
523 - binary-tunnel - Binary Tunnel
524 - mars - Mars
525 - blue-sea - Blue Sea
526 - technology - Technology
527 - landscape - Landscape
528 - twilight - Twilight
529 - canyon - Canyon
530 - northern-light - Northern Light
531 - astronomy - Astronomy
532 - fish - Fish
533 - penguin - Penguin
534 - mountain - Mountain
535 - panda - Panda
536 - parrot - Parrot
537 - cave - Cave
538 - zebra - Zebra
539 - contrast-dark - High Contrast Dark
540 choices: ['blue', 'green', 'red', 'melongene', 'spring', 'summer', 'autumn',
541 'winter', 'circuit-board', 'calla-lily', 'binary-tunnel', 'mars',
542 'blue-sea', 'technology', 'landscape', 'twilight', 'canyon',
543 'northern-light', 'astronomy', 'fish', 'penguin', 'mountain', 'panda',
544 'parrot', 'cave', 'zebra', 'contrast-dark', 'mariner', 'jade',
545 'neutrino', 'dark-matter', 'forest', 'cat', 'graphite']
546 adom_access:
547 aliases: ['adom-access']
548 type: str
549 description:
550 - set all/specify/exclude adom access mode.
551 - all - All ADOMs access.
552 - specify - Specify ADOMs access.
553 - exclude - Exclude ADOMs access.
554 choices: ['all', 'specify', 'exclude', 'per-adom-profile']
555 fingerprint:
556 type: str
557 description: PKI user certificate fingerprint
558 th_from_profile:
559 aliases: ['th-from-profile']
560 type: int
561 description: Internal use only
562 th6_from_profile:
563 aliases: ['th6-from-profile']
564 type: int
565 description: Internal use only
566 cors_allow_origin:
567 aliases: ['cors-allow-origin']
568 type: str
569 description: Access-Control-Allow-Origin.
570 fortiai:
571 type: str
572 description:
573 - Enable/disble FortiAI.
574 - disable - Disable setting.
575 - enable - Enable setting.
576 choices: ['disable', 'enable']
577 policy_block:
578 aliases: ['policy-block']
579 type: list
580 elements: dict
581 description: Policy block.
582 suboptions:
583 policy_block_name:
584 aliases: ['policy-block-name']
585 type: str
586 description: Policy block names.
587 old_password:
588 aliases: ['old-password']
589 type: str
590 description: Old password.
591 autoreg_user:
592 aliases: ['autoreg-user']
593 type: str
594 description: Autoreg user.
595 choices: ['disable', 'enable']
596 '''
597
598 EXAMPLES = '''
599 - name: Example playbook
600 hosts: fortimanagers
601 gather_facts: false
602 connection: httpapi
603 vars:
604 ansible_httpapi_use_ssl: true
605 ansible_httpapi_validate_certs: false
606 ansible_httpapi_port: 443
607 tasks:
608 - name: Admin User
609 fortinet.fortimanager.fmgr_system_admin_user:
610 state: present
611 system_admin_user:
612 adom:
613 - adom_name: ansible
614 userid: "ansible-test"
615 - name: Admin domain.
616 fortinet.fortimanager.fmgr_system_admin_user_adom:
617 bypass_validation: false
618 user: ansible-test # userid
619 state: present
620 system_admin_user_adom:
621 adom_name: "ALL ADOMS"
622 '''
623
624 RETURN = '''
625 meta:
626 description: The result of the request.
627 type: dict
628 returned: always
629 contains:
630 request_url:
631 description: The full url requested.
632 returned: always
633 type: str
634 sample: /sys/login/user
635 response_code:
636 description: The status of api request.
637 returned: always
638 type: int
639 sample: 0
640 response_data:
641 description: The api response.
642 type: list
643 returned: always
644 response_message:
645 description: The descriptive message of the api response.
646 type: str
647 returned: always
648 sample: OK.
649 system_information:
650 description: The information of the target system.
651 type: dict
652 returned: always
653 rc:
654 description: The status the request.
655 type: int
656 returned: always
657 sample: 0
658 version_check_warning:
659 description: Warning if the parameters used in the playbook are not supported by the current FortiManager version.
660 type: list
661 returned: complex
662 '''
663 from ansible.module_utils.basic import AnsibleModule
664 from ansible.module_utils.connection import Connection
665 from ansible_collections.fortinet.fortimanager.plugins.module_utils.napi import NAPIManager, check_galaxy_version, check_parameter_bypass
666 from ansible_collections.fortinet.fortimanager.plugins.module_utils.common import get_module_arg_spec
667
668
669 def main():
670 urls_list = [
671 '/cli/global/system/admin/user'
672 ]
673 module_arg_spec = {
674 'system_admin_user': {
675 'type': 'dict', 'v_range': [['6.0.0', '']],
676 'options': {
677 'adom': {'type': 'list', 'options': {'adom-name': {'type': 'str'}}, 'elements': 'dict'},
678 'adom-exclude': {
679 'v_range': [['6.0.0', '7.0.2']],
680 'type': 'list',
681 'options': {'adom-name': {'v_range': [['6.0.0', '7.0.2']], 'type': 'str'}},
682 'elements': 'dict'
683 },
684 'app-filter': {'type': 'list', 'options': {'app-filter-name': {'type': 'str'}}, 'elements': 'dict'},
685 'avatar': {'type': 'str'},
686 'ca': {'type': 'str'},
687 'change-password': {'choices': ['disable', 'enable'], 'type': 'str'},
688 'dashboard': {
689 'type': 'list',
690 'options': {
691 'column': {'type': 'int'},
692 'diskio-content-type': {'choices': ['util', 'iops', 'blks'], 'type': 'str'},
693 'diskio-period': {'choices': ['1hour', '8hour', '24hour'], 'type': 'str'},
694 'log-rate-period': {'choices': ['2min', '1hour', '6hours'], 'type': 'str'},
695 'log-rate-topn': {'choices': ['1', '2', '3', '4', '5'], 'type': 'str'},
696 'log-rate-type': {'choices': ['log', 'device'], 'type': 'str'},
697 'moduleid': {'type': 'int'},
698 'name': {'type': 'str'},
699 'num-entries': {'type': 'int'},
700 'refresh-interval': {'type': 'int'},
701 'res-cpu-display': {'choices': ['average', 'each'], 'type': 'str'},
702 'res-period': {'choices': ['10min', 'hour', 'day'], 'type': 'str'},
703 'res-view-type': {'choices': ['real-time', 'history'], 'type': 'str'},
704 'status': {'choices': ['close', 'open'], 'type': 'str'},
705 'tabid': {'type': 'int'},
706 'time-period': {'choices': ['1hour', '8hour', '24hour'], 'type': 'str'},
707 'widget-type': {
708 'choices': [
709 'top-lograte', 'sysres', 'sysinfo', 'licinfo', 'jsconsole', 'sysop', 'alert', 'statistics', 'rpteng', 'raid', 'logrecv',
710 'devsummary', 'logdb-perf', 'logdb-lag', 'disk-io', 'log-rcvd-fwd'
711 ],
712 'type': 'str'
713 }
714 },
715 'elements': 'dict'
716 },
717 'dashboard-tabs': {'type': 'list', 'options': {'name': {'type': 'str'}, 'tabid': {'type': 'int'}}, 'elements': 'dict'},
718 'description': {'type': 'str'},
719 'dev-group': {'type': 'str'},
720 'email-address': {'type': 'str'},
721 'ext-auth-accprofile-override': {'choices': ['disable', 'enable'], 'type': 'str'},
722 'ext-auth-adom-override': {'choices': ['disable', 'enable'], 'type': 'str'},
723 'ext-auth-group-match': {'type': 'str'},
724 'first-name': {'type': 'str'},
725 'force-password-change': {'choices': ['disable', 'enable'], 'type': 'str'},
726 'group': {'type': 'str'},
727 'hidden': {'v_range': [['6.0.0', '7.6.3']], 'type': 'int'},
728 'ips-filter': {'type': 'list', 'options': {'ips-filter-name': {'type': 'str'}}, 'elements': 'dict'},
729 'ipv6_trusthost1': {'type': 'str'},
730 'ipv6_trusthost10': {'type': 'str'},
731 'ipv6_trusthost2': {'type': 'str'},
732 'ipv6_trusthost3': {'type': 'str'},
733 'ipv6_trusthost4': {'type': 'str'},
734 'ipv6_trusthost5': {'type': 'str'},
735 'ipv6_trusthost6': {'type': 'str'},
736 'ipv6_trusthost7': {'type': 'str'},
737 'ipv6_trusthost8': {'type': 'str'},
738 'ipv6_trusthost9': {'type': 'str'},
739 'last-name': {'type': 'str'},
740 'ldap-server': {'type': 'str'},
741 'meta-data': {
742 'type': 'list',
743 'options': {
744 'fieldlength': {'type': 'int'},
745 'fieldname': {'type': 'str'},
746 'fieldvalue': {'type': 'str'},
747 'importance': {'choices': ['optional', 'required'], 'type': 'str'},
748 'status': {'choices': ['disabled', 'enabled'], 'type': 'str'}
749 },
750 'elements': 'dict'
751 },
752 'mobile-number': {'type': 'str'},
753 'pager-number': {'type': 'str'},
754 'password': {'no_log': True, 'type': 'raw'},
755 'password-expire': {'no_log': True, 'type': 'raw'},
756 'phone-number': {'type': 'str'},
757 'policy-package': {'type': 'list', 'options': {'policy-package-name': {'type': 'str'}}, 'elements': 'dict'},
758 'profileid': {'type': 'str'},
759 'radius_server': {'type': 'str'},
760 'restrict-access': {'v_range': [['6.0.0', '6.2.3'], ['6.4.0', '6.4.0']], 'choices': ['disable', 'enable'], 'type': 'str'},
761 'restrict-dev-vdom': {
762 'v_range': [['6.0.0', '6.2.3'], ['6.4.0', '6.4.0']],
763 'type': 'list',
764 'options': {'dev-vdom': {'v_range': [['6.0.0', '6.2.3'], ['6.4.0', '6.4.0']], 'type': 'str'}},
765 'elements': 'dict'
766 },
767 'rpc-permit': {'choices': ['read-write', 'none', 'read', 'from-profile'], 'type': 'str'},
768 'ssh-public-key1': {'no_log': True, 'type': 'raw'},
769 'ssh-public-key2': {'no_log': True, 'type': 'raw'},
770 'ssh-public-key3': {'no_log': True, 'type': 'raw'},
771 'subject': {'type': 'str'},
772 'tacacs-plus-server': {'type': 'str'},
773 'trusthost1': {'type': 'str'},
774 'trusthost10': {'type': 'str'},
775 'trusthost2': {'type': 'str'},
776 'trusthost3': {'type': 'str'},
777 'trusthost4': {'type': 'str'},
778 'trusthost5': {'type': 'str'},
779 'trusthost6': {'type': 'str'},
780 'trusthost7': {'type': 'str'},
781 'trusthost8': {'type': 'str'},
782 'trusthost9': {'type': 'str'},
783 'two-factor-auth': {'choices': ['disable', 'enable', 'password', 'ftc-ftm', 'ftc-email', 'ftc-sms'], 'type': 'str'},
784 'user_type': {'choices': ['local', 'radius', 'ldap', 'tacacs-plus', 'pki-auth', 'group', 'sso', 'api'], 'type': 'str'},
785 'userid': {'required': True, 'type': 'str'},
786 'web-filter': {'type': 'list', 'options': {'web-filter-name': {'type': 'str'}}, 'elements': 'dict'},
787 'wildcard': {'choices': ['disable', 'enable'], 'type': 'str'},
788 'login-max': {'v_range': [['6.4.6', '']], 'type': 'int'},
789 'use-global-theme': {'v_range': [['7.0.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
790 'user-theme': {
791 'v_range': [['7.0.0', '']],
792 'choices': [
793 'blue', 'green', 'red', 'melongene', 'spring', 'summer', 'autumn', 'winter', 'circuit-board', 'calla-lily', 'binary-tunnel',
794 'mars', 'blue-sea', 'technology', 'landscape', 'twilight', 'canyon', 'northern-light', 'astronomy', 'fish', 'penguin',
795 'mountain', 'panda', 'parrot', 'cave', 'zebra', 'contrast-dark', 'mariner', 'jade', 'neutrino', 'dark-matter', 'forest', 'cat',
796 'graphite'
797 ],
798 'type': 'str'
799 },
800 'adom-access': {'v_range': [['7.0.3', '']], 'choices': ['all', 'specify', 'exclude', 'per-adom-profile'], 'type': 'str'},
801 'fingerprint': {'v_range': [['6.4.8', '6.4.15'], ['7.0.4', '']], 'type': 'str'},
802 'th-from-profile': {'v_range': [['7.0.3', '']], 'type': 'int'},
803 'th6-from-profile': {'v_range': [['7.0.3', '']], 'type': 'int'},
804 'cors-allow-origin': {'v_range': [['7.2.2', '']], 'type': 'str'},
805 'fortiai': {'v_range': [['7.6.0', '']], 'choices': ['disable', 'enable'], 'type': 'str'},
806 'policy-block': {
807 'v_range': [['7.6.0', '']],
808 'type': 'list',
809 'options': {'policy-block-name': {'v_range': [['7.6.0', '']], 'type': 'str'}},
810 'elements': 'dict'
811 },
812 'old-password': {'v_range': [['7.2.11', '7.2.12'], ['7.4.7', '7.4.10'], ['7.6.3', '']], 'no_log': True, 'type': 'str'},
813 'autoreg-user': {'v_range': [['7.6.4', '']], 'choices': ['disable', 'enable'], 'type': 'str'}
814 }
815 }
816 }
817
818 module_option_spec = get_module_arg_spec('full crud')
819 module_arg_spec.update(module_option_spec)
820 check_galaxy_version(module_arg_spec)
821 module = AnsibleModule(argument_spec=check_parameter_bypass(module_arg_spec, 'system_admin_user'),
822 supports_check_mode=True)
823 if not module._socket_path:
824 module.fail_json(msg='MUST RUN IN HTTPAPI MODE')
825 connection = Connection(module._socket_path)
826 fmgr = NAPIManager('full crud', module_arg_spec, urls_list,
827 'userid', 'data', module, connection)
828 fmgr.process_crud()
829 module.exit_json(meta=module.params)
830
831
832 if __name__ == '__main__':
833 main()