]> git.immae.eu Git - perso/Immae/Config/Ansible.git/commitdiff
Add pavucontrol and ssh
authorIsmaël Bouya <ismael.bouya@fretlink.com>
Sun, 11 Nov 2018 16:08:12 +0000 (17:08 +0100)
committerIsmaël Bouya <ismael.bouya@fretlink.com>
Sun, 11 Nov 2018 16:08:12 +0000 (17:08 +0100)
roles/tools/files/ssh/known_hosts [new file with mode: 0644]
roles/tools/files/ssh/rc [new file with mode: 0644]
roles/tools/tasks/main.yml
roles/tools/templates/ssh_config.j2 [new file with mode: 0644]

diff --git a/roles/tools/files/ssh/known_hosts b/roles/tools/files/ssh/known_hosts
new file mode 100644 (file)
index 0000000..92545ea
--- /dev/null
@@ -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 (file)
index 0000000..35b7d34
--- /dev/null
@@ -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
index dd52f67d578ca100015b8593025609a055fa1e4b..3fa7d35ffa58eda6049e9cbcd85ad28cc3340f81 100644 (file)
     - [ "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 (file)
index 0000000..63cfe81
--- /dev/null
@@ -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