mount the dkhost share automatically
This commit is contained in:
@@ -49,7 +49,7 @@
|
|||||||
roles:
|
roles:
|
||||||
# - _install_updates
|
# - _install_updates
|
||||||
# - Datadog.datadog
|
# - Datadog.datadog
|
||||||
# - dockerhost
|
- dockerhost
|
||||||
# - geerlingguy.nginx
|
# - geerlingguy.nginx
|
||||||
# - certbot
|
# - certbot
|
||||||
- docker_registry
|
- docker_registry
|
||||||
|
|||||||
@@ -51,9 +51,36 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- docker-engine
|
- docker-engine
|
||||||
- docker-compose
|
- docker-compose
|
||||||
|
- virtualbox-guest-dkms
|
||||||
|
|
||||||
|
|
||||||
- name: copy docker config file
|
- name: copy docker config file
|
||||||
copy:
|
copy:
|
||||||
src: daemon.json
|
src: daemon.json
|
||||||
dest: /etc/docker/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