Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (35 sloc) 901 Bytes
- name: Install NFS Libraries and RSync
apt:
name: "{{ item }}"
force: yes
state: present
with_items:
- nfs-common
- rsync
- name: Add NFS mountpoint
mount:
name: /media/wd5t
src: 192.168.1.170:/media/wd
opts: "rw,hard,intr"
fstype: nfs
state: mounted
become: true # as root
- name: Add node root folder to shared montpoint
file:
path: "{{ shared_folder }}/{{ inventory_hostname }}"
state: directory
mode: 0777
register: mountpoint
- name: Stop docker service
service:
name: docker
state: stopped
- name: Set docker to use the new shared mountpoint as working folder
replace:
path: /lib/systemd/system/docker.service
regexp: '.*ExecStart.*'
replace: 'ExecStart=/usr/bin/dockerd -H fd:// --insecure-registry {{docker_registry}}'
backup: yes
register: mountpoint
- name: Reboot system
command: reboot
You can’t perform that action at this time.