Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible code bot recommendations #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@
- hosts: localhost
tasks:
- name: Purge the openstack project
include_role:
ansible.builtin.include_role:
name: purge

- name: Clean up the temp image
file:
with_fileglob:
- /var/lib/virt-lightning/pool/upstream/*_exp.qcow2
ansible.builtin.file:
path: "{{ item }}"
state: absent
with_fileglob:
- '/var/lib/virt-lightning/pool/upstream/*_exp.qcow2'

- name: Clean up the local temp dir
file:
ansible.builtin.file:
path: images/basehost
state: absent

- name: Clean up the basehost
virt_lightning.virt_lightning.vm:
name: basehost
Expand All @@ -22,4 +25,3 @@
virt_lightning.virt_lightning.vm:
name: newvm
state: absent

19 changes: 11 additions & 8 deletions openstack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,31 @@
- hosts: localhost
gather_facts: false
tasks:
- include_role:
- ansible.builtin.include_role:
name: purge

- hosts: localhost
tasks:
- include_role:
name: deploy
vars:
- vars:
deploy__config_drive: false
- include_role:
ansible.builtin.include_role:
name: deploy

- ansible.builtin.include_role:
name: test_vm

- name: purge the test server
openstack.cloud.server:
name: test_vm
state: absent

- hosts: localhost
tasks:
- include_role:
name: deploy
vars:
- vars:
deploy__config_drive: true
ansible.builtin.include_role:
name: deploy

- include_role:
name: test_vm
- name: purge the test server
Expand Down
Loading