working ansible

This commit is contained in:
Pim Kunis 2023-03-11 18:04:58 +01:00
parent 271d75b7bd
commit a6afac22f5
3 changed files with 12 additions and 2 deletions

View file

@ -1,5 +1,13 @@
---
- hosts: all - hosts: all
gather_facts: no
tasks: tasks:
- name: Wait for system to become reachable
wait_for_connection:
- name: Gather facts for the first time
setup:
- name: ensure file exists - name: ensure file exists
copy: copy:
content: "" content: ""

View file

@ -11,5 +11,3 @@ chpasswd:
expire: False expire: False
packages: packages:
- qemu-guest-agent - qemu-guest-agent
ansible:
install_method: pip

View file

@ -49,4 +49,8 @@ resource "libvirt_domain" "ubuntu" {
} }
cloudinit = libvirt_cloudinit_disk.cloudinit.id cloudinit = libvirt_cloudinit_disk.cloudinit.id
provisioner "local-exec" {
command = "ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -T 60 -u root -i '192.168.30.7,' ansible.yml"
}
} }