From f4a4492992f944a77357a8dd238c2ee283f1ce20 Mon Sep 17 00:00:00 2001 From: Fabio Alessandro Locati Date: Thu, 1 Dec 2016 12:26:22 +0000 Subject: [PATCH] bigpanda: Use delegate_to (over local_action) (#3586) * Fix YAML, naed variables * Fix spaces --- .../modules/extras/monitoring/bigpanda.py | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/extras/monitoring/bigpanda.py b/lib/ansible/modules/extras/monitoring/bigpanda.py index 86b64762772..4112ea05bb0 100644 --- a/lib/ansible/modules/extras/monitoring/bigpanda.py +++ b/lib/ansible/modules/extras/monitoring/bigpanda.py @@ -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 ''' # ===========================================