3 remote_user: "{{ user }}"
9 update_path: "/tmp/testapi"
10 image: "opnfv/testapi"
11 mongodb_url: "mongodb://172.17.0.1:27017"
12 swagger_url: "http://{{ host }}:{{ port }}"
14 - name: create temporary update directory
16 path: "{{ update_path }}"
18 - name: transfer files in templates
21 dest: "{{ update_path }}"
22 - name: backup mongodb database
23 command: "python {{ update_path }}/backup_mongodb.py -u {{ mongodb_url }} -o {{ update_path }}"
24 - name: stop and remove old versions
25 command: bash "{{ update_path }}/rm_olds.sh"
27 - debug: msg="{{ rm_result.stderr }}"
28 - name: delete old docker images
29 command: docker rmi "{{ image }}"
31 - name: update mongodb
32 command: "python {{ update_path }}/update_mongodb.py -u {{ mongodb_url }}"
33 - name: docker start testapi server
34 command: docker run -dti -p "{{ port }}:8000"
35 -e "mongodb_url={{ mongodb_url }}"
36 -e "swagger_url={{ swagger_url }}"
38 - name: remove temporary update directory
40 path: "{{ update_path }}"