Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puppet::profile::puppetboard: Add feature for enabling/disabling SSL #172

Open
wants to merge 2 commits into
base: production
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions manifests/profile/puppetboard.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
# Vhost name
# @param port [String] Default: 5000
# Revision of puppetboard to install (tag,branch or commit)
# @param ssl [Boolean] Default: false
# Enable SSL for puppetboard
# @param ssl_cert [String] Default: undef
# Location of SSL certificate
# @param ssl_key [String] Default: undef
# Location of SSL key
# @param puppetdb_port [String] Default: 8080
# Port to use for communicating with PuppetDB
# @param puppetdb_host [String] Default: localhost
Expand All @@ -29,6 +35,9 @@
$reports_count = undef,
$vhost_name = 'pboard',
$port = '5000',
$ssl = false,
$ssl_cert = undef,
$ssl_key = undef,
$puppetdb_port = '8080',
$puppetdb_host = 'localhost',
$git_source = 'https://github.com/puppet-community/puppetboard/',
Expand All @@ -49,8 +58,21 @@
manage_virtualenv => $manage_virtualenv,
}

class { '::puppetboard::apache::vhost':
vhost_name => $vhost_name,
port => $port,
if($ssl){
# Enable SSL on puppetboard
class { '::puppetboard::apache::vhost':
vhost_name => $vhost_name,
port => $port,
ssl => $ssl,
ssl_cert => $ssl_cert,
ssl_key => $ssl_key,
}
}
else{
# Non secure puppetboard
class { '::puppetboard::apache::vhost':
vhost_name => $vhost_name,
port => $port,
}
}
}