2 # set up a common /data directory for ephemeral or EBS volume
3 - stat: path=/media/data
5 - set_fact: data_mount_path={{ dpstat.stat.path }}
6 when: dpstat.stat.exists and data_mount_path is undefined
8 - stat: path=/media/ephemeral0
10 - set_fact: data_mount_path={{ dpstat.stat.path }}
11 when: dpstat.stat.exists and data_mount_path is undefined
13 - stat: path=/media/ephemeral1
15 - set_fact: data_mount_path={{ dpstat.stat.path }}
16 when: dpstat.stat.exists and data_mount_path is undefined
20 - set_fact: data_mount_path={{ dpstat.stat.path }}
21 when: dpstat.stat.exists and data_mount_path is undefined
23 - name: Establish /data link to volume.
24 when: data_mount_path is defined
28 src: "{{ data_mount_path }}"