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.
This commit is contained in:
parent
8e271e3043
commit
3149d9707f
@ -57,11 +57,11 @@ class profile::puppetmaster (
|
|||||||
file { '/usr/local/bin/update-classes.sh' :
|
file { '/usr/local/bin/update-classes.sh' :
|
||||||
ensure => file,
|
ensure => file,
|
||||||
source => 'puppet:///modules/profile/puppetmaster/update-classes.sh',
|
source => 'puppet:///modules/profile/puppetmaster/update-classes.sh',
|
||||||
mode => '755',
|
mode => '0755',
|
||||||
}
|
}
|
||||||
|
|
||||||
#https://docs.puppetlabs.com/puppet/latest/reference/config_file_environment.html#environmenttimeout
|
#https://docs.puppetlabs.com/puppet/latest/reference/config_file_environment.html#environmenttimeout
|
||||||
ini_setting { "environment_timeout = unlimited":
|
ini_setting { 'environment_timeout = unlimited':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
path => '/etc/puppetlabs/puppet/puppet.conf',
|
path => '/etc/puppetlabs/puppet/puppet.conf',
|
||||||
section => 'main',
|
section => 'main',
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
class profile::webhook_mcollective {
|
|
||||||
|
|
||||||
class { 'r10k::mcollective':
|
|
||||||
notify => Service['mcollective'],
|
|
||||||
}
|
|
||||||
|
|
||||||
include r10k::webhook::config
|
|
||||||
|
|
||||||
class {'r10k::webhook':
|
|
||||||
user => 'root',
|
|
||||||
group => '0',
|
|
||||||
require => Class['r10k::webhook::config'],
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,14 +1,23 @@
|
|||||||
class profile::webhook_no_mcollective (
|
class profile::zack_r10k_webhook (
|
||||||
$username,
|
$username,
|
||||||
$password
|
$password,
|
||||||
|
$use_mcollective = false,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
if $use_mcollective {
|
||||||
|
|
||||||
|
class { 'r10k::mcollective':
|
||||||
|
notify => Service['mcollective'],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
class {'r10k::webhook::config':
|
class {'r10k::webhook::config':
|
||||||
enable_ssl => true,
|
enable_ssl => true,
|
||||||
protected => true,
|
protected => true,
|
||||||
user => $username,
|
user => $username,
|
||||||
pass => $password,
|
pass => $password,
|
||||||
use_mcollective => false,
|
use_mcollective => $use_mcollective,
|
||||||
}
|
}
|
||||||
|
|
||||||
class {'r10k::webhook':
|
class {'r10k::webhook':
|
@ -8,7 +8,7 @@ class role::all_in_one_pe {
|
|||||||
webhook_password => $webhook_password,
|
webhook_password => $webhook_password,
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'profile::webhook_no_mcollective' :
|
class { 'profile::zack_r10k_webhook' :
|
||||||
username => $webhook_username,
|
username => $webhook_username,
|
||||||
password => $webhook_password,
|
password => $webhook_password,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user