Add <type>_network_interfaces for controllers, monitoring, seed, seed-hypervisor

This allows for the full set of interfaces to be overridden by setting one
of these variables, rather than simply extending the default list via
<type>_extra_network_interfaces.
This commit is contained in:
Mark Goddard 2017-08-29 13:01:45 +00:00
parent 4544e67bd0
commit f0b409e484
12 changed files with 38 additions and 15 deletions

View File

@ -9,6 +9,11 @@ controller_bootstrap_user: "{{ lookup('env', 'USER') }}"
############################################################################### ###############################################################################
# Controller network interface configuration. # Controller network interface configuration.
# List of networks to which controller nodes are attached.
controller_network_interfaces: >
{{ (controller_default_network_interfaces +
controller_extra_network_interfaces) | unique | list }}
# List of default networks to which controller nodes are attached. # List of default networks to which controller nodes are attached.
controller_default_network_interfaces: > controller_default_network_interfaces: >
{{ [provision_oc_net_name, {{ [provision_oc_net_name,

View File

@ -9,6 +9,13 @@ monitoring_bootstrap_user: "{{ controller_bootstrap_user }}"
############################################################################### ###############################################################################
# Monitoring node network interface configuration. # Monitoring node network interface configuration.
# List of networks to which monitoring nodes are attached.
monitoring_network_interfaces: >
{{ controller_network_interfaces | unique | list
if inventory_hostname in groups['controllers'] else
(monitoring_default_network_interfaces +
monitoring_extra_network_interfaces) | unique | list }}
# List of default networks to which monitoring nodes are attached. # List of default networks to which monitoring nodes are attached.
monitoring_default_network_interfaces: > monitoring_default_network_interfaces: >
{{ [provision_oc_net_name, {{ [provision_oc_net_name,

View File

@ -9,6 +9,11 @@ seed_bootstrap_user: "{{ lookup('env', 'USER') }}"
############################################################################### ###############################################################################
# Seed network interface configuration. # Seed network interface configuration.
# List of networks to which seed nodes are attached.
seed_network_interfaces: >
{{ (seed_default_network_interfaces +
seed_extra_network_interfaces) | unique | list }}
# List of default networks to which seed nodes are attached. # List of default networks to which seed nodes are attached.
seed_default_network_interfaces: > seed_default_network_interfaces: >
{{ [oob_oc_net_name, {{ [oob_oc_net_name,

View File

@ -2,6 +2,11 @@
############################################################################### ###############################################################################
# Seed hypervisor network interface configuration. # Seed hypervisor network interface configuration.
# List of networks to which seed hypervisor nodes are attached.
seed_hypervisor_network_interfaces: >
{{ (seed_hypervisor_default_network_interfaces +
seed_hypervisor_extra_network_interfaces) | unique | list }}
# List of default networks to which seed hypervisor nodes are attached. # List of default networks to which seed hypervisor nodes are attached.
seed_hypervisor_default_network_interfaces: "{{ seed_default_network_interfaces }}" seed_hypervisor_default_network_interfaces: "{{ seed_default_network_interfaces }}"

View File

@ -3,6 +3,4 @@
# Network interface attachments. # Network interface attachments.
# List of networks to which these nodes are attached. # List of networks to which these nodes are attached.
network_interfaces: > network_interfaces: "{{ controller_network_interfaces | unique | list }}"
{{ (controller_default_network_interfaces +
controller_extra_network_interfaces) | unique | list }}

View File

@ -3,9 +3,4 @@
# Network interface attachments. # Network interface attachments.
# List of networks to which these nodes are attached. # List of networks to which these nodes are attached.
network_interfaces: > network_interfaces: "{{ monitoring_network_interfaces | unique | list }}"
{{ (controller_default_network_interfaces +
controller_extra_network_interfaces) | unique | list
if inventory_hostname in groups['controllers'] else
(monitoring_default_network_interfaces +
monitoring_extra_network_interfaces) | unique | list }}

View File

@ -3,6 +3,4 @@
# Network interface attachments. # Network interface attachments.
# List of networks to which these nodes are attached. # List of networks to which these nodes are attached.
network_interfaces: > network_interfaces: "{{ seed_hypervisor_network_interfaces | unique | list }}"
{{ (seed_hypervisor_default_network_interfaces +
seed_hypervisor_extra_network_interfaces) | unique | list }}

View File

@ -3,6 +3,4 @@
# Network interface attachments. # Network interface attachments.
# List of networks to which these nodes are attached. # List of networks to which these nodes are attached.
network_interfaces: > network_interfaces: "{{ seed_network_interfaces | unique | list }}"
{{ (seed_default_network_interfaces +
seed_extra_network_interfaces) | unique | list }}

View File

@ -9,6 +9,9 @@
############################################################################### ###############################################################################
# Network interface attachments. # Network interface attachments.
# List of networks to which controller nodes are attached.
#controller_network_interfaces:
# List of default networks to which controller nodes are attached. # List of default networks to which controller nodes are attached.
#controller_default_network_interfaces: #controller_default_network_interfaces:

View File

@ -9,6 +9,9 @@
############################################################################### ###############################################################################
# Monitoring node network interface configuration. # Monitoring node network interface configuration.
# List of networks to which monitoring nodes are attached.
#monitoring_network_interfaces:
# List of default networks to which monitoring nodes are attached. # List of default networks to which monitoring nodes are attached.
#monitoring_default_network_interfaces: #monitoring_default_network_interfaces:

View File

@ -2,6 +2,9 @@
############################################################################### ###############################################################################
# Seed hypervisor network interface configuration. # Seed hypervisor network interface configuration.
# List of networks to which seed hypervisor nodes are attached.
#seed_hypervisor_network_interfaces:
# List of default networks to which seed hypervisor nodes are attached. # List of default networks to which seed hypervisor nodes are attached.
#seed_hypervisor_default_network_interfaces: #seed_hypervisor_default_network_interfaces:

View File

@ -9,6 +9,9 @@
############################################################################### ###############################################################################
# Network interface attachments. # Network interface attachments.
# List of networks to which seed nodes are attached.
#seed_network_interfaces:
# List of default networks to which seed nodes are attached. # List of default networks to which seed nodes are attached.
#seed_default_network_interfaces: #seed_default_network_interfaces: