object_host.conf.erb 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /**
  2. * WARNING: This host definition is automatically generated by Puppet.
  3. * ANY MANUAL CHANGES TO IT WILL GET OVERWRITTEN!
  4. */
  5. /**
  6. * A host 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 Host "<%= @object_hostname %>" {
  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 @ipv4_address -%>
  21. address = "<%= @ipv4_address -%>"
  22. <%- end -%>
  23. <%- if @ipv6_address -%>
  24. address6 = "<%= @ipv6_address -%>"
  25. <%- end -%>
  26. <%- if @groups.length != 0 -%>
  27. groups = [ <%- @groups.each do |group| -%> "<%= group %>", <%- end -%>]
  28. <%- end -%>
  29. <%- if @vars.empty? != true -%>
  30. <%- @vars.each_pair do |key, value| -%>
  31. vars.<%= key %> = "<%= value %>"
  32. <%- end -%>
  33. <%- end -%>
  34. <%- if @check_command -%>
  35. check_command = "<%= @check_command -%>"
  36. <%- end -%>
  37. <%- if @max_check_attempts -%>
  38. max_check_attempts = <%= @max_check_attempts %>
  39. <%- end -%>
  40. <%- if @check_period -%>
  41. check_period = <%= @check_period %>
  42. <%- end -%>
  43. <%- if @check_interval -%>
  44. check_interval = <%= @check_interval %>
  45. <%- end -%>
  46. <%- if @retry_interval -%>
  47. retry_interval = <%= @retry_interval %>
  48. <%- end -%>
  49. <%- if @enable_notifications -%>
  50. enable_notifications = <%= @enable_notifications %>
  51. <%- end -%>
  52. <%- if @enable_active_checks -%>
  53. enable_active_checks = <%= @enable_active_checks %>
  54. <%- end -%>
  55. <%- if @enable_passive_checks -%>
  56. enable_passive_checks = <%= @enable_passive_checks %>
  57. <%- end -%>
  58. <%- if @enable_event_handler -%>
  59. enable_event_handler = <%= @enable_event_handler %>
  60. <%- end -%>
  61. <%- if @enable_flapping -%>
  62. enable_flapping = <%= @enable_flapping %>
  63. <%- end -%>
  64. <%- if @enable_perfdata -%>
  65. enable_perfdata = <%= @enable_perfdata %>
  66. <%- end -%>
  67. <%- if @event_command -%>
  68. event_command = "<%= @event_command -%>"
  69. <%- end -%>
  70. <%- if @flapping_threshold -%>
  71. flapping_threshold = "<%= @flapping_threshold -%>"
  72. <%- end -%>
  73. <%- if @volatile -%>
  74. volatile = "<%= @volatile -%>"
  75. <%- end -%>
  76. <%- if @notes -%>
  77. notes = "<%= @notes -%>"
  78. <%- end -%>
  79. <%- if @notes_url -%>
  80. notes_url = "<%= @notes_url -%>"
  81. <%- end -%>
  82. <%- if @action_url -%>
  83. action_url = "<%= @action_url -%>"
  84. <%- end -%>
  85. <%- if @icon_image -%>
  86. icon_image = "<%= @icon_image -%>"
  87. <%- end -%>
  88. <%- if @icon_image_alt -%>
  89. icon_image_alt = "<%= @icon_image_alt -%>"
  90. <%- end -%>
  91. }