DCD-386: Add role to mount NFS server on nodes.

This commit is contained in:
Steve Smith
2019-05-30 13:13:59 +10:00
parent 09b4760621
commit 2f9358301b
3 changed files with 20 additions and 1 deletions

View File

@@ -11,6 +11,6 @@
roles: roles:
- role: linux_common - role: linux_common
- role: aws_common - role: aws_common
- role: aws_efs_config - role: nfs_mount
- role: product_common - role: product_common
- role: product_install - role: product_install

View File

@@ -86,3 +86,5 @@ atl_tomcat_protocol: "{{ lookup('env', 'ATL_TOMCAT_PROTOCOL') or 'HTTP/1.1' }}"
atl_tomcat_redirectport: "{{ lookup('env', 'ATL_TOMCAT_REDIRECTPORT') or '' }}" atl_tomcat_redirectport: "{{ lookup('env', 'ATL_TOMCAT_REDIRECTPORT') or '' }}"
atl_tomcat_scheme: "{{ lookup('env', 'ATL_TOMCAT_SCHEME') or 'http' }}" atl_tomcat_scheme: "{{ lookup('env', 'ATL_TOMCAT_SCHEME') or 'http' }}"
atl_tomcat_secure: "{{ lookup('env', 'ATL_TOMCAT_SECURE') or 'false' }}" atl_tomcat_secure: "{{ lookup('env', 'ATL_TOMCAT_SECURE') or 'false' }}"
atl_fileserver_host: "{{ lookup('env', 'ATL_FILESERVER_IP') }}"

View File

@@ -0,0 +1,17 @@
---
- name: Create mountpoint
file:
state: directory
path: "{{ atl_shared_mountpoint }}"
mode: 0755
owner: "{{ atl_product_user }}"
group: "{{ atl_product_user }}"
- name: Enable mountpoint in fstab
mount:
path: "{{ atl_shared_mountpoint }}"
src: "{{ atl_fileserver_host }}:{{ atl_shared_mountpoint }}"
fstype: nfs
opts: "rw,nfsvers=4,_netdev"
state: mounted