Re: [ansible-project] seting environment

2017-12-22 Thread coach rhca
any thoughts on this... On Fri, Dec 22, 2017 at 12:23 PM, coach rhca wrote: > Kai/Brian, could you please help on it...as above the files are > variable1.yml, variable2.yml,variable3.ymlhaving the values as > ptr_image: my.example.com/jobname/testname > ver_number: v99

Re: [ansible-project] seting environment

2017-12-21 Thread coach rhca
Kai/Brian, could you please help on it...as above the files are variable1.yml, variable2.yml,variable3.ymlhaving the values as ptr_image: my.example.com/jobname/testname ver_number: v99 and diferent values in different files but the variable name ( ptr_image and ver_number name remains the

Re: [ansible-project] seting environment

2017-12-14 Thread coach rhca
Thanks a ton Brian for the help... On Thu, Dec 14, 2017 at 11:50 PM, Brian Coca wrote: > - name: to execute the build > tasks: > - name: exporting the variables > include_vars: > file: variable.yml > name: myenvvars > > - name: running the docker

Re: [ansible-project] seting environment

2017-12-14 Thread Brian Coca
- name: to execute the build tasks: - name: exporting the variables include_vars: file: variable.yml name: myenvvars - name: running the docker stack shell: docket stack -c some.yml .. environment: '{{myenvvars}}' -- -- Brian Coca -- You received

Re: [ansible-project] seting environment

2017-12-14 Thread coach rhca
thanks again kai and appreciate your help...will check it... On Thu, Dec 14, 2017 at 10:34 PM, Kai Stian Olstad < ansible-project+l...@olstad.com> wrote: > On Thursday, 14 December 2017 17.58.03 CET coach rhca wrote: > > > > Thanks Kai for clarifying it...so putting variable under the

Re: [ansible-project] seting environment

2017-12-14 Thread Kai Stian Olstad
On Thursday, 14 December 2017 17.58.03 CET coach rhca wrote: > > Thanks Kai for clarifying it...so putting variable under the environment > module after shell will export the variable. ..can we see the variable > with echo $ver_number on the linux host if it has been exported using > environment

Re: [ansible-project] seting environment

2017-12-14 Thread coach rhca
Thanks Kai for clarifying it...so putting variable under the environment module after shell will export the variable. ..can we see the variable with echo $ver_number on the linux host if it has been exported using environment On Thu, Dec 14, 2017 at 9:15 PM, Kai Stian Olstad <

Re: [ansible-project] seting environment

2017-12-14 Thread Kai Stian Olstad
On Thursday, 14 December 2017 16.35.10 CET coach rhca wrote: > > thanks Kai, if the include_vars will not export , i have tried the > environment module too... the variable file is dynamic and every time it > changes the value. > cat variable.yml ( its a dynamic file and the

Re: [ansible-project] seting environment

2017-12-14 Thread coach rhca
thanks Kai, if the include_vars will not export , i have tried the environment module too... the variable file is dynamic and every time it changes the value. cat variable.yml ( its a dynamic file and the value keeps changing ) ptr_image: my.example.com/jobname/testname

Re: [ansible-project] seting environment

2017-12-14 Thread Kai Stian Olstad
On Thursday, 14 December 2017 14.07.22 CET coach rhca wrote: > > any thoughts or approach in this regard. Check out environments, include vars doesn't export anything to a shell. It only load the variable inside Ansible. -- Kai Stian Olstad -- You received this message because you are

Re: [ansible-project] seting environment

2017-12-14 Thread coach rhca
any thoughts or approach in this regard. On Thu, Dec 14, 2017 at 12:13 PM, wrote: > I have few variables defined in a variable.yml file for example > > cat variable.com ( its a dynamic file and the value keeps changing ) > ptr_image: my.example.com/jobname/testname >

[ansible-project] seting environment

2017-12-13 Thread coach . rhca
I have few variables defined in a variable.yml file for example cat variable.com ( its a dynamic file and the value keeps changing ) ptr_image: my.example.com/jobname/testname ver_number: v99 I am using this in my playbook ... build.yml where i am using this file for the variables.. --- -