summaryrefslogtreecommitdiffstats
path: root/xci/playbooks/roles
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-04-18 10:04:48 +0200
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2017-08-11 12:56:12 -0700
commitf8c31589066ef70ba749ba694bf4dea732290b24 (patch)
tree4731174713412d05d91abf904d5f2860492409b5 /xci/playbooks/roles
parent796a5f56f02e131c996de434a3b7c95b346ec649 (diff)
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 <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'xci/playbooks/roles')
-rw-r--r--xci/playbooks/roles/configure-network/tasks/main.yml30
1 files changed, 24 insertions, 6 deletions
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"