--- # - name: Retrieve MAC-address shell: /home/core/Scripte/vhost_getMAC "{{ vm_name }}" register: vm_mac changed_when: "False" - name: Debug MAC-address debug: msg={{ vm_mac["stdout"] }} changed_when: "False" - name: Add a new host in the dhcp pool community.libvirt.virt_net: name: br_nat command: modify xml: "" ...