mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-20 11:50:22 -07:00
Fix Ansible documentation in part of example formatting (#334)
This commit is contained in:
parent
58ed77e851
commit
983d937b7b
58 changed files with 376 additions and 353 deletions
|
@ -68,22 +68,22 @@ options:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# List ongoing maintenance windows using a token
|
||||
- pagerduty:
|
||||
- name: List ongoing maintenance windows using a token
|
||||
pagerduty:
|
||||
name: companyabc
|
||||
token: xxxxxxxxxxxxxx
|
||||
state: ongoing
|
||||
|
||||
# Create a 1 hour maintenance window for service FOO123
|
||||
- pagerduty:
|
||||
- name: Create a 1 hour maintenance window for service FOO123
|
||||
pagerduty:
|
||||
name: companyabc
|
||||
user: example@example.com
|
||||
token: yourtoken
|
||||
state: running
|
||||
service: FOO123
|
||||
|
||||
# Create a 5 minute maintenance window for service FOO123
|
||||
- pagerduty:
|
||||
- name: Create a 5 minute maintenance window for service FOO123
|
||||
pagerduty:
|
||||
name: companyabc
|
||||
token: xxxxxxxxxxxxxx
|
||||
hours: 0
|
||||
|
@ -92,8 +92,8 @@ EXAMPLES = '''
|
|||
service: FOO123
|
||||
|
||||
|
||||
# Create a 4 hour maintenance window for service FOO123 with the description "deployment".
|
||||
- pagerduty:
|
||||
- name: Create a 4 hour maintenance window for service FOO123 with the description "deployment"
|
||||
pagerduty:
|
||||
name: companyabc
|
||||
user: example@example.com
|
||||
state: running
|
||||
|
@ -102,26 +102,28 @@ EXAMPLES = '''
|
|||
desc: deployment
|
||||
register: pd_window
|
||||
|
||||
# Delete the previous maintenance window
|
||||
- pagerduty:
|
||||
- name: Delete the previous maintenance window
|
||||
pagerduty:
|
||||
name: companyabc
|
||||
user: example@example.com
|
||||
state: absent
|
||||
window_id: '{{ pd_window.result.maintenance_window.id }}'
|
||||
|
||||
# Delete a maintenance window from a separate playbook than its creation, and if it is the only existing maintenance window.
|
||||
- pagerduty:
|
||||
# Delete a maintenance window from a separate playbook than its creation,
|
||||
# and if it is the only existing maintenance window
|
||||
- name: Check
|
||||
pagerduty:
|
||||
requester_id: XXXXXXX
|
||||
token: yourtoken
|
||||
state: ongoing
|
||||
register: pd_window
|
||||
|
||||
- pagerduty:
|
||||
- name: Delete
|
||||
pagerduty:
|
||||
requester_id: XXXXXXX
|
||||
token: yourtoken
|
||||
state: absent
|
||||
window_id: "{{ pd_window.result.maintenance_windows[0].id }}"
|
||||
|
||||
'''
|
||||
|
||||
import datetime
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue