ansible / ansible.builtin / v2.4.4.0-1 / 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.4.4.0-1) — module
pip
Install with pip install ansible==2.4.4.0.post1
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. required: false minutes: default: 10 description: - Length of maintenance window in minutes. required: false timeout: default: 10 description: - The timeout of API request (seconds). required: false version_added: '2.1' version_added_collection: ansible.builtin host_names: aliases: - host_name default: null 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. required: false login_user: description: - Zabbix user name. required: true server_url: aliases: - url default: null description: - Url of Zabbix server, with protocol (http or https). C(url) is an alias for C(server_url). required: true host_groups: aliases: - host_group default: null 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. required: false collect_data: default: 'true' description: - Type of maintenance. With data collection, or without. required: false login_password: description: - Zabbix user password. required: true http_login_user: default: None description: - Basic Auth login required: false version_added: '2.1' version_added_collection: ansible.builtin http_login_password: default: None description: - Basic Auth password required: false version_added: '2.1' version_added_collection: ansible.builtin