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
|
- hosts: all
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
tasks:
|
tasks:
|
||||||
- name: Wait for system to become reachable
|
- name: Wait for cloud init to finish
|
||||||
wait_for_connection:
|
pause:
|
||||||
- name: Gather facts for the first time
|
minutes: 2
|
||||||
setup:
|
|
||||||
- name: Wait for cloud-init to finish
|
|
||||||
command: cloud-init status --wait
|
|
||||||
- name: Update repositories
|
- name: Update repositories
|
||||||
apt:
|
apt:
|
||||||
autoremove: true
|
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
|
cloudinit = libvirt_cloudinit_disk.cloudinit.id
|
||||||
|
|
||||||
provisioner "local-exec" {
|
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