mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-09 09:49:09 -07:00
Native YAML (#3581)
This commit is contained in:
parent
f85fd14242
commit
c40bb574c6
1 changed files with 36 additions and 25 deletions
|
@ -117,43 +117,54 @@ options:
|
||||||
|
|
||||||
EXAMPLES='''
|
EXAMPLES='''
|
||||||
# List ongoing maintenance windows using a user/passwd
|
# List ongoing maintenance windows using a user/passwd
|
||||||
- pagerduty: name=companyabc user=example@example.com passwd=password123 state=ongoing
|
- pagerduty:
|
||||||
|
name: companyabc
|
||||||
|
user: example@example.com
|
||||||
|
passwd: password123
|
||||||
|
state: ongoing
|
||||||
|
|
||||||
# List ongoing maintenance windows using a token
|
# List ongoing maintenance windows using a token
|
||||||
- pagerduty: name=companyabc token=xxxxxxxxxxxxxx state=ongoing
|
- pagerduty:
|
||||||
|
name: companyabc
|
||||||
|
token: xxxxxxxxxxxxxx
|
||||||
|
state: ongoing
|
||||||
|
|
||||||
# Create a 1 hour maintenance window for service FOO123, using a user/passwd
|
# Create a 1 hour maintenance window for service FOO123, using a user/passwd
|
||||||
- pagerduty: name=companyabc
|
- pagerduty:
|
||||||
user=example@example.com
|
name: companyabc
|
||||||
passwd=password123
|
user: example@example.com
|
||||||
state=running
|
passwd: password123
|
||||||
service=FOO123
|
state: running
|
||||||
|
service: FOO123
|
||||||
|
|
||||||
# Create a 5 minute maintenance window for service FOO123, using a token
|
# Create a 5 minute maintenance window for service FOO123, using a token
|
||||||
- pagerduty: name=companyabc
|
- pagerduty:
|
||||||
token=xxxxxxxxxxxxxx
|
name: companyabc
|
||||||
hours=0
|
token: xxxxxxxxxxxxxx
|
||||||
minutes=5
|
hours: 0
|
||||||
state=running
|
minutes: 5
|
||||||
service=FOO123
|
state: running
|
||||||
|
service: FOO123
|
||||||
|
|
||||||
|
|
||||||
# Create a 4 hour maintenance window for service FOO123 with the description "deployment".
|
# Create a 4 hour maintenance window for service FOO123 with the description "deployment".
|
||||||
- pagerduty: name=companyabc
|
- pagerduty:
|
||||||
user=example@example.com
|
name: companyabc
|
||||||
passwd=password123
|
user: example@example.com
|
||||||
state=running
|
passwd: password123
|
||||||
service=FOO123
|
state: running
|
||||||
hours=4
|
service: FOO123
|
||||||
desc=deployment
|
hours: 4
|
||||||
|
desc: deployment
|
||||||
register: pd_window
|
register: pd_window
|
||||||
|
|
||||||
# Delete the previous maintenance window
|
# Delete the previous maintenance window
|
||||||
- pagerduty: name=companyabc
|
- pagerduty:
|
||||||
user=example@example.com
|
name: companyabc
|
||||||
passwd=password123
|
user: example@example.com
|
||||||
state=absent
|
passwd: password123
|
||||||
service={{ pd_window.result.maintenance_window.id }}
|
state: absent
|
||||||
|
service: '{{ pd_window.result.maintenance_window.id }}'
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue