Skip to content

Instantly share code, notes, and snippets.

@simonmcc
simonmcc / -
Created August 4, 2015 09:16
ansible-playbook -i myInventory demo.yml
PLAY [all] ********************************************************************
TASK: [ping ] *****************************************************************
ok: [head0001]
ok: [head0002]
ok: [cpu0001]
ok: [cpu0002]
ok: [head0003]
==> head0001: Running provisioner: ansible...
PYTHONUNBUFFERED=1 ANSIBLE_FORCE_COLOR=true ANSIBLE_HOST_KEY_CHECKING=false ANSIBLE_SSH_ARGS='-o UserKnownHostsFile=/dev/null -o ControlMaster=auto -o ControlPersist=60s' ansible-playbook --private-key=/Users/mccartsi/.vagrant.d/insecure_private_key --user=vagrant --connection=ssh --limit='head0001' --inventory-file=myInventory --sudo demo.yml
PLAY [all] ********************************************************************
TASK: [ping ] *****************************************************************
ok: [head0001]
TASK: [shell uname -a] ********************************************************
changed: [head0001]
[default]
head0001 ansible_ssh_host=10.16.0.201 ansible_ssh_user=vagrant ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key
#
# Vagrant based OpenStack Grizzly hosts instances
# eth0 - vagrant/nat 10.0.2.0/24
# eth1 - instance fixed_ip network 10.16.0.0/22 10.16.1.0/22
# eth2 - instance floating_ip network 172.16.0.0/22 172.16.1.0/22
#
nodes = {
# run the salt-master first, so that it can be used as an apt-proxy
# and also try to catch the keys of minions as the come up
@simonmcc
simonmcc / -
Created December 9, 2014 18:24
#!/usr/bin/expect -f
#
# I got tired of messing up my SSO password since we don't have ssh key logins
set user mccartsi
set server [lindex $argv 0]
set pass [exec security find-generic-password -a $user -s "HP Cloud SSO" -w]
trap { # trap sigwinch and pass it to the child we spawned
set rows [stty rows]
set cols [stty columns]
@simonmcc
simonmcc / -
Created December 9, 2014 14:39
# Add bash completion for ssh: it tries to complete the host to which you
# want to connect from the list of the ones contained in ~/.ssh/known_hosts
__ssh_known_hosts() {
if [[ -f ~/.ssh/known_hosts ]]; then
cut -d " " -f1 ~/.ssh/known_hosts | cut -d "," -f1
fi
}
_ssh() {
local cur known_hosts
COMPREPLY=()
@simonmcc
simonmcc / -
Created November 27, 2014 16:57
81c81
< "az": "az1",
---
> "az": "az3",
85,86c85,86
< "url": "https://chef11.useast.hpcloud.net/organizations/paas-us-ae1-az1",
< "validator": "us-ae1-az1-validator"
---
> "url": "https://chef11.useast.hpcloud.net/organizations/paas-us-ae1-az3",
> "validator": "us-ae1-az3-validator"
@simonmcc
simonmcc / -
Created November 27, 2014 16:13
startup_message off
#escape ``
hardstatus alwayslastline
hardstatus string "%{gk}[%= %{wk}%?%-Lw%?%{r}(%{W}%n*%f %t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]"
#hardstatus string "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<"
vbell off
defscrollback 10000

Keybase proof

I hereby claim:

  • I am simonmcc on github.
  • I am simonmcc (https://keybase.io/simonmcc) on keybase.
  • I have a public key whose fingerprint is 85A5 1500 86CE 3257 9BF1 5658 B769 7B65 2533 1DBC

To claim this, I am signing this object:

@simonmcc
simonmcc / -
Last active August 29, 2015 14:06
ruby-1.9.3-p327:
system:
uname: "Darwin Simons-MacBook-Pro.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64"
system: "osx/10.9/x86_64"
bash: "/bin/bash => GNU bash, version 3.2.51(1)-release (x86_64-apple-darwin13)"
zsh: "/bin/zsh => zsh 5.0.2 (x86_64-apple-darwin13.0)"
rvm:
version: "rvm 1.25.17 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]"