mount the dkhost share automatically
This commit is contained in:
@@ -51,9 +51,36 @@
|
||||
with_items:
|
||||
- docker-engine
|
||||
- docker-compose
|
||||
- virtualbox-guest-dkms
|
||||
|
||||
|
||||
- name: copy docker config file
|
||||
copy:
|
||||
src: daemon.json
|
||||
dest: /etc/docker/daemon.json
|
||||
|
||||
- name: create mount points for shares
|
||||
file:
|
||||
state: directory
|
||||
dest: /mnt/dkhost
|
||||
|
||||
# vbox shares are mounted in home folders of users with vboxsf group
|
||||
#- name: add root to vboxsf group
|
||||
# user: name={{ item }} groups=vboxsf append=yes
|
||||
# with_items: "{{ dockerhost.users }}"
|
||||
|
||||
- name: setup host shares in fstab
|
||||
lineinfile:
|
||||
state: present
|
||||
dest: /etc/fstab
|
||||
insertafter: EOF
|
||||
regexp: '^#?dkhost '
|
||||
line: 'dkhost /mnt/dkhost vboxsf noauto 0 0'
|
||||
|
||||
- name: mount host shares in rc.local
|
||||
lineinfile:
|
||||
state: present
|
||||
dest: /etc/rc.local
|
||||
insertafter: 'exit 0'
|
||||
regexp: '^#?mount dkhost'
|
||||
line: 'mount dkhost'
|
||||
|
||||
Reference in New Issue
Block a user