ansible / ansible.builtin / v2.5.6 / module / pagerduty Create PagerDuty maintenance windows | "added in version" 1.2 of ansible.builtin" Authors: Andrew Newdigate (@suprememoocow), Dylan Silva (@thaumos), Justin Johns, Bruce Pennypacker preview | supported by communityansible.builtin.pagerduty (v2.5.6) — module
pip
Install with pip install ansible==2.5.6
This module will let you create PagerDuty maintenance windows
# List ongoing maintenance windows using a user/passwd - pagerduty: name: companyabc user: example@example.com passwd: password123 state: ongoing
# List ongoing maintenance windows using a token - pagerduty: name: companyabc token: xxxxxxxxxxxxxx state: ongoing
# Create a 1 hour maintenance window for service FOO123, using a user/passwd - pagerduty: name: companyabc user: example@example.com passwd: password123 state: running service: FOO123
# Create a 5 minute maintenance window for service FOO123, using a token - pagerduty: name: companyabc token: xxxxxxxxxxxxxx hours: 0 minutes: 5 state: running service: FOO123
# Create a 4 hour maintenance window for service FOO123 with the description "deployment". - pagerduty: name: companyabc user: example@example.com passwd: password123 state: running service: FOO123 hours: 4 desc: deployment register: pd_window
# Delete the previous maintenance window - pagerduty: name: companyabc user: example@example.com passwd: password123 state: absent service: '{{ pd_window.result.maintenance_window.id }}'
desc: aliases: [] choices: [] default: Created by Ansible description: - Short description of maintenance window. required: false name: aliases: [] choices: [] default: null description: - PagerDuty unique subdomain. required: true user: aliases: [] choices: [] default: null description: - PagerDuty user ID. required: true hours: aliases: [] choices: [] default: 1 description: - Length of maintenance window in hours. required: false state: aliases: [] choices: - running - started - ongoing - absent default: null description: - Create a maintenance window or get a list of ongoing windows. required: true token: aliases: [] choices: [] default: null description: - A pagerduty token, generated on the pagerduty site. Can be used instead of user/passwd combination. required: true version_added: '1.8' version_added_collection: ansible.builtin passwd: aliases: [] choices: [] default: null description: - PagerDuty user password. required: true minutes: aliases: [] choices: [] default: 0 description: - Maintenance window in minutes (this is added to the hours). required: false version_added: '1.8' version_added_collection: ansible.builtin service: aliases: - services choices: [] default: null description: - A comma separated list of PagerDuty service IDs. required: false requester_id: aliases: [] choices: [] default: null description: - ID of user making the request. Only needed when using a token and creating a maintenance_window. required: true version_added: '1.8' version_added_collection: ansible.builtin validate_certs: choices: - 'yes' - 'no' default: 'yes' description: - If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. required: false version_added: 1.5.1 version_added_collection: ansible.builtin