Skip to content

Instantly share code, notes, and snippets.

@henrydobson
henrydobson / keybase.md
Last active February 18, 2021 12:10
keybase.md

Keybase proof

I hereby claim:

  • I am henrydobson on github.
  • I am henrydobson (https://keybase.io/henrydobson) on keybase.
  • I have a public key ASA3VSh_Qan2Zd63c6gglg5Tsl7dnHMmDyko8MrxZqr6tAo

To claim this, I am signing this object:

@henrydobson
henrydobson / gist:8417f63fe18a983cc71925071a939137
Created September 10, 2018 16:11
kitchen-terraform-trace
D ------Exception-------
D Class: Kitchen::ActionFailed
D Message: 1 actions failed.
>>>>>> Failed to complete #verify action: [undefined method `name' for nil:NilClass] on aws-linux-baseline-centos-7
D ----------------------
D ------Backtrace-------
D /Users/henrydobson/.rvm/gems/ruby-2.4.4/gems/test-kitchen-1.23.2/lib/kitchen/command.rb:183:in `report_errors'
D /Users/henrydobson/.rvm/gems/ruby-2.4.4/gems/test-kitchen-1.23.2/lib/kitchen/command.rb:174:in `run_action'
D /Users/henrydobson/.rvm/gems/ruby-2.4.4/gems/test-kitchen-1.23.2/lib/kitchen/command/action.rb:36:in `block in call'
D /Users/henrydobson/.rvm/rubies/ruby-2.4.4/lib/ruby/2.4.0/benchmark.rb:293:in `measure'
@henrydobson
henrydobson / find_username_by_access_key.py
Created April 4, 2017 13:13
aws find username by access key
# example: python find_username_by_access_key.py <your_key>
import sys, boto3
TARGET_ACCESS_KEY = sys.argv[1]
client = boto3.client('iam')
paginator = client.get_paginator('list_users')
response_iterator = paginator.paginate(
PaginationConfig={
'MaxItems': 150,
puppet | 2016-09-01 15:54:15,965 ERROR [c.p.h.c.i.PersistentSyncHttpClient] Error executing http request
puppet | java.net.ConnectException: Connection refused
puppet | at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_91]
puppet | at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_91]
puppet | at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:173) ~[puppet-server-release.jar:na]
puppet | at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:147) ~[puppet-server-release.jar:na]
puppet | at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:350) ~[puppet-server-release.jar:na]
puppet | at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnec
version: '2'
services:
puppet:
container_name: puppet
hostname: puppet
image: henrydobson/puppetserver
ports:
- 0.0.0.0:8140:8140
volumes:
Creating network "compose_default" with the default driver
Pulling puppetdbpostgres (puppet/puppetdb-postgres:latest)...
latest: Pulling from puppet/puppetdb-postgres
5c90d4a2d1a8: Pull complete
22337bfd13a9: Pull complete
c3961b297acc: Pull complete
5a17453338b4: Pull complete
6364e0d7a283: Pull complete
58c25f5c0dad: Pull complete
f0e675ce88d9: Pull complete
@henrydobson
henrydobson / puppet_duo_autosign
Last active October 30, 2021 00:27
A Puppet Server autosign script, which includes some whitelisted certnames, CSR attribute evaluation and Duo push auth via the auth API. Credit to nmcspadden who's script https://github.com/macadmins/docker-puppetmaster-whdcli/blob/master/check_csr.py helped greatly for the CSR eval portion of this script. Big thanks to futureimperfect for guida…
#!/usr/bin/env python
import os, sys, time, subprocess, logging
import urllib, duo_client
### Puppet VARS ###
###################
CERTNAME = sys.argv[1]
CSR = sys.stdin.read()
### DUO VARS ###
@henrydobson
henrydobson / git-logs-git-fat-diags
Last active August 15, 2016 12:21
git logs for git fat diagnosics
# with export GIT_TRACE=1 #
# I think this will be the most important log so I've put it out of order at the top here. This is the trace
output from the processor #
trace: built-in: git 'add' '-A'
trace: run_command: 'git-fat filter-clean '\''client_resources/site_default.zip'\'''
trace: exec: '/bin/sh' '-c' 'git-fat filter-clean '\''client_resources/site_default.zip'\''' 'git-fat filter-clean '\''client_resources/site_default.zip'\'''
git-fat filter-clean 'client_resources/site_default.zip': git-fat: command not found
error: cannot feed the input to external filter git-fat filter-clean %f
error: external filter git-fat filter-clean %f failed -1
@henrydobson
henrydobson / pid-node-output.txt
Created July 15, 2016 10:50
Ubuntu 14.04 Errors: Puppet-in-Docker Node output
Info: Creating a new SSL key for 3a62f87cdb6d.localdomain
Info: Caching certificate for ca
Info: csr_attributes file loading from /etc/puppetlabs/puppet/csr_attributes.yaml
Info: Creating a new SSL certificate request for 3a62f87cdb6d.localdomain
Info: Certificate Request fingerprint (SHA256): 8A:93:5B:6D:D9:9F:96:DC:85:64:E1:82:FC:60:A1:B5:FC:86:ED:AD:08:9F:42:BE:17:73:74:59:78:B6:16:9E
Info: Caching certificate for 3a62f87cdb6d.localdomain
Info: Caching certificate_revocation_list for ca
Info: Caching certificate for ca
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
@henrydobson
henrydobson / pid-puppetserver-errors.txt
Created July 15, 2016 10:49
Ubuntu 14.04 Errors: Puppet-in-Docker PuppetServer Container
Creating network "compose_default" with the default driver
Creating postgres
Creating compose_puppetdb_1
Creating compose_puppetexplorer_1
Creating compose_puppetboard_1
Creating puppet
Attaching to postgres, compose_puppetdb_1, compose_puppetboard_1, puppet, compose_puppetexplorer_1
postgres | The files belonging to this database system will be owned by user "postgres".
postgres | This user must also own the server process.
postgres |