2022-03-21 23:27:54 -04:00

43 lines
684 B
HCL

#variable "hostname" {
# description = "hostname"
# type = any
# default = {}
#}
#variable "groups" {
# description = "groups"
# type = any
# default = {}
#}
#variable "vars" {
# description = "Variables"
# type = any
# default = {}
#}
resource "ansible_host" "example2" {
inventory_hostname = "www.example.com"
groups = ["web"]
vars = {
foo = "bar"
}
}
resource "ansible_host" "example" {
inventory_hostname = "example.com"
groups = ["web"]
vars = {
ansible_user = "admin"
}
}
resource "ansible_group" "web" {
inventory_group_name = "web"
children = ["foo", "bar", "baz"]
vars = {
foo = "bar"
bar = 2
}
}