From f8c31589066ef70ba749ba694bf4dea732290b24 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Tue, 18 Apr 2017 10:04:48 +0200 Subject: xci: Fix network configuration This change - sets static IP for controller nodes' vxlan bridges as stated in osa documentation: compute and network hosts must have an IP [1] - configures IPs for controller nodes' vxlan bridges. - removes the additional vlan ip from compute nodes as it seems to be there for all in one. - removes glean.rules as they mess with the network configuration once the network changes are applied. - removes the contents of interfaces.d as osa populates config for lxc bridges and includes this config in interfaces file thus all the files in interfaces.d must be removed in order not to mess with the network configuration. - updates modules appropriately. [1] https://docs.openstack.org/project-deploy-guide/openstack-ansible/draft/app-config-prod.html Change-Id: I84d5f07216c8d0246da06080fb0ed19f917d6637 Signed-off-by: Fatih Degirmenci --- .../roles/configure-network/tasks/main.yml | 30 +++++++++++++++++----- 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'xci/playbooks') diff --git a/xci/playbooks/roles/configure-network/tasks/main.yml b/xci/playbooks/roles/configure-network/tasks/main.yml index 8bc84822..aafadf71 100644 --- a/xci/playbooks/roles/configure-network/tasks/main.yml +++ b/xci/playbooks/roles/configure-network/tasks/main.yml @@ -8,9 +8,27 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## # TODO: this role needs to be adjusted for different distros -- name: configure network for {{ ansible_os_family }} on interface {{ interface }} - template: - src: "{{ src }}" - dest: "{{ dest }}" -- name: restart ubuntu xenial network service - shell: "/sbin/ifconfig {{ interface }} 0 &&/sbin/ifdown -a && /sbin/ifup -a" +- block: + - name: configure modules + lineinfile: + dest: /etc/modules + state: present + create: yes + line: "8021q" + - name: add modules + modprobe: + name: 8021q + state: present + - name: ensure glean rules are removed + file: + path: "/etc/udev/rules.d/99-glean.rules" + state: absent + - name: ensure interfaces.d folder is empty + shell: "/bin/rm -rf /etc/network/interfaces.d/*" + - name: ensure interfaces file is updated + template: + src: "{{ src }}" + dest: "{{ dest }}" + - name: restart network service + shell: "/sbin/ifconfig {{ interface }} 0 && /sbin/ifdown -a && /sbin/ifup -a" + when: ansible_distribution_release == "xenial" -- cgit 1.2.3-korg