From 9ad592965a84b2e890d8bba1683e34dbcfa9d640 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Sun, 19 Aug 2012 22:04:18 -0400 Subject: [PATCH] Add docs for 'local_action' (ansible:#905). Oh, and fix 'make viewdocs'. --- build-site.py | 2 +- rst/playbooks2.rst | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/build-site.py b/build-site.py index 525ba35c4f..b0dfe9d11b 100755 --- a/build-site.py +++ b/build-site.py @@ -93,5 +93,5 @@ if __name__ == '__main__': if "view" in sys.argv: import webbrowser - if not webbrowser.open('html/index.html'): + if not webbrowser.open('index.html'): print >> sys.stderr, "Could not open on your webbrowser." diff --git a/rst/playbooks2.rst b/rst/playbooks2.rst index 89865248b8..b30541e5db 100644 --- a/rst/playbooks2.rst +++ b/rst/playbooks2.rst @@ -491,7 +491,6 @@ a good idea:: serial: 5 tasks: - - name: take out of load balancer pool action: command /usr/bin/take_out_of_pool $inventory_hostname delegate_to: 127.0.0.1 @@ -503,6 +502,22 @@ a good idea:: action: command /usr/bin/add_back_to_pool $inventory_hostname delegate_to: 127.0.0.1 + +Here is the same playbook as above, but using the shorthand syntax, +'local_action', for delegating to 127.0.0.1:: + + --- + # ... + tasks: + - name: take out of load balancer pool + local_action: command /usr/bin/take_out_of_pool $inventory_hostname + + # ... + + - name: add back to load balancer pool + local_action: command /usr/bin/add_back_to_pool $inventory_hostname + + Style Points ````````````