Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2016-04-05 Thread Jonathan Davila
You can set the python interpreter as a host or group var. Normally I set ansible_python_interpreter: /usr/bin/env python But in your case it sounds like you'd want a specific path. On Friday, April 1, 2016 at 7:18:17 PM UTC-4, Osama Shaikh wrote: > > Hi Brian, > > Has there been any update

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2016-04-01 Thread Osama Shaikh
Hi Brian, Has there been any update on setting ansible_python_interpreter in ansible.cfg. Our use case is Inside a system user account, we have our own python 2.7.6 version and we want to use ansible_python_interpreter to set our own python path not the one comes by default. Regards,

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2015-04-23 Thread Vu Do
Hi Brian Coca Set PATH variable like this in play level work well for me, environment: PATH: {{ ansible_env.PATH }}:/usr/local/bin I just wonder how you set this in global or inventory setting? Can you show me an example of inventory setting? On Friday, April 17, 2015 at 9:59:06 PM

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2015-04-23 Thread Brian Coca
its still on my 'todo' list, cannot show examples until it transitions to my 'done' list -- Brian Coca -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2015-04-17 Thread Steven Haddox
It's been my experience that ansible absolutely requires Python 2.6+ or Python 2.4 with the simplejson module. I don't know where in the documents, but I reference this in my README for my main ansible project: https://github.com/stevenhaddox/ansible_rails_enterprise/blob/master/README.md I also

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2015-04-17 Thread Eugene Sajine
yes, i have misstated the problem in my initial question a bit, sorry. I know about the ansible_python_interpreter and it does take care of the simplejson error, as instead of using the interpreter that is available in PATH it uses what i have specified. So the only question about that variable

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2015-04-17 Thread Brian Coca
yes, environment is now settable at task/play level, I have it on my list to add either a global (ansible.cfg) or inventory setting -- Brian Coca -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2015-04-16 Thread Eugene Sajine
I'm having problems with some hosts running ansible: It complains that there is no simplejson module found. I figured that it is something to do with the way ansible_env.PATH is set as somehow it picks up a very old version of python and i can't figure out where it comes from. I posted the

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2015-04-13 Thread David Vallee Delisle
So that seems to fix the issue but it's a very ugly fix. There should be a way to set the sudo_exe variable per server in the inventory file... On Sunday, December 14, 2014 at 1:16:16 PM UTC-5, Sagar Srivastava wrote: I know this is an old post but if someone still sees my reply, may tell me

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2015-04-13 Thread Brian Coca
you have the environment: keyword that can set path per task, in 1.9 you can do it per play. -- Brian Coca -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2014-12-14 Thread Sagar Srivastava
I know this is an old post but if someone still sees my reply, may tell me how bad is it to do the following ( create a symbolic link in /usr/bin for sudo - it works in my solaris box): ln -s /usr/local/bin/sudo /usr/bin/sudo On Thursday, November 21, 2013 3:15:09 PM UTC-5, Brian Coca wrote:

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2013-11-26 Thread Paul Markham
On Tuesday, November 26, 2013 9:44:37 AM UTC+11, Melissa Tan wrote: After it is set, I'm faced with a password prompt when no password required is already done. So it is actually executing sudo, but sudo isn't setup to authorized the command that Ansible is pushing through. The

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2013-11-23 Thread Michael DeHaan
As indicated, this isn't about setting the path, this is about configuring sudo in ansible.cfg to include the full path to the sudo executable. This is the way this will need to be done as this all happens before executing the module, hence using Ansible to set a path is not possible. On Fri,

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2013-11-21 Thread Michael DeHaan
If you need to, you can specify a different sudo binary in ansible.cfg. You might wish to fully path it there. On Thu, Nov 21, 2013 at 3:15 PM, Brian Coca brianc...@gmail.com wrote: in playbooks each task can set variables using the environment: var=val, keyword, but I don't think there is

Re: [ansible-project] Is there a way to set ENV variable on target hosts?

2013-11-21 Thread Michael DeHaan
Also make sure you're running with a recent Ansible, Ansible 1.4 is now the latest release. Newer versions (incl. later 1.3.X) will tell you if they get stuck waiting at a prompt in most cases. On Thu, Nov 21, 2013 at 8:02 PM, Michael DeHaan mich...@ansibleworks.comwrote: Instead of