# Using template module

**URL:** <https://forum.ansible.com/t/using-template-module/38152>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [June 23, 2023, 9:10am UTC](https://forum.ansible.com/t/using-template-module/38152 "2023-06-23T09:10:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Keith\_Forman](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@Keith\_Forman](https://forum.ansible.com/u/Keith_Forman)\
**Post date:** [June 23, 2023, 9:10am UTC](https://forum.ansible.com/t/using-template-module/38152/1 "2023-06-23T09:10:49Z")

</div>

Hi all

Hoping someone can help me.

We have recently installed awx operator, running inside minikube.

Everything is working as expected, and can run multiple jobs.

The prblem I’m currently having is being able to grab files form the ansible controller to copy to the selected host.

Example:

- hosts: sonarqube.platsoft.lan

tasks:

- name:  
template: src=/etc/nginx/conf.d/nginx.conf.j2 dest=/etc/nginx/conf.d/y.conf

The above task should copy the nginx.conf.j2 on the controller to the host right?

I am getting an error stating “Could not find or access file on ansible controller”.

Im just a bit confused. Where should the files be placed for the playbook to see them on the controller? Do they need to be within one of the containers, or on the VM hosting the containers?

Please help ☹

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [June 23, 2023, 5:09pm UTC](https://forum.ansible.com/t/using-template-module/38152/2 "2023-06-23T17:09:54Z")

</div>

Hi,

The way job execution works with the operator is that jobs are launched against the kubernetes api. You’ll need to do some work around mounting the file system:

[https://docs.ansible.com/automation-controller/4.3/html/userguide/execution\_environments.html#execution-environment-mount-options](https://docs.ansible.com/automation-controller/4.3/html/userguide/execution_environments.html#execution-environment-mount-options)

This documentation should help you figure out what options you’ll want to expose.

Thanks,

AWX Team

---

<div class="post-metadata">

**Author:** ![Keith\_Forman](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@Keith\_Forman](https://forum.ansible.com/u/Keith_Forman)\
**Post date:** [June 26, 2023, 10:32am UTC](https://forum.ansible.com/t/using-template-module/38152/3 "2023-06-26T10:32:26Z")

</div>

Thanks, appreciate it.  
So my question now - Where does the file that I want to mount into the temp pod need to exist? On the VM where awx operator is being hosted? Or within the ee container?  
I have tried isolated paths as well as instance groups, but still no luck.

---

<div class="post-metadata">

**Author:** ![Keith\_Forman](https://avatars.discourse-cdn.com/v4/letter/k/3da27b/32.png) [@Keith\_Forman](https://forum.ansible.com/u/Keith_Forman)\
**Post date:** [June 26, 2023, 11:39am UTC](https://forum.ansible.com/t/using-template-module/38152/4 "2023-06-26T11:39:57Z")

</div>

I came right, thanks very much!
