setup nfs on media server for media consumers
This commit is contained in:
parent
af28e7a23f
commit
b470d74da0
@ -35,6 +35,8 @@ foremanAlma ansible_user=ansible
|
|||||||
[windows]
|
[windows]
|
||||||
bane ansible_user=ansible ansible_connection=winrm ansible_winrm_transport=basic ansible_port=5985 ansible_winrm_server_cert_validation=ignore
|
bane ansible_user=ansible ansible_connection=winrm ansible_winrm_transport=basic ansible_port=5985 ansible_winrm_server_cert_validation=ignore
|
||||||
|
|
||||||
|
baxter
|
||||||
|
|
||||||
[servers:children]
|
[servers:children]
|
||||||
doc
|
doc
|
||||||
aws
|
aws
|
||||||
|
27
playbooks/common/nfs.yml
Normal file
27
playbooks/common/nfs.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
- name: installs nfs and makes common folders available to the network
|
||||||
|
hosts: baxter
|
||||||
|
become: true
|
||||||
|
vars_files:
|
||||||
|
- ../../vars/secrets.yml
|
||||||
|
tasks:
|
||||||
|
- name: install nfs core packages
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: nfs-kernel-server
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: write config to /etc/exports
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: ../../templates/exports.conf.j2
|
||||||
|
dest: /etc/exports
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
|
- name: export the configuration(being safe)
|
||||||
|
ansible.builtin.shell: |
|
||||||
|
exportfs -ra
|
||||||
|
|
||||||
|
- name: start the nfs service
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: nfs-kernel-server
|
||||||
|
state: started
|
||||||
|
enabled: true
|
1
templates/exports.conf.j2
Normal file
1
templates/exports.conf.j2
Normal file
@ -0,0 +1 @@
|
|||||||
|
{{nfs_dir}} {{nfs_server_ip}}(rw,sync,no_root_squash,no_subtree_check)
|
Loading…
Reference in New Issue
Block a user