From b4693a8e0d5a6b79dbbc3c7d3987dabbab4bbd43 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 11 Nov 2018 17:08:12 +0100 Subject: [PATCH] Add pavucontrol and ssh --- roles/tools/files/ssh/known_hosts | 2 ++ roles/tools/files/ssh/rc | 8 ++++++++ roles/tools/tasks/main.yml | 25 ++++++++++++++++++++++++- roles/tools/templates/ssh_config.j2 | 13 +++++++++++++ 4 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 roles/tools/files/ssh/known_hosts create mode 100644 roles/tools/files/ssh/rc create mode 100644 roles/tools/templates/ssh_config.j2 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 -- 2.41.0