rearrange variables and add parallelism
This commit is contained in:
parent
b13a0b4ed9
commit
bfd5db44a0
@ -6,25 +6,17 @@
|
|||||||
- ansible.builtin.import_role:
|
- ansible.builtin.import_role:
|
||||||
name: terraform_vm
|
name: terraform_vm
|
||||||
vars:
|
vars:
|
||||||
|
terraform_vm_state: "{{ state | default(omit) }}"
|
||||||
terraform_vm_project_path: /home/vez/homelab/terraform/projects/terransible
|
terraform_vm_project_path: /home/vez/homelab/terraform/projects/terransible
|
||||||
terraform_vars_vm_env: lab
|
terraform_vars_vm_env: lab
|
||||||
terraform_vars_vm_tags:
|
terraform_vars_vm_tags:
|
||||||
- lab
|
- lab
|
||||||
# terraform_vars_multi_node_deployment: false
|
terraform_vars_multi_node_deployment: "{{ multi_node_deployment | default(true) }}"
|
||||||
# terraform_vars_target_node: zenith
|
terraform_vars_target_node: "{{ target_node | default(omit) }}"
|
||||||
terraform_vars_vm_attr:
|
terraform_vars_vm_attr: {"master": { "ram": 2048, "cpu": 2, "vlan": 66 }, "worker": { "ram": 1024, "cpu": 1, "vlan": 66 }}
|
||||||
master:
|
|
||||||
ram: 2048
|
|
||||||
cpu: 2
|
|
||||||
vlan: 66
|
|
||||||
worker:
|
|
||||||
ram: 1024
|
|
||||||
cpu: 1
|
|
||||||
vlan: 66
|
|
||||||
|
|
||||||
- name: Ping
|
- name: Ping
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: false
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Ping all the hosts
|
- name: Ping all the hosts
|
||||||
ansible.builtin.ping:
|
ansible.builtin.ping:
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
---
|
---
|
||||||
- name: Deploy a Terraform infrastructure
|
- name: Deploy a Terraform infrastructure
|
||||||
|
delegate_to: localhost
|
||||||
cloud.terraform.terraform:
|
cloud.terraform.terraform:
|
||||||
project_path: "{{ terraform_vm_project_path }}"
|
project_path: "{{ terraform_vm_project_path }}"
|
||||||
state: "{{ terraform_vm_state }}"
|
state: "{{ terraform_vm_state }}"
|
||||||
|
parallelism: 3
|
||||||
complex_vars: true
|
complex_vars: true
|
||||||
variables:
|
variables:
|
||||||
multi_node_deployment: "{{ terraform_vars_multi_node_deployment | default(omit)}}"
|
multi_node_deployment: "{{ terraform_vars_multi_node_deployment | default(omit)}}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user