Skip to content

Instantly share code, notes, and snippets.

@b4ldr
Last active August 29, 2015 14:05
Show Gist options
  • Save b4ldr/4e9b5e69fc6a72984f68 to your computer and use it in GitHub Desktop.
Save b4ldr/4e9b5e69fc6a72984f68 to your computer and use it in GitHub Desktop.
interfaces => dummy0,dummy0_0,eth0,eth1,lo
ipaddress_eth0 => 192.2.0.1
macaddress_eth0 => 60:eb:69:8f:88:19
macaddress_eth1 => 60:eb:69:8f:88:1a
mtu_eth0 => 1500
mtu_eth1 => 1500
netmask_eth0 => 255.255.255.128
<% @interfaces.each do |eth| if local_variables.grep(/ipaddress_#{@eth}/) and ! eth.start_with?('dummy', 'lo') %>
listen: <%= eval(ipaddress_#{@eth}) %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment