mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 14:20:22 -07:00
modules: fix examples to use FQCN (#644)
* modules: fix examples to use FQCN * fix * fix * fix
This commit is contained in:
parent
8b92e0454d
commit
41cfdda6a3
533 changed files with 2130 additions and 2130 deletions
|
@ -140,32 +140,32 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Register nginx service with the local consul agent
|
||||
consul:
|
||||
community.general.consul:
|
||||
service_name: nginx
|
||||
service_port: 80
|
||||
|
||||
- name: Register nginx service with curl check
|
||||
consul:
|
||||
community.general.consul:
|
||||
service_name: nginx
|
||||
service_port: 80
|
||||
script: curl http://localhost
|
||||
interval: 60s
|
||||
|
||||
- name: Register nginx with an http check
|
||||
consul:
|
||||
community.general.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
|
||||
consul:
|
||||
community.general.consul:
|
||||
service_name: nginx
|
||||
service_port: 80
|
||||
service_address: 10.1.5.23
|
||||
|
||||
- name: Register nginx with some service tags
|
||||
consul:
|
||||
community.general.consul:
|
||||
service_name: nginx
|
||||
service_port: 80
|
||||
tags:
|
||||
|
@ -173,26 +173,26 @@ EXAMPLES = '''
|
|||
- webservers
|
||||
|
||||
- name: Remove nginx service
|
||||
consul:
|
||||
community.general.consul:
|
||||
service_name: nginx
|
||||
state: absent
|
||||
|
||||
- name: Register celery worker service
|
||||
consul:
|
||||
community.general.consul:
|
||||
service_name: celery-worker
|
||||
tags:
|
||||
- prod
|
||||
- worker
|
||||
|
||||
- name: Create a node level check to test disk usage
|
||||
consul:
|
||||
community.general.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
|
||||
consul:
|
||||
community.general.consul:
|
||||
check_name: nginx-check2
|
||||
check_id: nginx-check2
|
||||
service_id: nginx
|
||||
|
|
|
@ -77,7 +77,7 @@ requirements:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: Create an ACL with rules
|
||||
consul_acl:
|
||||
community.general.consul_acl:
|
||||
host: consul1.example.com
|
||||
mgmt_token: some_management_acl
|
||||
name: Foo access
|
||||
|
@ -88,7 +88,7 @@ EXAMPLES = """
|
|||
policy: deny
|
||||
|
||||
- name: Create an ACL with a specific token
|
||||
consul_acl:
|
||||
community.general.consul_acl:
|
||||
host: consul1.example.com
|
||||
mgmt_token: some_management_acl
|
||||
name: Foo access
|
||||
|
@ -98,7 +98,7 @@ EXAMPLES = """
|
|||
policy: read
|
||||
|
||||
- name: Update the rules associated to an ACL token
|
||||
consul_acl:
|
||||
community.general.consul_acl:
|
||||
host: consul1.example.com
|
||||
mgmt_token: some_management_acl
|
||||
name: Foo access
|
||||
|
@ -122,7 +122,7 @@ EXAMPLES = """
|
|||
policy: write
|
||||
|
||||
- name: Remove a token
|
||||
consul_acl:
|
||||
community.general.consul_acl:
|
||||
host: consul1.example.com
|
||||
mgmt_token: some_management_acl
|
||||
token: 172bd5c8-9fe9-11e4-b1b0-3c15c2c9fd5e
|
||||
|
|
|
@ -110,27 +110,27 @@ 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
|
||||
consul_kv:
|
||||
community.general.consul_kv:
|
||||
key: somekey
|
||||
register: retrieved_key
|
||||
|
||||
- name: Add or update the value associated with a key in the key/value store
|
||||
consul_kv:
|
||||
community.general.consul_kv:
|
||||
key: somekey
|
||||
value: somevalue
|
||||
|
||||
- name: Remove a key from the store
|
||||
consul_kv:
|
||||
community.general.consul_kv:
|
||||
key: somekey
|
||||
state: absent
|
||||
|
||||
- name: Add a node to an arbitrary group via consul inventory (see consul.ini)
|
||||
consul_kv:
|
||||
community.general.consul_kv:
|
||||
key: ansible/groups/dc1/somenode
|
||||
value: top_secret
|
||||
|
||||
- name: Register a key/value pair with an associated session
|
||||
consul_kv:
|
||||
community.general.consul_kv:
|
||||
key: stg/node/server_birthday
|
||||
value: 20160509
|
||||
session: "{{ sessionid }}"
|
||||
|
|
|
@ -98,27 +98,27 @@ options:
|
|||
|
||||
EXAMPLES = '''
|
||||
- name: Register basic session with consul
|
||||
consul_session:
|
||||
community.general.consul_session:
|
||||
name: session1
|
||||
|
||||
- name: Register a session with an existing check
|
||||
consul_session:
|
||||
community.general.consul_session:
|
||||
name: session_with_check
|
||||
checks:
|
||||
- existing_check_name
|
||||
|
||||
- name: Register a session with lock_delay
|
||||
consul_session:
|
||||
community.general.consul_session:
|
||||
name: session_with_delay
|
||||
delay: 20s
|
||||
|
||||
- name: Retrieve info about session by id
|
||||
consul_session:
|
||||
community.general.consul_session:
|
||||
id: session_id
|
||||
state: info
|
||||
|
||||
- name: Retrieve active sessions
|
||||
consul_session:
|
||||
community.general.consul_session:
|
||||
state: list
|
||||
'''
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ author:
|
|||
|
||||
EXAMPLES = """
|
||||
- name: Store a value "bar" under the key "foo" for a cluster located "http://localhost:2379"
|
||||
etcd3:
|
||||
community.general.etcd3:
|
||||
key: "foo"
|
||||
value: "baz3"
|
||||
host: "localhost"
|
||||
|
@ -75,7 +75,7 @@ EXAMPLES = """
|
|||
state: "present"
|
||||
|
||||
- name: Authenticate using user/password combination with a timeout of 10 seconds
|
||||
etcd3:
|
||||
community.general.etcd3:
|
||||
key: "foo"
|
||||
value: "baz3"
|
||||
state: "present"
|
||||
|
@ -84,7 +84,7 @@ EXAMPLES = """
|
|||
timeout: 10
|
||||
|
||||
- name: Authenticate using TLS certificates
|
||||
etcd3:
|
||||
community.general.etcd3:
|
||||
key: "foo"
|
||||
value: "baz3"
|
||||
state: "present"
|
||||
|
|
|
@ -43,7 +43,7 @@ EXAMPLES = '''
|
|||
gather_facts: no
|
||||
tasks:
|
||||
- name: Get cluster state
|
||||
pacemaker_cluster:
|
||||
community.general.pacemaker_cluster:
|
||||
state: online
|
||||
'''
|
||||
|
||||
|
|
|
@ -47,39 +47,39 @@ author: "Trey Perry (@treyperry)"
|
|||
|
||||
EXAMPLES = """
|
||||
- name: Creating or updating a znode with a given value
|
||||
znode:
|
||||
community.general.znode:
|
||||
hosts: 'localhost:2181'
|
||||
name: /mypath
|
||||
value: myvalue
|
||||
state: present
|
||||
|
||||
- name: Getting the value and stat structure for a znode
|
||||
znode:
|
||||
community.general.znode:
|
||||
hosts: 'localhost:2181'
|
||||
name: /mypath
|
||||
op: get
|
||||
|
||||
- name: Listing a particular znode's children
|
||||
znode:
|
||||
community.general.znode:
|
||||
hosts: 'localhost:2181'
|
||||
name: /zookeeper
|
||||
op: list
|
||||
|
||||
- name: Waiting 20 seconds for a znode to appear at path /mypath
|
||||
znode:
|
||||
community.general.znode:
|
||||
hosts: 'localhost:2181'
|
||||
name: /mypath
|
||||
op: wait
|
||||
timeout: 20
|
||||
|
||||
- name: Deleting a znode at path /mypath
|
||||
znode:
|
||||
community.general.znode:
|
||||
hosts: 'localhost:2181'
|
||||
name: /mypath
|
||||
state: absent
|
||||
|
||||
- name: Creating or updating a znode with a given value on a remote Zookeeper
|
||||
znode:
|
||||
community.general.znode:
|
||||
hosts: 'my-zookeeper-node:2181'
|
||||
name: /mypath
|
||||
value: myvalue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue