summaryrefslogtreecommitdiffstats
path: root/xci/installer/osh/playbooks/roles/prepare-osh/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'xci/installer/osh/playbooks/roles/prepare-osh/tasks/main.yml')
-rw-r--r--xci/installer/osh/playbooks/roles/prepare-osh/tasks/main.yml33
1 files changed, 33 insertions, 0 deletions
diff --git a/xci/installer/osh/playbooks/roles/prepare-osh/tasks/main.yml b/xci/installer/osh/playbooks/roles/prepare-osh/tasks/main.yml
new file mode 100644
index 00000000..453a815c
--- /dev/null
+++ b/xci/installer/osh/playbooks/roles/prepare-osh/tasks/main.yml
@@ -0,0 +1,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/inventory/opnfv/group_vars/k8s-cluster/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
+