DCD-224: Add fetching of EC2 metadata and generation of EFS mount from it.

This commit is contained in:
Steve Smith
2019-04-01 15:38:26 +11:00
parent 84cb4ec9ae
commit 54baed6cca
9 changed files with 42 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
---
efs_target: "{{ ansible_ec2_placement_availability_zone }}.{{ atl_efs_id }}.efs.{{ ansible_ec2_placement_region }}.amazonaws.com"

View File

@@ -0,0 +1,3 @@
---
dependencies:
- aws_metadata

View File

@@ -0,0 +1,13 @@
---
- name: Enable mountpoint in fstab
# lineinfile:
# path: "/etc/fstab"
# line: "{{ efs_target }}:/ /media/atl nfs4 rw,vers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 0 0"
# notify: mount_all
mount:
path: "{{ atl_shared_mountpoint }}"
src: "{{ efs_target }}:/"
fstype: nfs4
opts: "rw,vers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2"
state: mounted