From 8503b6c31989c1b290f3c81953410415265965d1 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Mon, 19 Mar 2018 07:41:50 -0700 Subject: Move configuration network templates The jinja templates that are used for networking setup are based on the openstack-ansible needs, those needs can differ for another installers. This change propose to make the network configuration depending on the installer. Signed-off-by: Victor Morales Change-Id: Ie805c3c7716393377d4dfcb32ed794cc1039d515 --- xci/playbooks/roles/bootstrap-host/tasks/network.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xci/playbooks/roles/bootstrap-host/tasks/network.yml') diff --git a/xci/playbooks/roles/bootstrap-host/tasks/network.yml b/xci/playbooks/roles/bootstrap-host/tasks/network.yml index 92e9195e..723db48d 100644 --- a/xci/playbooks/roles/bootstrap-host/tasks/network.yml +++ b/xci/playbooks/roles/bootstrap-host/tasks/network.yml @@ -70,7 +70,7 @@ - directory - name: ensure interfaces file is updated template: - src: "{{ ansible_os_family | lower }}/{{ ansible_hostname }}.interface.j2" + src: "{{ installer_type }}/{{ ansible_os_family | lower }}/{{ ansible_hostname }}.interface.j2" dest: "/etc/network/interfaces" - name: restart network service shell: "/sbin/ifconfig {{ ansible_local.xci.network.xci_interface }} 0 && /sbin/ifdown -a && /sbin/ifup -a" @@ -81,7 +81,7 @@ - block: - name: Configure networking on SUSE template: - src: "{{ ansible_os_family | lower }}/suse.interface.j2" + src: "{{ installer_type }}/{{ ansible_os_family | lower }}/suse.interface.j2" dest: "/etc/sysconfig/network/ifcfg-{{ item.name }}" with_items: - { name: "{{ ansible_local.xci.network.xci_interface }}" } @@ -101,7 +101,7 @@ - name: Configure routes on SUSE template: - src: "{{ ansible_os_family | lower }}/suse.routes.j2" + src: "{{ installer_type }}/{{ ansible_os_family | lower }}/suse.routes.j2" dest: "/etc/sysconfig/network/ifroute-{{ item.name }}" with_items: - { name: "br-vlan", gateway: "192.168.122.1", route: "default" } @@ -116,7 +116,7 @@ - block: - name: Configure networking on CentOS for interfaces template: - src: "{{ ansible_os_family | lower }}/interface.ifcfg.j2" + src: "{{ installer_type }}/{{ ansible_os_family | lower }}/interface.ifcfg.j2" dest: "/etc/sysconfig/network-scripts/ifcfg-{{ item.name }}" with_items: - { name: "{{ ansible_local.xci.network.xci_interface }}" , bridge: "br-vlan" } @@ -125,7 +125,7 @@ - { name: "{{ ansible_local.xci.network.xci_interface }}.30", bridge: "br-vxlan" , vlan_id: 30 } - name: Configure networking on CentOS for bridges template: - src: "{{ ansible_os_family | lower }}/bridge.ifcfg.j2" + src: "{{ installer_type }}/{{ ansible_os_family | lower }}/bridge.ifcfg.j2" dest: "/etc/sysconfig/network-scripts/ifcfg-{{ item.name }}" with_items: - { name: "br-vlan" , ip: "{{ host_info[inventory_hostname].VLAN_IP }}", prefix: 24 } -- cgit 1.2.3-korg