3
0

move away from that webhook and use the one from voxpopuli - https://gitlab.confdroid.com/internal/confdroid_management/-/issues/284

This commit is contained in:
Arne Teuke
2025-10-25 18:34:37 +02:00
parent ae7d39960c
commit fbe5bade06
8 changed files with 21 additions and 131 deletions

View File

@@ -53,5 +53,10 @@ class puppet_cd::r10k::install (
require => File['r10k_dir'],
content => template($pt_r10k_erb),
}
if $pt_use_r10k_webhook == true {
package { $pt_r10k_webhook_pkg:
ensure => $pt_pkg_ensure,
}
}
}
}

View File

@@ -1,69 +0,0 @@
## puppet_cd::r10k::webhook.pp
# Module name: puppet_cd
# Author: Arne Teuke (arne_teuke@confdroid)
# @summary Class manages r10k webhook settings for the puppet_cd module.
###############################################################################
class puppet_cd::r10k::webhook (
) inherits puppet_cd::params {
if ($pt_pm_fqdn == $fqdn) and ($pt_use_r10k_webhook == true) {
# create the webhook binary
file { $pt_r10k_hook_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => bin_t,
seluser => unconfined_u,
source => 'puppet:///modules/puppet_cd/webhook',
}
# create the webhook config dir
file { $pt_r10k_webhook_dir:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
}
# create webhook config
file { $pt_r10k_hook_config_file:
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => etc_t,
seluser => system_u,
content => template($pt_r10k_hook_config_erb),
notify => Service['webhook'],
}
# create service config
file { $pt_r10k_hook_service_file:
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => systemd_unit_file_t,
seluser => system_u,
content => template($pt_r10k_hook_service_erb),
notify => Service['webhook'],
}
# manage service
service { 'webhook':
ensure => 'running',
hasstatus => true,
hasrestart => true,
enable => true,
}
}
}