Feat(Songe): Create Songe
This commit is contained in:
61
tasks/NAS_mounts.yml
Normal file
61
tasks/NAS_mounts.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
---
|
||||
- name: create mount points
|
||||
file:
|
||||
path: "{{ item.name }}"
|
||||
state: directory
|
||||
with_items: "{{ label_mounts }}"
|
||||
|
||||
- name: Mount data drives for storage
|
||||
mount:
|
||||
name: '{{ item.name }}'
|
||||
src: '{{ item.label }}'
|
||||
fstype: ext4
|
||||
passno: 2
|
||||
state: mounted
|
||||
with_items: "{{ label_mounts }}"
|
||||
|
||||
- name: create mount points
|
||||
file:
|
||||
path: "{{ item.name }}"
|
||||
state: directory
|
||||
with_items: "{{ access_mounts }}"
|
||||
|
||||
- name: Mount media mounts for easy access
|
||||
mount:
|
||||
name: '{{ item.name }}'
|
||||
src: '{{ item.src }}'
|
||||
fstype: none
|
||||
opts: bind
|
||||
passno: 0
|
||||
state: mounted
|
||||
with_items: "{{ access_mounts }}"
|
||||
|
||||
- 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
|
Reference in New Issue
Block a user