Skip to content

Instantly share code, notes, and snippets.

@kevinquinnyo
Created March 9, 2016 22:22
Show Gist options
  • Select an option

  • Save kevinquinnyo/d1c4ef59a53c89d608cf to your computer and use it in GitHub Desktop.

Select an option

Save kevinquinnyo/d1c4ef59a53c89d608cf to your computer and use it in GitHub Desktop.
webserver_private_ips = []
web_interfaces = __salt__['mine.get']('web*{0}*'.format(client_id), 'network.interfaces')
webserver_private_ips = []
for minion, interface in web_interfaces.iteritems():
for name, data in interface.iteritems():
if name == 'eth1':
webserver_private_ips.append(data['inet'][0]['address'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment