# mounting addition disks issue on new instance types

**URL:** <https://forum.ansible.com/t/mounting-addition-disks-issue-on-new-instance-types/29686>\
**Category:** Ansible Project\
**Created:** [February 14, 2019, 5:55pm UTC](https://forum.ansible.com/t/mounting-addition-disks-issue-on-new-instance-types/29686 "2019-02-14T17:55:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Dias](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@Frank\_Dias](https://forum.ansible.com/u/Frank_Dias)\
**Post date:** [February 14, 2019, 5:55pm UTC](https://forum.ansible.com/t/mounting-addition-disks-issue-on-new-instance-types/29686/1 "2019-02-14T17:55:06Z")

</div>

the following play work on t2 instances, the issue I am running into is when I try to run it against a t3 instance it fails.  
it looks like the issue comes from the new instance types are using /dev/nvme0n1p1 for root and /nvme1n1 for the second drive. t2 vs (t3. m5 ,c5)  
so is there a ec2 fact that I can filter on to set the var additional\_disk:“{{platform}}”  
any exampled that anone willing to share of how they are dealing with the change in device name for the new instance types.

additional\_disk: /dev/xvdb

# mountpoint: /mnt

- name: check if {{ additional\_disk }} exists  
set\_fact:  
exist\_device: True  
when: ansible\_devices[“{{ additional\_disk | basename }}”] is defined

- name: check if {{ additional\_disk }} in use  
command: pvdisplay “{{ additional\_disk }}”  
register: result  
ignore\_errors: True

- name: format new volume  
filesystem:  
fstype: ext4  
dev: “{{ additional\_disk }}”  
when: exist\_device is defined and result|failed

- name: mount {{ additional\_disk }} on {{ mountpoint }}  
mount:  
name: “{{ mountpoint }}”  
src: “{{ additional\_disk }}”  
fstype: ext4  
state: mounted  
when: exist\_device is defined and mountpoint is defined
