Kai/Brian, could you please help on it...as above the files are
variable1.yml, variable2.yml,variable3.yml....having 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 same in all files but
values change) ...is there a way that we can export the environment
variable from file variable1.yml and run the docker stack -c some.yml and
then take the variable2 file and export the environment variable again from
this file and then again run docket stack -c some.yml and so on...( one
variable file values to be export and subsequent ones)....

thanks

On Thu, Dec 21, 2017 at 9:15 AM, coach rhca <[email protected]> wrote:

> sorry for coming back to this again...if we have multiple vars file will
> the logic be the same....for example ..
>
> include_vars:
>         file: {{item}} (rather than one file variable.yml)
>
> * with_items:*
>
> *                 - variable1.yml*
>
> *                 - variable2.yml*
> *                 - variable3.yml*
>         name: myenvvars
>
>
>   - name: running the docker stack
>     shell: docket stack -c some.yml ..
>     environment: '{{myenvvars}}'
>
> please can you share the insight ...
>
> On Fri, Dec 15, 2017 at 12:56 PM, coach rhca <[email protected]> wrote:
>
>> Thanks a ton  Brian for the help...
>>
>> On Thu, Dec 14, 2017 at 11:50 PM, Brian Coca <[email protected]> wrote:
>>
>>> - 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 this message because you are subscribed to a topic in the
>>> Google Groups "Ansible Project" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/ansible-project/glH8oHQHiC0/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> To post to this group, send email to [email protected].
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/ansible-project/CACVha7crB1C-mxTE4A6kLRrtQvfbzsYJB%3DJgF
>>> OOKeLLrvN9UyA%40mail.gmail.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CALguqPLv2bA60k%3D8iUP%3DKDfqU%3Dq0bgAV54Yp786cWd77_zCQ1w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to