diff --git a/site/profile/manifests/git_webhook.pp b/site/profile/manifests/git_webhook.pp new file mode 100644 index 0000000..a46d4ea --- /dev/null +++ b/site/profile/manifests/git_webhook.pp @@ -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 + } + +} diff --git a/site/profile/manifests/code_manager.pp b/site/profile/manifests/git_webhook/code_manager.pp similarity index 97% rename from site/profile/manifests/code_manager.pp rename to site/profile/manifests/git_webhook/code_manager.pp index fc0eb8b..60cabf4 100644 --- a/site/profile/manifests/code_manager.pp +++ b/site/profile/manifests/git_webhook/code_manager.pp @@ -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, diff --git a/site/profile/manifests/zack_r10k_webhook.pp b/site/profile/manifests/git_webhook/zack_r10k_webhook.pp similarity index 97% rename from site/profile/manifests/zack_r10k_webhook.pp rename to site/profile/manifests/git_webhook/zack_r10k_webhook.pp index 0ab4da2..ed05282 100644 --- a/site/profile/manifests/zack_r10k_webhook.pp +++ b/site/profile/manifests/git_webhook/zack_r10k_webhook.pp @@ -1,4 +1,4 @@ -class profile::zack_r10k_webhook ( +class profile::git_webhook::zack_r10k_webhook ( $use_mcollective = false, ) { diff --git a/site/profile/templates/code_manager/create_rbac_token.epp b/site/profile/templates/git_webhook/code_manager/create_rbac_token.epp similarity index 100% rename from site/profile/templates/code_manager/create_rbac_token.epp rename to site/profile/templates/git_webhook/code_manager/create_rbac_token.epp diff --git a/site/role/manifests/all_in_one_pe.pp b/site/role/manifests/all_in_one_pe.pp index a8152b1..9e93155 100644 --- a/site/role/manifests/all_in_one_pe.pp +++ b/site/role/manifests/all_in_one_pe.pp @@ -1,6 +1,6 @@ class role::all_in_one_pe { include profile::puppetmaster - include profile::code_manager + include profile::git_webhook }