2020-09-14 01:24:17 +02:00
|
|
|
---
|
|
|
|
- name: Describe guest interface
|
|
|
|
sysrc:
|
|
|
|
name: 'ifconfig_vmnet{{ item.index }}_descr'
|
|
|
|
value: 'VM {{ item.name }}'
|
|
|
|
loop_control:
|
|
|
|
label: '{{ item.name }} : vmnet{{ item.index }}'
|
|
|
|
with_items: '{{ bhyve_guests }}'
|
|
|
|
|
|
|
|
- name: Set host IPv4 addresses
|
|
|
|
sysrc:
|
|
|
|
name: 'ifconfig_vmnet{{ item.index }}'
|
2024-10-02 15:17:26 +02:00
|
|
|
value: 'inet {{ bhyve_ipv4 | ansible.utils.ipmath(2 * item.index)}}/31'
|
2020-09-14 01:24:17 +02:00
|
|
|
with_items: '{{ bhyve_guests }}'
|
|
|
|
|
|
|
|
- name: Set host IPv6 addresses
|
|
|
|
sysrc:
|
|
|
|
name: 'ifconfig_vmnet{{ item.index }}_ipv6'
|
2024-10-02 15:17:26 +02:00
|
|
|
value: 'inet6 {{ bhyve_ipv6 | ansible.utils.ipmath(2 * item.index)}}/127'
|
2020-09-14 01:24:17 +02:00
|
|
|
with_items: '{{ bhyve_guests }}'
|
|
|
|
|
|
|
|
- name: Add guest interfaces
|
|
|
|
sysrc:
|
|
|
|
name: cloned_interfaces
|
|
|
|
state: append
|
|
|
|
value: 'vmnet{{ item.index }}'
|
|
|
|
loop_control:
|
|
|
|
label: '{{ item.name }} : vmnet{{ item.index }}'
|
|
|
|
with_items: '{{ bhyve_guests }}'
|