temporary fix for ansible
This commit is contained in:
parent
7320e4e44a
commit
0b1424514a
3 changed files with 7 additions and 7 deletions
|
@ -2,12 +2,9 @@
|
|||
- hosts: all
|
||||
gather_facts: no
|
||||
tasks:
|
||||
- name: Wait for system to become reachable
|
||||
wait_for_connection:
|
||||
- name: Gather facts for the first time
|
||||
setup:
|
||||
- name: Wait for cloud-init to finish
|
||||
command: cloud-init status --wait
|
||||
- name: Wait for cloud init to finish
|
||||
pause:
|
||||
minutes: 2
|
||||
- name: Update repositories
|
||||
apt:
|
||||
autoremove: true
|
||||
|
|
3
inventory
Normal file
3
inventory
Normal file
|
@ -0,0 +1,3 @@
|
|||
[targets]
|
||||
|
||||
192.168.30.7 ansible_connection=ssh ansible_user=root
|
2
main.tf
2
main.tf
|
@ -51,6 +51,6 @@ resource "libvirt_domain" "ubuntu" {
|
|||
cloudinit = libvirt_cloudinit_disk.cloudinit.id
|
||||
|
||||
provisioner "local-exec" {
|
||||
command = "ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -T 60 -u root -i '${var.internal_ip},' ansible.yml"
|
||||
command = "ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -T 60 -u root -i inventory ansible.yml"
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue