Skip to content

Commit

Permalink
Added fixes for danieldreier#2 based on what we use at work
Browse files Browse the repository at this point in the history
  • Loading branch information
genebean committed Oct 24, 2017
1 parent dbe01d2 commit 84fa059
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
2 changes: 0 additions & 2 deletions data/common.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
---
autosign::configfile : '/etc/autosign.conf'
autosign::ensure : 'present'
autosign::gem_provider : 'puppet_gem'
autosign::journalpath : '/var/lib/autosign'
autosign::package_name : 'autosign'
autosign::settings_loglevel : 'INFO'
autosign::settings_logfile : '/var/log/autosign.log'
autosign::settings_validity : 7200
Expand Down
2 changes: 0 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@
# "absent", or a specific gem version.
#
class autosign (
String $package_name,
Stdlib::Absolutepath $configfile,
String $ensure,
String $user,
String $group,
Stdlib::Absolutepath $journalpath,
String $gem_provider,
String $settings_loglevel,
Stdlib::Absolutepath $settings_logfile,
Integer $settings_validity,
Expand Down
16 changes: 12 additions & 4 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
# This class is called from autosign for install.
#
class autosign::install inherits autosign {
# install the autosign gem
package { $autosign::package_name:
ensure => $autosign::ensure,
provider => $autosign::gem_provider,
# install the autosign gem for both the agent and puppetserver
package {
default:
ensure => $autosign::ensure,
name => 'autosign',
;
'autosign via puppet_gem':
provider => 'puppet_gem',
;
'autosign via puppetserver_gem':
provider => 'puppuppetserver_gempet_gem',
;
}

$_dir_ensure = $autosign::ensure ? {
Expand Down
4 changes: 4 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
{
"name": "puppetlabs-stdlib",
"version_requirement": ">= 4.0.0 < 6.0.0"
},
{
"name": "puppetlabs-puppetserver_gem",
"version_requirement": ">= 1.0.0 < 2.0.0"
}
],
"operatingsystem_support": [
Expand Down

0 comments on commit 84fa059

Please sign in to comment.