Merge "Add a single variable for combined networks"
This commit is contained in:
commit
f08146b377
|
@ -336,7 +336,7 @@
|
|||
Domains: "{{ container_domain }}"
|
||||
systemd_networks: |-
|
||||
{% set _networks = [] %}
|
||||
{% for _, value in (container_networks | combine(nspawn_networks)).items() %}
|
||||
{% for _, value in nspawn_combined_networks.items() %}
|
||||
{% if value.bridge is defined %}
|
||||
{% set _network = {'interface': 'mv-mv-' + value.bridge.split('br-')[-1]} %}
|
||||
{% else %}
|
||||
|
|
|
@ -24,8 +24,7 @@ Bind={{ bind }}:{{ bind }}
|
|||
|
||||
[Network]
|
||||
{% set macvlans = [] %}
|
||||
{% set _ = container_networks.update(nspawn_networks) %}
|
||||
{% for key, value in container_networks.items() %}
|
||||
{% for key, value in nspawn_combined_networks.items() %}
|
||||
{% if value.bridge is defined %}
|
||||
{% set _ = macvlans.append('mv-' + value.bridge.split('br-')[-1]) %}
|
||||
{% endif %}
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
{% endfor %}
|
||||
{% endif %}
|
||||
{% set macvlans = [] %}
|
||||
{% set _ = container_networks.update(nspawn_networks) %}
|
||||
{% for key, value in container_networks.items() %}
|
||||
{% for key, value in nspawn_combined_networks.items() %}
|
||||
{% if value.bridge is defined %}
|
||||
{% set macvlan = 'mv-' + value.bridge.split('br-')[-1] %}
|
||||
{% endif %}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
# Copyright 2018, Rackspace US, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# A combined hash of all networks to be used within a deployment.
|
||||
nspawn_combined_networks: "{{ container_networks | combine(container_extra_networks | default({})) | combine(nspawn_networks) }}"
|
Loading…
Reference in New Issue