Skip to content

Instantly share code, notes, and snippets.

@dkiser
Created July 16, 2015 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dkiser/159e20e0ab8fee11a42c to your computer and use it in GitHub Desktop.
Save dkiser/159e20e0ab8fee11a42c to your computer and use it in GitHub Desktop.
salt_hw_nic_infos
{% for nic, nic_data in salt['network.interfaces']().iteritems() %}
{% set _port_type = salt['cmd.run']("ethtool {{nic}} | grep -i 'port:' | awk '{print $2}'") %}
{{ _port_type }}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment