refactor(vars): remove legacy variable inputs
This commit is contained in:
@@ -23,17 +23,17 @@
|
||||
virtualization_proxmox_scsi: >-
|
||||
{%- set out = {} -%}
|
||||
{%- for disk in system_cfg.disks -%}
|
||||
{%- set _ = out.update({ 'scsi' ~ loop.index0: hypervisor_storage ~ ':' ~ (disk.size | int) }) -%}
|
||||
{%- set _ = out.update({ 'scsi' ~ loop.index0: hypervisor_cfg.storage ~ ':' ~ (disk.size | int) }) -%}
|
||||
{%- endfor -%}
|
||||
{{ out }}
|
||||
community.proxmox.proxmox_kvm:
|
||||
api_host: "{{ hypervisor_url }}"
|
||||
api_user: "{{ hypervisor_username }}"
|
||||
api_password: "{{ hypervisor_password }}"
|
||||
api_host: "{{ hypervisor_cfg.url }}"
|
||||
api_user: "{{ hypervisor_cfg.username }}"
|
||||
api_password: "{{ hypervisor_cfg.password }}"
|
||||
ciuser: "{{ user_name }}"
|
||||
cipassword: "{{ user_password }}"
|
||||
ciupgrade: false
|
||||
node: "{{ hypervisor_node }}"
|
||||
node: "{{ hypervisor_cfg.node }}"
|
||||
vmid: "{{ system_cfg.id }}"
|
||||
name: "{{ hostname }}"
|
||||
cpu: host
|
||||
@@ -53,17 +53,17 @@
|
||||
efitype: 4m
|
||||
format: raw
|
||||
pre_enrolled_keys: false
|
||||
storage: "{{ hypervisor_storage }}"
|
||||
storage: "{{ hypervisor_cfg.storage }}"
|
||||
tpmstate0: >-
|
||||
{{
|
||||
{'storage': hypervisor_storage, 'version': '2.0'}
|
||||
{'storage': hypervisor_cfg.storage, 'version': '2.0'}
|
||||
if virtualization_tpm2_enabled | bool
|
||||
else omit
|
||||
}}
|
||||
ide:
|
||||
ide0: "{{ boot_iso }},media=cdrom"
|
||||
ide1: "{{ rhel_iso + ',media=cdrom' if rhel_iso is defined and rhel_iso | length > 0 else omit }}"
|
||||
ide2: "{{ hypervisor_storage }}:cloudinit"
|
||||
ide2: "{{ hypervisor_cfg.storage }}:cloudinit"
|
||||
net:
|
||||
net0: >-
|
||||
virtio,bridge={{ system_cfg.network }}{% if system_cfg.vlan is defined and system_cfg.vlan | string | length > 0 %},tag={{ system_cfg.vlan }}{% endif %}
|
||||
@@ -83,10 +83,10 @@
|
||||
- name: Start VM on Proxmox
|
||||
delegate_to: localhost
|
||||
community.proxmox.proxmox_kvm:
|
||||
api_host: "{{ hypervisor_url }}"
|
||||
api_user: "{{ hypervisor_username }}"
|
||||
api_password: "{{ hypervisor_password }}"
|
||||
node: "{{ hypervisor_node }}"
|
||||
api_host: "{{ hypervisor_cfg.url }}"
|
||||
api_user: "{{ hypervisor_cfg.username }}"
|
||||
api_password: "{{ hypervisor_cfg.password }}"
|
||||
node: "{{ hypervisor_cfg.node }}"
|
||||
name: "{{ hostname }}"
|
||||
vmid: "{{ system_cfg.id }}"
|
||||
state: started
|
||||
|
||||
Reference in New Issue
Block a user