-
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support overriding ssh port in default config
- Include param tags - fail2ban::port function to simplify syntax - Add Debian 12 template
- Loading branch information
Showing
23 changed files
with
2,747 additions
and
1,971 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# See https://puppet.com/docs/puppet/latest/lang_write_functions_in_puppet.html | ||
# for more information on native puppet functions. | ||
# | ||
# Looks up fail2ban::jails_config.{namespace} for port configuration | ||
# | ||
# @param config_key | ||
# @param default_port | ||
# @return actual config | ||
function fail2ban::port(String $config_key, Fail2ban::Port $default_port) >> String { | ||
$needle = "fail2ban::jails_config.${config_key}.port" | ||
$result = lookup($needle, undef, undef, $default_port) | ||
|
||
case $result { | ||
String : { $result } | ||
Integer : { String($result) } | ||
Array,Tuple : { join($result, ',') } | ||
default : { raise(Puppet::ParseError, "Unsupported type in lookup result: ${result}.class") } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.