
    Vh                         d dl mZmZmZ eZdZdZdZd dl	Z	d dl
mZ d dlmZ d dlmZ d dlmc mc mc mc mZ  G d	 d
e      Zd Zedk(  r e        yy)    )absolute_importdivisionprint_functiona3  
---
module: zabbix_settings

short_description: Update Zabbix global settings.

description:
    - This module allows you to update Zabbix global settings.

author:
    - ONODERA Masaru(@masa-orca)

requirements:
    - "python >= 3.9"

version_added: 2.1.0

options:
    default_lang:
        description:
            - Default language for users.
        required: false
        type: str
    default_timezone:
        description:
            - Default time zone for users.
            - Please set C(system) if you want to use system time zone.
        required: false
        type: str
    default_theme:
        description:
            - Default theme for users.
        required: false
        type: str
        choices:
            - blue-theme
            - dark-theme
            - hc-light
            - hc-dark
    search_limit:
        description:
            - A number of search and filter results limit.
        required: false
        type: int
    max_overview_table_size:
        description:
            - Max number of columns and rows in overview tables
        required: false
        type: int
    max_in_table:
        description:
            - Max count of elements to show inside table cell
        required: false
        type: int
    server_check_interval:
        description:
            - The Zabbix shows "Zabbix server is down" warning if C(true).
        required: false
        type: bool
    work_period:
        description:
            - Working time setting.
            - U(https://www.zabbix.com/documentation/current/en/manual/appendix/time_period)
        required: false
        type: str
    show_technical_errors:
        description:
            - The Zabbix shows PHP and SQL technical errors to users who are non-Super admin or belong to user groups with debug mode not enabled if C(true).
        required: false
        type: bool
    history_period:
        description:
            - Max period of displaying history data.
            - Accepts seconds and time unit with suffix (e.g. 24h).
        required: false
        type: str
    period_default:
        description:
            - Default period value for time filter.
            - Accepts seconds and time unit with suffix (e.g. 1h).
        required: false
        type: str
    max_period:
        description:
            - Max period for time filter.
            - Accepts seconds and time unit with suffix (e.g. 1y).
        required: false
        type: str
    severity_color_0:
        description:
            - A custom color for not classified severity.
            - Please set hexadecimal color code (e.g. 00FF00).
        required: false
        type: str
    severity_color_1:
        description:
            - A custom color for information severity.
            - Please set hexadecimal color code (e.g. 00FF00).
        required: false
        type: str
    severity_color_2:
        description:
            - A custom color for warning severity.
            - Please set hexadecimal color code (e.g. 00FF00).
        required: false
        type: str
    severity_color_3:
        description:
            - A custom color for average severity.
            - Please set hexadecimal color code (e.g. 00FF00).
        required: false
        type: str
    severity_color_4:
        description:
            - A custom color for high severity.
            - Please set hexadecimal color code (e.g. 00FF00).
        required: false
        type: str
    severity_color_5:
        description:
            - A custom color for disaster severity.
            - Please set hexadecimal color code (e.g. 00FF00).
        required: false
        type: str
    severity_name_0:
        description:
            - A custom name for not classified severity.
        required: false
        type: str
    severity_name_1:
        description:
            - A custom name for information severity.
        required: false
        type: str
    severity_name_2:
        description:
            - A custom name for warning severity.
        required: false
        type: str
    severity_name_3:
        description:
            - A custom name for average severity.
        required: false
        type: str
    severity_name_4:
        description:
            - A custom name for high severity.
        required: false
        type: str
    severity_name_5:
        description:
            - A custom name for disaster severity.
        required: false
        type: str
    custom_color:
        description:
            - Custom event color settings will be activated if C(true).
        required: false
        type: bool
    ok_period:
        description:
            - A time of period for displaying OK triggers.
            - Accepts seconds and time unit with suffix (e.g. 5m).
        required: false
        type: str
    blink_period:
        description:
            - A time of period for blinking status changed triggers.
            - Accepts seconds and time unit with suffix (e.g. 5m).
        required: false
        type: str
    problem_unack_color:
        description:
            - A custom color for unacknowledged PROBLEM events.
            - This setting will be activated if I(custom_color=true).
            - Please set hexadecimal color code (e.g. 00FF00).
        required: false
        type: str
    problem_ack_color:
        description:
            - A custom color for acknowledged PROBLEM events.
            - This setting will be activated if I(custom_color=true).
            - Please set hexadecimal color code (e.g. 00FF00).
        required: false
        type: str
    ok_unack_color:
        description:
            - A custom color for unacknowledged RESOLVED events.
            - This setting will be activated if I(custom_color=true).
            - Please set hexadecimal color code (e.g. 00FF00).
        required: false
        type: str
    ok_ack_color:
        description:
            - A custom color for acknowledged RESOLVED events.
            - This setting will be activated if I(custom_color=true).
            - Please set hexadecimal color code (e.g. 00FF00).
        required: false
        type: str
    problem_unack_style:
        description:
            - Unacknowledged PROBLEM events blink if C(true).
        required: false
        type: bool
    problem_ack_style:
        description:
            - Acknowledged PROBLEM events blink if C(true).
        required: false
        type: bool
    ok_unack_style:
        description:
            - Unacknowledged RESOLVED events blink if C(true).
        required: false
        type: bool
    ok_ack_style:
        description:
            - Acknowledged RESOLVED events blink if C(true).
        required: false
        type: bool
    frontend_url:
        description:
            - A URL of frontend.
            - This parameter is used for url parameter of settings API.
        required: false
        type: str
    discovery_group:
        description:
            - A hostgroup which discovered hosts will belong to.
        required: false
        type: str
    default_inventory_mode:
        description:
            - A default value for host inventory mode.
        required: false
        type: str
        choices:
            - disabled
            - manual
            - automatic
    alert_usrgrp:
        description:
            - A name of user group which user belongs to receive an alerm message when database down.
        required: false
        type: str
    snmptrap_logging:
        description:
            - Logging unmatched SNMP traps will be ebabled if C(true).
        required: false
        type: bool
    login_attempts:
        description:
            - A number of login attempts you can try with non blocked.
        required: false
        type: int
    login_block:
        description:
            - A time of interval to reset login attempts when the user is blocked.
            - Accepts seconds and time unit with suffix (e.g. 5m).
        required: false
        type: str
    validate_uri_schemes:
        description:
            - Validate URI schemes if C(true).
        required: false
        type: bool
    uri_valid_schemes:
        description:
            - A list of valid URI scheme.
        required: false
        type: list
        elements: str
    x_frame_options:
        description:
            - A text of X-Frame-Options of HTTP header.
        required: false
        type: str
    iframe_sandboxing_enabled:
        description:
            - The Zabbix uses iframe sandboxing if C(true).
        required: false
        type: bool
    iframe_sandboxing_exceptions:
        description:
            - A text of iframe sandboxing exceptions.
        required: false
        type: str

    timeout_zabbix_agent:
        description:
            - A time of zabbix agent timeout.
            - This parameter is available since Zabbix 7.0
        required: false
        type: str

    timeout_simple_check:
        description:
            - A time of simple check timeout.
            - This parameter is available since Zabbix 7.0
        required: false
        type: str

    timeout_snmp_agent:
        description:
            - A time of SNMP agent timeout.
            - This parameter is available since Zabbix 7.0
        required: false
        type: str

    timeout_external_check:
        description:
            - A time of external check timeout.
            - This parameter is available since Zabbix 7.0
        required: false
        type: str

    timeout_db_monitor:
        description:
            - A time of db monitor timeout.
            - This parameter is available since Zabbix 7.0
        required: false
        type: str

    timeout_http_agent:
        description:
            - A time of HTTP agent timeout.
            - This parameter is available since Zabbix 7.0
        required: false
        type: str

    timeout_ssh_agent:
        description:
            - A time of SSH agent timeout.
            - This parameter is available since Zabbix 7.0
        required: false
        type: str

    timeout_telnet_agent:
        description:
            - A time of telnet agent timeout.
            - This parameter is available since Zabbix 7.0
        required: false
        type: str

    timeout_script:
        description:
            - A time of script timeout.
            - This parameter is available since Zabbix 7.0
        required: false
        type: str

    timeout_browser:
        description:
            - A time of browser timeout.
            - This parameter is available since Zabbix 7.0
        required: false
        type: str

    connect_timeout:
        description:
            - A time of connection timeout with Zabbix server.
        required: false
        type: str
    socket_timeout:
        description:
            - A time of network default timeout.
        required: false
        type: str
    media_type_test_timeout:
        description:
            - A time of network timeout for media type test.
        required: false
        type: str
    item_test_timeout:
        description:
            - A time of network timeout for item tests.
        required: false
        type: str
    script_timeout:
        description:
            - A time of network timeout for script execution.
        required: false
        type: str
    report_test_timeout:
        description:
            - A time of network timeout for scheduled report test.
        required: false
        type: str
    auditlog_enabled:
        description:
            - Enable audit logging if C(true).
        required: false
        type: bool
    auditlog_mode:
        description:
            - Enable logging of system actions (changes by low-level discovery, network discovery and autoregistration) if C(true).
            - This parameter is available since Zabbix 7.0
        required: false
        type: bool
    geomaps_tile_provider:
        description:
            - A provider of Geomap tile.
            - Please set C(another) if you want use non default provider
        required: false
        type: str
        choices:
            - OpenStreetMap.Mapnik
            - OpenTopoMap
            - Stamen.TonerLite
            - Stamen.Terrain
            - USGS.USTopo
            - USGS.USImagery
            - another
    geomaps_tile_url:
        description:
            - A URL of geomap tile.
        required: false
        type: str
    geomaps_max_zoom:
        description:
            - Max zoom level of geomap.
        required: false
        type: str
    geomaps_attribution:
        description:
            - A text of Geomap attribution.
        required: false
        type: str
    vault_provider:
        description:
            - A name of vault provider.
            - This parameter is available since Zabbix 6.2.
        required: false
        type: str
        choices:
            - HashiCorp_Vault
            - CyberArk_Vault

notes:
    - This module manages settings related with settings api except ha_failover_delay.

extends_documentation_fragment:
    - community.zabbix.zabbix
a  
# If you want to use Username and Password to be authenticated by Zabbix Server
- name: Set credentials to access Zabbix Server API
  ansible.builtin.set_fact:
    ansible_user: Admin
    ansible_httpapi_pass: zabbix

# If you want to use API token to be authenticated by Zabbix Server
# https://www.zabbix.com/documentation/current/en/manual/web_interface/frontend_sections/administration/general#api-tokens
- name: Set API token
  ansible.builtin.set_fact:
    ansible_zabbix_auth_key: 8ec0d52432c15c91fcafe9888500cf9a607f44091ab554dbee860f6b44fac895

- name: Update settings
  # set task level variables as we change ansible_connection plugin here
  vars:
    ansible_network_os: community.zabbix.zabbix
    ansible_connection: httpapi
    ansible_httpapi_port: 443
    ansible_httpapi_use_ssl: true
    ansible_httpapi_validate_certs: false
    ansible_zabbix_url_path: "zabbixeu"  # If Zabbix WebUI runs on non-default (zabbix) path ,e.g. http://<FQDN>/zabbixeu
    ansible_host: zabbix-example-fqdn.org
  community.zabbix.zabbix_settings:
    alert_usrgrp: "0"
    auditlog_enabled: false
    auditlog_mode: false
    blink_period: "10m"
    timeout_zabbix_agent: "30s"
    connect_timeout: "30s"
    custom_color: false
    default_inventory_mode: automatic
z
msg:
    description: The result of the operation
    returned: success
    type: str
    sample: "Successfully update global settings"
N)AnsibleModule)
ZabbixBase)LooseVersionc                   0    e Zd Zd Zd Zd Zd Zd Zd Zy)Settingsc                     	 | j                   j                  j                  ddi      S # t        $ r)}| j                  j                  d|z         Y d }~y d }~ww xY w)NoutputextendzFailed to get settings: %smsg)_zapisettingsget	Exception_module	fail_json)selfes     t/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/zabbix/plugins/modules/zabbix_settings.pyget_settingszSettings.get_settings  sX    	I::&&**Hh+?@@ 	ILL""'Ca'G"HH	Is   &) 	AAAc                     t        j                  d      }|j                  |      }|+| j                  j	                  dj                  |             y)Nz^(\d+)([smhdwMy]?)${0} is invalid value.r   Trecompilesearchr   r   format)r   timepatternsearch_results       r   _is_timezSettings._is_time  sI    **34t, LL""'>'E'Ed'K"L    c                     t        j                  d      }|j                  |      }|+| j                  j	                  dj                  |             y)Nz^[0-9a-fA-F]{6}$r   r   Tr   )r   colorr"   r#   s       r   	_is_colorzSettings._is_color
  sI    **01u- LL""'>'E'Ee'L"Mr%   c                     | j                   j                  j                  dd|ii      }|rt        |      dkD  r| j                  j                  d|z         |d   d   S )Nfiltername   zUser group '%s' cannot be foundr   usrgrpid)r   	usergroupr   lenr   r   )r   usrgrp	usrgrpidss      r   get_usrgrpid_from_namezSettings.get_usrgrpid_from_name  s[    JJ((,,h8H-IJ	C	NQ.LL""#Dv#MN|J''r%   c                     | j                   j                  j                  dd|ii      }|rt        |      dkD  r| j                  j                  d|z         |d   d   S )Nr*   r+   r,   zHost group '%s' cannot be foundr   groupid)r   	hostgroupr   r/   r   r   )r   r5   r4   s      r   get_groupid_from_namezSettings.get_groupid_from_name  s[    **&&**Hvy6I+JK#g,*LL""#Dy#PQqz)$$r%   cH                 d   	 i }Ht        |t              r||d   k7  r|Hd<   t        |t              r||d   k7  r|Hd<   t        |t              r||d   k7  r|Hd<   t        |t              rt        |      |d   k7  rt        |      Hd<   t        |t              rt        |      |d   k7  rt        |      Hd<   t        |t              rt        |      |d   k7  rt        |      Hd<   t        |t              r|r|d   dk7  rdHd<   n|d   d	k7  rd	Hd<   t        |	t              r|	|d
   k7  r|	Hd
