Remove hardcoded ips 15/68315/8
authorManuel Buil <mbuil@suse.com>
Mon, 5 Aug 2019 12:06:28 +0000 (14:06 +0200)
committerManuel Buil <mbuil@suse.com>
Tue, 6 Aug 2019 12:59:00 +0000 (14:59 +0200)
We should use the Ansible variables whenever possible instead of
hardcoding values like IPs

deploy-scenario:k8-calico-nofeature
installer-type:osh

Change-Id: Iee5f179b0b36d2fcbf9b2eca82a3c31cefd83229
Signed-off-by: Manuel Buil <mbuil@suse.com>
xci/installer/osh/playbooks/roles/install-osh-mini/tasks/main.yml

index e3fa2dd..eb920a8 100644 (file)
@@ -96,7 +96,7 @@
     chdir: /root/repos/openstack-helm
 
 - name: Copy script to the worker node
-  command: "scp -o \"StrictHostKeyChecking no\" tools/deployment/developer/ceph/170-setup-gateway.sh root@192.168.122.4:170-setup-gateway.sh"
+  command: "scp -o \"StrictHostKeyChecking no\" tools/deployment/developer/ceph/170-setup-gateway.sh root@{{ hostvars.node1.ip }}:170-setup-gateway.sh"
   changed_when: false
   args:
     chdir: /root/repos/openstack-helm
 - name: Setup the gateway to the public network at worker node
   command: /root/170-setup-gateway.sh
   changed_when: false
-  delegate_to: 192.168.122.4
+  delegate_to: node1
 
 - name: Add a route from opnfv to worker node for the public network
   command: ip route add 172.24.4.0/24 via 192.168.122.4