serialproxy.pp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # == Class: nova::serialproxy
  2. #
  3. # Configures nova serialproxy
  4. #
  5. # === Parameters:
  6. #
  7. # [*enabled*]
  8. # (optional) Whether to run the serialproxy service
  9. # Defaults to false
  10. #
  11. # [*manage_service*]
  12. # (optional) Whether to start/stop the service
  13. # Defaults to true
  14. #
  15. # [*serialproxy_host*]
  16. # (optional) Host on which to listen for incoming requests
  17. # Defaults to '0.0.0.0'
  18. #
  19. # [*serialproxy_port*]
  20. # (optional) Port on which to listen for incoming requests
  21. # Defaults to '6083'
  22. #
  23. # [*ensure_package*]
  24. # (optional) The state of the nova-serialproxy package
  25. # Defaults to 'present'
  26. #
  27. class nova::serialproxy(
  28. $enabled = true,
  29. $manage_service = true,
  30. $serialproxy_host = '0.0.0.0',
  31. $serialproxy_port = '6083',
  32. $ensure_package = 'present'
  33. ) {
  34. include ::nova::deps
  35. include ::nova::params
  36. nova_config {
  37. 'serial_console/serialproxy_port': value => $serialproxy_port;
  38. 'serial_console/serialproxy_host': value => $serialproxy_host;
  39. }
  40. nova::generic_service { 'serialproxy':
  41. enabled => $enabled,
  42. manage_service => $manage_service,
  43. package_name => $::nova::params::serialproxy_package_name,
  44. service_name => $::nova::params::serialproxy_service_name,
  45. ensure_package => $ensure_package
  46. }
  47. }