Skip to content

Instantly share code, notes, and snippets.

View madAndroid's full-sized avatar
🏠
Working from home

Andrew Stangl madAndroid

🏠
Working from home
View GitHub Profile
require 'base64'
require 'digest/md5'
key = "your public key here"
# first decode the key
key_decoded = Base64.decode64(key)
# create an md5
md5 = Digest::MD5.hexdigest(key_decoded)
# convert that hash into a readable fingerprint
~/r/s/P/puppet-with-cukes git:master ❯❯❯ git df ✭ ✱ ◼
diff --git a/puppet/scalefactory.com/modules/sf_bacula/manifests/director.pp b/puppet/scalefactory.com/modules/sf_bacula/manifests/director.pp
index 695e2fa..10dcedd 100644
--- a/puppet/scalefactory.com/modules/sf_bacula/manifests/director.pp
+++ b/puppet/scalefactory.com/modules/sf_bacula/manifests/director.pp
@@ -516,9 +516,11 @@ class sf_bacula::director (
if $catalog_mysql_hostname != 'localhost' {
$director_restore_hostname = $catalog_mysql_hostname
+ $director_requires = undef
ip-172-31-109-83 : OK
{:status=>0, :err=> "I, [2013-10-31T09:23:14.029574 #29721] INFO -- : run_post_deploy_commands: Running collectstatic commands\nI, [2013-10-31T09:23:14.029842 #29721] INFO -- : logged_system: cd /srv/django/prod_twig/current && /srv/django/scripts/prod_twig/collectstatic.sh\nI, [2013-10-31T09:23:14.039497 #29721] INFO -- : RUNNING COLLECTSTATIC FOR prod_twig.. \nI, [2013-10-31T09:23:14.051370 #29721] INFO -- : total 28\nI, [2013-10-31T09:23:14.051492 #29721] INFO -- : drwxr-xr-x 6 twig-deploy twig-deploy 4096 Oct 28 17:16 .\nI, [2013-10-31T09:23:14.051574 #29721] INFO -- : drwxr-xr-x 6 twig-deploy twig-deploy 4096 Oct 31 09:20 ..\nI, [2013-10-31T09:23:14.051664 #29721] INFO -- : drwxr-xr-x 15 twig-deploy twig-deploy 4096 Oct 28 17:16 apps\nI, [2013-10-31T09:23:14.051746 #29721] INFO -- : -rw-r--r-- 1 twig-deploy twig-deploy 247 Oct 28 17:16 manage.py\nI, [2013-10-31T09:23:14.051835 #29721] INFO -- : drwxr-xr-x 3 twig-deploy twig-deploy 40
notice: Scope(Class[Cucumber_defaults]): using available proxy for vagrant cucumber tests - to ensure squid is correctly configured for caching packages, see:
notice: Scope(Class[Cucumber_defaults]): https://sites.google.com/a/scalefactory.com/intranet/reference/devguide/using-squid-for-cucumber-vagrant-package-caching
notice: Scope(Class[Sf_mcollective::Agent::Params]): Mcollective plugin path: /opt/automation/usr/libexec/mcollective
info: Applying configuration version '1382440599'
notice: /Stage[main]/Sf_mcollective::Agent::Config/File[/etc/mcollective/facts.yaml]/content:
--- /etc/mcollective/facts.yaml 2013-10-22 11:16:28.048039698 +0000
+++ /tmp/puppet-file20131022-32092-14j2kun-0 2013-10-22 11:17:21.042039669 +0000
@@ -1,84 +1,54 @@
---
- fqdn: server.centos6.internal
notice: Scope(Class[Sf_mcollective::Agent::Params]): Mcollective plugin path: /opt/automation/usr/libexec/mcollective
info: Applying configuration version '1382432156'
notice: /Stage[main]/Sf_mcollective::Agent::Config/File[/etc/mcollective/facts.yaml]/content:
--- /etc/mcollective/facts.yaml 2013-10-22 08:55:12.170085693 +0000
+++ /tmp/puppet-file20131022-32128-7tyy9n-0 2013-10-22 08:57:15.337085625 +0000
@@ -28,12 +28,13 @@
hostname: server
http_proxy:
id: root
- interfaces: eth0,eth1,lo
[root@ip-172-31-107-32 ~]# mco sfdeploy --verbose --application prod_twig --branch master update_git_clone deploy_branch -C tw_role_webserver Discovering hosts using the mc method for 2 second(s) .... 2
* [ ============================================================> ] 2 / 2
ip-172-31-110-194 : OK
{:status=>0, :err=> "I, [2013-10-15T12:15:32.887946 #4851] INFO -- : create_clone_path: Creating directory /srv/deploy/clones/prod_twig\nD, [2013-10-15T12:15:32.888354 #4851] DEBUG -- : initial_git_clone: Git clone already created\nI, [2013-10-15T12:15:32.888442 #4851] INFO -- : update_git_clone: Fetching changes from upstream\nI, [2013-10-15T12:15:32.888605 #4851] INFO -- : logged_system: cd /srv/deploy/clones/prod_twig && git fetch\nD, [2013-10-15T12:15:34.546545 #4851] DEBUG -- : Exit status: 0", :out=>""}
ip-172-31-111-62 : OK
{:status=>0, :err=> "I, [2013-10-15T12:15:32.946383 #955] INFO -- : create_clone_path: Creating
$389_aws_servers = [ 'foo', 'bar' ]
$389_repl_host1 = $389_aws_servers[0]
$389_repl_host2 = $389_aws_servers[1]
notify { " REPL HOST 1 == $389_repl_host1": }
notify { " REPL HOST 2 == $389_repl_host2": }
file { '/tmp/test.txt':
content => template('setup.inf')
}
[twig-deploy@ip-172-31-108-109 ~]$ sudo mco sfdeploy update_git_clone -a prod_twig -b master -C tw_role_webserver
* [ ============================================================> ] 2 / 2
ip-172-31-109-14
err: I, [2013-10-11T09:42:41.331416 #28691] INFO -- : create_clone_path: Creating directory /srv/deploy/clones/prod_twig
D, [2013-10-11T09:42:41.335869 #28691] DEBUG -- : initial_git_clone: Git clone already created
I, [2013-10-11T09:42:41.335972 #28691] INFO -- : update_git_clone: Fetching changes from upstream
I, [2013-10-11T09:42:41.336160 #28691] INFO -- : logged_system: cd /srv/deploy/clones/prod_twig && git fetch
[twig-deploy@ip-172-31-108-218 hiera-aws]$ less /etc/activemq/activemq.xml
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
#!/bin/sh
# This script will monitor another NAT instance and take over its routes
# if communication with the other instance fails
# NAT instance variables
# Other instance's IP to ping and route to grab if other node goes down
NAT_ID=
NAT_RT_ID=
# My route to grab when I come back up