NFS Mount
add nfs-common to support nfs shares add vars and task to mount nfs share for media
This commit is contained in:
@@ -2,12 +2,32 @@
|
|||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
pip_install_packages:
|
pip_install_packages:
|
||||||
- name: docker
|
- name: Docker
|
||||||
|
|
||||||
|
nfs_host: 192.168.0.109
|
||||||
|
nfs_options: "auto,nofail,noatime,nolock,intr,tcp,actimeo=1800"
|
||||||
|
nfs_mounts:
|
||||||
|
- remote_path: /export/Movies
|
||||||
|
local_path: /mnt/storage/movies
|
||||||
|
- remote_path: /export/TVShows
|
||||||
|
local_path: /mnt/storage/tv
|
||||||
|
- remote_path: /export/Scripts
|
||||||
|
local_path: /mnt/scripts
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- geerlingguy.pip
|
- geerlingguy.pip
|
||||||
- geerlingguy.docker
|
- geerlingguy.docker
|
||||||
tasks:
|
tasks:
|
||||||
|
- name: Mount NFS Volumes
|
||||||
|
ansible.posix.mount:
|
||||||
|
src: "{{ nfs_host }}:{{ item.remote_path }}"
|
||||||
|
path: "{{ item.local_path }}"
|
||||||
|
fstype: nfs
|
||||||
|
opts: "{{ nfs_options }}"
|
||||||
|
boot: true
|
||||||
|
state: mounted
|
||||||
|
loop: "{{ nfs_mounts | flatten }}"
|
||||||
|
|
||||||
- name: Install docker tools
|
- name: Install docker tools
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
@@ -20,6 +40,7 @@
|
|||||||
- docker-ce
|
- docker-ce
|
||||||
- docker-ce-cli
|
- docker-ce-cli
|
||||||
- docker-compose
|
- docker-compose
|
||||||
|
- nfs-common
|
||||||
|
|
||||||
- name: Create Dockeruser and Add to Docker Group
|
- name: Create Dockeruser and Add to Docker Group
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
|
|||||||
Reference in New Issue
Block a user