mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-224: Add fetching of EC2 metadata and generation of EFS mount from it.
This commit is contained in:
2
roles/aws_efs_config/defaults/main.yml
Normal file
2
roles/aws_efs_config/defaults/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
efs_target: "{{ ansible_ec2_placement_availability_zone }}.{{ atl_efs_id }}.efs.{{ ansible_ec2_placement_region }}.amazonaws.com"
|
||||
3
roles/aws_efs_config/meta/main.yml
Normal file
3
roles/aws_efs_config/meta/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
dependencies:
|
||||
- aws_metadata
|
||||
13
roles/aws_efs_config/tasks/main.yml
Normal file
13
roles/aws_efs_config/tasks/main.yml
Normal 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
|
||||
Reference in New Issue
Block a user