summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-11 17:08:12 +0100
committerIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-11 17:08:12 +0100
commitb4693a8e0d5a6b79dbbc3c7d3987dabbab4bbd43 (patch)
tree0fb61dc7eebf8d7f72f0bffeff86036ec2c5a288 /roles
parent3dd3d428e1c9bd516299d03014485d79db68fff4 (diff)
downloadAnsible-b4693a8e0d5a6b79dbbc3c7d3987dabbab4bbd43.tar.gz
Ansible-b4693a8e0d5a6b79dbbc3c7d3987dabbab4bbd43.tar.zst
Ansible-b4693a8e0d5a6b79dbbc3c7d3987dabbab4bbd43.zip
Add pavucontrol and ssh
Diffstat (limited to 'roles')
-rw-r--r--roles/tools/files/ssh/known_hosts2
-rw-r--r--roles/tools/files/ssh/rc8
-rw-r--r--roles/tools/tasks/main.yml25
-rw-r--r--roles/tools/templates/ssh_config.j213
4 files changed, 47 insertions, 1 deletions
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 @@
1immae.eu,git.immae.eu ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM/7mizTNieTOU4i263zZeKBf/3U9O1rP7YEvR8qZWSFZXmEAlXsH3C+v2c1AS2udQpbgioKuqoRj2ZQImyScnU=
2github.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 @@
1#!/bin/bash
2
3if [ -n "$DISPLAY" ]; then
4 export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority"
5 read protocol cookie
6 xauth remove $DISPLAY
7 xauth add $DISPLAY "$protocol" "$cookie"
8fi
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 @@
83 - [ "LocationMode", "path-bar" ] 83 - [ "LocationMode", "path-bar" ]
84 - [ "SortOrder", "ascending" ] 84 - [ "SortOrder", "ascending" ]
85 - [ "StartupMode", "recent" ] 85 - [ "StartupMode", "recent" ]
86 86- name: pavucontrol configuration
87 ini_file:
88 path: "$XDG_CONFIG_HOME/pavucontrol.ini"
89 section: "window"
90 option: "{{ item.0 }}"
91 value: "{{ item.1 }}"
92 no_extra_spaces: true
93 loop:
94 - [ "sinkInputType", "0" ]
95 - [ "sourceOutputType", "0" ]
96 - [ "sinkType", "0" ]
97 - [ "sourceType", "0" ]
98 - [ "showVolumeMeters", "1" ]
99- name: ssh files
100 copy:
101 src: "ssh/{{ item }}"
102 dest: "$HOME/.ssh/{{ item }}"
103 loop:
104 - known_hosts
105 - rc
106- name: ssh configuration
107 template:
108 src: ssh_config.j2
109 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 @@
1Host *
2CheckHostIP no
3{% if "graphical_vt" not in features.get(profile, []) %}
4ProxyCommand sh -c 'gpg-connect-agent updatestartuptty /bye >/dev/null && nc "$0" "$1"' %h %p
5{% endif %}
6
7Host gitolite
8HostName git.immae.eu
9User gitolite
10
11Host immae.eu
12HostName immae.eu
13User immae