summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-28 10:13:27 +0100
committerIsmaël Bouya <ismael.bouya@fretlink.com>2018-11-28 20:23:16 +0100
commitd4357f69e1ccbb1c277f8978ea6f4a368b3ee3c2 (patch)
tree4062fb00ac2419feae4c71de1228a76d2badb67f
parent34d5d6fc77fd440963b1e0cfc099bc7291c5eeb0 (diff)
downloadAnsible-d4357f69e1ccbb1c277f8978ea6f4a368b3ee3c2.tar.gz
Ansible-d4357f69e1ccbb1c277f8978ea6f4a368b3ee3c2.tar.zst
Ansible-d4357f69e1ccbb1c277f8978ea6f4a368b3ee3c2.zip
ssh and tmux configuration fixes
-rw-r--r--roles/contexts/fretlink/templates/environment.j29
-rw-r--r--roles/tools/files/ssh/rc11
-rw-r--r--roles/tools/templates/tmux.conf.j21
3 files changed, 16 insertions, 5 deletions
diff --git a/roles/contexts/fretlink/templates/environment.j2 b/roles/contexts/fretlink/templates/environment.j2
index bb9328a..e5e2c64 100644
--- a/roles/contexts/fretlink/templates/environment.j2
+++ b/roles/contexts/fretlink/templates/environment.j2
@@ -8,6 +8,14 @@ if ! $(echo "$PATH" | grep -q "$DIR/toolbox/scripts"); then
8 PATH="$DIR/toolbox/scripts:$PATH" 8 PATH="$DIR/toolbox/scripts:$PATH"
9fi 9fi
10 10
11p() {
12 if [ -z "$2" ]; then
13 pass show Travail/Fretlink/$1
14 else
15 pass show Travail/Fretlink/$1 | grep "^$2:" | sed -e "s/^$2: //"
16 fi | head -n1
17}
18
11build_macaroon() { 19build_macaroon() {
12 if [ "$1" = "--old" ]; then 20 if [ "$1" = "--old" ]; then
13 shift 21 shift
@@ -178,6 +186,7 @@ if [ "$APP" = "notifier" ]; then
178 export TEMPLATES_ASSETS_BASE_URL="http://dummy/" 186 export TEMPLATES_ASSETS_BASE_URL="http://dummy/"
179 export TRANSPOREON_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/ApiTest subkey=Login') }}" 187 export TRANSPOREON_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/ApiTest subkey=Login') }}"
180 export TRANSPOREON_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/ApiTest') }}" 188 export TRANSPOREON_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/ApiTest') }}"
189 export TRANSPOREON_HOST="api.test.transporeon.com"
181 export TRANSPOREON_CALLBACK_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest subkey=Login') }}" 190 export TRANSPOREON_CALLBACK_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest subkey=Login') }}"
182 export TRANSPOREON_CALLBACK_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest') }}" 191 export TRANSPOREON_CALLBACK_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest') }}"
183 192
diff --git a/roles/tools/files/ssh/rc b/roles/tools/files/ssh/rc
index 35b7d34..32d1bd4 100644
--- a/roles/tools/files/ssh/rc
+++ b/roles/tools/files/ssh/rc
@@ -1,8 +1,9 @@
1#!/bin/bash 1#!/bin/bash
2 2
3if [ -n "$DISPLAY" ]; then 3if read proto cookie && [ -n "$DISPLAY" ]; then
4 export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" 4 if [ `echo $DISPLAY | cut -c1-10` = "localhost:" ]; then
5 read protocol cookie 5 echo add unix:`echo $DISPLAY | cut -c11-` $proto $cookie
6 xauth remove $DISPLAY 6 else
7 xauth add $DISPLAY "$protocol" "$cookie" 7 echo add $DISPLAY "$protocol" "$cookie"
8 fi | xauth -q -
8fi 9fi
diff --git a/roles/tools/templates/tmux.conf.j2 b/roles/tools/templates/tmux.conf.j2
index 07e88b9..57ddc2e 100644
--- a/roles/tools/templates/tmux.conf.j2
+++ b/roles/tools/templates/tmux.conf.j2
@@ -75,3 +75,4 @@ set-window-option -g window-status-bell-style fg=yellow,bold,underscore
75set -g default-terminal screen-256color 75set -g default-terminal screen-256color
76 76
77set -g mouse on 77set -g mouse on
78set -g detach-on-destroy off