29aad33a6bba5e8ec070e7a93d44b4cacb9b6656
[mirror/dsa-puppet.git] / 3rdparty / modules / horizon / manifests / params.pp
1 # these parameters need to be accessed from several locations and
2 # should be considered to be constant
3 class horizon::params {
4
5   $logdir      = '/var/log/horizon'
6   $django_wsgi = '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'
7   $manage_py   = '/usr/share/openstack-dashboard/manage.py'
8
9   case $::osfamily {
10     'RedHat': {
11       $http_service                = 'httpd'
12       $http_modwsgi                = 'mod_wsgi'
13       $package_name                = 'openstack-dashboard'
14       $config_file                 = '/etc/openstack-dashboard/local_settings'
15       $httpd_config_file           = '/etc/httpd/conf.d/openstack-dashboard.conf'
16       $httpd_listen_config_file    = '/etc/httpd/conf/httpd.conf'
17       $root_url                    = '/dashboard'
18       $apache_user                 = 'apache'
19       $apache_group                = 'apache'
20       $wsgi_user                   = 'dashboard'
21       $wsgi_group                  = 'dashboard'
22     }
23     'Debian': {
24       $http_service                = 'apache2'
25       $config_file                 = '/etc/openstack-dashboard/local_settings.py'
26       $httpd_listen_config_file    = '/etc/apache2/ports.conf'
27       $root_url                    = '/horizon'
28       $apache_user                 = 'www-data'
29       $apache_group                = 'www-data'
30       $wsgi_user                   = 'horizon'
31       $wsgi_group                  = 'horizon'
32       case $::operatingsystem {
33         'Debian': {
34             $package_name          = 'openstack-dashboard-apache'
35             $httpd_config_file     = '/etc/apache2/sites-available/openstack-dashboard.conf'
36         }
37         default: {
38             $package_name          = 'openstack-dashboard'
39             $httpd_config_file     = '/etc/apache2/conf-available/openstack-dashboard.conf'
40         }
41       }
42     }
43     default: {
44       fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian")
45     }
46   }
47 }