# Instance groups multiple volume mounts

**URL:** <https://forum.ansible.com/t/instance-groups-multiple-volume-mounts/37429>\
**Category:** AWX Project\
**Tags:** azure, awx\
**Created:** [December 6, 2022, 10:22am UTC](https://forum.ansible.com/t/instance-groups-multiple-volume-mounts/37429 "2022-12-06T10:22:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [December 6, 2022, 10:22am UTC](https://forum.ansible.com/t/instance-groups-multiple-volume-mounts/37429/1 "2022-12-06T10:22:33Z")

</div>

Hello,  
I’m trying to modify an istance group with a customize pod specification.  
I have this with a volume mount to an azure file share.

**_apiVersion: v1_**  
**_kind: Pod_**  
**_metadata:_**  
**_namespace: awx_**  
**_spec:_**  
**_serviceAccountName: default_**  
**_automountServiceAccountToken: false_**  
**_containers:_**  
**_- image: xxx/awx:awx-custom-22_**  
**_name: worker_**  
**_args:_**  
**_- ansible-runner_**  
**_- worker_**  
**_- ‘–private-data-dir=/runner’_**  
**_volumeMounts:_**  
**_- name: varlog_**  
**_mountPath: /var/awx-log_**  
**_resources:_**  
**_requests:_**  
**_cpu: 250m_**  
**_memory: 100Mi_**  
**_volumes:_**  
**_- name: varlog_**  
**_azureFile:_**  
**_secretName: awx-share-secret_**  
**_shareName: awx-logs_**  
**_readOnly: false_**

If I try to add an addictional volume mounts like this:  
**_volumeMounts:_**  
**_- name: varlog_**  
**_mountPath: /var/awx-log_**

**_- name: vartest_**  
**_mountPath: /var/test_**

the automation pod starts without volumes attached.  
There is a limit to number of volumes? I can add only one? Where I’m wrong?

Thank you,  
Elia

---

<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:** [December 7, 2022, 9:33pm UTC](https://forum.ansible.com/t/instance-groups-multiple-volume-mounts/37429/2 "2022-12-07T21:33:34Z")

</div>

the volumeMount “-name references” the volume name. Therefore the 2nd entry should also be -name: varlog

does that work?

---

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [December 13, 2022, 10:45am UTC](https://forum.ansible.com/t/instance-groups-multiple-volume-mounts/37429/3 "2022-12-13T10:45:41Z")

</div>

That is only an example to understand if there are known problems with more volumes specified in pod yaml.

This is my completed pod specification:  
_ **apiVersion: v1** _  
_ **kind: Pod** _  
_ **metadata:** _  
_ **namespace: awx** _  
_ **spec:** _  
_ **serviceAccountName: default** _  
_ **automountServiceAccountToken: false** _  
_ **containers:** _  
_ **- image: xxx/awx:awx-custom-22** _  
_ **name: worker** _  
_ **args:** _  
_ **- ansible-runner** _  
_ **- worker** _  
_ **- ‘–private-data-dir=/runner’** _  
_ **volumeMounts:** _  
_ **- name: varlog** _  
_ **mountPath: /var/awx-log** _  
_ **-** _ _ **name: awx-runner-entrypoint-volume** _  
_ **mountPath: /usr/bin/entrypoint** _  
_ **subPath: entrypoint** _  
_ **resources:** _  
_ **requests:** _  
_ **cpu: 250m** _  
_ **memory: 100Mi** _  
_ **volumes:** _  
_ **- name: varlog** _  
_ **azureFile:** _  
_ **secretName: awx-share-secret** _  
_ **shareName: awx-logs** _  
_ **readOnly: false** _  
_ **- name: awx-runner-entrypoint-volume** _  
_ **configMap:** _  
_ **name: awx-runner-entrypoint** _  
_ **items:** _  
_ **- key: entrypoint** _  
_ **path: entrypoint** _  
_ **mode: 0775** _

if I set a pod specification with only one volume (“varlog” or “awx-runner-entrypoint-volume” both works) I have not any problem.  
If I try with both defined the pod starts without volumes attached. Where I am wrong? It’s possible to define a pod specification with more volumes?

Thank you very much for your help.

Elia

---

<div class="post-metadata">

**Author:** ![epi82](https://avatars.discourse-cdn.com/v4/letter/e/ed655f/32.png) [@epi82](https://forum.ansible.com/u/epi82)\
**Post date:** [December 16, 2022, 10:26am UTC](https://forum.ansible.com/t/instance-groups-multiple-volume-mounts/37429/4 "2022-12-16T10:26:17Z")

</div>

That’s my fault. It was a banal indentation error ☹

Sorry. Now it’s working mounting both vloumes that I need.

 ![1.PNG](https://us1.discourse-cdn.com/ansible/original/2X/f/fb373299e49cd40a44c708e871b32e207e4e01ad.png)

Thank you,  
Elia
