use complex default variables in the terraform task

This commit is contained in:
Vezpi 2025-04-04 20:46:57 +00:00
parent bc19a7638b
commit af91955f47
2 changed files with 9 additions and 1 deletions

View File

@ -1,2 +1,7 @@
---
terraform_vm_state: present
terraform_vars_vm_attr:
vm:
ram: 2048
cpu: 2
vlan: 66

View File

@ -3,6 +3,9 @@
cloud.terraform.terraform:
project_path: "{{ terraform_vm_project_path }}"
state: "{{ terraform_vm_state }}"
complex_vars: true
variables:
vm_attr: "{{ terraform_vars_vm_attr }}"
- name: Refresh inventory
ansible.builtin.meta: refresh_inventory