ansible / ansible.builtin / v2.7.9 / module / zabbix_maintenance Create Zabbix maintenance windows | "added in version" 1.8 of ansible.builtin" Authors: Alexander Bulimov (@abulimov) preview | supported by communityansible.builtin.zabbix_maintenance (v2.7.9) — module
pip
Install with pip install ansible==2.7.9
This module will let you create Zabbix maintenance windows.
- name: Create a named maintenance window for host www1 for 90 minutes zabbix_maintenance: name: Update of www1 host_name: www1.example.com state: present minutes: 90 server_url: https://monitoring.example.com login_user: ansible login_password: pAsSwOrD
- name: Create a named maintenance window for host www1 and host groups Office and Dev zabbix_maintenance: name: Update of www1 host_name: www1.example.com host_groups: - Office - Dev state: present server_url: https://monitoring.example.com login_user: ansible login_password: pAsSwOrD
- name: Create a named maintenance window for hosts www1 and db1, without data collection. zabbix_maintenance: name: update host_names: - www1.example.com - db1.example.com state: present collect_data: False server_url: https://monitoring.example.com login_user: ansible login_password: pAsSwOrD
- name: Remove maintenance window by name zabbix_maintenance: name: Test1 state: absent server_url: https://monitoring.example.com login_user: ansible login_password: pAsSwOrD
desc: default: Created by Ansible description: - Short description of maintenance window. required: true name: description: - Unique name of maintenance window. required: true state: choices: - present - absent default: present description: - Create or remove a maintenance window. Maintenance window to remove is identified by name. minutes: default: 10 description: - Length of maintenance window in minutes. timeout: default: 10 description: - The timeout of API request (seconds). type: int host_names: aliases: - host_name description: - Hosts to manage maintenance window for. Separate multiple hosts with commas. C(host_name) is an alias for C(host_names). B(Required) option when C(state) is I(present) and no C(host_groups) specified. login_user: description: - Zabbix user name. required: true type: str server_url: aliases: - url description: - URL of Zabbix server, with protocol (http or https). C(url) is an alias for C(server_url). required: true type: str host_groups: aliases: - host_group description: - Host groups to manage maintenance window for. Separate multiple groups with commas. C(host_group) is an alias for C(host_groups). B(Required) option when C(state) is I(present) and no C(host_names) specified. collect_data: default: 'yes' description: - Type of maintenance. With data collection, or without. type: bool login_password: description: - Zabbix user password. required: true type: str validate_certs: default: true description: - If set to False, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. type: bool http_login_user: description: - Basic Auth login type: str http_login_password: description: - Basic Auth password type: str