Skip to content

Commit

Permalink
Added gem_source param
Browse files Browse the repository at this point in the history
This allows custom Gem source to be used for eyaml install.
  • Loading branch information
acjohnson authored and Johnson Aaron committed Jan 27, 2015
1 parent 29ca821 commit dcbcf61
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ Configures the hiera merge behavior (e.g. for deep merges). No default
Enables/disables generating pkcs7 keys for use with hiera-eyaml
#### `extra_config`
Accepts arbitrary content to add to the end of hiera.yaml
#### `gem_source`
Configures the Gem source to use for installing hiera-eyaml.

## Limitations

Expand Down
4 changes: 3 additions & 1 deletion manifests/eyaml.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
$group = $hiera::group,
$cmdpath = $hiera::cmdpath,
$confdir = $hiera::confdir,
$create_keys = $hiera::create_keys
$create_keys = $hiera::create_keys,
$gem_source = $hiera::gem_source,
) inherits hiera::params {

package { 'hiera-eyaml':
ensure => installed,
provider => $provider,
source => $gem_source,
}

File {
Expand Down
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
# The default should cover most cases.
# Default: ['/opt/puppet/bin', '/usr/bin', '/usr/local/bin']
#
# [*gem_source*]
# Configure an alternative Gem source
# Default: undef, use backend default
#
# === Actions:
#
# Installs either /etc/puppet/hiera.yaml or /etc/puppetlabs/puppet/hiera.yaml.
Expand Down Expand Up @@ -116,6 +120,7 @@
$logger = $hiera::params::logger,
$cmdpath = $hiera::params::cmdpath,
$create_keys = $hiera::params::create_keys,
$gem_source = $hiera::params::gem_source,
$merge_behavior = undef,
$extra_config = '',
) inherits hiera::params {
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@
$logger = 'console'
$eyaml_extension = undef
$create_keys = true
$gem_source = undef
}

0 comments on commit dcbcf61

Please sign in to comment.