Skip to content

Instantly share code, notes, and snippets.

@nvalentine-puppetlabs
Last active August 29, 2015 14:11
Show Gist options
  • Save nvalentine-puppetlabs/944f177b99f04791a7af to your computer and use it in GitHub Desktop.
Save nvalentine-puppetlabs/944f177b99f04791a7af to your computer and use it in GitHub Desktop.
Example of passing hash from Hiera to a profile and then to create_resources
---
classes:
- site::profile::jenkins::master
site::profile::jenkins::master::plugins:
git:
version: 2.2.7
ansicolor:
version: 0.4.0
build-failure-analyzer:
version: 1.10.3
build-monitor-plugin:
version: 1.6+build.132
buildgraph-view:
version: 1.1.1
greenballs:
version: 1.14
class site::profile::jenkins::master(
$plugins = {},
) inherits ::site::params {
require ::site::profile::jenkins
validate_hash($plugins)
class { '::jenkins':
configure_firewall => true,
job_hash => $jobs,
}
include ::git
$jenkins_plugins_defaults = {}
create_resources('jenkins::plugin', $plugins, $jenkins_plugins_defaults)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment