diff --git a/metal/hosts.ini b/metal/hosts.ini index a3a8ddcc..540156e4 100644 --- a/metal/hosts.ini +++ b/metal/hosts.ini @@ -9,3 +9,4 @@ metal3 ansible_host=192.168.1.113 mac='00-23-24-d1-f5-69' [metal:vars] ansible_user=root +subnet=192.168.1.0/24 diff --git a/metal/roles/lxd/templates/leader.yaml.j2 b/metal/roles/lxd/templates/leader.yaml.j2 index 94950778..7b0082c3 100644 --- a/metal/roles/lxd/templates/leader.yaml.j2 +++ b/metal/roles/lxd/templates/leader.yaml.j2 @@ -4,7 +4,7 @@ config: networks: - config: bridge.mode: fan - fan.underlay_subnet: auto + fan.underlay_subnet: {{ hostvars[inventory_hostname]['subnet'] }} description: "" name: lxdfan0 type: "" diff --git a/test/hosts.ini b/test/hosts.ini index d090be9b..5e735236 100644 --- a/test/hosts.ini +++ b/test/hosts.ini @@ -4,3 +4,4 @@ metal1 ansible_host=192.168.50.3 [metal:vars] ansible_user=root +subnet=192.168.50.0/24