forked from redhat-openstack/openstack-puppet-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into php_value
- Loading branch information
Showing
13 changed files
with
169 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
class apache::mod::dav_svn ( | ||
$authz_svn_enabled = false, | ||
) { | ||
Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn'] | ||
include ::apache::mod::dav | ||
::apache::mod { 'dav_svn': } | ||
Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn'] | ||
include ::apache::mod::dav | ||
::apache::mod { 'dav_svn': } | ||
|
||
if $authz_svn_enabled { | ||
::apache::mod { 'authz_svn': | ||
loadfile_name => $::osfamily ? { | ||
'Debian' => undef, | ||
default => 'dav_svn_authz_svn.load', | ||
}, | ||
require => Apache::Mod['dav_svn'], | ||
} | ||
if $::osfamily == 'Debian' and ($::operatingsystemmajrelease != '6' and $::operatingsystemmajrelease != '10.04') { | ||
$loadfile_name = undef | ||
} else { | ||
$loadfile_name = 'dav_svn_authz_svn.load' | ||
} | ||
|
||
if $authz_svn_enabled { | ||
::apache::mod { 'authz_svn': | ||
loadfile_name => $loadfile_name, | ||
require => Apache::Mod['dav_svn'], | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ | |
{ | ||
"operatingsystem": "OracleLinux", | ||
"operatingsystemrelease": [ | ||
"5", | ||
"6", | ||
"7" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,57 @@ | ||
require 'spec_helper_acceptance' | ||
|
||
describe 'apache::mod::fcgid class', :unless => UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) do | ||
case fact('osfamily') | ||
when 'Debian' | ||
# Not implemented | ||
when 'RedHat' | ||
context "default fcgid config" do | ||
it 'succeeds in puppeting fcgid' do | ||
pp = <<-EOS | ||
class { 'epel': } # mod_fcgid lives in epel | ||
class { 'apache': } | ||
class { 'apache::mod::php': } # For /usr/bin/php-cgi | ||
class { 'apache::mod::fcgid': | ||
options => { | ||
'FcgidIPCDir' => '/var/run/fcgidsock', | ||
describe 'apache::mod::fcgid class', :unless => (UNSUPPORTED_PLATFORMS.include?(fact('osfamily')) or (fact('operatingsystem') == 'OracleLinux' and fact('operatingsystemmajrelease') == '7')) do | ||
context "default fcgid config", :if => (fact('osfamily') == 'RedHat' and fact('operatingsystemmajrelease') != '5') do | ||
it 'succeeds in puppeting fcgid' do | ||
pp = <<-EOS | ||
class { 'epel': } # mod_fcgid lives in epel | ||
class { 'apache': } | ||
class { 'apache::mod::php': } # For /usr/bin/php-cgi | ||
class { 'apache::mod::fcgid': | ||
options => { | ||
'FcgidIPCDir' => '/var/run/fcgidsock', | ||
}, | ||
} | ||
apache::vhost { 'fcgid.example.com': | ||
port => '80', | ||
docroot => '/var/www/fcgid', | ||
directories => { | ||
path => '/var/www/fcgid', | ||
options => '+ExecCGI', | ||
addhandlers => { | ||
handler => 'fcgid-script', | ||
extensions => '.php', | ||
}, | ||
} | ||
apache::vhost { 'fcgid.example.com': | ||
port => '80', | ||
docroot => '/var/www/fcgid', | ||
directories => { | ||
path => '/var/www/fcgid', | ||
options => '+ExecCGI', | ||
addhandlers => { | ||
handler => 'fcgid-script', | ||
extensions => '.php', | ||
}, | ||
fcgiwrapper => { | ||
command => '/usr/bin/php-cgi', | ||
suffix => '.php', | ||
} | ||
}, | ||
} | ||
file { '/var/www/fcgid/index.php': | ||
ensure => file, | ||
owner => 'root', | ||
group => 'root', | ||
content => "<?php echo 'Hello world'; ?>\\n", | ||
} | ||
EOS | ||
apply_manifest(pp, :catch_failures => true) | ||
end | ||
fcgiwrapper => { | ||
command => '/usr/bin/php-cgi', | ||
suffix => '.php', | ||
} | ||
}, | ||
} | ||
file { '/var/www/fcgid/index.php': | ||
ensure => file, | ||
owner => 'root', | ||
group => 'root', | ||
content => "<?php echo 'Hello world'; ?>\\n", | ||
} | ||
EOS | ||
apply_manifest(pp, :catch_failures => true) | ||
end | ||
|
||
describe service('httpd') do | ||
it { is_expected.to be_enabled } | ||
it { is_expected.to be_running } | ||
end | ||
describe service('httpd') do | ||
it { is_expected.to be_enabled } | ||
it { is_expected.to be_running } | ||
end | ||
|
||
it 'should answer to fcgid.example.com' do | ||
shell("/usr/bin/curl -H 'Host: fcgid.example.com' 127.0.0.1:80") do |r| | ||
expect(r.stdout).to match(/^Hello world$/) | ||
expect(r.exit_code).to eq(0) | ||
end | ||
it 'should answer to fcgid.example.com' do | ||
shell("/usr/bin/curl -H 'Host: fcgid.example.com' 127.0.0.1:80") do |r| | ||
expect(r.stdout).to match(/^Hello world$/) | ||
expect(r.exit_code).to eq(0) | ||
end | ||
end | ||
|
||
it 'should run a php-cgi process' do | ||
shell("pgrep -u apache php-cgi", :acceptable_exit_codes => [0]) | ||
end | ||
it 'should run a php-cgi process' do | ||
shell("pgrep -u apache php-cgi", :acceptable_exit_codes => [0]) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.