ansible / ansible.builtin / v2.8.13 / 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.8.13) — module
pip
Install with pip install ansible==2.8.13
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. 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. 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 http_login_user: description: - Basic Auth login required: false type: str http_login_password: description: - Basic Auth password required: false type: str