From: Ismaƫl Bouya Date: Sun, 11 Nov 2018 16:08:12 +0000 (+0100) Subject: Add pavucontrol and ssh X-Git-Tag: v1.0~26 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=b4693a8e0d5a6b79dbbc3c7d3987dabbab4bbd43;hp=3dd3d428e1c9bd516299d03014485d79db68fff4;p=perso%2FImmae%2FConfig%2FAnsible.git Add pavucontrol and ssh --- diff --git a/roles/tools/files/ssh/known_hosts b/roles/tools/files/ssh/known_hosts new file mode 100644 index 0000000..92545ea --- /dev/null +++ b/roles/tools/files/ssh/known_hosts @@ -0,0 +1,2 @@ +immae.eu,git.immae.eu ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM/7mizTNieTOU4i263zZeKBf/3U9O1rP7YEvR8qZWSFZXmEAlXsH3C+v2c1AS2udQpbgioKuqoRj2ZQImyScnU= +github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== diff --git a/roles/tools/files/ssh/rc b/roles/tools/files/ssh/rc new file mode 100644 index 0000000..35b7d34 --- /dev/null +++ b/roles/tools/files/ssh/rc @@ -0,0 +1,8 @@ +#!/bin/bash + +if [ -n "$DISPLAY" ]; then + export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" + read protocol cookie + xauth remove $DISPLAY + xauth add $DISPLAY "$protocol" "$cookie" +fi diff --git a/roles/tools/tasks/main.yml b/roles/tools/tasks/main.yml index dd52f67..3fa7d35 100644 --- a/roles/tools/tasks/main.yml +++ b/roles/tools/tasks/main.yml @@ -83,4 +83,27 @@ - [ "LocationMode", "path-bar" ] - [ "SortOrder", "ascending" ] - [ "StartupMode", "recent" ] - +- name: pavucontrol configuration + ini_file: + path: "$XDG_CONFIG_HOME/pavucontrol.ini" + section: "window" + option: "{{ item.0 }}" + value: "{{ item.1 }}" + no_extra_spaces: true + loop: + - [ "sinkInputType", "0" ] + - [ "sourceOutputType", "0" ] + - [ "sinkType", "0" ] + - [ "sourceType", "0" ] + - [ "showVolumeMeters", "1" ] +- name: ssh files + copy: + src: "ssh/{{ item }}" + dest: "$HOME/.ssh/{{ item }}" + loop: + - known_hosts + - rc +- name: ssh configuration + template: + src: ssh_config.j2 + dest: $HOME/.ssh/config diff --git a/roles/tools/templates/ssh_config.j2 b/roles/tools/templates/ssh_config.j2 new file mode 100644 index 0000000..63cfe81 --- /dev/null +++ b/roles/tools/templates/ssh_config.j2 @@ -0,0 +1,13 @@ +Host * +CheckHostIP no +{% if "graphical_vt" not in features.get(profile, []) %} +ProxyCommand sh -c 'gpg-connect-agent updatestartuptty /bye >/dev/null && nc "$0" "$1"' %h %p +{% endif %} + +Host gitolite +HostName git.immae.eu +User gitolite + +Host immae.eu +HostName immae.eu +User immae