Finalize ssh-ident installation & configuration.

This commit is contained in:
Glenn Y. Rolland 2015-12-31 11:20:42 +01:00
parent f810e043d6
commit adc4d19ad7
2 changed files with 39 additions and 3 deletions

View file

@ -1,8 +1,12 @@
---
# defaults file for glenux.ssh-ident
sshident_users: []
# - alice
# - bob
sshident_matches: []
# - user:
# - user: johndoe
# rules:
# - regexp: "work-project-one"
# key: work
@ -10,4 +14,5 @@ sshident_matches: []
# key: work
# - regexp: "personal"
# key: personal
#
# - user: ...
# rules: ...

View file

@ -7,7 +7,7 @@
install_recommends=no
- name: Fetch ssh-ident sources
register: ssh_ident_git
register: sshident_git
git:
repo=https://github.com/ccontavalli/ssh-ident.git
dest=/usr/local/src/ssh-ident
@ -20,3 +20,34 @@
dest=/usr/local/bin/ssh-ident
state=link
# TODO: for each ssh-ident user, add links & bashrc thing
- name: Install for users
file:
path=~{{item}}/bin
state=directory
with_items: sshident_users
- file:
src=/usr/local/bin/ssh-ident
dest=~{{item}}/bin/ssh
state=link
with_items: sshident_users
- lineinfile:
dest=~{{item}}/.bashrc
regexp=^alias.scp=
line='alias scp="BINARY_SSH=scp /usr/local/bin/ssh-ident"'
become: true
become_user: "{{item}}"
with_items: sshident_users
- lineinfile:
dest=~{{item}}/.bashrc
regexp=^alias.rsync=
line='alias scp="BINARY_SSH=rsync /usr/local/bin/ssh-ident"'
become: true
become_user: "{{item}}"
with_items: sshident_users