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
|
||||
vars:
|
||||
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:
|
||||
- geerlingguy.pip
|
||||
- geerlingguy.docker
|
||||
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
|
||||
ansible.builtin.package:
|
||||
name: "{{ item }}"
|
||||
@@ -20,6 +40,7 @@
|
||||
- docker-ce
|
||||
- docker-ce-cli
|
||||
- docker-compose
|
||||
- nfs-common
|
||||
|
||||
- name: Create Dockeruser and Add to Docker Group
|
||||
ansible.builtin.user:
|
||||
|
||||
Reference in New Issue
Block a user