diff options
author | mail_redacted_for_web | 2015-10-30 13:42:33 -0700 |
---|---|---|
committer | mail_redacted_for_web | 2015-10-30 13:42:33 -0700 |
commit | 3149d9707f2882bdd4bc499a2bc65fb6dff36bf9 (patch) | |
tree | b8b22bd0b16543749a253c1beb4b59aca1b62e88 /site/profile/manifests/zack_r10k_webhook.pp | |
parent | 8e271e3043fd55ce7c39f520360214e6844085af (diff) | |
download | control-repo-template-3149d9707f2882bdd4bc499a2bc65fb6dff36bf9.tar.bz2 |
Refactor webhook profiles into one profile with a parameter
Previously there was a mcollective and no_mcollective version of
the webhook profile. They were almost identical so I merged them
and manage the difference with a "use_mcollective" parameter.
I renamed the webhook profile to zack_r10k_webhook.
Diffstat (limited to 'site/profile/manifests/zack_r10k_webhook.pp')
-rw-r--r-- | site/profile/manifests/zack_r10k_webhook.pp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/site/profile/manifests/zack_r10k_webhook.pp b/site/profile/manifests/zack_r10k_webhook.pp new file mode 100644 index 0000000..7e0bd40 --- /dev/null +++ b/site/profile/manifests/zack_r10k_webhook.pp @@ -0,0 +1,29 @@ +class profile::zack_r10k_webhook ( + $username, + $password, + $use_mcollective = false, +) { + + if $use_mcollective { + + class { 'r10k::mcollective': + notify => Service['mcollective'], + } + + } + + class {'r10k::webhook::config': + enable_ssl => true, + protected => true, + user => $username, + pass => $password, + use_mcollective => $use_mcollective, + } + + class {'r10k::webhook': + user => 'root', + group => '0', + require => Class['r10k::webhook::config'], + } + +} |