Added a states parameter to the user object and rendering of it to the ERB template.
This commit is contained in:
parent
6ad25eee99
commit
d5fa1e655a
2 changed files with 4 additions and 5 deletions
|
@ -19,8 +19,7 @@ define icinga2::object::user (
|
|||
$enable_notifications = undef,
|
||||
$period = undef,
|
||||
$types = [],
|
||||
#Parameters to add:
|
||||
# states
|
||||
$states = [],
|
||||
$target_dir = '/etc/icinga2/conf.d',
|
||||
$target_file_name = "${fqdn}.conf",
|
||||
$target_file_owner = 'root',
|
||||
|
|
|
@ -10,9 +10,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
//Parameters to add:
|
||||
// states
|
||||
|
||||
object User "<%= @object_username %>" {
|
||||
<%#- If any of the @ parameters are undefined, don't print anything for them: -%>
|
||||
<%- if @template_to_import -%>
|
||||
|
@ -45,4 +42,7 @@ object User "<%= @object_username %>" {
|
|||
<%- if @types.length != 0 -%>
|
||||
types = [ <%- @types.each do |type| -%> <%= type %>, <%- end -%>]
|
||||
<%- end -%>
|
||||
<%- if @states.length != 0 -%>
|
||||
states = [ <%- @states.each do |state| -%> <%= state %>, <%- end -%>]
|
||||
<%- end -%>
|
||||
}
|
Loading…
Reference in a new issue