params.pp 4.0 KB

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