first commit
This commit is contained in:
24
main.tf
Normal file
24
main.tf
Normal file
@ -0,0 +1,24 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
ansible = {
|
||||
version = "~> 1.3.0"
|
||||
source = "ansible/ansible"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "ansible_host" "host" {
|
||||
name = var.ansible_hostname
|
||||
groups = ["thegroup"]
|
||||
}
|
||||
|
||||
resource "ansible_group" "group" {
|
||||
name = "thegroup"
|
||||
children = [var.ansible_hostname]
|
||||
}
|
||||
|
||||
resource "ansible_playbook" "playbook" {
|
||||
playbook = var.ansible_playbook_path
|
||||
name = var.ansible_hostname
|
||||
replayable = true
|
||||
}
|
||||
Reference in New Issue
Block a user