Commit a8ffaf0d authored by Spiros Koulouzis's avatar Spiros Koulouzis

move add data-root after installing docker

parent 5e61061b
...@@ -90,23 +90,6 @@ ...@@ -90,23 +90,6 @@
when: mount_volume.stat.exists when: mount_volume.stat.exists
ignore_errors: yes ignore_errors: yes
- name: Change data-root location in /etc/docker/daemon.json
shell: |
echo '{"data-root": "/data"}' > /etc/docker/daemon.json
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:
...@@ -122,6 +105,18 @@ ...@@ -122,6 +105,18 @@
- name: Update apt and install docker-ce - name: Update apt and install docker-ce
apt: update_cache=yes name=docker-ce state=latest apt: update_cache=yes name=docker-ce state=latest
- name: Change data-root location in /etc/docker/daemon.json
shell: |
echo '{"data-root": "/data"}' > /etc/docker/daemon.json
when: mount_volume.stat.exists == True
- name: Restart service docker, in all cases
service:
name: docker
state: restarted
ignore_errors: yes
when: mount_volume.stat.exists == True
- name: Update and upgrade apt packages - name: Update and upgrade apt packages
apt: apt:
upgrade: yes upgrade: yes
......
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