Removed no longer relevant cli destroy playbooks
We now use the upstream kolla playbook for destroy so the custom playbooks used by the cli are no longer relevant. Also fixed a couple of minor pep8 and bandit errors. Change-Id: Ie4e7cf5980cd7ca1702a12a566937d5cea9848f4 Jira-Issue: None
This commit is contained in:
parent
9772b1ab28
commit
499aa1ec2b
@ -1,22 +0,0 @@
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: get running container ids
|
||||
shell: docker ps | grep '{{ prefix }}' | awk '{print $1}'
|
||||
register: ps_result
|
||||
ignore_errors: no
|
||||
- name: stop/kill all kolla containers
|
||||
shell: docker '{{ destroy_type | default("kill") }}' "{{ item }}"
|
||||
ignore_errors: no
|
||||
with_items: '{{ ps_result.stdout_lines }}'
|
||||
- name: get all container ids
|
||||
shell: docker ps -a | grep '{{ prefix }}' | awk '{print $1}'
|
||||
register: ps_a_result
|
||||
ignore_errors: no
|
||||
- name: remove docker containers
|
||||
shell: docker rm '{{ item }}'
|
||||
ignore_errors: no
|
||||
with_items: '{{ ps_a_result.stdout_lines }}'
|
||||
- name: delete var/lib/kolla contents
|
||||
shell: rm -rf /var/lib/kolla/*
|
||||
ignore_errors: yes
|
@ -1,19 +0,0 @@
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: get running non-data container ids
|
||||
shell: docker ps | grep '{{ prefix }}' | grep -v '\-data' | awk '{print $1}'
|
||||
register: ps_result
|
||||
ignore_errors: no
|
||||
- name: stop/kill all non-data kolla containers
|
||||
shell: docker '{{ destroy_type | default("kill") }}' '{{ item }}'
|
||||
ignore_errors: no
|
||||
with_items: '{{ ps_result.stdout_lines }}'
|
||||
- name: get all non-data container ids
|
||||
shell: docker ps -a | grep '{{ prefix }}' | grep -v '\-data' | awk '{print $1}'
|
||||
register: ps_a_result
|
||||
ignore_errors: no
|
||||
- name: remove non-data docker containers
|
||||
shell: docker rm '{{ item }}'
|
||||
ignore_errors: no
|
||||
with_items: '{{ ps_a_result.stdout_lines }}'
|
@ -112,7 +112,8 @@ class AsyncApi(object):
|
||||
inventory.validate_hostnames(hostnames)
|
||||
|
||||
ansible_job = actions.destroy_hosts(hostnames, destroy_type,
|
||||
verbose_level, include_data, remove_images)
|
||||
verbose_level, include_data,
|
||||
remove_images)
|
||||
return Job(ansible_job)
|
||||
|
||||
def async_host_precheck(self, hostnames, verbose_level=1):
|
||||
|
@ -43,7 +43,7 @@ class PasswordSet(Command):
|
||||
password_name = parsed_args.passwordname.strip()
|
||||
if parsed_args.insecure is not False:
|
||||
# --insecure flag is present
|
||||
password = ''
|
||||
password = '' # nosec
|
||||
if parsed_args.insecure:
|
||||
password = parsed_args.insecure.strip()
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user