mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-19 19:30:22 -07:00
Fix examples formatting (#345)
This commit is contained in:
parent
31ba39cac4
commit
a7c830f49d
148 changed files with 330 additions and 334 deletions
|
@ -139,32 +139,32 @@ options:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: register nginx service with the local consul agent
|
||||
- name: Register nginx service with the local consul agent
|
||||
consul:
|
||||
service_name: nginx
|
||||
service_port: 80
|
||||
|
||||
- name: register nginx service with curl check
|
||||
- name: Register nginx service with curl check
|
||||
consul:
|
||||
service_name: nginx
|
||||
service_port: 80
|
||||
script: curl http://localhost
|
||||
interval: 60s
|
||||
|
||||
- name: register nginx with an http check
|
||||
- name: Register nginx with an http check
|
||||
consul:
|
||||
service_name: nginx
|
||||
service_port: 80
|
||||
interval: 60s
|
||||
http: http://localhost:80/status
|
||||
|
||||
- name: register external service nginx available at 10.1.5.23
|
||||
- name: Register external service nginx available at 10.1.5.23
|
||||
consul:
|
||||
service_name: nginx
|
||||
service_port: 80
|
||||
service_address: 10.1.5.23
|
||||
|
||||
- name: register nginx with some service tags
|
||||
- name: Register nginx with some service tags
|
||||
consul:
|
||||
service_name: nginx
|
||||
service_port: 80
|
||||
|
@ -172,26 +172,26 @@ EXAMPLES = '''
|
|||
- prod
|
||||
- webservers
|
||||
|
||||
- name: remove nginx service
|
||||
- name: Remove nginx service
|
||||
consul:
|
||||
service_name: nginx
|
||||
state: absent
|
||||
|
||||
- name: register celery worker service
|
||||
- name: Register celery worker service
|
||||
consul:
|
||||
service_name: celery-worker
|
||||
tags:
|
||||
- prod
|
||||
- worker
|
||||
|
||||
- name: create a node level check to test disk usage
|
||||
- name: Create a node level check to test disk usage
|
||||
consul:
|
||||
check_name: Disk usage
|
||||
check_id: disk_usage
|
||||
script: /opt/disk_usage.py
|
||||
interval: 5m
|
||||
|
||||
- name: register an http check against a service that's already registered
|
||||
- name: Register an http check against a service that's already registered
|
||||
consul:
|
||||
check_name: nginx-check2
|
||||
check_id: nginx-check2
|
||||
|
|
|
@ -76,7 +76,7 @@ requirements:
|
|||
'''
|
||||
|
||||
EXAMPLES = """
|
||||
- name: create an ACL with rules
|
||||
- name: Create an ACL with rules
|
||||
consul_acl:
|
||||
host: consul1.example.com
|
||||
mgmt_token: some_management_acl
|
||||
|
@ -87,7 +87,7 @@ EXAMPLES = """
|
|||
- key: "private/foo"
|
||||
policy: deny
|
||||
|
||||
- name: create an ACL with a specific token
|
||||
- name: Create an ACL with a specific token
|
||||
consul_acl:
|
||||
host: consul1.example.com
|
||||
mgmt_token: some_management_acl
|
||||
|
@ -97,7 +97,7 @@ EXAMPLES = """
|
|||
- key: "foo"
|
||||
policy: read
|
||||
|
||||
- name: update the rules associated to an ACL token
|
||||
- name: Update the rules associated to an ACL token
|
||||
consul_acl:
|
||||
host: consul1.example.com
|
||||
mgmt_token: some_management_acl
|
||||
|
@ -121,7 +121,7 @@ EXAMPLES = """
|
|||
- session: "standup"
|
||||
policy: write
|
||||
|
||||
- name: remove a token
|
||||
- name: Remove a token
|
||||
consul_acl:
|
||||
host: consul1.example.com
|
||||
mgmt_token: some_management_acl
|
||||
|
|
|
@ -109,7 +109,7 @@ options:
|
|||
EXAMPLES = '''
|
||||
# If the key does not exist, the value associated to the "data" property in `retrieved_key` will be `None`
|
||||
# If the key value is empty string, `retrieved_key["data"]["Value"]` will be `None`
|
||||
- name: retrieve a value from the key/value store
|
||||
- name: Retrieve a value from the key/value store
|
||||
consul_kv:
|
||||
key: somekey
|
||||
register: retrieved_key
|
||||
|
|
|
@ -97,27 +97,27 @@ options:
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- name: register basic session with consul
|
||||
- name: Register basic session with consul
|
||||
consul_session:
|
||||
name: session1
|
||||
|
||||
- name: register a session with an existing check
|
||||
- name: Register a session with an existing check
|
||||
consul_session:
|
||||
name: session_with_check
|
||||
checks:
|
||||
- existing_check_name
|
||||
|
||||
- name: register a session with lock_delay
|
||||
- name: Register a session with lock_delay
|
||||
consul_session:
|
||||
name: session_with_delay
|
||||
delay: 20s
|
||||
|
||||
- name: retrieve info about session by id
|
||||
- name: Retrieve info about session by id
|
||||
consul_session:
|
||||
id: session_id
|
||||
state: info
|
||||
|
||||
- name: retrieve active sessions
|
||||
- name: Retrieve active sessions
|
||||
consul_session:
|
||||
state: list
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue