Skip to content

Instantly share code, notes, and snippets.

@TimJDFletcher
Created September 3, 2017 20:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TimJDFletcher/def16798e25a0d5553b61e920ac72262 to your computer and use it in GitHub Desktop.
Save TimJDFletcher/def16798e25a0d5553b61e920ac72262 to your computer and use it in GitHub Desktop.
Check IPv6 connections with ansible
---
- hosts: all
gather_facts: false
tasks:
- name: Get information from ds.testmyipv6.com
raw: curl http://ds.testmyipv6.com/
changed_when: false
register: connection_test
- debug:
msg: IPv6 supported
when: "'You are successfully using IPv6 to connect to this server' in connection_test.stdout"
- debug:
msg: IPv6 not supported
when: "'You are connecting to this server via IPv4' in connection_test.stdout"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment