mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 08:23:06 -06:00
DCD-386: Create and mount FS for share.
This commit is contained in:
@@ -11,3 +11,4 @@
|
||||
roles:
|
||||
- role: linux_common
|
||||
- role: aws_common
|
||||
- role: nfs_server
|
||||
|
||||
5
roles/nfs_server/defaults/main.yml
Normal file
5
roles/nfs_server/defaults/main.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
|
||||
atl_nfs_server_device: "{{ lookup('env', 'ATL_NFS_SERVER_DEVICE') }}"
|
||||
atl_nfs_fs_type: "xfs"
|
||||
atl_nfs_fs_label: "BB-Shared"
|
||||
22
roles/nfs_server/tasks/main.yml
Normal file
22
roles/nfs_server/tasks/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
|
||||
- name: Create the filesystem if necessary
|
||||
filesystem:
|
||||
dev: "{{ atl_nfs_server_device }}"
|
||||
fstype: "{{ atl_nfs_fs_type }}"
|
||||
opts:
|
||||
- "-L {{ atl_nfs_fs_label }}"
|
||||
|
||||
- name: Create mountpoint
|
||||
file:
|
||||
path: "{{ atl_shared_mountpoint }}"
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: "{{ atl_product_user }}"
|
||||
group: "{{ atl_product_user }}"
|
||||
|
||||
- name: Setup fstab and mount the filesystem
|
||||
mount:
|
||||
path: "{{ atl_shared_mountpoint }}"
|
||||
src: "{{ atl_nfs_server_device }}:/"
|
||||
state: mounted
|
||||
Reference in New Issue
Block a user