From 0361fc8964b1cd8b8cd09d9aa8596bd5f12e81e2 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 30 Apr 2020 00:19:50 +0900 Subject: [PATCH] Expect Python3.6 instead of Python2.7 on CentOS8 and Fedora Change-Id: Id485d353e40433644dec4f9d8ec18e4124373dce --- spec/classes/zaqar_wsgi_apache_spec.rb | 30 ++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/spec/classes/zaqar_wsgi_apache_spec.rb b/spec/classes/zaqar_wsgi_apache_spec.rb index a1e2958..29e39df 100644 --- a/spec/classes/zaqar_wsgi_apache_spec.rb +++ b/spec/classes/zaqar_wsgi_apache_spec.rb @@ -97,12 +97,30 @@ describe 'zaqar::wsgi::apache' do :wsgi_script_source => '/usr/lib/python3/dist-packages/zaqar/transport/wsgi/app.py' } when 'RedHat' - { - :httpd_service_name => 'httpd', - :httpd_ports_file => '/etc/httpd/conf/ports.conf', - :wsgi_script_path => '/var/www/cgi-bin/zaqar', - :wsgi_script_source => '/usr/lib/python2.7/site-packages/zaqar/transport/wsgi/app.py' - } + if facts[:operatingsystem] == 'Fedora' + { + :httpd_service_name => 'httpd', + :httpd_ports_file => '/etc/httpd/conf/ports.conf', + :wsgi_script_path => '/var/www/cgi-bin/zaqar', + :wsgi_script_source => '/usr/lib/python3.6/site-packages/zaqar/transport/wsgi/app.py' + } + else + if facts[:operatingsystemmajrelease] > '7' + { + :httpd_service_name => 'httpd', + :httpd_ports_file => '/etc/httpd/conf/ports.conf', + :wsgi_script_path => '/var/www/cgi-bin/zaqar', + :wsgi_script_source => '/usr/lib/python3.6/site-packages/zaqar/transport/wsgi/app.py' + } + else + { + :httpd_service_name => 'httpd', + :httpd_ports_file => '/etc/httpd/conf/ports.conf', + :wsgi_script_path => '/var/www/cgi-bin/zaqar', + :wsgi_script_source => '/usr/lib/python2.7/site-packages/zaqar/transport/wsgi/app.py' + } + end + end end end