# Ansible Controller - accessing files outside of EE

**URL:** <https://forum.ansible.com/t/ansible-controller-accessing-files-outside-of-ee/4031>\
**Category:** Get Help\
**Tags:** ee\
**Created:** [February 23, 2024, 10:47pm UTC](https://forum.ansible.com/t/ansible-controller-accessing-files-outside-of-ee/4031 "2024-02-23T22:47:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![walk](https://avatars.discourse-cdn.com/v4/letter/w/9d8465/32.png) [@walk](https://forum.ansible.com/u/walk)\
**Post date:** [February 23, 2024, 10:47pm UTC](https://forum.ansible.com/t/ansible-controller-accessing-files-outside-of-ee/4031/1 "2024-02-23T22:47:18Z")

</div>

I am needing to create a playbook ran from our Ansible Controller (Tower) that creates a file (it is a variable list) and have it stored on our controller so that it can be loaded by a different playbook. I tested all of my code locally on the ansible server via CLI and now that I am attempting to put it into Ansible tower, I have run into problems.

I was first thinking I could run a git module to place this file into our master Git repo but this doesn’t appear to be supported by “ansible.builtin.git”. I then attempted to use the builtin copy module to place the file inside the local linux servers /tmp folder but it appears I cannot break outside of the containerized “EE” that the playbooks run from.

Does anyone have ideas…either a way to get the file into my master and develop Git repo or how to get the containerized instance in Ansible to place my file into a local server file location and then how to get that file included into a separate playbook as included variables.

I’m stumped.

---

<div class="post-metadata">

**Author:** ![laurent-indermuehle](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/laurent-indermuehle/32/289_2.png) [@laurent-indermuehle](https://forum.ansible.com/u/laurent-indermuehle)\
**Post date:** [February 24, 2024, 7:45pm UTC](https://forum.ansible.com/t/ansible-controller-accessing-files-outside-of-ee/4031/2 "2024-02-24T19:45:12Z")

</div>

Hi @walk ,

I sound like you need to mount a folder from your controller inside the EE. I know how to do it from the CLI, it’s in ansible-navigator.yml config file. But I’ll have to lookup the documentation to find a way of doing that in the controller. I think this chapter may help: [15. Execution Environments — Automation Controller User Guide v4.5](https://docs.ansible.com/automation-controller/latest/html/userguide/execution_environments.html#execution-environment-mount-options)

---

<div class="post-metadata">

**Author:** ![ptn](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ptn/32/481_2.png) [@ptn](https://forum.ansible.com/u/ptn)\
**Post date:** [February 25, 2024, 8:13am UTC](https://forum.ansible.com/t/ansible-controller-accessing-files-outside-of-ee/4031/3 "2024-02-25T08:13:38Z")

</div>

Hey,

Top of my head, you could also put your task generating this file in a role, which you could run as dependancy (whole role) or pre\_task (by importing this single task from role) in your playbook.

> it is a variable list

Then use [ansible.builtin.include\_vars module](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/include_vars_module.html) to load your vars into your play, as you might already be doing.

If this file has to be pre-generated, and/or necessarily be stored on the control node, then mounting this path into the container, as suggested by @laurent-indermuehle, might well be the way to go.

---

<div class="post-metadata">

**Author:** ![Jason](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jason/32/304_2.png) [@Jason](https://forum.ansible.com/u/Jason)\
**Post date:** [February 25, 2024, 2:33pm UTC](https://forum.ansible.com/t/ansible-controller-accessing-files-outside-of-ee/4031/4 "2024-02-25T14:33:49Z")

</div>

Are you trying to store the list long term or is this part of a workflow?

If it is a latter you can use set\_stats to pass to the next play.

[https://docs.ansible.com/ansible/latest/collections/ansible/builtin/set\_stats\_module.html](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/set_stats_module.html)
