[ssh] Use ansible for ssh

pull/28/head
Alpha Chen 10 years ago
parent 1d191d6cc1
commit d3e810de6f

@ -17,6 +17,7 @@
stow_packages:
- git
- ruby
- ssh
- tmux
- vim
tasks:
@ -29,3 +30,6 @@
file: src={{ ansible_env.HOME }}/.dotfiles/{{ item.key }} dest={{ ansible_env.HOME}}/{{ item.value }} state=link
with_dict:
git/.gitignore: .gitignore
- name: setup ssh keys
local_action: ruby ~/.dotfiles/setup_ssh_keys.rb
when: ansible_domain == "local"

@ -0,0 +1,21 @@
require 'fileutils'
include FileUtils
def with_mount(image)
out = `hdiutil mount #{image}`
mountpoint = out.split(/\s+/).last
yield(mountpoint)
ensure
puts `hdiutil unmount #{mountpoint}`
end
cd File.expand_path('~/.ssh')
with_mount "~/Dropbox/sekritz.sparseimage" do |mountpoint|
Dir["#{mountpoint}/ssh keys/*"].each do |file|
cp file, File.basename(file)
puts `chmod go-r #{File.basename(file)}`
puts `ssh-add -K #{File.basename(file)}`
end
end

@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtNVr7YQs2r7lB7CyGRY2/GW2WYqs1NbPCFu3IYGOGXhKn8A8dA1pL7Jvs/njufrkbVh6CQ0fkQgf7AtTL7q+KORyh7VDawg4euqYRhyyJl+vlZAI0hRnF6qoPy9s3j2CI/9EbmAmAvNbsp6kCpsg0RB5ik0Q+pr7PBORGnAew8JOo6zEuUOOBwIldK/TXLaO9SowSHtCdq9tHXl/2X2mP8hhT0BOSLDbQFK0vJii0Dy0QrktSFZRDbs+8e20HxkyKPu4+rOmQfR/ymE3YdSxLLgcXe/zDIMZiTQrI2Lsc2PcE56NeXNXtmr3ZlnO5LLaZGqdOvKDE6x6PTd2q1l0/ alpha@mirepoix.local

@ -0,0 +1,38 @@
TCPKeepALive yes
ServerAliveInterval 60
ControlMaster auto
ControlPath /tmp/%r@%h:%p
ControlPersist yes
Host *
IdentityFile ~/.ssh/id_rsa
# For vagrant virtual machines
# Host 192.168.33.*
# ForwardAgent yes
# IdentityFile ~/.vagrant.d/insecure_private_key
# StrictHostKeyChecking no
# UserKnownHostsFile=/dev/null
# User root
# LogLevel ERROR
Host *.intsm.net
IdentityFile ~/.ssh/sm_rsa
ForwardAgent yes
StrictHostKeyChecking no
# UserKnownHostsFile=/dev/null
Host *.github.com
IdentityFile ~/.ssh/github_rsa
Host *.prgmr.com
IdentityFile ~/.ssh/prgmr_rsa
Host kejadlen.net
IdentityFile ~/.ssh/prgmr_rsa
Host home.kejadlen.net
# User alpha
Host chime.prgmr.com
User kejadlen

@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC5J3ORhIWtQuSUYRIZtgB9ebq7G/YlZelhuSP7ro4TxlT26BneytvaRLDsw3zYXmwEXLSnJgqMj5TzkUvDodGgo9MdfnbmQIWcCMipbLACLtxP17joE0M7qsIE5evEUa4Gv6RvhAgEnpDY3/yxafyi80xMgIHV8PYGBxBLsL4yue8FzUCPHYi2L99LmWF3aMBX4dhx36mnTalBHJFgtCxWKpqwq0jZgIXgZLr30j6caoCsPSr5oM6zEucuo5AfVnpStetrNobkHWedXoEff79XGCTLWvfvw5a/2rMPCSI+ghmv6MXgnyz8CT2b4uSykEOqe8O07ugDCMlP91R0vf5r alpha.chen+github@gmail.com

@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCtNVr7YQs2r7lB7CyGRY2/GW2WYqs1NbPCFu3IYGOGXhKn8A8dA1pL7Jvs/njufrkbVh6CQ0fkQgf7AtTL7q+KORyh7VDawg4euqYRhyyJl+vlZAI0hRnF6qoPy9s3j2CI/9EbmAmAvNbsp6kCpsg0RB5ik0Q+pr7PBORGnAew8JOo6zEuUOOBwIldK/TXLaO9SowSHtCdq9tHXl/2X2mP8hhT0BOSLDbQFK0vJii0Dy0QrktSFZRDbs+8e20HxkyKPu4+rOmQfR/ymE3YdSxLLgcXe/zDIMZiTQrI2Lsc2PcE56NeXNXtmr3ZlnO5L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