This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"----------------------------------------------------------------------- | |
"Andrew's vimrc based on Hunner, BaSS & ciaran | |
"----------------------------------------------------------------------- | |
"----------------------------------------------------------------------- | |
" terminal setup | |
"----------------------------------------------------------------------- | |
" {{{1 | |
" Add path for windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Name of service . | |
bounce_service() { | |
prepare_platform | |
# If all three of these are true it is using upstart, so we need to grep the results of service rather than trusting the return code, which will probably just be 0 in all cases. | |
if ([ -h /etc/init.d/${1?} ] && [ $(readlink -f /etc/init.d/${1?}) = "/lib/init/upstart-job" ]) || [ -f /etc/init/${1?}.conf ]; then | |
if (service "${1?}" status | ${PLATFORM_EGREP?} -q "stop/waiting") > /dev/null 2>&1; then | |
run_suppress_output "service ${1?} start | ${PLATFORM_EGREP?} -q 'start/running'" | |
else | |
run_suppress_output "service ${1?} restart | ${PLATFORM_EGREP?} -q 'start/running'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#<RuntimeError: PuppetAcceptance::DSL::Helpers.with_puppet_running_on failed (check backtrace for location) because: Host 'debian-7-amd64.vm' exited with 1 running: | |
env PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-puppet/lib:${RUBYLIB}" puppet agent --test | |
Last 10 lines of output were: | |
Server hostname 'debian-7-amd64.vm' did not match server certificate; expected one of debian-7-amd64.hsd1.or.comcast.net, DNS:debian-7-amd64, DNS:debian-7-amd64.hsd1.or.comcast.net, DNS:puppet | |
Info: Retrieving plugin | |
Error: /File[/var/lib/puppet/lib]: Failed to generate additional resources using 'eval_generate': Server hostname 'debian-7-amd64.vm' did not match server certificate; expected one of debian-7-amd64.hsd1.or.comcast.net, DNS:debian-7-amd64, DNS:debian-7-amd64.hsd1.or.comcast.net, DNS:puppet | |
Error: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve file metadata for puppet://debian-7-amd64.vm/plugins: Server hostnam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT paged_results.* FROM (SELECT reports.certname, reports.configuration_version, reports.containment_path, reports.end_time, reports.environment, reports.event_status, reports.file, reports.hash, reports.line, reports.message, reports.new_value, reports.old_value, reports.property, reports.puppet_version, reports.receive_time, reports.report_format, reports.resource_title, reports.resource_type, reports.start_time, reports.status, reports.timestamp, reports.transaction_uuid FROM ( select reports.hash, | |
reports.certname, | |
reports.puppet_version, | |
reports.report_format, | |
reports.configuration_version, | |
reports.start_time, | |
reports.end_time, | |
reports.receive_time, | |
reports.transaction_uuid, | |
environments.name as environment, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env bash | |
cat <<PUPPETDBCONF > /etc/puppet/puppetdb.conf | |
[main] | |
server=$(facter fqdn) | |
port=8081 | |
PUPPETDBCONF | |
cat <<ROUTESYAML > /etc/puppet/routes.yaml | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
q_all_in_one_install=y | |
q_enable_future_parser=y | |
q_upgrade_with_unknown_disk_space=y | |
q_puppet_symlinks_install=y | |
q_backup_and_purge_old_configuration=n | |
q_backup_and_purge_old_database_directory=n | |
q_database_host=monolithic.vm | |
q_database_install=y | |
q_database_port=5432 | |
q_database_root_password=0DLykKg1Leqcrwl2cNTp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def pe-migrations | |
{35 {:pre bring-up-historical-resources-tables | |
:post add-key-constraints-for-those-tables} | |
36 {:pre tear-down-contraints-so-foss-can-upgrade-normally} | |
40 {:post reinstantiate-those-constraints}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usermod: user puppetdb is currently used by process 15306 | |
Updating : puppetdb-3.0.0-0.1SNAPSHOT.2015.07.09T1006.el7.noarch 1/2 | |
Migrating configuration files /tmp/puppetdb-orig-configs/jetty.ini /tmp/puppetdb-orig-configs/database.ini /tmp/puppetdb-orig-configs/config.ini to /etc/puppetlabs/puppetdb/conf.d | |
Replacing: /etc/puppetlabs/puppetdb/conf.d/jetty.ini with /tmp/puppetdb-orig-configs/jetty.ini | |
Replacing: /etc/puppetlabs/puppetdb/conf.d/database.ini with /tmp/puppetdb-orig-configs/database.ini | |
Replacing: /etc/puppetlabs/puppetdb/conf.d/config.ini with /tmp/puppetdb-orig-configs/config.ini | |
Checking to see if we need to update default settings | |
Backing up /etc/puppetlabs/puppetdb/conf.d/config.ini to /etc/puppetlabs/puppetdb/conf.d/config.ini.bak.1436463075 before making changes | |
Updated setting vardir in /etc/puppetlabs/puppetdb/conf.d/config.ini. | |
Replacing: /opt/puppetlabs/server/data/puppetdb with /var/lib/puppetdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<<<<<<< HEAD | |
def get_package_version(host, version = nil) | |
version = PuppetDBExtensions.config[:package_build_version].to_s | |
# version can look like: | |
# 3.0.0 | |
# 3.0.0.SNAPSHOT.2015.07.08T0945 | |
# Rewrite version if its a SNAPSHOT in rc form | |
if version.include?("SNAPSHOT") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT (CASE WHEN certnames.latest_report_id IS NULL THEN 'unreported' | |
/* NOW() would instead be a parameterized value */ | |
WHEN reports.end_time < NOW() - interval '1 hour' THEN 'unresponsive' | |
WHEN reports.noop = TRUE THEN 'noop' | |
ELSE resport_statuses.status | |
END) AS latest_report_status, | |
certnames.certname | |
FROM certnames | |
LEFT JOIN reports ON certnames.latest_report_id = reports.id | |
LEFT JOIN report_statuses ON reports.status_id = report_statuses.id; |
OlderNewer