Homelab/ansible/deploy_tf.yml
2025-03-26 22:37:13 +00:00

22 lines
473 B
YAML

---
- name: Deploy a Terraform infrastructure
hosts: localhost
gather_facts: false
tasks:
- name: Create a VM
cloud.terraform.terraform:
project_path: /home/vez/homelab/terraform/projects/terransible
state: present
register: tf_return
- name: Refresh inventory
ansible.builtin.meta: refresh_inventory
- name: Ping
hosts: servers
gather_facts: false
tasks:
- name: Ping the host group
ansible.builtin.ping: