# AWX and NFS mounts

**URL:** <https://forum.ansible.com/t/awx-and-nfs-mounts/3684>\
**Category:** Get Help\
**Tags:** awx, ee\
**Created:** [February 5, 2024, 8:52pm UTC](https://forum.ansible.com/t/awx-and-nfs-mounts/3684 "2024-02-05T20:52:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chr00ted](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chr00ted/32/2188_2.png) [@chr00ted](https://forum.ansible.com/u/chr00ted)\
**Post date:** [February 5, 2024, 8:52pm UTC](https://forum.ansible.com/t/awx-and-nfs-mounts/3684/1 "2024-02-05T20:52:20Z")

</div>

Continuing the discussion from [The default execution environment cannot mount the local nfs storage volume](http://forum.ansible.com/t/the-default-execution-environment-cannot-mount-the-local-nfs-storage-volume/3472/3):

@wxh9527 , Would you mind sharing exactly what you did to resolve it please?

What exactly did you put into the custom pod spec as well as anything else you may have done.

I’m asking because in the past w/straight ansible I would run playbooks to backup my cisco switches. etc. Those configs would be stored on my ansible (cli) host that I could access when needed. When I do the same in AWX, the configs would be stored in a container that goes away after execution.

---

<div class="post-metadata">

**Author:** ![chr00ted](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chr00ted/32/2188_2.png) [@chr00ted](https://forum.ansible.com/u/chr00ted)\
**Post date:** [February 6, 2024, 1:52am UTC](https://forum.ansible.com/t/awx-and-nfs-mounts/3684/2 "2024-02-06T01:52:48Z")

</div>

Perhaps someone can tell me if I’m on the right path at least:

I created an instance group with the following custom pod specs:

apiVersion: v1  
kind: Pod  
metadata:  
namespace: awx  
spec:  
serviceAccountName: default  
automountServiceAccountToken: false  
containers:  
- image: [quay.io/ansible/awx-ee:latest](http://quay.io/ansible/awx-ee:latest)  
name: worker  
args:  
- ansible-runner  
- worker  
- ‘–private-data-dir=/runner’  
volumeMounts:  
- name: nfststmnt  
mountPath: /scratch  
volumes:

- name: nfststmnt  
nfs:  
server: 192.168.1.22 # not actual ip  
path: /shared

Then in my template, I select the instance group created above. In that template I’m attempting to save output to scratch. Here is my template:

* * *

- hosts: all  
connection: httpapi  
gather\_facts: no  
vars:  
vdom: “root”  
ansible\_httpapi\_use\_ssl: yes  
ansible\_httpapi\_validate\_certs: no  
ansible\_httpapi\_port: 443  
ansible\_network\_os: fortinet.fortios.fortios  
tasks:
  - name: Backup  
fortinet.fortios.fortios\_monitor:  
selector: ‘backup.system.config’  
vdom: “root”  
params:  
scope: ‘global’  
register: backupinfo

  - name: Save the backup information.  
copy:  
content: ‘{{ backupinfo.meta.raw }}’  
dest: ‘/scratch/fw1.cfg’

The playbook runs, gathers the fortigate backup, its failing to save to /scratch (my nfs share).

Any help would be extremely appreciated.

---

<div class="post-metadata">

**Author:** ![chr00ted](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chr00ted/32/2188_2.png) [@chr00ted](https://forum.ansible.com/u/chr00ted)\
**Post date:** [February 6, 2024, 2:04am UTC](https://forum.ansible.com/t/awx-and-nfs-mounts/3684/3 "2024-02-06T02:04:45Z")

</div>

It was an issue w/nfs export… I figured I may as well check that while Im waiting.

Issue resolved, thanks anyway 😉

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 7, 2024, 2:04am UTC](https://forum.ansible.com/t/awx-and-nfs-mounts/3684/4 "2024-03-07T02:04:50Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
