From 9f8c4d716a693a0ce56de84ae5f80f997cb7e981 Mon Sep 17 00:00:00 2001 From: Aidan Hobson Sayers Date: Thu, 22 Oct 2015 12:07:54 +0100 Subject: [PATCH] Document setting environment variables in a playbook --- docsite/rst/playbooks_environment.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docsite/rst/playbooks_environment.rst b/docsite/rst/playbooks_environment.rst index 11334fdb2f0..da050f007d5 100644 --- a/docsite/rst/playbooks_environment.rst +++ b/docsite/rst/playbooks_environment.rst @@ -33,6 +33,17 @@ The environment can also be stored in a variable, and accessed like so:: - apt: name=cobbler state=installed environment: proxy_env +You can also use it at a playbook level:: + + - hosts: testhost + + roles: + - php + - nginx + + environment: + http_proxy: http://proxy.example.com:8080 + While just proxy settings were shown above, any number of settings can be supplied. The most logical place to define an environment hash might be a group_vars file, like so::