Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Add Puppet 4 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Murray committed Aug 10, 2016
1 parent f3204aa commit 03f07cb
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ rvm:
script:
- bundle exec rake lint
- bundle exec rake validate
- BEAKER_set=openstack-ubuntu BEAKER_debug=yes bundle exec rake beaker
- bundle exec rake beaker
env:
matrix:
- PUPPET_INSTALL_TYPE=foss BEAKER_set=openstack-ubuntu-trusty
- PUPPET_INSTALL_TYPE=agent BEAKER_set=openstack-ubuntu-trusty
global:
- BEAKER_debug=yes
- secure: soaLCzoLjkyTSUk3SVwe8jDB3PRDoLCsQj8hTGvjWMYCs6ys7OtATOhbD+TjkmN2UR5oFTj9s3ATlXfJxRtYfJybXs4wGYiBlX6GeOPP2MIrCVjh/3vRcujQvSR8wQ0k7TdYb4/UJ/liKw4NmwNQ2/xKivMj4DxyIdA84H/vvLs+I+RtTHbueHuPbH254a2EPCyECA1ro5cvZK/p4kYoMJeYtRHfX1Uex/uNggrYTEmDXRqPdndrGxQXCGCLPxT3bFw6cZUNaW5ICzn6Mq2D4CImmb2jI+GL/OG5oJQXaFm0fIKUq9dvqkoXmg+Ggac2LVIwfpKR73R53loCgmHygijZhlzJjQ/ySBNyu3iflvszMYBN3nls6+en430KF5Y9R0XvFUarYaS8GM/74p81usLDNnbLRKQj/bBNKKIVdG6fSRlqd54a2VADuo1v+W4qa0R5zaOgr3W7iOK2MWFtu438AkoXjm6qtRow8ABYT4OR6e80Ie0MmYPjph+DNVYLEu09lYnv6nqLoVOJixnydy2DTWCIitvZ0TCjei4JcXhAffN+Fhkrkuro3TZywrM8dq6wwopaYw2hmd/OJyUY9uFDry2Js3vEUvEXX8LOGhQChhdo9zDR+oZhPC8VItmuQB4Z0eoLkH8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63+/gORHV/yACqTj6998gx8n8HQqWVL0DBCqo4gNQkROo0M81f5X/EwG0StF1GKCu8EN2iuKSCRtl8rX7KxoRZpAL72+Ib/vT4VIe+SX6WucDyDOm4beSNXGTxMBgRqmLOZRhj+4MjPdnf4S1YOkHYBVb8ulVTu9WfI8Ur9bFEF3NASCjHMXMhuU1y2Mfex04ncfhe9VRR6K8mOwlqemii5dwIKTR9Od9ybw46pu/vo7fIzvbT87pfXp0YdskUAB3wh1Ckm5A78JdYrNtU13pkFwW6E/Ng/CXr3GjQ7/5ujs442UUwSm4fqs75xl1liCklJN5q7SBC+C4Fks8=
Expand Down
14 changes: 10 additions & 4 deletions manifests/web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
include ::apache::mod::php
include ::apache::mod::ssl

if versioncmp($::puppetversion, '4.0.0') >= 0 {
$_ssldir = '/etc/puppetlabs/puppet/ssl'
} else {
$_ssldir = '/var/lib/puppet/ssl'
}

apache::vhost { 'nfsen':
servername => $::fqdn,
port => 80,
Expand All @@ -25,10 +31,10 @@
port => 443,
docroot => '/var/www/html',
ssl => true,
ssl_cert => "/var/lib/puppet/ssl/certs/${::fqdn}.pem",
ssl_key => "/var/lib/puppet/ssl/private_keys/${::fqdn}.pem",
ssl_ca => '/var/lib/puppet/ssl/certs/ca.pem',
ssl_crl => '/var/lib/puppet/ssl/crl.pem',
ssl_cert => "${_ssldir}/certs/${::fqdn}.pem",
ssl_key => "${_ssldir}/private_keys/${::fqdn}.pem",
ssl_ca => "${_ssldir}/certs/ca.pem",
ssl_crl => "${_ssldir}/crl.pem",
ssl_verify_client => $::nfsen::web_ssl_verify_client,
ssl_verify_depth => $::nfsen::web_ssl_verify_depth,
} ->
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
{ "name": "puppetlabs/vcsrepo", "version_requirement": ">=1.3.0 < 2.0.0" }
],
"requirements": [
{ "name": "puppet", "version_requirement": ">= 3.8.0 < 4.0.0" }
{ "name": "puppet", "version_requirement": ">= 3.8.0 < 5.0.0" }
]
}
7 changes: 5 additions & 2 deletions spec/acceptance/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
shell('ipcmk -S 1')
# Create a CA and certificate for the web server
shell('puppet cert generate $(facter fqdn)')

hiera_path = ENV['PUPPET_INSTALL_TYPE'] == 'agent' ? '/etc/puppetlabs/code/environments/production/hieradata' : '/var/lib/hiera'

# Add in an MPM module for mod_php
shell('echo "apache::mpm_module: \'prefork\'" >> /var/lib/hiera/common.yaml')
shell("echo apache::mpm_module: 'prefork' >> #{hiera_path}/common.yaml")
# Disable the default vhost
shell('echo "apache::default_vhost: false" >> /var/lib/hiera/common.yaml')
shell("echo apache::default_vhost: false >> #{hiera_path}/common.yaml")

pp = <<-EOS
Exec {
Expand Down

0 comments on commit 03f07cb

Please sign in to comment.