20 lines
428 B
YAML
20 lines
428 B
YAML
---
|
|
|
|
#
|
|
- 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: "<host mac='{{ vm_mac[\"stdout\"] }}' name='{{ vm_name }}' ip='{{ vm_ip }}'/>"
|
|
|
|
... |