Merge "Ensure veths are only 15 characters long"
This commit is contained in:
commit
d68b9c91b9
|
@ -102,3 +102,5 @@ lxc_container_download_template_options: >
|
|||
|
||||
# Toggle the restart of containers via the handler.
|
||||
lxc_container_allow_restarts: yes
|
||||
|
||||
lxc_container_network_veth_pair: "{{ inventory_hostname[-8:].replace('-', '').replace('_', '') }}_{{ item.value.interface }}"
|
||||
|
|
|
@ -251,7 +251,7 @@
|
|||
shell: >
|
||||
/usr/local/bin/lxc-veth-wiring
|
||||
"{{ inventory_hostname }}"
|
||||
"{{ inventory_hostname[-8:].replace('-', '').replace('_', '') }}_{{ item.value.interface }}"
|
||||
"{{ lxc_container_network_veth_pair[-15:] }}"
|
||||
"{{ item.value.interface }}"
|
||||
"{{ item.value.bridge }}"
|
||||
register: wiring_script
|
||||
|
|
|
@ -8,7 +8,7 @@ lxc.network.name = {{ item.value.interface }}
|
|||
# Name the veth after the container
|
||||
# NOTE(major): The lxc.network.veth.pair line must appear right after
|
||||
# lxc.network.name or it will be ignored.
|
||||
lxc.network.veth.pair = {{ inventory_hostname[-8:].replace('-', '').replace('_', '') }}_{{ item.value.interface }}
|
||||
lxc.network.veth.pair = {{ lxc_container_network_veth_pair[-15:] }}
|
||||
{% endif %}
|
||||
# Host link to attach to, this should be a bridge if lxc.network.type = veth
|
||||
lxc.network.link = {{ item.value.bridge }}
|
||||
|
|
Loading…
Reference in New Issue