create ansible folder
This commit is contained in:
parent
de457e8e38
commit
995e99c1e6
@ -1,14 +1,22 @@
|
|||||||
---
|
---
|
||||||
- name: Deploy a Terraform infrastructure
|
- name: Deploy a Terraform infrastructure
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: terraform apply
|
|
||||||
|
- name: Create a VM
|
||||||
cloud.terraform.terraform:
|
cloud.terraform.terraform:
|
||||||
project_path: /home/vez/homelab/terraform/projects/terransible
|
project_path: /home/vez/homelab/terraform/projects/terransible
|
||||||
state: present
|
state: present
|
||||||
register: tf_return
|
register: tf_return
|
||||||
|
|
||||||
|
- name: Refresh inventory
|
||||||
|
ansible.builtin.meta: refresh_inventory
|
||||||
|
|
||||||
- name: Ping
|
- name: Ping
|
||||||
hosts: servers
|
hosts: servers
|
||||||
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- ping:
|
|
||||||
|
- name: Ping the host group
|
||||||
|
ansible.builtin.ping:
|
4
ansible/inventory/terraform.yml
Normal file
4
ansible/inventory/terraform.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
plugin: cloud.terraform.terraform_provider
|
||||||
|
project_path:
|
||||||
|
- /home/vez/homelab/terraform/projects/terransible
|
@ -1,2 +0,0 @@
|
|||||||
---
|
|
||||||
plugin: cloud.terraform.terraform_provider
|
|
Loading…
x
Reference in New Issue
Block a user