diff options
author | Markos Chandras <mchandras@suse.de> | 2018-04-25 15:55:10 +0100 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2018-04-30 16:09:19 +0100 |
commit | 15be5eb8da9881428ea1635a3184c39f63dfaf80 (patch) | |
tree | 7e46c3fc275e1ee8222568087999a89bcd153567 /xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2 | |
parent | be67faf1cfaeb2f0d1ff73c90c8b3996b2b6a506 (diff) |
xci: roles: bootstrap-host: Simplify configuration files
We split the networking task on distro specific files to make it
easier to read. Moreover, the debian network configuration has been
improved by simply sharing a common file across all nodes and also
use the 'source' facility in the main /etc/network/interfaces file
to use one configuration file per interface.
Change-Id: Ic822fe6dc197227e70c0ba7cee812629df287d82
Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2')
-rw-r--r-- | xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2 b/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2 new file mode 100644 index 00000000..d3364385 --- /dev/null +++ b/xci/playbooks/roles/bootstrap-host/templates/osa/redhat.interface.j2 @@ -0,0 +1,22 @@ +DEVICE={{ item.name }} +NM_CONTROLLED=no +ONBOOT=yes +BOOTPROTO=none +{% if item.vlan_id is defined %} +VLAN=yes +ETHERDEVICE={{ ansible_local.xci.network.xci_interface }} +VLAN_ID={{ item.vlan_id }} +{% endif %} +{% if item.bridge is not defined %} +BRIDGE={{ item.bridge }} +{% else %} +TYPE=Bridge +DELAY=0 +STP=off +{% endif %} +{% if item.ip is defined %} +IPADDR={{ item.ip }} +{% endif %} +{% if item.prefix is defined %} +PREFIX={{ item.prefix }} +{% endif %} |