set :application, `basename $(pwd)`.chomp
set :commit_sha, `git rev-parse --short "HEAD"`.chomp
set :default_environment, {
"RATIONALE_CLIENT" => "capistrano",
"RATIONALE" => "'Deploying #{application} #{commit_sha}'"
}
Last active
November 22, 2017 14:42
-
-
Save erichs/f113cc38fe498ab1704e to your computer and use it in GitHub Desktop.
Papers, Please
Dec 16 21:27:24 cdehost1 RATIONALE[46672]: event='ssh rationale' client='interactive-ssh' user='ops' ip='10.20.30.5' rationale='testing rationale' command="/bin/bash"
Dec 16 21:29:15 cdehost1 RATIONALE[46672]: event='ssh rationale' client='interactive-ssh' user='ops' ip='10.20.30.5' rationale='testing rationale' metric='111.011724' metric_units='seconds' description='session end'
Dec 16 21:30:33 cdehost2 RATIONALE[33096]: event='ssh rationale' client='ansible' user='ops' ip='10.20.30.5' rationale='gather ansible facts' command="/bin/sh -c '/usr/bin/python'"
Dec 16 21:30:34 cdehost2 RATIONALE[33096]: event='ssh rationale' client='ansible' user='ops' ip='10.20.30.5' rationale='gather ansible facts' metric='1.117183' metric_units='seconds' description='session end'
Dec 16 22:56:14 cdehost1 RATIONALE[14518]: event='ssh rationale' client='capistrano' user='dev' ip='10.20.30.6' rationale='Deploying app 2df726a' command="env RATIONALE_CLIENT=capistrano RATIONALE='Deploying\ app\ 2df726a' sh -c '/srv/app/bundle-exec rake assets:precompile'"
Dec 16 17:56:18 cdehost1 RATIONALE[14518]: event='ssh rationale' client='capistrano' user='dev' ip='10.20.30.6' rationale='Deploying app 2df726a' metric='4.852107' metric_units='seconds' description='session end'
user@devbox:~$ export RATIONALE="testing sendenv" RATIONALE_CLIENT="ad-hoc"
user@devbox:~$ ssh server
user@server:~$ echo $RATIONALE
testing sendenv
user@server:~$ echo $RATIONALE_CLIENT
ad-hoc
user@server:~$ ^D
$ ssh ops@cdehost
RATIONALE: _
Yes, such an interesting blog post, but the script would really help.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you think it would be possible to share the script you used for SSH's
ForceCommand
?