<   t        |
t              r|
r|d   dk7  rdHd<   n|d   d	k7  rd	Hd<   t        |t              r| j	                  |      r||d   k7  r|Hd<   t        |t              r| j	                  |      r||d   k7  r|Hd<   t        |t              r| j	                  |      r||d   k7  r|Hd<   t        |t              r| j                  |      r||d   k7  r|Hd<   t        |t              r| j                  |      r||d   k7  r|Hd<   t        |t              r| j                  |      r||d   k7  r|Hd<   t        |t              r| j                  |      r||d   k7  r|Hd<   t        |t              r| j                  |      r||d   k7  r|Hd<   t        |t              r| j                  |      r||d   k7  r|Hd<   t        |t              r||d   k7  r|Hd<   t        |t              r||d   k7  r|Hd<   t        |t              r||d   k7  r|Hd<   t        |t              r||d   k7  r|Hd<   t        |t              r||d   k7  r|Hd<   t        |t              r||d   k7  r|Hd<   t        |t              r|r|d   dk7  rdHd<   n|d   d	k7  rd	Hd<   t        |t              r| j	                  |      r||d   k7  r|Hd<   t        |t              r| j	                  |      r||d   k7  r|Hd<   t        |t              r| j                  |      r||d   k7  r|Hd<   t        |t              r| j                  |      r||d    k7  r|Hd <   t        |t              r| j                  |      r||d!   k7  r|Hd!<   t        | t              r| j                  |       r| |d"   k7  r| Hd"<   t        |!t              r|!r|d#   dk7  rdHd#<   n|d#   d	k7  rd	Hd#<   t        |"t              r|"r|d$   dk7  rdHd$<   n|d$   d	k7  rd	Hd$<   t        |#t              r|#r|d%   dk7  rdHd%<   n|d%   d	k7  rd	Hd%<   t        |$t              r|$r|d&   dk7  rdHd&<   n|d&   d	k7  rd	Hd&<   t        |%t              r|%|d'   k7  r|%Hd'<   t        |&t              r| j                  |&      }I|d(   |Ik7  rIHd(<   t        |'t              r1t        t        j                  g d)|'      d*z
        }J|J|d+   k7  rJHd+<   t        |(t              r&|(d	k7  r| j                  |(      }Kn|(}K|d,   Kk7  rKHd,<   t        |)t              r|)r|d-   dk7  rdHd-<   n|d-   d	k7  rd	Hd-<   t        |*t              rt        |*      |d.   k7  rt        |*      Hd.<   t        |+t              r| j	                  |+      r|+|d/   k7  r|+Hd/<   t        |,t              r|,r|d0   dk7  rdHd0<   n|d0   d	k7  rd	Hd0<   t        |-t              ro|d1   j                  d2      }L|-j                          |Lj                          g }Mt        j                  |-|L|M       t        |M      d3k7  rd2j                  |-      Hd1<   t        |.t              r|.|d4   k7  r|.Hd4<   t        |/t              r|/r|d5   dk7  rdHd5<   n|d5   d	k7  rd	Hd5<   t        |0t              r|0|d6   k7  r|0Hd6<   t!        | j"                        t!        d7      k\  rt        |1t              r| j	                  |1      r|1|d8   k7  r|1Hd8<   t        |2t              r| j	                  |2      r|2|d9   k7  r|2Hd9<   t        |3t              r| j	                  |3      r|3|d:   k7  r|3Hd:<   t        |4t              r| j	                  |4      r|4|d;   k7  r|4Hd;<   t        |5t              r| j	                  |5      r|5|d<   k7  r|5Hd<<   t        |6t              r| j	                  |6      r|6|d=   k7  r|6Hd=<   t        |7t              r| j	                  |7      r|7|d>   k7  r|7Hd><   t        |8t              r| j	                  |8      r|8|d?   k7  r|8Hd?<   t        |9t              r| j	                  |9      r|9|d@   k7  r|9Hd@<   t        |:t              r| j	                  |:      r|:|dA   k7  r|:HdA<   t        Bt              rBr|dB   dk7  rdHdB<   n|dB   d	k7  rd	HdB<   nt        |1t              r| j$                  j'                  dCD       t        |2t              r| j$                  j'                  dED       t        |3t              r| j$                  j'                  dFD       t        |4t              r| j$                  j'                  dGD       t        |5t              r| j$                  j'                  dHD       t        |6t              r| j$                  j'                  dID       t        |7t              r| j$                  j'                  dJD       t        |8t              r| j$                  j'                  dKD       t        |9t              r| j$                  j'                  dLD       t        |:t              r| j$                  j'                  dMD       t        Bt              r| j$                  j'                  dND       t        |;t              r| j	                  |;      r|;|dO   k7  r|;HdO<   t        |<t              r| j	                  |<      r|<|dP   k7  r|<HdP<   t        |=t              r| j	                  |=      r|=|dQ   k7  r|=HdQ<   t        |>t              r| j	                  |>      r|>|dR   k7  r|>HdR<   t        |?t              r| j	                  |?      r|?|dS   k7  r|?HdS<   t        @t              r| j	                  @      r@|dT   k7  r@HdT<   t        At              rAr|dU   dk7  rdHdU<   n|dU   d	k7  rd	HdU<   t        Ct              rC}N|CdVk(  rdW}NN|dX   k7  rNHdX<   t        Dt              rD|dY   k7  rDHdY<   t        Et              rt        E      |dZ   k7  rt        E      HdZ<   t        Ft              rF|d[   k7  rFHd[<   t!        d\      t!        | j"                        k  r>t        Gt              r.t        t        j                  d]d^gG            }O|O|d_   k7  rOHd_<   Hi k7  ru| j$                  j(                  r| j$                  j+                  d`a       | j,                  j.                  j1                  H       | j$                  j+                  d`dbc       y | j$                  j(                  r| j$                  j+                  dda       | j$                  j+                  dddec       y # t2        $ r)}P| j$                  j'                  dfPz  D       Y d }P~Py d }P~Pww xY w)gNdefault_langdefault_timezonedefault_themesearch_limitmax_overview_table_sizemax_in_tableserver_check_interval100work_periodshow_technical_errors1history_periodperiod_default
max_periodseverity_color_0severity_color_1severity_color_2severity_color_3severity_color_4severity_color_5severity_name_0severity_name_1severity_name_2severity_name_3severity_name_4severity_name_5custom_color	ok_periodblink_periodproblem_unack_colorproblem_ack_colorok_unack_colorok_ack_colorproblem_unack_styleproblem_ack_styleok_unack_styleok_ack_styleurldiscovery_groupiddisabledmanual	automaticr,   default_inventory_modealert_usrgrpidsnmptrap_logginglogin_attemptslogin_blockvalidate_uri_schemesuri_valid_schemes,r   x_frame_optionsiframe_sandboxing_enablediframe_sandboxing_exceptionsz7.0timeout_zabbix_agenttimeout_simple_checktimeout_snmp_agenttimeout_external_checktimeout_db_monitortimeout_http_agenttimeout_ssh_agenttimeout_telnet_agenttimeout_scripttimeout_browserauditlog_modezI'timeout_zabbix_agent' unsupported in Zabbix server versions prior to 7.0r   zI'timeout_simple_check' unsupported in Zabbix server versions prior to 7.0zG'timeout_snmp_agent' unsupported in Zabbix server versions prior to 7.0zK'timeout_external_check' unsupported in Zabbix server versions prior to 7.0zG'timeout_db_monitor' unsupported in Zabbix server versions prior to 7.0zG'timeout_http_agent' unsupported in Zabbix server versions prior to 7.0zF'timeout_ssh_agent' unsupported in Zabbix server versions prior to 7.0zI'timeout_telnet_agent' unsupported in Zabbix server versions prior to 7.0zC'timeout_script' unsupported in Zabbix server versions prior to 7.0zD'timeout_browser' unsupported in Zabbix server versions prior to 7.0zE'auditlog_mode' is unsupported in Zabbix server versions prior to 7.0connect_timeoutsocket_timeoutmedia_type_test_timeoutitem_test_timeoutscript_timeoutreport_test_timeoutauditlog_enabledanother geomaps_tile_providergeomaps_tile_urlgeomaps_max_zoomgeomaps_attributionz6.2HashiCorp_VaultCyberArk_Vaultvault_providerT)changedz$Successfully updated global settings)r   resultFzSettings are already up to datez$Failed to update global settings: %s)
isinstancestrintboolr$   r(   r6   zabbix_utilshelper_to_numeric_valuer2   listsplitsorthelper_compare_listsr/   joinr   _zbx_api_versionr   r   
check_mode	exit_jsonr   r   updater   )Qr   current_settingsr8   r9   r:   r;   r<   r=   r>   rA   rB   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   frontend_urldiscovery_grouprd   alert_usrgrprf   rg   rh   ri   rj   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   rz   r{   r|   r}   r~   r   r   ry   r   r   r   r   r   paramsr_   _default_inventory_modere   current_uri_valid_schemescompare_result_geomaps_tile_provider_vault_providerr   sQ                                                                                    r   update_settingszSettings.update_settings  sh   TG	SF,,#3N#CC-9F>**C0#'78J'KK1AF-.-- $4_$EE.;F?+,,|$(8(HH-0->F>*137/0'(ABC 9<<S8TF45,,|$(8(HH-0->F>*/6('(?@DH:>67'(?@CG:=67+s+"2="AA,7F=)/6('(?@CG:=67'(?@CG:=67.#.==0%)9:J)KK3A/0.#.==0%)9:J)KK3A/0*c*==,!%5l%CC/9|,*C0>>"23'+;<N+OO5E12*C0>>"23'+;<N+OO5E12*C0>>"23'+;<N+OO5E12*C0>>"23'+;<N+OO5E12*C0>>"23'+;<N+OO5E12*C0>>"23'+;<N+OO5E12/3/"&67H&II0?F,-/3/"&67H&II0?F,-/3/"&67H&II0?F,-/3/"&67H&II0?F,-/3/"&67H&II0?F,-/3/"&67H&II0?F,-,-'73>14~.'73>14~.)S)==+ $4[$AA.7{+,,==.#'7'GG1=~.-s3>>"56*.>?T.UU8K45+S1>>"34(,<=P,QQ6G23.#.>>.1%)9:J)KK3A/0,,>>,/#'7'GG1=~.-t4&'(=>#E8;45'(=>#E8;45+T2$'(;<C6923'(;<C6923.$/!'(89S@36/0'(89S@36/0,-'73>14~.'73>14~.,,#3E#::$0F5M/3/$($>$>$O!#$78<MM2CF./0#6*- 88;=S +' ,'(@AB 8OF34,,3&%)%@%@%NN%1N#$45G/=F+,*D1#'(:;sB5812'(:;sB5812.#.~&*:;K*LL/2>/BF+,+s+==-"&6}&EE0;}-.5''(>?3F9<56'(>?3F9<56+T2,<=P,Q,W,W-) "&&()..0!#11%'@. ~&!+25((;L2MF.//3/"&67H&II0?F,-3T:,'(CDK>A:;'(CDK>A:;6<0'(FGH
 5 6 D112l56II2C8}}%9:/3CDZ3[[=QF#9:2C8}}%9:/3CDZ3[[=QF#9:0#6}}%78-1ABV1WW;MF#784c:}}%;<15EF^5__?UF#;<0#6}}%78-1ABV1WW;MF#780#6}}%78-1ABV1WW;MF#78/5}}%67,0@AT0UU:KF#672C8}}%9:/3CDZ3[[=QF#9:nc2}}^4)-=>N-OO7EF#34os3}}_5*.>?P.QQ8GF#45mT2$+O<C69F?3+O<C69F?3 2C8LL**/z*{2C8LL**/z*{0#6LL**/x*y4c:LL**/|*}0#6LL**/x*y0#6LL**/x*y/5LL**/w*x2C8LL**/z*{nc2LL**/t*uos3LL**/u*vmT2LL**/v*w/3/==1&*:;L*MM4C01.#.==0%)9:J)KK3A/0137==!89/+,EFG =T89+S1==!23(,<=P,QQ6G23.#.==0%)9:J)KK3A/0-s3==!45*.>?T.UU8K45*D1#'(:;sB5812'(:;sB5812/5)>&(I5-/*)-=>U-VV6LF23*C0#'78J'KK1AF-.*C0'(,<=O,PP145E1FF-.-s3&*:;P*QQ4GF01E"l43H3H&IInc2&)$<<.0@A>'O
 '*:;K*LL3B/0|<<**LL**4*8

##**62&& )O '  <<**LL**5*9&&!*K '   	SLL""'MPQ'Q"RR	Ss   z*{= -A{= =	|/|**|/N)	__name__
__module____qualname__r   r$   r(   r2   r6   r    r%   r   r
   r
     s#    I(%QSr%   r
   c                  `   t        j                         } | j                  t        dWi dt        d      dt        d      dt        dg d      dt        d	      d
t        d	      dt        d	      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      dt        d      d t        d      d!t        d      d"t        d      d#t        d      d$t        d      d%t        d      d&t        d      d't        d      d(t        d      d)t        d      d*t        d      d+t        d      d,t        dg d-      d.t        d      d/t        d      d0t        d	      d1t        d      d2t        d      d3t        d4d5      d6t        d      d7t        d      d8t        d      d9t        d      d:t        d      d;t        d      d<t        d      d=t        d      d>t        d      d?t        d      d@t        d      dAt        d      dBt        d      dCt        d      dDt        d      dEt        d      dFt        d      dGt        d      dHt        d      dIt        d      dJt        d      dKt        dg dL      dMt        d      dNt        d      dOt        d      dPt        ddQdRg             t	        | dKdSg dTggdUV      }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d
   }|j
                  d   }|j
                  d   }|j
                  d   }	|j
                  d   }
|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d   }|j
                  d    }|j
                  d!   }|j
                  d"   }|j
                  d#   }|j
                  d$   }|j
                  d%   } |j
                  d&   }!|j
                  d'   }"|j
                  d(   }#|j
                  d)   }$|j
                  d*   }%|j
                  d+   }&|j
                  d,   }'|j
                  d.   }(|j
                  d/   })|j
                  d0   }*|j
                  d1   }+|j
                  d2   },|j
                  d3   }-|j
                  d6   }.|j
                  d7   }/|j
                  d8   }0|j
                  d9   }1|j
                  d:   }2|j
                  d;   }3|j
                  d<   }4|j
                  d=   }5|j
                  d>   }6|j
                  d?   }7|j
                  d@   }8|j
                  dA   }9|j
                  dB   }:|j
                  dC   };|j
                  dD   }<|j
                  dE   }=|j
                  dF   }>|j
                  dG   }?|j
                  dH   }@|j
                  dI   }A|j
                  dJ   }B|j
                  dK   }C|j
                  dM   }D|j
                  dN   }E|j
                  dO   }F|j
                  dP   }Gt        |      }H|Hj                         }I |Hj                  g |I||||||||	|
|||||||||||||||||||||| |!|"|#|$|%|&|'|(|)|*|+|,|-|.|/|0|1|2|3|4|5|6|7|8|9|:|;|<|=|>|?|@|A|B|C|D|E|F|G  y )XNr8   r   )typer9   r:   )z
blue-themez
dark-themezhc-lightzhc-dark)r   choicesr;   r   r<   r=   r>   r   rA   rB   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r   r   rd   r`   r   rf   rg   rh   ri   rj   r   )r   elementsrl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   rz   r{   r|   r}   r~   r   r   ry   r   )zOpenStreetMap.MapnikOpenTopoMapzStamen.TonerLitezStamen.TerrainzUSGS.USTopozUSGS.USImageryr   r   r   r   r   r   r   r   )r   r   r   T)argument_specrequired_ifsupports_check_moder   )	r   zabbix_common_argument_specr   dictr   r   r
   r   r   )Jr   moduler8   r9   r:   r;   r<   r=   r>   rA   rB   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r   r   rd   r   rf   rg   rh   ri   rj   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   rz   r{   r|   r}   r~   r   r   ry   r   r   r   r   r   r   r   sJ                                                                             r   mainr   1  s    <<>M X	
