Feat(Choux): nfs sharing documents
This commit is contained in:
parent
8b9afaeae6
commit
a88753fcaf
@ -21,6 +21,7 @@
|
|||||||
- include: tasks/dotfiles.yml
|
- include: tasks/dotfiles.yml
|
||||||
- include: tasks/wine.yml
|
- include: tasks/wine.yml
|
||||||
- include: tasks/home_autofs.yml
|
- include: tasks/home_autofs.yml
|
||||||
|
- include: tasks/nfs_share.yml
|
||||||
- include: tasks/choux_borg_backup.yml
|
- include: tasks/choux_borg_backup.yml
|
||||||
- include: tasks/arch_virtualbox.yml
|
- include: tasks/arch_virtualbox.yml
|
||||||
|
|
||||||
|
30
tasks/nfs_share.yml
Normal file
30
tasks/nfs_share.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
- name: install nfs
|
||||||
|
apt:
|
||||||
|
pkg: nfs-kernel-server
|
||||||
|
state: present
|
||||||
|
notify: restart nfs
|
||||||
|
|
||||||
|
- name: Lines in exports
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/exports
|
||||||
|
line: "{{ item.name }} 192.168.1.1/24({{ item.options }})"
|
||||||
|
with_items: "{{ nfs_shares }}"
|
||||||
|
notify: restart nfs
|
||||||
|
|
||||||
|
- name: create mount points
|
||||||
|
file:
|
||||||
|
path: "{{ item.name }}"
|
||||||
|
state: directory
|
||||||
|
with_items: "{{ nfs_shares }}"
|
||||||
|
|
||||||
|
- name: rbind Mounts for NFS etc.
|
||||||
|
mount:
|
||||||
|
name: '{{ item.name }}'
|
||||||
|
src: '{{ item.src }}'
|
||||||
|
fstype: none
|
||||||
|
opts: rbind
|
||||||
|
passno: 0
|
||||||
|
state: mounted
|
||||||
|
with_items: "{{ nfs_shares }}"
|
||||||
|
notify: restart nfs
|
@ -9,5 +9,10 @@ borg_backup_repo: "{{ backup_mount_point }}/Choux"
|
|||||||
borg_script_path: /root/.borg
|
borg_script_path: /root/.borg
|
||||||
borg_script_filename: backup.sh
|
borg_script_filename: backup.sh
|
||||||
|
|
||||||
|
label_mounts: []
|
||||||
|
access_mounts: []
|
||||||
|
nfs_shares:
|
||||||
|
- { src: '/media/documents', name: '/export/documents', options: 'rw,no_subtree_check,nohide' }
|
||||||
|
|
||||||
music_dir: /media/documents/musique/
|
music_dir: /media/documents/musique/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user