Merge "Optimise the destroy role by script module"
This commit is contained in:
commit
a9f20f82c0
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
- name: Destroying all Kolla containers and volumes
|
- name: Destroying all Kolla containers and volumes
|
||||||
command: /tmp/kolla-cleanup/tools/cleanup-containers
|
script: ../tools/cleanup-containers
|
||||||
|
@ -1,17 +1,12 @@
|
|||||||
---
|
---
|
||||||
- name: Destroying Kolla host configuration
|
- name: Destroying Kolla host configuration
|
||||||
become: true
|
become: true
|
||||||
command: >
|
script: ../tools/cleanup-host
|
||||||
env enable_haproxy={{ enable_haproxy }}
|
environment:
|
||||||
enable_swift={{ enable_swift }}
|
enable_haproxy: "{{ enable_haproxy }}"
|
||||||
glance_file_datadir_volume={{ glance_file_datadir_volume }}
|
enable_swift: "{{ enable_swift }}"
|
||||||
kolla_internal_vip_address={{ kolla_internal_vip_address }}
|
glance_file_datadir_volume: "{{ glance_file_datadir_volume }}"
|
||||||
kolla_external_vip_address={{ kolla_external_vip_address }}
|
kolla_internal_vip_address: "{{ kolla_internal_vip_address }}"
|
||||||
kolla_dev_repos_directory={{ kolla_dev_repos_directory }}
|
kolla_external_vip_address: "{{ kolla_external_vip_address }}"
|
||||||
destroy_include_dev={{ destroy_include_dev }}
|
kolla_dev_repos_directory: "{{ kolla_dev_repos_directory }}"
|
||||||
/tmp/kolla-cleanup/tools/cleanup-host
|
destroy_include_dev: "{{ destroy_include_dev }}"
|
||||||
|
|
||||||
- name: Destroying kolla-cleanup folder
|
|
||||||
file:
|
|
||||||
path: /tmp/kolla-cleanup
|
|
||||||
state: absent
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- name: Removing Kolla images
|
- name: Removing Kolla images
|
||||||
command: /tmp/kolla-cleanup/tools/cleanup-images --all
|
script: ../tools/cleanup-images --all
|
||||||
when:
|
when:
|
||||||
- destroy_include_images | bool
|
- destroy_include_images | bool
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Creating /kolla-cleanup/tools directory on node
|
|
||||||
file:
|
|
||||||
state: directory
|
|
||||||
path: /tmp/kolla-cleanup/tools
|
|
||||||
|
|
||||||
- name: Copying validate-docker-execute.sh file
|
|
||||||
copy:
|
|
||||||
src: ../tools/validate-docker-execute.sh
|
|
||||||
dest: /tmp/kolla-cleanup/tools
|
|
||||||
mode: 0755
|
|
||||||
|
|
||||||
- name: Copying cleanup-containers file
|
|
||||||
copy:
|
|
||||||
src: ../tools/cleanup-containers
|
|
||||||
dest: /tmp/kolla-cleanup/tools
|
|
||||||
mode: 0755
|
|
||||||
|
|
||||||
- name: Copying cleanup-host file
|
|
||||||
copy:
|
|
||||||
src: ../tools/cleanup-host
|
|
||||||
dest: /tmp/kolla-cleanup/tools
|
|
||||||
mode: 0755
|
|
||||||
|
|
||||||
- name: Copying cleanup-images file
|
|
||||||
copy:
|
|
||||||
src: ../tools/cleanup-images
|
|
||||||
dest: /tmp/kolla-cleanup/tools
|
|
||||||
mode: 0755
|
|
||||||
when:
|
|
||||||
- destroy_include_images | bool
|
|
@ -1,6 +1,4 @@
|
|||||||
---
|
---
|
||||||
- include: copy_tools.yml
|
|
||||||
|
|
||||||
- include: validate_docker_execute.yml
|
- include: validate_docker_execute.yml
|
||||||
|
|
||||||
- include: cleanup_containers.yml
|
- include: cleanup_containers.yml
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
- name: Ensure the docker service is running
|
- name: Ensure the docker service is running
|
||||||
command: /tmp/kolla-cleanup/tools/validate-docker-execute.sh
|
script: ../tools/validate-docker-execute.sh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user