working ansible
This commit is contained in:
parent
271d75b7bd
commit
a6afac22f5
3 changed files with 12 additions and 2 deletions
|
@ -1,5 +1,13 @@
|
|||
---
|
||||
- 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: ensure file exists
|
||||
copy:
|
||||
content: ""
|
||||
|
|
|
@ -11,5 +11,3 @@ chpasswd:
|
|||
expire: False
|
||||
packages:
|
||||
- qemu-guest-agent
|
||||
ansible:
|
||||
install_method: pip
|
||||
|
|
4
main.tf
4
main.tf
|
@ -49,4 +49,8 @@ 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 '192.168.30.7,' ansible.yml"
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue