From f6211eec7cdd7b5e949dce83c42fe5e93e8fc7d0 Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Mon, 13 Mar 2023 21:52:35 +0100 Subject: [PATCH] revert to waiting... --- ansible.yml | 2 +- cloud_init.cfg.tftpl | 7 ------- local.yml | 9 --------- main.tf | 6 +++--- 4 files changed, 4 insertions(+), 20 deletions(-) delete mode 100644 local.yml diff --git a/ansible.yml b/ansible.yml index b6b9fa7..53faca9 100644 --- a/ansible.yml +++ b/ansible.yml @@ -4,7 +4,7 @@ tasks: - name: Wait for cloud init to finish pause: - minutes: 2 + seconds: 120 - name: Update repositories apt: autoremove: true diff --git a/cloud_init.cfg.tftpl b/cloud_init.cfg.tftpl index f9fd68b..f3ebf4f 100644 --- a/cloud_init.cfg.tftpl +++ b/cloud_init.cfg.tftpl @@ -14,10 +14,3 @@ packages: - dnsmasq package_update: true package_upgrade: true -package_reboot_if_required: true -ansible: - install_method: pip - pull: - url: "https://gitlab.com/pizzapim/dmz-dns-vm.git" - playbook_name: local.yml - accept_host_key: true diff --git a/local.yml b/local.yml deleted file mode 100644 index 269f2e5..0000000 --- a/local.yml +++ /dev/null @@ -1,9 +0,0 @@ -- hosts: localhost - connection: local - - tasks: - - name: ensure file exists - copy: - content: "" - dest: ~/testje.txt - force: false diff --git a/main.tf b/main.tf index d31751d..caff4bc 100644 --- a/main.tf +++ b/main.tf @@ -50,7 +50,7 @@ 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 inventory ansible.yml" - #} + provisioner "local-exec" { + command = "ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -T 60 -u root -i inventory ansible.yml" + } }