object_user.conf.erb 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. * WARNING: This host definition is automatically generated by Puppet.
  3. * ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
  4. */
  5. /**
  6. * A user definition. You can create your own configuration files
  7. * in the conf.d directory (e.g. one per host). By default all *.conf
  8. * files in this directory are included.
  9. *
  10. */
  11. object User "<%= @object_username %>" {
  12. <%#- If any of the @ parameters are undefined, don't print anything for them: -%>
  13. <%- if @template_to_import -%>
  14. <%#- Otherwise, include the parameter: -%>
  15. import "<%= @template_to_import -%>"
  16. <%- end -%>
  17. <%- if @display_name -%>
  18. display_name = "<%= @display_name -%>"
  19. <%- end -%>
  20. <%- if @email -%>
  21. email = "<%= @email -%>"
  22. <%- end -%>
  23. <%- if @pager -%>
  24. pager = "<%= @pager -%>"
  25. <%- end -%>
  26. <%- if @enable_notifications -%>
  27. enable_notifications = <%= @enable_notifications %>
  28. <%- end %>
  29. <%- if @vars.empty? != true -%>
  30. <%- @vars.sort_by {|key, value| key}.each do |key, value| -%>
  31. vars.<%= key %> = "<%= value %>"
  32. <%- end -%>
  33. <%- end -%>
  34. <%- if @groups.length != 0 -%>
  35. groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
  36. <%- end -%>
  37. <%- if @period -%>
  38. period = "<%= @period -%>"
  39. <%- end -%>
  40. <%- if @types.length != 0 -%>
  41. types = [ <%- @types.each do |type| -%> <%= type %>, <%- end -%>]
  42. <%- end -%>
  43. <%- if @states.length != 0 -%>
  44. states = [ <%- @states.each do |state| -%> <%= state %>, <%- end -%>]
  45. <%- end -%>
  46. }