Skip to content

Instantly share code, notes, and snippets.

@adamrb
Created July 5, 2013 15:00
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 adamrb/5935142 to your computer and use it in GitHub Desktop.
Save adamrb/5935142 to your computer and use it in GitHub Desktop.
define ip_local_reserved_ports (
$reserved_ports = [],
) {
$all_reserved_ports += $reserved_ports
$joined_ports = join($all_reserved_ports, ",")
file_line { 'joined_ports_line':
line => "net.ipv4.ip_local_reserved_ports = ${joined_ports}",
path => "/etc/sysctl.conf",
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment