diff options
author | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-11-11 17:08:12 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@fretlink.com> | 2018-11-11 17:08:12 +0100 |
commit | b4693a8e0d5a6b79dbbc3c7d3987dabbab4bbd43 (patch) | |
tree | 0fb61dc7eebf8d7f72f0bffeff86036ec2c5a288 | |
parent | 3dd3d428e1c9bd516299d03014485d79db68fff4 (diff) | |
download | Ansible-b4693a8e0d5a6b79dbbc3c7d3987dabbab4bbd43.tar.gz Ansible-b4693a8e0d5a6b79dbbc3c7d3987dabbab4bbd43.tar.zst Ansible-b4693a8e0d5a6b79dbbc3c7d3987dabbab4bbd43.zip |
Add pavucontrol and ssh
-rw-r--r-- | roles/tools/files/ssh/known_hosts | 2 | ||||
-rw-r--r-- | roles/tools/files/ssh/rc | 8 | ||||
-rw-r--r-- | roles/tools/tasks/main.yml | 25 | ||||
-rw-r--r-- | roles/tools/templates/ssh_config.j2 | 13 |
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 @@ | |||
1 | immae.eu,git.immae.eu ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM/7mizTNieTOU4i263zZeKBf/3U9O1rP7YEvR8qZWSFZXmEAlXsH3C+v2c1AS2udQpbgioKuqoRj2ZQImyScnU= | ||
2 | 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 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | if [ -n "$DISPLAY" ]; then | ||
4 | export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" | ||
5 | read protocol cookie | ||
6 | xauth remove $DISPLAY | ||
7 | xauth add $DISPLAY "$protocol" "$cookie" | ||
8 | 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 @@ | |||
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 @@ | |||
1 | Host * | ||
2 | CheckHostIP no | ||
3 | {% if "graphical_vt" not in features.get(profile, []) %} | ||
4 | ProxyCommand sh -c 'gpg-connect-agent updatestartuptty /bye >/dev/null && nc "$0" "$1"' %h %p | ||
5 | {% endif %} | ||
6 | |||
7 | Host gitolite | ||
8 | HostName git.immae.eu | ||
9 | User gitolite | ||
10 | |||
11 | Host immae.eu | ||
12 | HostName immae.eu | ||
13 | User immae | ||