+++ /dev/null
-# Extraction from Python source files
-[python: **.py]
-
-[python: bin/*]
-
--- /dev/null
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Standard modules
+import os
+import sys
+import logging
+
+from pathlib import Path
+
+# own modules:
+my_path = Path(__file__)
+my_real_path = my_path.resolve()
+base_dir = my_real_path.parent
+libdir = base_dir.joinpath('lib')
+
+sys.path.insert(0, str(libdir))
+
+from webhooks.get_forge_modules import GetForgeModulesApp
+
+MY_APPNAME = my_path.stem
+LOG = logging.getLogger(MY_APPNAME)
+
+app = GetForgeModulesApp(appname=MY_APPNAME, base_dir=base_dir)
+
+if app.verbose > 1:
+ LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
+
+app()
+
+sys.exit(0)
+
+# vim: ts=4 et
--- /dev/null
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Standard modules
+import os
+import sys
+import logging
+
+from pathlib import Path
+
+# own modules:
+my_path = Path(__file__)
+my_real_path = my_path.resolve()
+base_dir = my_real_path.parent
+libdir = base_dir.joinpath('lib')
+
+sys.path.insert(0, str(libdir))
+
+from webhooks.get_module_changes import GetModuleChangesApp
+
+MY_APPNAME = my_path.stem
+LOG = logging.getLogger(MY_APPNAME)
+
+app = GetModuleChangesApp(appname=MY_APPNAME, base_dir=base_dir)
+
+if app.verbose > 2:
+ LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
+
+app()
+
+sys.exit(0)
+
+# vim: ts=4 et
--- /dev/null
+#!/bin/bash
+
+set -e
+set -u
+
+PUPPET_CONF="/etc/puppetlabs/puppet/puppet.conf"
+CERTNAME=$(cat /etc/puppetlabs/puppet/puppet.conf | \
+ grep -P -v '^\s*#' | \
+ grep -P -v '^\s*$' | \
+ grep -P -o '^\s*certname(\s|=).*' | \
+ awk -F'=' '{print $2}' | \
+ sed -e 's/^[ ]*//' -e 's/[ ]*$//')
+if [[ -z "${CERTNAME}" ]] ; then
+ CERTNAME=$(hostname -f)
+fi
+
+echo
+echo "###########################################"
+echo "Current node: '${CERTNAME}'"
+echo
+
+envs=$( ls -1 /etc/puppetlabs/code/environments )
+if [[ "$#" != "0" ]] ; then
+ envs="$*"
+fi
+
+for env in ${envs} ; do
+
+ env_dir="/etc/puppetlabs/code/environments/${env}"
+
+ echo
+ echo "###########################################"
+ echo "Performing environment '${env}' ..."
+ echo "###########################################"
+ echo
+
+
+ cmd="/opt/puppetlabs/puppet/bin/r10k deploy environment \"${env}\" -v -p"
+ echo "${cmd}"
+ eval ${cmd}
+
+
+ if [[ -d "${env_dir}" ]] ; then
+ echo
+ sleep 1
+
+ cmd="/usr/bin/curl -i"
+ cmd+=" --cert /etc/puppetlabs/puppet/ssl/certs/${CERTNAME}.pem"
+ cmd+=" --key /etc/puppetlabs/puppet/ssl/private_keys/${CERTNAME}.pem"
+ cmd+=" --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem"
+ cmd+=" -X DELETE"
+ cmd+=" \"https://${CERTNAME}:8140/puppet-admin-api/v1/environment-cache?environment=${env}\""
+
+ echo "${cmd}"
+ eval ${cmd}
+
+ else
+ echo -e "\nEnvironment-Verzeichnis '${env_dir}' existiert nicht." >&2
+ fi
+
+ cmd="/opt/puppetlabs/puppet/bin/puppet generate types --environment \"${env}\""
+ echo "${cmd}"
+ eval ${cmd}
+
+ echo
+ echo "Finished environment '${env}'."
+ sleep 1
+
+done
+
+# vim: ts=4 et list
--- /dev/null
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Standard modules
+import sys
+import logging
+
+from pathlib import Path
+
+# own modules:
+my_path = Path(__file__)
+my_real_path = my_path.resolve()
+base_dir = my_real_path.parent
+libdir = base_dir.joinpath('lib')
+
+sys.path.insert(0, str(libdir))
+
+from webhooks.deploy import WebhookDeployApp # noqa
+
+MY_APPNAME = my_path.stem
+LOG = logging.getLogger(MY_APPNAME)
+
+app = WebhookDeployApp(appname=MY_APPNAME, base_dir=base_dir)
+
+if app.verbose > 2:
+ LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
+
+app()
+
+sys.exit(0)
+
+# vim: ts=4 et
--- /dev/null
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Standard modules
+import sys
+import logging
+
+from pathlib import Path
+
+# own modules:
+my_path = Path(__file__)
+my_real_path = my_path.resolve()
+base_dir = my_real_path.parent
+libdir = base_dir.joinpath('lib')
+
+sys.path.insert(0, str(libdir))
+
+from webhooks.r10k import R10kHookApp # noqa
+
+MY_APPNAME = my_path.stem.replace('_', '-')
+LOG = logging.getLogger(MY_APPNAME)
+
+app = R10kHookApp(appname=MY_APPNAME, base_dir=base_dir)
+
+if app.verbose > 2:
+ LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
+
+app()
+
+sys.exit(0)
+
+# vim: ts=4 et
--- /dev/null
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Standard modules
+import sys
+import logging
+
+from pathlib import Path
+
+# own modules:
+my_path = Path(__file__)
+my_real_path = my_path.resolve()
+base_dir = my_real_path.parent
+libdir = base_dir.joinpath('lib')
+
+sys.path.insert(0, str(libdir))
+
+from webhooks.show_env import ShowEnvApp # noqa
+
+MY_APPNAME = my_path.stem
+LOG = logging.getLogger(MY_APPNAME)
+
+app = ShowEnvApp(output_type='html', appname=MY_APPNAME, base_dir=base_dir)
+
+if app.verbose > 2:
+ LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
+
+app()
+
+sys.exit(0)
+
+# vim: ts=4 et
--- /dev/null
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Standard modules
+import sys
+import logging
+
+from pathlib import Path
+
+# own modules:
+my_path = Path(__file__)
+my_real_path = my_path.resolve()
+base_dir = my_real_path.parent
+libdir = base_dir.joinpath('lib')
+
+sys.path.insert(0, str(libdir))
+
+from webhooks.show_env import ShowEnvApp # noqa
+
+MY_APPNAME = my_path.stem
+LOG = logging.getLogger(MY_APPNAME)
+
+app = ShowEnvApp(output_type='txt', appname=MY_APPNAME, base_dir=base_dir)
+
+if app.verbose > 2:
+ LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
+
+app()
+
+sys.exit(0)
+
+# vim: ts=4 et
--- /dev/null
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Standard modules
+import sys
+import logging
+
+from pathlib import Path
+
+# own modules:
+my_path = Path(__file__)
+my_real_path = my_path.resolve()
+base_dir = my_real_path.parent
+libdir = base_dir.joinpath('lib')
+
+sys.path.insert(0, str(libdir))
+
+from webhooks.show_modules import ShowModulesApp # noqa
+
+MY_APPNAME = my_path.stem
+LOG = logging.getLogger(MY_APPNAME)
+
+app = ShowModulesApp(output_type='html', appname=MY_APPNAME, base_dir=base_dir)
+
+if app.verbose > 2:
+ LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
+
+app()
+
+sys.exit(0)
+
+# vim: ts=4 et
--- /dev/null
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Standard modules
+import sys
+import logging
+
+from pathlib import Path
+
+# own modules:
+my_path = Path(__file__)
+my_real_path = my_path.resolve()
+base_dir = my_real_path.parent
+libdir = base_dir.joinpath('lib')
+
+sys.path.insert(0, str(libdir))
+
+from webhooks.show_modules import ShowModulesApp # noqa
+
+MY_APPNAME = my_path.stem
+LOG = logging.getLogger(MY_APPNAME)
+
+app = ShowModulesApp(output_type='txt', appname=MY_APPNAME, base_dir=base_dir)
+
+if app.verbose > 2:
+ LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
+
+app()
+
+sys.exit(0)
+
+# vim: ts=4 et
--- /dev/null
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+
+# Standard modules
+import sys
+import logging
+
+from pathlib import Path
+
+# own modules:
+my_path = Path(__file__)
+my_real_path = my_path.resolve()
+base_dir = my_real_path.parent
+libdir = base_dir.joinpath('lib')
+
+sys.path.insert(0, str(libdir))
+
+from webhooks.show_modules import ShowModulesApp # noqa
+
+MY_APPNAME = my_path.stem
+LOG = logging.getLogger(MY_APPNAME)
+
+app = ShowModulesApp(appname=MY_APPNAME, base_dir=base_dir)
+
+if app.verbose > 2:
+ LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
+
+app()
+
+sys.exit(0)
+
+# vim: ts=4 et
+++ /dev/null
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-# Standard modules
-import sys
-import logging
-
-from pathlib import Path
-
-# own modules:
-my_path = Path(__file__)
-my_real_path = my_path.resolve()
-base_dir = my_real_path.parent
-libdir = base_dir.joinpath('lib')
-
-sys.path.insert(0, str(libdir))
-
-from webhooks.deploy import WebhookDeployApp # noqa
-
-MY_APPNAME = my_path.stem
-LOG = logging.getLogger(MY_APPNAME)
-
-app = WebhookDeployApp(appname=MY_APPNAME, base_dir=base_dir)
-
-if app.verbose > 2:
- LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
-
-app()
-
-sys.exit(0)
-
-# vim: ts=4 et
+++ /dev/null
----
-# May be overridden by /etc/pixelpark/deploy.yaml
-verbose: 0
-do_sudo: true
-log_dir: '/var/log/webhooks'
-default_email: 'puppet@pixelpark.com'
-default_parent_dir: '/etc/puppetlabs/code/fileserver'
-smtp_server: 'localhost'
-smtp_port: 25
-ignore_projects: []
-mail_cc_addresses: []
-sender_address: 'Puppetmaster <puppetmaster@pixelpark.com>'
-projects:
- hiera:
- namespace: 'puppet'
- name: 'hiera'
- parent_dir: '/etc/puppetlabs/code'
- branch: 'master'
- workdir: 'hiera-data'
- postfix_config:
- namespace: 'ppadmin'
- name: 'postfix_config'
- workdir: 'postfix_config'
- branch: 'master'
-
-mail_bodies:
- special_chars: "Received special characters in module name"
- no_branch_dir: "Branch folder does not exist"
- no_modules_dir: "Modules folder does not exist"
- git_access_denied: "Access to remote repository was denied"
-
--- /dev/null
+# Extraction from Python source files
+[python: **.py]
+
+[python: bin/*]
+
--- /dev/null
+---
+# May be overridden by /etc/pixelpark/deploy.yaml
+verbose: 0
+do_sudo: true
+log_dir: '/var/log/webhooks'
+default_email: 'puppet@pixelpark.com'
+default_parent_dir: '/etc/puppetlabs/code/fileserver'
+smtp_server: 'localhost'
+smtp_port: 25
+ignore_projects: []
+mail_cc_addresses: []
+sender_address: 'Puppetmaster <puppetmaster@pixelpark.com>'
+projects:
+ hiera:
+ namespace: 'puppet'
+ name: 'hiera'
+ parent_dir: '/etc/puppetlabs/code'
+ branch: 'master'
+ workdir: 'hiera-data'
+ postfix_config:
+ namespace: 'ppadmin'
+ name: 'postfix_config'
+ workdir: 'postfix_config'
+ branch: 'master'
+
+mail_bodies:
+ special_chars: "Received special characters in module name"
+ no_branch_dir: "Branch folder does not exist"
+ no_modules_dir: "Modules folder does not exist"
+ git_access_denied: "Access to remote repository was denied"
+
--- /dev/null
+---
+
+puppet_env_dir: '/etc/puppetlabs/code/environments'
+forge_uri: 'https://forgeapi.puppet.com/v3/modules'
+http_timeout: 30
+
--- /dev/null
+---
+#verbose: 0
+#no_error_mail: true
+#do_sudo: true
+#log_dir: '/var/log/webhooks'
+#default_email: 'puppet@pixelpark.com'
+#default_parent_dir: '/etc/puppetlabs/code'
+#smtp_server: 'localhost'
+#smtp_port: 25
+#mail_cc_addresses: []
+#sender_address: 'Puppetmaster <puppetmaster@pixelpark.com>'
+#data_dir: '/var/lib/webhooks'
+# Relative to data_dir
+#cachefile: 'modules-info.yaml'
--- /dev/null
+---
+simulate: False
+++ /dev/null
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-# Standard modules
-import os
-import sys
-import logging
-
-from pathlib import Path
-
-# own modules:
-my_path = Path(__file__)
-my_real_path = my_path.resolve()
-base_dir = my_real_path.parent
-libdir = base_dir.joinpath('lib')
-
-sys.path.insert(0, str(libdir))
-
-from webhooks.get_forge_modules import GetForgeModulesApp
-
-MY_APPNAME = my_path.stem
-LOG = logging.getLogger(MY_APPNAME)
-
-app = GetForgeModulesApp(appname=MY_APPNAME, base_dir=base_dir)
-
-if app.verbose > 1:
- LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
-
-app()
-
-sys.exit(0)
-
-# vim: ts=4 et
+++ /dev/null
----
-
-puppet_env_dir: '/etc/puppetlabs/code/environments'
-forge_uri: 'https://forgeapi.puppet.com/v3/modules'
-http_timeout: 30
-
+++ /dev/null
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-# Standard modules
-import os
-import sys
-import logging
-
-from pathlib import Path
-
-# own modules:
-my_path = Path(__file__)
-my_real_path = my_path.resolve()
-base_dir = my_real_path.parent
-libdir = base_dir.joinpath('lib')
-
-sys.path.insert(0, str(libdir))
-
-from webhooks.get_module_changes import GetModuleChangesApp
-
-MY_APPNAME = my_path.stem
-LOG = logging.getLogger(MY_APPNAME)
-
-app = GetModuleChangesApp(appname=MY_APPNAME, base_dir=base_dir)
-
-if app.verbose > 2:
- LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
-
-app()
-
-sys.exit(0)
-
-# vim: ts=4 et
+++ /dev/null
----
-#verbose: 0
-#no_error_mail: true
-#do_sudo: true
-#log_dir: '/var/log/webhooks'
-#default_email: 'puppet@pixelpark.com'
-#default_parent_dir: '/etc/puppetlabs/code'
-#smtp_server: 'localhost'
-#smtp_port: 25
-#mail_cc_addresses: []
-#sender_address: 'Puppetmaster <puppetmaster@pixelpark.com>'
-#data_dir: '/var/lib/webhooks'
-# Relative to data_dir
-#cachefile: 'modules-info.yaml'
+++ /dev/null
----
-simulate: False
+++ /dev/null
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-# Standard modules
-import sys
-import logging
-
-from pathlib import Path
-
-# own modules:
-my_path = Path(__file__)
-my_real_path = my_path.resolve()
-base_dir = my_real_path.parent
-libdir = base_dir.joinpath('lib')
-
-sys.path.insert(0, str(libdir))
-
-from webhooks.r10k import R10kHookApp # noqa
-
-MY_APPNAME = my_path.stem.replace('_', '-')
-LOG = logging.getLogger(MY_APPNAME)
-
-app = R10kHookApp(appname=MY_APPNAME, base_dir=base_dir)
-
-if app.verbose > 2:
- LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
-
-app()
-
-sys.exit(0)
-
-# vim: ts=4 et
+++ /dev/null
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-# Standard modules
-import sys
-import logging
-
-from pathlib import Path
-
-# own modules:
-my_path = Path(__file__)
-my_real_path = my_path.resolve()
-base_dir = my_real_path.parent
-libdir = base_dir.joinpath('lib')
-
-sys.path.insert(0, str(libdir))
-
-from webhooks.show_env import ShowEnvApp # noqa
-
-MY_APPNAME = my_path.stem
-LOG = logging.getLogger(MY_APPNAME)
-
-app = ShowEnvApp(output_type='html', appname=MY_APPNAME, base_dir=base_dir)
-
-if app.verbose > 2:
- LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
-
-app()
-
-sys.exit(0)
-
-# vim: ts=4 et
+++ /dev/null
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-# Standard modules
-import sys
-import logging
-
-from pathlib import Path
-
-# own modules:
-my_path = Path(__file__)
-my_real_path = my_path.resolve()
-base_dir = my_real_path.parent
-libdir = base_dir.joinpath('lib')
-
-sys.path.insert(0, str(libdir))
-
-from webhooks.show_env import ShowEnvApp # noqa
-
-MY_APPNAME = my_path.stem
-LOG = logging.getLogger(MY_APPNAME)
-
-app = ShowEnvApp(output_type='txt', appname=MY_APPNAME, base_dir=base_dir)
-
-if app.verbose > 2:
- LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
-
-app()
-
-sys.exit(0)
-
-# vim: ts=4 et
+++ /dev/null
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-# Standard modules
-import sys
-import logging
-
-from pathlib import Path
-
-# own modules:
-my_path = Path(__file__)
-my_real_path = my_path.resolve()
-base_dir = my_real_path.parent
-libdir = base_dir.joinpath('lib')
-
-sys.path.insert(0, str(libdir))
-
-from webhooks.show_modules import ShowModulesApp # noqa
-
-MY_APPNAME = my_path.stem
-LOG = logging.getLogger(MY_APPNAME)
-
-app = ShowModulesApp(output_type='html', appname=MY_APPNAME, base_dir=base_dir)
-
-if app.verbose > 2:
- LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
-
-app()
-
-sys.exit(0)
-
-# vim: ts=4 et
+++ /dev/null
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-# Standard modules
-import sys
-import logging
-
-from pathlib import Path
-
-# own modules:
-my_path = Path(__file__)
-my_real_path = my_path.resolve()
-base_dir = my_real_path.parent
-libdir = base_dir.joinpath('lib')
-
-sys.path.insert(0, str(libdir))
-
-from webhooks.show_modules import ShowModulesApp # noqa
-
-MY_APPNAME = my_path.stem
-LOG = logging.getLogger(MY_APPNAME)
-
-app = ShowModulesApp(output_type='txt', appname=MY_APPNAME, base_dir=base_dir)
-
-if app.verbose > 2:
- LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
-
-app()
-
-sys.exit(0)
-
-# vim: ts=4 et
+++ /dev/null
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-
-# Standard modules
-import sys
-import logging
-
-from pathlib import Path
-
-# own modules:
-my_path = Path(__file__)
-my_real_path = my_path.resolve()
-base_dir = my_real_path.parent
-libdir = base_dir.joinpath('lib')
-
-sys.path.insert(0, str(libdir))
-
-from webhooks.show_modules import ShowModulesApp # noqa
-
-MY_APPNAME = my_path.stem
-LOG = logging.getLogger(MY_APPNAME)
-
-app = ShowModulesApp(appname=MY_APPNAME, base_dir=base_dir)
-
-if app.verbose > 2:
- LOG.debug("{c} object:\n{o}".format(c=app.__class__.__name__, o=app))
-
-app()
-
-sys.exit(0)
-
-# vim: ts=4 et
+++ /dev/null
-#!/bin/bash
-
-set -e
-set -u
-
-PUPPET_CONF="/etc/puppetlabs/puppet/puppet.conf"
-CERTNAME=$(cat /etc/puppetlabs/puppet/puppet.conf | \
- grep -P -v '^\s*#' | \
- grep -P -v '^\s*$' | \
- grep -P -o '^\s*certname(\s|=).*' | \
- awk -F'=' '{print $2}' | \
- sed -e 's/^[ ]*//' -e 's/[ ]*$//')
-if [[ -z "${CERTNAME}" ]] ; then
- CERTNAME=$(hostname -f)
-fi
-
-echo
-echo "###########################################"
-echo "Current node: '${CERTNAME}'"
-echo
-
-envs=$( ls -1 /etc/puppetlabs/code/environments )
-if [[ "$#" != "0" ]] ; then
- envs="$*"
-fi
-
-for env in ${envs} ; do
-
- env_dir="/etc/puppetlabs/code/environments/${env}"
-
- echo
- echo "###########################################"
- echo "Performing environment '${env}' ..."
- echo "###########################################"
- echo
-
-
- cmd="/opt/puppetlabs/puppet/bin/r10k deploy environment \"${env}\" -v -p"
- echo "${cmd}"
- eval ${cmd}
-
-
- if [[ -d "${env_dir}" ]] ; then
- echo
- sleep 1
-
- cmd="/usr/bin/curl -i"
- cmd+=" --cert /etc/puppetlabs/puppet/ssl/certs/${CERTNAME}.pem"
- cmd+=" --key /etc/puppetlabs/puppet/ssl/private_keys/${CERTNAME}.pem"
- cmd+=" --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem"
- cmd+=" -X DELETE"
- cmd+=" \"https://${CERTNAME}:8140/puppet-admin-api/v1/environment-cache?environment=${env}\""
-
- echo "${cmd}"
- eval ${cmd}
-
- else
- echo -e "\nEnvironment-Verzeichnis '${env_dir}' existiert nicht." >&2
- fi
-
- cmd="/opt/puppetlabs/puppet/bin/puppet generate types --environment \"${env}\""
- echo "${cmd}"
- eval ${cmd}
-
- echo
- echo "Finished environment '${env}'."
- sleep 1
-
-done
-
-# vim: ts=4 et list