mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
bigpanda: Use delegate_to (over local_action) (#3586)
* Fix YAML, naed variables * Fix spaces
This commit is contained in:
parent
f8f0893922
commit
f4a4492992
1 changed files with 24 additions and 5 deletions
|
@ -79,15 +79,34 @@ requirements: [ ]
|
|||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
- bigpanda: component=myapp version=1.3 token={{ bigpanda_token }} state=started
|
||||
- bigpanda:
|
||||
component: myapp
|
||||
version: 1.3
|
||||
token: '{{ bigpanda_token }}'
|
||||
state: started
|
||||
...
|
||||
- bigpanda: component=myapp version=1.3 token={{ bigpanda_token }} state=finished
|
||||
- bigpanda:
|
||||
component: myapp
|
||||
version: 1.3
|
||||
token: '{{ bigpanda_token }}'
|
||||
state: finished
|
||||
|
||||
If outside servers aren't reachable from your machine, use local_action and override hosts:
|
||||
- local_action: bigpanda component=myapp version=1.3 token={{ bigpanda_token }} hosts={{ansible_hostname}} state=started
|
||||
# If outside servers aren't reachable from your machine, use delegate_to and override hosts:
|
||||
- bigpanda:
|
||||
component: myapp
|
||||
version: 1.3
|
||||
token: '{{ bigpanda_token }}'
|
||||
hosts: '{{ ansible_hostname }}'
|
||||
state: started
|
||||
delegate_to: localhost
|
||||
register: deployment
|
||||
...
|
||||
- local_action: bigpanda component=deployment.component version=deployment.version token=deployment.token state=finished
|
||||
- bigpanda:
|
||||
component: '{{ deployment.component }}'
|
||||
version: '{{ deployment.version }}'
|
||||
token: '{{ deployment.token }}'
|
||||
state: finished
|
||||
delegate_to: localhost
|
||||
'''
|
||||
|
||||
# ===========================================
|
||||
|
|
Loading…
Reference in a new issue