# setting environment

**URL:** <https://forum.ansible.com/t/setting-environment/26371>\
**Category:** Ansible Developer\
**Created:** [December 23, 2017, 4:39am UTC](https://forum.ansible.com/t/setting-environment/26371 "2017-12-23T04:39:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![coach.rhca](https://avatars.discourse-cdn.com/v4/letter/c/c57346/32.png) [@coach.rhca](https://forum.ansible.com/u/coach.rhca)\
**Post date:** [December 23, 2017, 4:39am UTC](https://forum.ansible.com/t/setting-environment/26371/1 "2017-12-23T04:39:44Z")

</div>

I am trying to load the environment variables from multiple files like variable1.yml , variable2.yml,variable3.yml…variable24.yml, this files contains two variables say (ptr\_image and ver\_number: Vsomeversion)…this files are dynamic and the values keep changing…the variable names ( i.e ptr\_image and version\_number ) remains the same across the files only values keep changing… Need to add this values one by one as an environment variable to run a command like

- name: running the docker stack  
shell: docket stack -c some.yml …

We tried using the include\_vars module but it only work for one environment variable but doesn’t work for the variable with\_items variabe…  
not sure if we are doing it correctly…Could you please here…thank you.
