Skip to content

Instantly share code, notes, and snippets.

@justinhennessy
Last active June 17, 2019 19:58
Show Gist options
  • Save justinhennessy/70d8c7c2ffb206df8f2dea7ba96595ad to your computer and use it in GitHub Desktop.
Save justinhennessy/70d8c7c2ffb206df8f2dea7ba96595ad to your computer and use it in GitHub Desktop.
class buildkite::install(
Pattern[/(\d+\.\d+\.\d+|installed)/] $agent_version = $buildkite::agent_version,
$agent_count = 1
) {
# more puppet code
if $agent_count > 1 {
range('2', String($agent_count)).each |$extra_agent| {
file { "/usr/lib/systemd/system/buildkite-agent${extra_agent}.service":
source => "puppet:///modules/${module_name}/buildkite-agent-service.template",
mode => '0644',
}
}
}
# puppet code
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment