diff --git a/.fixtures.yml b/.fixtures.yml index 955ce0cb..ca4ebdb3 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,8 +1,10 @@ fixtures: repositories: stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git" + concat: "git://github.com/puppetlabs/puppetlabs-concat.git" vcsrepo: "git://github.com/puppetlabs/puppetlabs-vcsrepo.git" python: "git://github.com/stankevich/puppet-python.git" epel: "git://github.com/stahnma/puppet-module-epel.git" + apache: 'git://github.com/puppetlabs/puppetlabs-apache.git' symlinks: puppetboard: "#{source_dir}" diff --git a/README.md b/README.md index 6802aaaf..309c0e76 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,9 @@ Installation Dependencies ------------ +Note Oracle linux 5 on puppet versions 4.6.0 to 4.7.1 has pip package problem +which will cause an error trying to install puppetboard. + Note that this module no longer explicitly requires the puppetlabs apache module. If you want to use the apache functionality of this module you will have to specify that the apache module is installed with: @@ -104,6 +107,16 @@ class { 'puppetboard': } ``` + +Disable SELinux +----- +```puppet +class { 'puppetboard': + manage_selinux => false, +} +``` + + ### Apache If you want puppetboard accessible through Apache and you're able to use the diff --git a/spec/classes/vhost_spec.rb b/spec/classes/vhost_spec.rb new file mode 100644 index 00000000..3b6fb971 --- /dev/null +++ b/spec/classes/vhost_spec.rb @@ -0,0 +1,39 @@ +require 'spec_helper' + +describe 'puppetboard::apache::vhost' do + describe 'default params' do + let :params do + { + 'vhost_name' => 'puppetboard.local', + 'port' => 80 + } + end + let(:pre_condition) do + [ + 'class { "apache": default_vhost => false, default_mods => false, vhost_enable_dir => "/etc/apache2/sites-enabled"}', + 'class { "apache::mod::wsgi": }' + ] + end + on_supported_os.each do |os, facts| + let :facts do + facts + end + context "on #{os}" do + it { is_expected.to contain_class('puppetboard::apache::vhost') } + it { is_expected.to contain_file('/srv/puppetboard/puppetboard/wsgi.py') } + it do + is_expected.to contain_apache__vhost('puppetboard.local').with( + 'ensure' => 'present', + 'port' => 80 + ).that_requires('File[/srv/puppetboard/puppetboard/wsgi.py]') + end + it do + is_expected.to contain_concat('25-puppetboard.local.conf').with( + 'ensure' => 'present', + 'path' => '/etc/apache2/sites-available/25-puppetboard.local.conf' + ) + end + end + end + end +end