Skip to content

Instantly share code, notes, and snippets.

@austinpapp
Created December 19, 2016 14:31
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 austinpapp/ce1bb4fa80223b3645532dfa3b7fecb2 to your computer and use it in GitHub Desktop.
Save austinpapp/ce1bb4fa80223b3645532dfa3b7fecb2 to your computer and use it in GitHub Desktop.
{% set ipv6_enabled = [] %}
{% for ip in grains["ipv6"] %}
{% if ip[:12] in ["fe80::a00:27"] %}
echo found {{ ip }}:
cmd.run
echo before {{ ipv6_enabled }}:
cmd.run
{% do ipv6_enabled.append(1) %}
echo after {{ ipv6_enabled }}:
cmd.run
{% break %}
{% endif %}
{% endfor %}
echo final {{ ipv6_enabled }}:
cmd.run
{% if ipv6_enabled %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment