summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/post-osa/templates
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2017-12-11 16:08:16 +0800
committerYifei Xue <xueyifei@huawei.com>2017-12-12 17:49:13 +0800
commitd30fc513bbda9fb2ab8421ed795b89c25bc08f7d (patch)
treed756617467b00fc7bdfedd954022b8b28c3d2cfa /deploy/adapters/ansible/roles/post-osa/templates
parent5fbadc0b9b5d8726050906d0923abfe7ea5ce1c0 (diff)
Bug fix for CentOS BM deployment
JIRA: - In order to configure network for OSA deployment, it's needed to install some packages, such as bridge-utils, iputils, etc. So we configure external network before using yum to install packages. Change-Id: I87864d6bdae79184aa82223f77b6ced1d0e9cf26 Signed-off-by: Yifei Xue <xueyifei@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/post-osa/templates')
-rw-r--r--deploy/adapters/ansible/roles/post-osa/templates/ifcfg-storage.j29
-rw-r--r--deploy/adapters/ansible/roles/post-osa/templates/ifcfg-tenant.j29
2 files changed, 14 insertions, 4 deletions
diff --git a/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-storage.j2 b/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-storage.j2
index 338da8c4..98cce6cb 100644
--- a/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-storage.j2
+++ b/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-storage.j2
@@ -1,7 +1,12 @@
-DEVICE={{compu_sys_mappings["storage"]["interface"]}}.{{compu_sys_mappings["storage"]["vlan_tag"]}}
+DEVICE={{ intf_storage }}
BOOTPROTO=none
ONBOOT=yes
-VLAN=yes
IPADDR={{ ip_settings[inventory_hostname]["storage"]["ip"] }}
NETMASK=255.255.255.0
DEFROUTE="no"
+{% if contr_sys_mappings["storage"]["vlan_tag"] | int %}
+{% set intf_vlan = "yes" %}
+{% else %}
+{% set intf_vlan = "no" %}
+{% endif %}
+VLAN={{ intf_vlan }}
diff --git a/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-tenant.j2 b/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-tenant.j2
index 15230c96..fce9b572 100644
--- a/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-tenant.j2
+++ b/deploy/adapters/ansible/roles/post-osa/templates/ifcfg-tenant.j2
@@ -1,7 +1,12 @@
-DEVICE={{compu_sys_mappings["tenant"]["interface"]}}.{{compu_sys_mappings["tenant"]["vlan_tag"]}}
+DEVICE={{ intf_tenant }}
BOOTPROTO=none
ONBOOT=yes
-VLAN=yes
IPADDR={{ ip_settings[inventory_hostname]["tenant"]["ip"] }}
NETMASK=255.255.255.0
DEFROUTE="no"
+{% if contr_sys_mappings["tenant"]["vlan_tag"] | int %}
+{% set intf_vlan = "yes" %}
+{% else %}
+{% set intf_vlan = "no" %}
+{% endif %}
+VLAN={{ intf_vlan }}