refactor(vars): add system/hypervisor dict inputs
This commit is contained in:
8
main.yml
8
main.yml
@@ -1,7 +1,7 @@
|
||||
---
|
||||
- name: Create and configure VMs
|
||||
hosts: all
|
||||
strategy: free # noqa: run-once[play]
|
||||
strategy: free # noqa: run-once[play]
|
||||
gather_facts: false
|
||||
become: true
|
||||
vars_prompt:
|
||||
@@ -29,6 +29,10 @@
|
||||
ansible.builtin.import_role:
|
||||
name: global_defaults
|
||||
|
||||
- name: Perform safety checks
|
||||
ansible.builtin.import_role:
|
||||
name: system_check
|
||||
|
||||
roles:
|
||||
- role: virtualization
|
||||
when: install_type == "virtual"
|
||||
@@ -62,7 +66,7 @@
|
||||
post_reboot_can_connect: >-
|
||||
{{
|
||||
(ansible_connection | default('ssh')) != 'ssh'
|
||||
or (vm_ip is defined and (vm_ip | string | length) > 0)
|
||||
or ((system_cfg.ip | default('') | string | length) > 0)
|
||||
or (
|
||||
install_type == 'physical'
|
||||
and (ansible_host | default('') | string | length) > 0
|
||||
|
||||
Reference in New Issue
Block a user