This module will let you create PagerDuty maintenance windows
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| desc | no | Created by Ansible | Short description of maintenance window. |
|
| hours | no | 1 | Length of maintenance window in hours. |
|
| minutes (added in 1.8)
| no | Maintenance window in minutes (this is added to the hours). |
||
| name | yes | PagerDuty unique subdomain. |
||
| passwd | yes | PagerDuty user password. |
||
| requester_id (added in 1.8)
| yes | ID of user making the request. Only needed when using a token and creating a maintenance_window. |
||
| service | no |
A comma separated list of PagerDuty service IDs. aliases: services
|
||
| state | yes |
| Create a maintenance window or get a list of ongoing windows. |
|
| token (added in 1.8)
| yes | A pagerduty token, generated on the pagerduty site. Can be used instead of user/passwd combination. |
||
| user | yes | PagerDuty user ID. |
||
| validate_certs (added in 1.5.1)
| no | yes |
| If no, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. |
# List ongoing maintenance windows using a user/passwd
- pagerduty: name=companyabc [email protected] 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
[email protected]
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
[email protected]
passwd=password123
state=running
service=FOO123
hours=4
desc=deployment
register: pd_window
# Delete the previous maintenance window
- pagerduty: name=companyabc
[email protected]
passwd=password123
state=absent
service={{ pd_window.result.maintenance_window.id }}
For more information on what this means please read Extras Modules
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, developing_test_pr and Developing Modules.
© 2012–2016 Michael DeHaan
© 2016 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/pagerduty_module.html