|
|
|
@ -4,10 +4,25 @@ |
|
|
|
|
get_url: |
|
|
|
|
url: "{{ docker_local_persist_url }}" |
|
|
|
|
dest: /usr/local/bin/docker-volume-local-persist |
|
|
|
|
mode: 755 |
|
|
|
|
mode: 0755 |
|
|
|
|
checksum: sha1:{{ docker_local_persist_sha1 }} |
|
|
|
|
tags: docker |
|
|
|
|
|
|
|
|
|
- name: Create needed dir |
|
|
|
|
file: path={{ item.dir }} state=directory mode={{ item.mode }} |
|
|
|
|
loop: |
|
|
|
|
- dir: /opt/docker |
|
|
|
|
mode: "755" |
|
|
|
|
- dir: /opt/docker/plugin-data |
|
|
|
|
mode: "700" |
|
|
|
|
- dir: /var/lib/docker |
|
|
|
|
mode: "755" |
|
|
|
|
tags: docker |
|
|
|
|
|
|
|
|
|
- name: Link plugin-data |
|
|
|
|
file: src=/opt/docker/plugin-data dest=/var/lib/docker/plugin-data state=link |
|
|
|
|
tags: docker |
|
|
|
|
|
|
|
|
|
- name: Install systemd unit |
|
|
|
|
template: src=docker-volume-local-persist.service.j2 dest=/etc/systemd/system/docker-volume-local-persist.service |
|
|
|
|
register: docker_local_persist_unit |
|
|
|
|