-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcleanup.yml
25 lines (24 loc) · 914 Bytes
/
cleanup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
- name: Use Beaker to release the machine
hosts: localhost
vars_files:
- "{{ provision.image }}"
tasks:
- name: Releasing machine using the 'beaker_provisioner' module
beaker_provisioner:
url: "{{ provision.url }}"
username: "{{ provision.beaker.user }}"
password: "{{ provision.beaker.password }}"
host: "{{ provision.host.address }}"
action: "release"
distro_tree_id: "{{ distro_id }}"
web_service: "{{ provision.web.service }}"
ca_cert: "{{ (provision.ca|default({})).cert | default(omit) }}"
# We need to recreate hosts file as there might be remaining assumptions
# from previous run (openstack_nodes, controllers) which might break
# idempotency.
- name: Clean old inventory file
file:
dest: "{{ inventory_dir }}/hosts"
state: link
src: "local_hosts"