Skip to content

Commit ec7a8d8

Browse files
committed
Add functionality to disable the zack/r10k webhook
Prior to this commit, if you upgraded from a previous version of the control-repo both code manager and zack/r10k webhook would be running and ready to receive data. This can present problems if the webhook isn't disbled in the git management system is sending data to both receivers. This commit adds rudimentary ability to break the zack/r10k webhook so it can't receive data.
1 parent d2db275 commit ec7a8d8

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

site/profile/manifests/git_webhook.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
include profile::git_webhook::zack_r10k_webhook
77
} else {
88
include profile::git_webhook::code_manager
9+
include profile::git_webhook::zack_r10k_webhook_disable
910
}
1011

1112
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class profile::git_webhook::zack_r10k_webhook_disable {
2+
3+
file { '/etc/webhook.yaml' :
4+
ensure => absent,
5+
notify => Exec['stop and disable webhook service'],
6+
}
7+
8+
exec { 'stop and disable webhook service' :
9+
command => '/opt/puppetlabs/puppet/bin/puppet resource service webhook ensure=stopped enable=false',
10+
logoutput => true,
11+
refreshonly => true,
12+
}
13+
14+
}

0 commit comments

Comments
 (0)