DCD-386: Configure and enable NFS server on node.

This commit is contained in:
Steve Smith
2019-05-30 11:43:55 +10:00
parent f13fb656d0
commit 5edb60454d
5 changed files with 38 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
---
- name: Restart Product
service:
name: "{{ atl_systemd_service_name }}"
state: restarted

View File

@@ -0,0 +1,6 @@
---
- name: Install Amazon-Linux-specific NFS packages
yum:
name:
- nfs-utils

View File

@@ -1,9 +1,8 @@
---
- name: Create product user for mapping
user:
name: "{{ atl_product_user }}"
comment: "Product runtime user"
- name: Install distro-specific NFS packages
include_tasks: "{{ ansible_distribution|lower }}.yml"
- name: Create mountpoint
file:
@@ -32,3 +31,17 @@
src: "LABEL={{ atl_nfs_fs_label }}"
fstype: "{{ atl_nfs_fs_type }}"
state: mounted
- name: Create the NFS export file
template:
src: "media-atl.exports.j2"
dest: "/etc/exports.d/20-media-atl.exports"
notify:
- Restart NFS
- name: Enable NFS
service:
name: nfs.service
enabled: true
state: started

View File

@@ -0,0 +1,7 @@
---
- name: Install Ubuntu-specific NFS packages
yum:
name:
- nfs-kernel-server
- libnfs-utils

View File

@@ -0,0 +1,2 @@
# Created by Ansible
/media/atl *(rw)