| --- |
| - hosts: {{ instance_name }} |
| #gather_facts: False |
| connection: ssh |
| user: ubuntu |
| sudo: yes |
| vars: |
| container_name: {{ container_name }} |
| wan_container_ip: {{ wan_container_ip }} |
| wan_container_netbits: {{ wan_container_netbits }} |
| wan_container_mac: {{ wan_container_mac }} |
| wan_container_gateway_ip: {{ wan_container_gateway_ip }} |
| wan_vm_ip: {{ wan_vm_ip }} |
| wan_vm_mac: {{ wan_vm_mac }} |
| |
| test: {{ test }} |
| argument: {{ argument }} |
| result_file: {{ result_fn }} |
| |
| |
| tasks: |
| {% if test=="ping" %} |
| - name: Send the pings |
| shell: rm -f /tmp/{{ result_fn }} |
| shell: ping -c 10 {{ argument }} > /tmp/{{ result_fn }} |
| |
| - name: Fetch the ping result |
| fetch: src=/tmp/{{ result_fn }} dest=/opt/xos/synchronizers/vtr/result/{{ result_fn }} flat=yes |
| {% endif %} |
| |