5)X	
!u-X	
 $WX	
 5)X	
 %)e$4X	
 5)X	
 #'F"3X	
 %(X	
 #'F"3X	
  U+X	
  U+X	
 'X	
 "u-X	
  "u-!X	
" "u-#X	
$ "u-%X	
& "u-'X	
( "u-)X	
* !e,+X	
, !e,-X	
. !e,/X	
0 !e,1X	
2 !e,3X	
4 !e,5X	
6 6*7X	
8 &9X	
: 5);X	
< !%% 0=X	
> #.?X	
@  U+AX	
B 5)CX	
D !%& 1EX	
F #/GX	
H  V,IX	
J 6*KX	
L 5)MX	
N !e,OX	
P $($G$QX	
V 5)WX	
X "v.YX	
Z  U+[X	
\ %(]X	
^ "&6!2_X	
` #?aX	
b !e,cX	
d '+&7eX	
f *.5)9gX	
h "&5!1iX	
j "&5!1kX	
l  $/mX	
n $(U#3oX	
p  $/qX	
r  $/sX	
t #.uX	
v "&5!1wX	
x  U+yX	
z !e,{X	
| !e,}X	
~  U+X	
@ %)e$4AX	
B #.CX	
D  U+EX	
F !%% 0GX	
H "v.IX	
J F+KX	
L #'#MX	
d "u-eX	
f "u-gX	
h !%% 0iX	
j  %68H$IkX	
Zv # (O
 !
F ==0L}}%78MM/2M==0L$mm,EF==0L"MM*AB--.K"MM*AB]]#34N]]#34N|,J}}%78}}%78}}%78}}%78}}%78}}%78mm$56Omm$56Omm$56Omm$56Omm$56Omm$56O==0Lk*I==0L --(=>&9:]]#34N==0L --(=>&9:]]#34N==0L==0Lmm$56O#]]+CD==0L}}%78]]#34N--.K!==)?@&9:mm$56O &.I J#)==1O#P !==)?@!==)?@';<#]]+CD';<';<&9:!==)?@]]#34Nmm$56Omm$56O]]#34N$mm,EF&9:]]#34N --(=>}}%78MM/2M"MM*AB}}%78}}%78 --(=>]]#34NH,,.H HHH 	H 		H
 	H 	 H 	H 	H 	H 	H 	H 	H 	H 	H 	H  	!H" 	#H$ 	%H& 	'H( 	)H* 	+H, 	-H. 	/H0 	1H2 	3H4 	5H6 	7H8 	9H: 	;H< 	=H> 	?H@ 	AHB 	CHD 	EHF 	GHH 	IHJ 	KHL 	MHN 	OHP 	QHR 	SHT 	UHV 	WHX 	YHZ 	[H\ 	]H^ 	"_H` 	%aHb 	cHd 	eHf 	gHh 	iHj 	kHl 	mHn 	oHp 	qHr 	sHt 	uHv 	wHx 	yHz 	 {H| 	}H~ 	H@ 	AHB 	CHD 	EHF 	GHH 	IHJ 	KHL 	MHN 	OHr%   __main__)
__future__r   r   r   r   __metaclass__DOCUMENTATIONEXAMPLESRETURNr   ansible.module_utils.basicr   >ansible_collections.community.zabbix.plugins.module_utils.baser   #ansible.module_utils.compat.versionr   Aansible_collections.community.zabbix.plugins.module_utils.helpers	communityzabbixpluginsmodule_utilshelpersr   r
   r   r   r   r%   r   <module>r      sn    A @zx D
 
 4 U < X X XsSz sSl{| zF r%   