--- # USAGE: # sudo ansible-playbook qemu_cloud_stop.yml - name: start qemu nodes hosts: all connection: local gather_facts: no serial: 1 vars: node_id: "{{ '%02d' | format(groups['all'].index(inventory_hostname)) }}" lm_ifname: lm_{{ cloud }}_{{ inventory_hostname_short }} tasks: - name: stop qemu shell: ../qemu_dev_stop {{ node_id }} failed_when: false - name: delete bridges linux_bridge: state: absent bridge: "{{ item }}" loop: - "{{ eth0 }}" - "{{ eth2 | default() }}" when: item != "" - name: delete taps linux_tuntap: state: absent name: "{{ item }}" loop: - "{{ lm_ifname }}_0" - "{{ lm_ifname }}_2"