diff --git a/ansible/roles/test/tasks/decap.yml b/ansible/roles/test/tasks/decap.yml index ce08e508335..01672c9077e 100644 --- a/ansible/roles/test/tasks/decap.yml +++ b/ansible/roles/test/tasks/decap.yml @@ -65,12 +65,7 @@ debug: msg="Loopback IPs {{ lo_ip }}, {{ lo_ipv6 }}" # Generate file with BGP routes information -- template: src=roles/test/templates/fib.j2 dest=/tmp/fib_info.txt - connection: local - -# Copy the fib_info to ptf container -- template: src=/tmp/fib_info.txt dest=/root - connection: local +- template: src=roles/test/templates/fib.j2 dest=/root/fib_info.txt delegate_to: "{{ ptf_host }}" - set_fact: outer_ipv4=True diff --git a/ansible/roles/test/tasks/shared-fib.yml b/ansible/roles/test/tasks/shared-fib.yml index 73aee0d19bb..a7739620a76 100644 --- a/ansible/roles/test/tasks/shared-fib.yml +++ b/ansible/roles/test/tasks/shared-fib.yml @@ -30,11 +30,7 @@ # Generate route file - name: Generate route-port map information template: src=roles/test/templates/fib.j2 - dest=/tmp/fib_info.txt - connection: local - -- name: copy the fib_info to ptf container - copy: src=/tmp/fib_info.txt dest=/root + dest=/root/fib_info.txt delegate_to: "{{ptf_host}}"