Hi,
I would like to use the gem module to install buildr. This gem needs to
have an envvar defined. The command is :
sudo env JAVA_HOME=$JAVA_HOME gem install buildr -v 1.4.3
(see http://buildr.apache.org/installing.html#linux)
If I don't do this, buildr refuses to install. This is usually quite a
pain to install via the command line (easy to forget), but it becomes
harder from ansible.
I would love to write
-gem: name=buildr state=present JAVA_HOME=my_path_to_java_home
Is it possible ?
Or can I export some envvar to the sudo user before running ansible ?
I run ansible from an unpriviledged user but I give it the sudo password
with --ask-sudo-pass. All my tasks run with sudo: yes.
Thanks.