From: Frank Brehm Date: Wed, 16 Aug 2017 14:29:25 +0000 (+0200) Subject: Modifications for Puppet 5 X-Git-Tag: 0.8.4~9^2 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=ff6ca26353f451516060e8c7ad07b953cdf6877a;p=pixelpark%2Fpuppetmaster-webhooks.git Modifications for Puppet 5 --- diff --git a/lib/webhooks/__init__.py b/lib/webhooks/__init__.py index 77c24cf..a4cfd0e 100644 --- a/lib/webhooks/__init__.py +++ b/lib/webhooks/__init__.py @@ -1,6 +1,6 @@ #!/bin/env python3 # -*- coding: utf-8 -*- -__version__ = '0.5.5' +__version__ = '0.5.6' # vim: ts=4 et list diff --git a/lib/webhooks/base_app.py b/lib/webhooks/base_app.py index f19e087..16632fd 100644 --- a/lib/webhooks/base_app.py +++ b/lib/webhooks/base_app.py @@ -282,6 +282,7 @@ class BaseHookApp(object): search_path_list = [ '/opt/pixelpark/bin', + '/opt/puppetlabs/puppet/bin', '/www/bin', ] diff --git a/lib/webhooks/deploy.py b/lib/webhooks/deploy.py index 33fde3b..253f59f 100644 --- a/lib/webhooks/deploy.py +++ b/lib/webhooks/deploy.py @@ -89,6 +89,10 @@ class WebhookDeployApp(BaseHookApp): self.projects['hiera']['name'] = cfg['name'].strip() if 'parent_dir' in cfg and cfg['parent_dir']: self.projects['hiera']['parent_dir'] = cfg['parent_dir'] + if 'workdir' in cfg and cfg['workdir']: + self.projects[project_key]['workdir'] = cfg['workdir'] + if 'branch' in cfg and cfg['branch'].strip(): + self.projects[project_key]['branch'] = cfg['branch'].strip() continue if project_key not in self.projects: self.projects[project_key] = {} @@ -203,6 +207,8 @@ class WebhookDeployApp(BaseHookApp): pname = 'hiera' parent_dir = '/www/data/puppet-hiera' + if self.verbose > 2: + LOG.debug("Got config structure for hiera:\n{}".format(pp(cfg))) if 'parent_dir' in cfg and cfg['parent_dir']: parent_dir = cfg['parent_dir'] workdir = pname