diff --git a/ansible/create-vm-template.yaml b/ansible/create-vm-template.yaml index 50568bb..fcc85ac 100644 --- a/ansible/create-vm-template.yaml +++ b/ansible/create-vm-template.yaml @@ -22,6 +22,7 @@ url: "{{ vm.cloud_image_url }}" dest: "{{ vm.cloud_image_path }}" mode: 0700 + become: yes - name: Install Cloud-init apt: @@ -34,6 +35,9 @@ command: "virt-customize -a {{ vm.cloud_image_path }} --install qemu-guest-agent" become: yes + - name: Exec local script + local_action: command bash cloud-config-gen.sh + - name : Copy cloud-init-config file copy: src: cloud-init-conf.yml