ansible: add ssh config block

pull/7/head
bretello 2024-01-02 15:51:01 +01:00
parent 904f53b0e0
commit 2805f13208
Signed by: brethil
GPG Key ID: 876AAC6290170FE7
1 changed files with 22 additions and 0 deletions

View File

@ -39,6 +39,8 @@
- "$HOME/projects"
- "$HOME/git"
- "$HOME/.config/git"
- "$HOME/.ssh/"
- "$HOME/.ssh/sockets"
- name: antibody # TODO: antibody is available on apt(debian)/brew/pacman
shell: |
@ -63,6 +65,26 @@
source $DOTFILES/brethil_dotfile.sh
create: true
- name: ssh config
blockinfile:
path: $HOME/.ssh/config
marker: "# {mark} brethil dotfiles"
insertbefore: "BOF"
block: |
TCPKeepAlive=yes
ServerAliveCountMax=6
## Uncomment to enable compression for all ssh sessions
#Compression=yes
ControlMaster auto
ControlPath ~/.ssh/sockets/%r@%n:%p
ControlPersist yes
Host *
ServerAliveInterval 300
create: true
- name: dotfiles symlink
file:
src: "{{ DOTFILES }}/{{ item.key }}"