e7fcfa1c0c
This redirect does not work or won't work in the future. Note: This adds ansible-core to test-requirements.txt, we may need to add requirements.txt and ansible collections in ansible-collections-requirements.yml in the future. Change-Id: Iffb41b68283f77050d8073364156cc0aca85559e
38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
---
|
|
- name: Clone Openstack Virtual Baremetal repo if it does not exist
|
|
git:
|
|
repo: https://opendev.org/openstack/openstack-virtual-baremetal.git
|
|
dest: "{{ local_working_dir }}/openstack-virtual-baremetal"
|
|
version: "{{ ovb_repo_version }}"
|
|
|
|
- name: copy clouds.yaml file
|
|
template:
|
|
src: clouds.yaml.j2
|
|
dest: "{{ local_working_dir }}/clouds.yaml"
|
|
mode: 0755
|
|
|
|
- name: Remove stack
|
|
openstack.cloud.stack:
|
|
name: "{{ stack_name }}"
|
|
cloud: "{{ cloud_name }}"
|
|
state: absent
|
|
environment:
|
|
OS_CLIENT_CONFIG_FILE: "{{ local_working_dir }}/clouds.yaml"
|
|
ignore_errors: true
|
|
|
|
- name: Remove associated keypair
|
|
shell: >
|
|
export OS_USERNAME="{{ os_username }}";
|
|
export OS_PASSWORD="{{ os_password }}";
|
|
export OS_TENANT_NAME="{{ os_tenant_name }}";
|
|
export OS_AUTH_URL="{{ os_auth_url }}";
|
|
nova keypair-delete key-{{ idnum }}
|
|
ignore_errors: true
|
|
no_log: true
|
|
changed_when: true
|
|
|
|
- name: remove clouds.yaml file
|
|
file:
|
|
path: "{{ local_working_dir }}/clouds.yaml"
|
|
state: absent
|