Puppet Class: gitlabr10khook::config
- Inherits:
- gitlabr10khook
- Defined in:
- manifests/config.pp
Overview
Class: gitlabr10khook::config vim: set softtabstop=2 ts=2 sw=2 expandtab:
This configures the gitlab-puppet-webhook that will take webhook triggers from gitlab and run r10k on your puppet server it currently only supports the PUSH mechanism
Authors
Karl Vollmer <karl.vollmer@gmail.com>
Copyright
Copyright 2016 Karl Vollmer.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'manifests/config.pp', line 15
class gitlabr10khook::config inherits gitlabr10khook {
# lint:ignore:variable_scope
# Configure the Conf file
file { "${gitlabr10khook::install}/webhook-puppet.conf":
ensure => file,
mode => '0640',
owner => 'root',
group => $gitlabr10khook::group,
content => template('gitlabr10khook/webhook-puppet.erb'),
}
$logfile = $gitlabr10khook::log['filename']
$logdir = dirname($logfile)
# Make sure the log directory exists, this won't work for
# recursive cause :(
file { $logdir:
ensure => directory,
mode => '0770',
owner => $gitlabr10khook::user,
group => $gitlabr10khook::group,
}
# Make sure the log file exists and is writeable by the runner
file { $logfile:
ensure => file,
mode => '0660',
owner => $gitlabr10khook::user,
group => $gitlabr10khook::group,
require => File[$logdir],
}
# Add the service to /etc/systemd/system
file { '/etc/systemd/system/gitlab-puppet-webhook.service':
ensure => file,
mode => '0644',
owner => 'root',
group => 'root',
content => template('gitlabr10khook/startup/gitlab-puppet-webhook.service.erb'),
}
# Make sure the systemd conf is in place with the correct path
file { "${gitlabr10khook::install}/startup/systemd.conf":
ensure => file,
mode => '0644',
owner => 'root',
group => 'root',
content => template('gitlabr10khook/startup/systemd.conf.erb'),
}
#lint:endignore
}
|