Skip to content

Commit

Permalink
Merge pull request #58 from hunner/terrimonster-fix_37_prov
Browse files Browse the repository at this point in the history
Terrimonster fix 37 prov
  • Loading branch information
hunner committed Mar 6, 2015
2 parents 8e7d30f + f15842a commit e2ca7c4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
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

0 comments on commit e2ca7c4

Please sign in to comment.