Skip to content

Instantly share code, notes, and snippets.

@jp
Created August 29, 2014 09:45
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 jp/751b8adbe0d08e4ec185 to your computer and use it in GitHub Desktop.
Save jp/751b8adbe0d08e4ec185 to your computer and use it in GitHub Desktop.
# open iptables for each node
iptables_ng_rule 'cluster' do
name '01-cluster-access'
chain 'INPUT'
rule search(:node,"chef_environment:#{node.chef_environment}").map {|node| "--source #{node[:ipaddress]} --jump ACCEPT" }
ip_version 4
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment