2 - name: preperations and sanity checks
3 hosts: "{{ hostname }}"
6 - name: setup variables
8 network_cooked: "{{ network }}"
9 install_cooked: "{{ install }}"
10 - name: create temporary host group for vm host
13 inventory_dir: "{{inventory_dir}}"
15 # TODO: add some sanity checks
17 - import_playbook: remove_known_hosts.yml
19 - name: basic installation
24 - name: wait for new vm to start up
25 hosts: "{{ hostname }}"
28 ## TODO: find a better way to fetch host key of new VMs
29 - name: disable ssh StrictHostKeyChecking for the next step
31 ansible_ssh_extra_args: -o StrictHostKeyChecking=no
32 - name: wait for vm to start up
36 - name: reenable StrictHostKeyChecking
38 ansible_ssh_extra_args: ""
40 - name: Apply VM configuration roles
41 hosts: "{{ hostname }}"
47 - import_playbook: "host_playbooks/{{ hostname }}.yml"
49 - name: reboot and wait for VM come back
50 hosts: "{{ hostname }}"
53 - role: reboot-and-wait