From 2f14860628bfb19e7d55f7e0cf39da8b023dfc83 Mon Sep 17 00:00:00 2001 From: Jonathan Rosser Date: Thu, 24 May 2018 21:53:25 +0100 Subject: [PATCH] Allow special purpose container interfaces Some use cases such as public facing dns servers for Designate are difficult to deploy with the dynamic inventory as they have a hard requirement for fixed IP on certain interfaces. An additional variable allows the deployer to create these special interfaces. Change-Id: I4f0ac58f2d5c19fea1606fe1fbb011bb1a36f7b4 --- .../notes/container-extra-networks-c74119ba6a559a59.yaml | 8 ++++++++ vars/main.yml | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/container-extra-networks-c74119ba6a559a59.yaml diff --git a/releasenotes/notes/container-extra-networks-c74119ba6a559a59.yaml b/releasenotes/notes/container-extra-networks-c74119ba6a559a59.yaml new file mode 100644 index 0000000..2595c50 --- /dev/null +++ b/releasenotes/notes/container-extra-networks-c74119ba6a559a59.yaml @@ -0,0 +1,8 @@ +--- +features: + - If defined in applicable host or group vars the variable + ``container_extra_networks`` will be merged with the existing + ``container_networks`` from the dynamic inventory. This allows a deployer + to specify special interfaces which may be unique to an indivdual + container. An example use for this feature would be applying known + fixed IP addresses to public interfaces on BIND servers for designate. diff --git a/vars/main.yml b/vars/main.yml index 4c5cade..17a4af0 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -14,6 +14,7 @@ # limitations under the License. # A set of container networks used within the LXC containers. This information -# is sourced from the assumed "container_networks" and "lxc_container_networks" -# variables and combined into a single immutable hash. -lxc_container_networks_combined: "{{ container_networks | default({}) | combine(lxc_container_networks) }}" +# is sourced from the assumed "container_networks", "container_extra_networks" +# and "lxc_container_networks" variables and combined into a single +# immutable hash. +lxc_container_networks_combined: "{{ container_networks | default({}) | combine(container_extra_networks | default({})) | combine(lxc_container_networks) }}"