From 87dde862bd5b93900a3f1db1d99962f89e160705 Mon Sep 17 00:00:00 2001 From: eroldan Date: Mon, 13 Apr 2015 16:21:08 -0300 Subject: [PATCH] Fixed wrong example of 'environment' for setting PATH --- docsite/rst/faq.rst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docsite/rst/faq.rst b/docsite/rst/faq.rst index 1b499c54740..ba3ae1264ff 100644 --- a/docsite/rst/faq.rst +++ b/docsite/rst/faq.rst @@ -3,15 +3,17 @@ Frequently Asked Questions Here are some commonly-asked questions and their answers. -.. _users_and_ports: +.. _set_environment: -If you are looking to set environment variables remotely for your project (in a task, not locally for Ansible) -The keyword is simply `environment` +How can I set the PATH or any other environment variable for a task or entire playbook? ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Setting environment variables can be done with the `environment` keyword. It can be used at task or playbook level:: + + environment: + PATH: {{ ansible_env.PATH }}:/thingy/bin + SOME: value -``` - environment: - PATH:$PATH:/thingy/bin -``` How do I handle different machines needing different user accounts or ports to log in with?