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

Feature/cleanup and document #44

Merged
merged 3 commits into from
Sep 25, 2017
Merged
Changes from all commits
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
69 changes: 62 additions & 7 deletions manifests/daemon.pp
Original file line number Diff line number Diff line change
@@ -1,23 +1,78 @@
# Define: prometheus::daemon
#
# This define managed prometheus daemons that don't have their own class
#
# [*version*]
# The binary release version
#
# [*real_download_url*]
# Complete URL corresponding to the where the release binary archive can be downloaded
#
# [*notify_service*]
# The service to notify when something changes in this define
#
# [*user*]
# User which runs the service
#
# [*install_method*]
# Installation method: url or package
#
# [*download_extension*]
# Extension for the release binary archive
#
# [*os*]
# Operating system (linux is the only one supported)
#
# [*arch*]
# Architecture (amd64 or i386)
#
# [*bin_dir*]
# Directory where binaries are located
#
# [*package_name*]
# The binary package name
#
# [*package_ensure*]
# If package, then use this for package ensure default 'installed'
#
# [*manage_user*]
# Whether to create user or rely on external code for that
#
# [*extra_groups*]
# Extra groups of which the user should be a part
#
# [*manage_group*]
# Whether to create a group for or rely on external code for that
#
# [*service_ensure*]
# State ensured for the service (default 'running')
#
# [*service_enable*]
# Whether to enable the service from puppet (default true)
#
# [*manage_service*]
# Should puppet manage the service? (default true)
#
define prometheus::daemon (
$version,
$real_download_url,
$notify_service,
$user,
$group,

$install_method = $prometheus::params::install_method,
$download_extension = $prometheus::params::download_extension,
$os = $prometheus::params::os,
$arch = $prometheus::params::arch,
$bin_dir = $prometheus::params::bin_dir,
$install_method = $::prometheus::params::install_method,
$download_extension = $::prometheus::params::download_extension,
$os = $::prometheus::params::os,
$arch = $::prometheus::params::arch,
$bin_dir = $::prometheus::params::bin_dir,
$package_name = undef,
$package_ensure = undef,
$package_ensure = 'installed',
$manage_user = true,
$extra_groups = [],
$manage_group = true,
$purge = true,
$options = '',
$init_style = $prometheus::params::init_style,
$init_style = $::prometheus::params::init_style,
$service_ensure = 'running',
$service_enable = true,
$manage_service = true,
Expand Down