params.pp 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # == Class icingaweb2::params
  2. #
  3. class icingaweb2::params {
  4. # Module variables
  5. $git_repo = 'https://git.icinga.org/icingaweb2.git'
  6. $git_revision = undef
  7. $install_method = 'git'
  8. $manage_apache_vhost = false
  9. $manage_repo = false
  10. $manage_user = true
  11. # Template variables
  12. $admin_permissions = '*'
  13. $admin_users = 'icingaadmin'
  14. $auth_backend = 'db'
  15. $auth_resource = 'icingaweb_db'
  16. $ido_db = 'mysql'
  17. $ido_db_host = 'localhost'
  18. $ido_db_name = 'icingaweb2'
  19. $ido_db_pass = 'icingaweb2'
  20. $ido_db_port = '3306'
  21. $ido_db_user = 'icingaweb2'
  22. $ido_type = 'db'
  23. $log_application = 'icingaweb2'
  24. $log_level = 'ERROR'
  25. $log_method = 'syslog'
  26. $log_resource = 'icingaweb_db'
  27. $log_store = 'db'
  28. $pkg_repo_version = 'release'
  29. $template_auth = 'icingaweb2/authentication.ini.erb'
  30. $template_config = 'icingaweb2/config.ini.erb'
  31. $template_resources='icingaweb2/resources.ini.erb'
  32. $template_roles = 'icingaweb2/roles.ini.erb'
  33. $template_apache = 'icingaweb2/apache2.conf.erb'
  34. $web_db = 'mysql'
  35. $web_db_host = 'localhost'
  36. $web_db_name = 'icingaweb2'
  37. $web_db_pass = 'icingaweb2'
  38. $web_db_port = '3306'
  39. $web_db_prefix = 'icingaweb2_'
  40. $web_db_user = 'icingaweb2'
  41. $web_type = 'db'
  42. $initialize = false
  43. case $::osfamily {
  44. 'RedHat': {
  45. $config_dir = '/etc/icingaweb2'
  46. $config_dir_mode = '2770'
  47. $config_dir_purge = false
  48. $config_dir_recurse = false
  49. $config_file_mode = '0664'
  50. $config_group = 'icingaweb2'
  51. $config_user = 'icingaweb2'
  52. $pkg_ensure = present
  53. $pkg_list = ['icingaweb2']
  54. $pkg_repo_release_key = 'http://packages.icinga.org/icinga.key'
  55. $pkg_repo_release_metadata_expire = undef
  56. case $::operatingsystem {
  57. 'Scientific': {
  58. $pkg_repo_release_url = "http://packages.icinga.org/epel/${::operatingsystemmajrelease}/release"
  59. $pkg_repo_snapshot_url = "http://packages.icinga.org/epel/${::operatingsystemmajrelease}/snapshot"
  60. }
  61. default: {
  62. $pkg_repo_release_url = 'http://packages.icinga.org/epel/$releasever/release'
  63. $pkg_repo_snapshot_url = 'http://packages.icinga.org/epel/$releasever/snapshot'
  64. }
  65. }
  66. $pkg_repo_snapshot_key = 'http://packages.icinga.org/icinga.key'
  67. $pkg_repo_snapshot_metadata_expire = '1d'
  68. $web_root = '/usr/share/icingaweb2'
  69. $pkg_deps = [
  70. 'php-gd',
  71. 'php-intl',
  72. 'php-ldap',
  73. 'php-mysql',
  74. 'php-pecl-imagick',
  75. 'php-pgsql',
  76. ]
  77. }
  78. 'Debian': {
  79. $config_dir = '/etc/icingaweb2'
  80. $config_dir_mode = '0755'
  81. $config_dir_purge = false
  82. $config_dir_recurse = false
  83. $config_file_mode = '0644'
  84. $config_group = 'icingaweb2'
  85. $config_user = 'icingaweb2'
  86. $pkg_ensure = present
  87. $pkg_list = ['icingaweb2']
  88. $pkg_repo_release_key = undef
  89. $pkg_repo_release_metadata_expire = undef
  90. $pkg_repo_release_url = undef
  91. $pkg_repo_snapshot_key = undef
  92. $pkg_repo_snapshot_metadata_expire = undef
  93. $pkg_repo_snapshot_url = undef
  94. $web_root = '/usr/share/icingaweb2'
  95. $pkg_deps = [
  96. 'php5-gd',
  97. 'php5-imagick',
  98. 'php5-intl',
  99. 'php5-ldap',
  100. 'php5-mysql',
  101. 'php5-pgsql',
  102. ]
  103. }
  104. default: {
  105. fail "Operating system ${::operatingsystem} is not supported."
  106. }
  107. }
  108. }