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

Terrimonster fix 37 prov #58

Merged
merged 5 commits into from
Mar 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ All notable changes to this project will be documented in this file.
### Bugfixes:
- Change Modulefile to metadata.json
- Add validation on `merge_behavior` param
- Make it kind of work on PE 3.7 (pe-puppetserver must still be restarted after
the gem is installed)

## [1.1.1] - 2014-11-21
### Bugfixes:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This module configures [Hiera](https://github.com/puppetlabs/hiera) for Puppet.
- /etc/hiera.yaml for symlink

### Setup requirements
If you are using Puppet Enterprise and the eyaml backend, you will need the [puppetlabs-pe_gem](https://forge.puppetlabs.com/puppetlabs/pe_gem) module to install the eyaml gem using PE's gem command.
If you are using Puppet Enterprise and the eyaml backend, you will need the [puppetlabs-pe_gem](https://forge.puppetlabs.com/puppetlabs/pe_gem) module to install the eyaml gem using PE's gem command. If you are using a PE version with puppetserver (3.7 and later) you will also need the [puppetlabs-pe_puppetserver_gem](https://forge.puppetlabs.com/puppetlabs/pe_puppetserver_gem) module.

Otherwise you just need puppet.

Expand Down Expand Up @@ -182,7 +182,7 @@ The following parameters are available for the hiera class:

## Limitations

Unknown.
The pe-puppetserver service must be restarted after hiera-eyaml is installed; this module will not do it for you.

## Development

Expand Down
16 changes: 16 additions & 0 deletions manifests/eyaml.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@
provider => $provider,
source => $gem_source,
}
if $provider == 'pe_puppetserver_gem' {
# The puppetserver gem wouldn't install the commandline util, so we do
# that here
#XXX Pre-puppet 4.0.0 version (PUP-1073)
exec { 'install pe_gem':
command => '/opt/puppet/bin/gem install hiera-eyaml',
creates => '/opt/puppet/bin/eyaml',
}
#XXX Post-puppet 4.0.0
#package { 'hiera-eyaml command line':
# ensure => installed,
# name => 'hiera-eyaml',
# provider => 'pe_gem',
# source => $gem_source,
#}
}

File {
owner => $owner,
Expand Down
6 changes: 5 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@
$datadir = '/etc/puppetlabs/puppet/hieradata'
$owner = 'pe-puppet'
$group = 'pe-puppet'
$provider = 'pe_gem'
$confdir = '/etc/puppetlabs/puppet'
if $::puppetversion =~ /3.7/ {
$provider = 'pe_puppetserver_gem'
} else {
$provider = 'pe_gem'
}
} else {
$hiera_yaml = '/etc/puppet/hiera.yaml'
$datadir = '/etc/puppet/hieradata'
Expand Down