Create profile::git_webhook to abstract away the details
Prior to this commit there were two possible webhooks - zack/r10k webhook - code manager I moved these two profiles under git_webhook and choose the correct one based on the version of PE being used. As a safety hatch, I provide the $force_zack_r10k_webhook param on profile::git_webhook in case someone needs to continue using it instead of code manager.
This commit is contained in:
parent
56d0908db2
commit
d2db275028
11
site/profile/manifests/git_webhook.pp
Normal file
11
site/profile/manifests/git_webhook.pp
Normal file
@ -0,0 +1,11 @@
|
||||
class profile::git_webhook (
|
||||
$force_zack_r10k_webhook = false
|
||||
) {
|
||||
|
||||
if versioncmp( $::pe_server_version, '2015.2.99' ) <= 0 or $force_zack_r10k_webhook {
|
||||
include profile::git_webhook::zack_r10k_webhook
|
||||
} else {
|
||||
include profile::git_webhook::code_manager
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
class profile::code_manager {
|
||||
class profile::git_webhook::code_manager {
|
||||
|
||||
$authenticate_webhook = hiera('puppet_enterprise::master::code_manager::authenticate_webhook', true)
|
||||
|
||||
@ -51,7 +51,7 @@ class profile::code_manager {
|
||||
}
|
||||
|
||||
exec { "Generate Token for ${code_manager_service_user}" :
|
||||
command => epp('profile/code_manager/create_rbac_token.epp',
|
||||
command => epp('profile/git_webhook/code_manager/create_rbac_token.epp',
|
||||
{ 'code_manager_service_user' => $code_manager_service_user,
|
||||
'code_manager_service_user_password' => $code_manager_service_user_password,
|
||||
'classifier_hostname' => $classifier_hostname,
|
@ -1,4 +1,4 @@
|
||||
class profile::zack_r10k_webhook (
|
||||
class profile::git_webhook::zack_r10k_webhook (
|
||||
$use_mcollective = false,
|
||||
) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
class role::all_in_one_pe {
|
||||
|
||||
include profile::puppetmaster
|
||||
include profile::code_manager
|
||||
include profile::git_webhook
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user