# Cannot load env file

**URL:** <https://forum.ansible.com/t/cannot-load-env-file/37498>\
**Category:** Ansible Project\
**Tags:** ansible-project\
**Created:** [December 26, 2022, 5:00pm UTC](https://forum.ansible.com/t/cannot-load-env-file/37498 "2022-12-26T17:00:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [December 26, 2022, 5:00pm UTC](https://forum.ansible.com/t/cannot-load-env-file/37498/1 "2022-12-26T17:00:59Z")

</div>

include\_vars expects a yaml formatted file, so that won't understand  
your shell environment variables file.  
You could write an ansible task that parses that .env file.  
But I would just source that .env file from the shell that ansible  
runs from and be done with it.
