blob: 2d323e344119f779c1b866f2b20cd5dc0ec0eb45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
- name: stop and remove {{ arangodb_image_container_name }} container
docker_container:
name: '{{ arangodb_image_container_name }}'
state: absent
- name: remove old {{ arangodb_image_name }} image
docker_image:
name: '{{ arangodb_image_name }}'
tag: '{{ arangodb_image_tag_name }}'
state: absent
- name: create {{ data_path }}/{{ arangodb_soft_home_path }}
file:
state: directory
path: '{{ data_path }}/{{ arangodb_soft_home_path }}'
- name: create {{ data_path }}/{{ arango_volume_path }}
file:
state: directory
path: '{{ data_path }}/{{ arango_volume_path }}'
- name: copy {{ arangodb_image_tar_name }}
copy:
src: '{{ package_path }}/{{ arangodb_image_tar_name }}'
dest: '{{ data_path }}/{{ arangodb_soft_home_path }}/{{ arangodb_image_tar_name }}'
force: true
backup: yes
- name: copy arangodb tar file
copy:
src: '../files/arangodb.tar.gz'
dest: '{{ data_path }}/{{ arango_volume_path }}/'
force: true
backup: yes
- name: tar -zxvf arangodb.tar.gz
shell: cd {{ data_path }}/{{ arango_volume_path }}/ && tar -zxvf arangodb.tar.gz && rm -rf arangodb.tar.gz
- name: load new {{ arangodb_image_name }} image from {{ arangodb_image_tar_name }}
docker_image:
name: '{{ arangodb_image_name }}'
tag: '{{ arangodb_image_tag_name }}'
load_path: '{{ data_path }}/{{ arangodb_soft_home_path }}/{{ arangodb_image_tar_name }}'
source: load
force_tag: yes
force_source: yes
- name: copy {{ arangodb_image_name }} docker-compose.yml
template:
src: docker-compose.yml.j2
dest: '{{ data_path }}/{{ arangodb_soft_home_path }}/docker-compose.yml'
backup: yes
- name: start {{ arangodb_image_container_name }} container
docker_compose:
project_src: '{{ data_path }}/{{ arangodb_soft_home_path }}'
|