Commit 5e61061b authored by Spiros Koulouzis's avatar Spiros Koulouzis

mount manually too

parent aabf0f1d
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
filesystem: filesystem:
fstype: xfs fstype: xfs
dev: /dev/xvdh dev: /dev/xvdh
when: mount_volume.stat.exists == True when: mount_volume.stat.exists == True
- name: Creates directory - name: Creates directory
...@@ -63,22 +63,50 @@ ...@@ -63,22 +63,50 @@
path: /data path: /data
state: directory state: directory
when: mount_volume.stat.exists == True when: mount_volume.stat.exists == True
- name: Mount - name: Mount
mount: mount:
path: /data path: /data
src: /dev/xvdh src: /dev/xvdh
state: present state: present
fstype: xfs fstype: xfs
when: mount_volume.stat.exists == True when: mount_volume.stat.exists == True
- name: check Mount
command: mountpoint -q /data
register: volume_stat
failed_when: False
changed_when: False
- debug:
msg: volume_stat.rc {{ volume_stat.rc }}
when: mount_volume.stat.exists
- name: Mount manualy
shell: 'mount /dev/xvdh /data'
when: mount_volume.stat.exists
ignore_errors: yes
- name: Change data-root location in /etc/docker/daemon.json - name: Change data-root location in /etc/docker/daemon.json
shell: | shell: |
echo '{"data-root": "/data"}' > /etc/docker/daemon.json echo '{"data-root": "/data"}' > /etc/docker/daemon.json
when: mount_volume.stat.exists == True when: mount_volume.stat.exists == True
- name: Restart service docker, in all cases
service:
name: docker
state: restarted
ignore_errors: yes
#- name: Get size
#shell: 'df -h'
#register: output
#when: mount_volume.stat.exists == True
- name: Add Docker GPG apt Key - name: Add Docker GPG apt Key
apt_key: apt_key:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment