summaryrefslogtreecommitdiffstats
path: root/xci/installer/osh/playbooks/roles/prepare-osh/tasks/main.yml
blob: aeaca6be68c3539a01a0409357ab7090435df21c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
- name: Write new resolv.conf file
  template:
    src: resolv.conf.j2
    dest: /etc/resolv.conf

- name: Make resolv.conf immutable
  shell: "chattr +i /etc/resolv.conf"
  changed_when: false
  args:
    executable: /bin/bash
  tags:
    - skip_ansible_lint

#TODO Fetch the value from a file generated by k8s deployer
- name: Get kube service addresses
  shell: "grep -r 'kube_service_addresses:' /root/releng-xci/.cache/repos/kubespray/opnfv_inventory/group_vars/k8s-cluster.yml | awk '{print $2}'"
  changed_when: false
  args:
    executable: /bin/bash
  register: kube_service_addresses
  tags:
    - skip_ansible_lint

#This rule allows openstack client in OPNFV VM to reach openstack
- name: Update routing table with kube service addresses
  shell: "ip route add {{ kube_service_addresses.stdout }} via 192.168.122.3 dev br-vlan onlink"
  changed_when: false
  args:
    executable: /bin/bash
  tags:
    - skip_ansible_lint