Added a types parameter to the user object and rendering of it to the ERB template.

This commit is contained in:
Nick Chappell 2014-08-03 19:15:57 -07:00
parent 086a300b1f
commit 6ad25eee99
2 changed files with 4 additions and 2 deletions

View file

@ -18,8 +18,8 @@ define icinga2::object::user (
$groups = [],
$enable_notifications = undef,
$period = undef,
$types = [],
#Parameters to add:
# types
# states
$target_dir = '/etc/icinga2/conf.d',
$target_file_name = "${fqdn}.conf",

View file

@ -11,7 +11,6 @@
*/
//Parameters to add:
// types
// states
object User "<%= @object_username %>" {
@ -43,4 +42,7 @@ object User "<%= @object_username %>" {
<%- if @period -%>
period "<%= @period -%>"
<%- end -%>
<%- if @types.length != 0 -%>
types = [ <%- @types.each do |type| -%> <%= type %>, <%- end -%>]
<%- end -%>
}