From 3149d9707f2882bdd4bc499a2bc65fb6dff36bf9 Mon Sep 17 00:00:00 2001 From: Nick Walker Date: Fri, 30 Oct 2015 13:42:33 -0700 Subject: 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. --- site/profile/manifests/zack_r10k_webhook.pp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 site/profile/manifests/zack_r10k_webhook.pp (limited to 'site/profile/manifests/zack_r10k_webhook.pp') 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'], + } + +} -- cgit v1.2.3