restrucure
This commit is contained in:
parent
e1cf88ad73
commit
3544581bde
6 changed files with 17 additions and 3 deletions
6
ansible/ansible.cfg
Normal file
6
ansible/ansible.cfg
Normal file
|
@ -0,0 +1,6 @@
|
|||
[defaults]
|
||||
inventory=inventory
|
||||
interpreter_python=/usr/bin/python3
|
||||
|
||||
[diff]
|
||||
always = True
|
2
main.tf
2
main.tf
|
@ -50,7 +50,7 @@ resource "libvirt_domain" "ubuntu" {
|
|||
cloudinit = libvirt_cloudinit_disk.cloudinit.id
|
||||
|
||||
provisioner "local-exec" {
|
||||
command = "ansible-playbook -e internal_ip=${var.internal_ip} -T 60 -u root -i inventory hermes.yml"
|
||||
command = "ansible-playbook -e internal_ip=${var.internal_ip} -T 60 -u root -i ${var.ansible_inventory} ${var.ansible_playbook}"
|
||||
|
||||
environment = {
|
||||
ANSIBLE_HOST_KEY_CHECKING = "False"
|
||||
|
|
|
@ -15,3 +15,11 @@ variable "host_public_key" {
|
|||
variable "internal_ip" {
|
||||
default = "192.168.30.7"
|
||||
}
|
||||
|
||||
variable "ansible_inventory" {
|
||||
default = "ansible/inventory"
|
||||
}
|
||||
|
||||
variable "ansible_playbook" {
|
||||
default = "ansible/hermes.yml"
|
||||
}
|
||||
|
|
Reference in a new issue