- name: ipv6 acceptance gather_facts: no hosts: "{{target}}" become: "{{ become_var|default(false) }}" tasks: - debug: var=type run_once: true - name: SNAT // guest behind nat can reach both perimeters shell: executable: /bin/bash cmd: | set -e ping -4 -W1 -c3 192.168.122.1 ping -6 -W1 -c3 baaf::baaf:1 register: output changed_when: false when: natgw is not defined - debug: var=output.stdout when: natgw is not defined - name: DNAT // both ip4+6 perimeters can reach guest behind nat delegate_to: localhost run_once: true shell: executable: /bin/bash cmd: | set -e echo ip4 ping -4 -W1 -c3 192.168.122.21 nmap -4 -p 2222 192.168.122.21 ssh -4 -p 2222 192.168.122.21 -l root hostname echo ip6 if [[ {{type}} = nat4466 ]]; then host=baaf::baaf:21 port=2222 elif [[ {{type}} = nat4400 ]]; then host=beef::beef:22 port=22 else echo unknown type {{type}} exit 1 fi ping -6 -W1 -c3 $host nmap -6 -p $port $host ssh -6 -p $port $host -l root hostname register: output changed_when: false - debug: var=output.stdout run_once: true