Re: [ansible-project] Ansible - Environment variable

2020-02-21 Thread Sivaraman P
Is there any other way to do this? On Sat, 22 Feb 2020, 11:46 Dick Visser, wrote: > Not really, this is what I meant with that the solution is fragile. > > > On Fri, 21 Feb 2020 at 11:02, Sivaraman P wrote: > >> Now I am able to set the environment using the playbook you have sent. >> But I

Re: [ansible-project] Ansible - Environment variable

2020-02-21 Thread Dick Visser
Not really, this is what I meant with that the solution is fragile. On Fri, 21 Feb 2020 at 11:02, Sivaraman P wrote: > Now I am able to set the environment using the playbook you have sent. But > I Have one more problem in this. The file that I have contains variables > like below. As we are

Re: [ansible-project] Ansible - Environment variable

2020-02-21 Thread Sivaraman P
Now I am able to set the environment using the playbook you have sent. But I Have one more problem in this. The file that I have contains variables like below. As we are reading the file and setting the environment, the values are not passing correctly, Is there any workaround for that?

Re: [ansible-project] Ansible - Environment variable

2020-02-20 Thread Dick Visser
On Thu, 20 Feb 2020 at 15:13, Sivaraman P wrote: > > Thanks much for your reply, I think this is what the solution I need. But > there are two things which I am not able get. I am new to ansible, kindly > answer those question even though it was silly. whether the variables which > are being

Re: [ansible-project] Ansible - Environment variable

2020-02-20 Thread Sivaraman P
Thanks much for your reply, I think this is what the solution I need. But there are two things which I am not able get. I am new to ansible, kindly answer those question even though it was silly. whether the variables which are being used in setfact need to be set before using that in setfact,

Re: [ansible-project] Ansible - Environment variable

2020-02-20 Thread Dick Visser
Hi You could fetch the .env file, parse it, and then use that as environment vars for a subsequent shell/command. It's not the cleanest method and probably fragile. There is another problem, the shell and command module will execute a single command. What you have is two command, the first one

Re: [ansible-project] Ansible - Environment variable

2020-02-20 Thread Sivaraman P
Hi, Thank you for your response, I have a command to check the status of abinitio service in target machines. But, the status command will only work if the env file is executed. The env file contain some environment variables like below. The variables numbers and value will change for one

Re: [ansible-project] Ansible - Environment variable

2020-02-20 Thread Dick Visser
Hi Could you please tell clearly: - What you are trying to achieve. - How you are doing this. - What problems you encounter. - Which command did you run, and what output did you get from that (copied as text, not as images/attachments/screenshots) - What the relevant

[ansible-project] Ansible - Environment variable

2020-02-20 Thread Sivaraman P
0I have the env file which is present in target machine and it contain certain number of variables with export command(the export command itself was present inside the file). export AB_HOME=/et/dev/abinitio/abinitio-V3 export PATH=${AB_HOME}/bin:${PATH} I have executed the env file using the