community / community.zabbix / 0.2.0 / module / zabbix_maintenance Create Zabbix maintenance windows Authors: Alexander Bulimov (@abulimov)community.zabbix.zabbix_maintenance (0.2.0) — module
Install with ansible-galaxy collection install community.zabbix:==0.2.0
collections: - name: community.zabbix version: 0.2.0
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. type: str name: description: - Unique name of maintenance window. required: true type: str state: choices: - present - absent default: present description: - Create or remove a maintenance window. Maintenance window to remove is identified by name. type: str minutes: default: 10 description: - Length of maintenance window in minutes. type: int timeout: default: 10 description: - The timeout of API request (seconds). type: int host_names: aliases: - host_name description: - Hosts to manage maintenance window for. - B(Required) option when I(state=present) and I(host_groups) is not used. elements: str type: list 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. - B(Required) option when I(state=present) and I(host_names) is not used. elements: str type: list 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