Skip to content

Commit c43747f

Browse files
Kayobe Automationassumptionsandg
authored andcommitted
Add Blazar host create playbook
1 parent 1bdc619 commit c43747f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
- name: Create Blazar hosts
3+
hosts: blazar-compute
4+
gather_facts: false
5+
vars:
6+
venv: "/stack/kayobe-automation-env/venvs/os-venv"
7+
tasks:
8+
- name: List Blazar compute hosts
9+
ansible.builtin.shell:
10+
cmd: |
11+
{{ venv }}/bin/openstack reservation host show \
12+
{{ inventory_hostname }} \
13+
register: host_show
14+
failed_when: false
15+
changed_when: false
16+
delegate_to: localhost
17+
18+
- name: Ensure Blazar compute hosts are created
19+
ansible.builtin.shell:
20+
cmd: |
21+
{{ venv }}/bin/openstack reservation host create \
22+
{{ inventory_hostname }} \
23+
delegate_to: localhost
24+
when: '"Unable to find resource" in host_show.stderr'

0 commit comments

Comments
 (0)