temporary fix for ansible

This commit is contained in:
Pim Kunis 2023-03-12 21:21:43 +01:00
parent 7320e4e44a
commit 0b1424514a
3 changed files with 7 additions and 7 deletions

View file

@ -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
View file

@ -0,0 +1,3 @@
[targets]
192.168.30.7 ansible_connection=ssh ansible_user=root

View file

@ -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"
}
}