Skip to content

Commit 48a8ddd

Browse files
bogdandoamartyasinha
authored andcommitted
Allow start infra VMs early
Override no start for VMs layout except those explicitly configured to start early. Signed-off-by: Bohdan Dobrelia <bdobreli@redhat.com>
1 parent 12a1914 commit 48a8ddd

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

create-infra.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,20 @@
3131
hosts: "{{ cifmw_target_host | default('localhost') }}"
3232
gather_facts: true
3333
tasks:
34-
# Inject "start: false" in the layout to not start any VM yet.
34+
# Inject "start: false" in the layout to not start any VM yet,
35+
# except vms explicitly configured to start early.
3536
# Starting the VM will be done later, either by the tool deploying
3637
# OSP, or the one deploy RHOSO.
3738
# VM initial configuration, when managed, is done using cloud-init.
3839
- name: Ensure no VM is started when we create them during this run
3940
vars:
4041
_no_start: >-
41-
{% set _vms = {} -%}
42-
{% for _type in _cifmw_libvirt_manager_layout.vms.keys() -%}
43-
{% set _ = _vms.update({_type: {'start': false}}) -%}
44-
{% endfor -%}
42+
{% set _vms = {} -%}
43+
{% for _type in _cifmw_libvirt_manager_layout.vms.keys() -%}
44+
{% if not (_cifmw_libvirt_manager_layout.vms[_type]["start"] | default(false)) -%}
45+
{% set _ = _vms.update({_type: {'start': false}}) -%}
46+
{% endif -%}
47+
{% endfor -%}
4548
{{ _vms }}
4649
ansible.builtin.set_fact:
4750
_cifmw_libvirt_manager_layout: >-

0 commit comments

Comments
 (0)