Commit 93e0a253 authored by Stefano Rivera's avatar Stefano Rivera

NFS client & server

parent 5ac45d50
---
- name: Install nfs-common
apt:
name: nfs-common
- name: Create NFS mountpoints
file:
state: directory
path: /srv/{{ nfs_server }}/{{ item }}
with_items:
- veyepar
- video
- name: Mount NFS mounts
mount:
name: /srv/{{ nfs_server }}/{{ item.name }}
src: "{{ nfs_server }}:/srv/{{ nfs_server }}/{{ item.name }}"
state: mounted
fstype: nfs
opts: "{{ item.opts }}"
dump: 0
passno: 2
with_items:
- name: veyepar
opts: ro,async
- name: video
opts: rw,sync
---
- name: exportfs
command: exportfs -r
---
- name: Install nfs-kernel-server
apt:
name: nfs-kernel-server
- name: Write /etc/exports
template:
src: templates/exports.j2
dest: /etc/exports
notify: exportfs
# {{ ansible_managed }}
# fsid=X is needed for XFS filesystems with 64bit inodes
/srv/{{ nfs_server }}/veyepar {{ eth_local_ip_address|default(ansible_default_ipv4.network + '/' + ansible_default_ipv4.netmask) }}(ro,async,no_subtree_check,fsid=0)
/srv/{{ nfs_server }}/video {{ eth_local_ip_address|default(ansible_default_ipv4.network + '/' + ansible_default_ipv4.netmask) }}(rw,sync,no_subtree_check,fsid=1)
......@@ -10,6 +10,10 @@
- tftp-server
- squid-deb-proxy
- hosts: nfs-server
roles:
- nfs-server
- hosts: icecast2
roles:
- icecast2
......@@ -34,3 +38,4 @@
- hosts: veyepar-encoder
roles:
- nfs-client
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment