diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/contexts/fretlink/files/scripts/fl_restoreDump | 19 | ||||
-rw-r--r-- | roles/contexts/fretlink/files/scripts/fl_tmux_dev | 10 | ||||
-rw-r--r-- | roles/contexts/fretlink/tasks/main.yml | 1 | ||||
-rw-r--r-- | roles/contexts/fretlink/templates/environment.j2 | 8 | ||||
-rwxr-xr-x | roles/git/files/config_files/git/templates_fretlink/hooks/pre-push | 8 | ||||
-rw-r--r-- | roles/lxde/files/config_files/libfm/libfm.conf | 2 | ||||
-rw-r--r-- | roles/lxde/files/config_files/pcmanfm/LXDE/pcmanfm.conf | 1 | ||||
-rw-r--r-- | roles/tools/files/ssh/known_hosts | 3 | ||||
-rw-r--r-- | roles/tools/templates/youtube-viewer.conf.j2 | 11 |
9 files changed, 51 insertions, 12 deletions
diff --git a/roles/contexts/fretlink/files/scripts/fl_restoreDump b/roles/contexts/fretlink/files/scripts/fl_restoreDump new file mode 100644 index 0000000..c76406b --- /dev/null +++ b/roles/contexts/fretlink/files/scripts/fl_restoreDump | |||
@@ -0,0 +1,19 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | if [ -z "$1" ]; then | ||
4 | echo "$(basename $0) zip-file-to-restore.zip" | ||
5 | exit 1 | ||
6 | fi | ||
7 | |||
8 | file=$(pwd)/$1 | ||
9 | |||
10 | cd $HOME/workdir/app | ||
11 | |||
12 | unzip "$file" | ||
13 | |||
14 | source ../environment | ||
15 | mongorestore --drop --uri $FRETLINK_MONGO_URI $(pwd)/.dump/ | ||
16 | |||
17 | if [ -e "../fixtures" ]; then | ||
18 | source ../fixtures | ||
19 | fi | ||
diff --git a/roles/contexts/fretlink/files/scripts/fl_tmux_dev b/roles/contexts/fretlink/files/scripts/fl_tmux_dev index ca89e27..174c4a7 100644 --- a/roles/contexts/fretlink/files/scripts/fl_tmux_dev +++ b/roles/contexts/fretlink/files/scripts/fl_tmux_dev | |||
@@ -1,5 +1,9 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | 2 | ||
3 | tmux_conf() { | ||
4 | tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf "$@" | ||
5 | } | ||
6 | |||
3 | type="${1:-bash}" | 7 | type="${1:-bash}" |
4 | if [ -n "$TMUX" ]; then | 8 | if [ -n "$TMUX" ]; then |
5 | m=switch-client | 9 | m=switch-client |
@@ -17,14 +21,14 @@ if tmux has-session -t "$type" 2>/dev/null; then | |||
17 | tmux $m -t "$type" | 21 | tmux $m -t "$type" |
18 | else | 22 | else |
19 | if [ "$type" = "remote" ]; then | 23 | if [ "$type" = "remote" ]; then |
20 | tmux new-session -d -c $start_dir -s "$type" mosh immae.eu \; \ | 24 | tmux_conf new-session -d -c $start_dir -s "$type" mosh immae.eu \; \ |
21 | $m -t "$type" | 25 | $m -t "$type" |
22 | elif [ -n "$start_dir" ]; then | 26 | elif [ -n "$start_dir" ]; then |
23 | tmux new-session -d -c $start_dir -s "$type" \; \ | 27 | tmux_conf new-session -d -c $start_dir -s "$type" \; \ |
24 | $m -t "$type" \; \ | 28 | $m -t "$type" \; \ |
25 | new-window -c $start_dir | 29 | new-window -c $start_dir |
26 | elif [ -d "$HOME/workdir/$type" ]; then | 30 | elif [ -d "$HOME/workdir/$type" ]; then |
27 | tmux new-session -d -c "$HOME/workdir/$type" -s "$type" \; \ | 31 | tmux_conf new-session -d -c "$HOME/workdir/$type" -s "$type" \; \ |
28 | $m -t "$type" \; \ | 32 | $m -t "$type" \; \ |
29 | send-keys "../start" C-m \; \ | 33 | send-keys "../start" C-m \; \ |
30 | rename-window "running" \; \ | 34 | rename-window "running" \; \ |
diff --git a/roles/contexts/fretlink/tasks/main.yml b/roles/contexts/fretlink/tasks/main.yml index 0908eca..5b75f9b 100644 --- a/roles/contexts/fretlink/tasks/main.yml +++ b/roles/contexts/fretlink/tasks/main.yml | |||
@@ -100,6 +100,7 @@ | |||
100 | - fl_tmux_dev | 100 | - fl_tmux_dev |
101 | - fl_vpn | 101 | - fl_vpn |
102 | - fl_getDump | 102 | - fl_getDump |
103 | - fl_restoreDump | ||
103 | - name: completion scripts | 104 | - name: completion scripts |
104 | copy: | 105 | copy: |
105 | src: "scripts/_{{ item }}" | 106 | src: "scripts/_{{ item }}" |
diff --git a/roles/contexts/fretlink/templates/environment.j2 b/roles/contexts/fretlink/templates/environment.j2 index 36e4bfd..91a6f6a 100644 --- a/roles/contexts/fretlink/templates/environment.j2 +++ b/roles/contexts/fretlink/templates/environment.j2 | |||
@@ -58,7 +58,7 @@ FL_APP_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_APP_PORT" | |||
58 | FL_CARRIER_DIRECTORY_PORT=8082 | 58 | FL_CARRIER_DIRECTORY_PORT=8082 |
59 | FL_CARRIER_DIRECTORY_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/CarrierDirectory subkey=Secret') }}" | 59 | FL_CARRIER_DIRECTORY_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/CarrierDirectory subkey=Secret') }}" |
60 | FL_CARRIER_DIRECTORY_PRIVATE_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/CarrierDirectory subkey=PrivateKey') }}" | 60 | FL_CARRIER_DIRECTORY_PRIVATE_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/CarrierDirectory subkey=PrivateKey') }}" |
61 | FL_CARRIER_DIRECTORY_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_CARRIER_DIRECTORY_PORT/api/" | 61 | FL_CARRIER_DIRECTORY_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_CARRIER_DIRECTORY_PORT/api" |
62 | 62 | ||
63 | FL_NOTIFIER_PORT=8081 | 63 | FL_NOTIFIER_PORT=8081 |
64 | FL_NOTIFIER_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Notifier subkey=Secret') }}" | 64 | FL_NOTIFIER_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Notifier subkey=Secret') }}" |
@@ -149,14 +149,16 @@ if [ "$APP" = "app" ]; then | |||
149 | export FRETLINK_AMAZON_PUBLIC_KEY="password" | 149 | export FRETLINK_AMAZON_PUBLIC_KEY="password" |
150 | export FRETLINK_AMAZON_PRIVATE_KEY="password" | 150 | export FRETLINK_AMAZON_PRIVATE_KEY="password" |
151 | export FRETLINK_GMAPS_API_KEY="password" | 151 | export FRETLINK_GMAPS_API_KEY="password" |
152 | export FRETLINK_PASSWORD_REQUEST_SECRET="password" | ||
152 | 153 | ||
153 | # secret | 154 | # secret |
154 | export FRETLINK_MACAROON_SECRET=$FL_APP_SECRET | 155 | export FRETLINK_MACAROON_SECRET=$FL_APP_SECRET |
155 | 156 | ||
156 | # carrier directory | 157 | # carrier directory |
157 | export CARRIER_DIRECTORY_URI="$FL_CARRIER_DIRECTORY_URL" | 158 | export CARRIER_DIRECTORY_URI="$FL_CARRIER_DIRECTORY_URL/" |
158 | export FRETLINK_CARDIR_URL="$FL_CARRIER_DIRECTORY_URL" | 159 | export FRETLINK_CARDIR_URL="$FL_CARRIER_DIRECTORY_URL" |
159 | export FRETLINK_CARDIR_ENABLED="true" | 160 | export FRETLINK_CARDIR_ENABLED="true" |
161 | export FRETLINK_CARDIRV3_ACCESS_KEY="$(build_macaroon $FL_CARRIER_DIRECTORY_SECRET carrier-directory carrier-directory carrier-directory::read)" | ||
160 | 162 | ||
161 | # notifier | 163 | # notifier |
162 | export FRETLINK_NOTIFIER_API=$FL_NOTIFIER_URL | 164 | export FRETLINK_NOTIFIER_API=$FL_NOTIFIER_URL |
@@ -183,6 +185,7 @@ if [ "$APP" = "app" ]; then | |||
183 | # geodata | 185 | # geodata |
184 | export FRETLINK_GEODATA_API="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/GeodataDev subkey=Url') }}" | 186 | export FRETLINK_GEODATA_API="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/GeodataDev subkey=Url') }}" |
185 | export FRETLINK_GEODATA_ACCESS_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/GeodataDev') }}" | 187 | export FRETLINK_GEODATA_ACCESS_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/GeodataDev') }}" |
188 | export GEODATA_URI="$FRETLINK_GEODATA_API" | ||
186 | fi | 189 | fi |
187 | 190 | ||
188 | if [ "$APP" = "admin-root" ]; then | 191 | if [ "$APP" = "admin-root" ]; then |
@@ -199,6 +202,7 @@ fi | |||
199 | 202 | ||
200 | if [ "$APP" = "carrier-directory" ]; then | 203 | if [ "$APP" = "carrier-directory" ]; then |
201 | export ADMIN_BASE_URL=$FL_APP_URL | 204 | export ADMIN_BASE_URL=$FL_APP_URL |
205 | export ACCESS_KEY="$(build_macaroon $FL_CARRIER_DIRECTORY_SECRET carrier-directory carrier-directory carrier-directory::read)" | ||
202 | fi | 206 | fi |
203 | 207 | ||
204 | if [ "$APP" = "notifier" ]; then | 208 | if [ "$APP" = "notifier" ]; then |
diff --git a/roles/git/files/config_files/git/templates_fretlink/hooks/pre-push b/roles/git/files/config_files/git/templates_fretlink/hooks/pre-push index 1197641..e223b1c 100755 --- a/roles/git/files/config_files/git/templates_fretlink/hooks/pre-push +++ b/roles/git/files/config_files/git/templates_fretlink/hooks/pre-push | |||
@@ -1,11 +1,11 @@ | |||
1 | #!/usr/bin/env bash | 1 | #!/usr/bin/env bash |
2 | 2 | ||
3 | echo "[+] Running the linter" | 3 | echo "[+] Running the linter" |
4 | make lint | 4 | make -q lint |
5 | output=$? | 5 | output=$? |
6 | 6 | ||
7 | if [ "$output" = 1 ]; then | 7 | if [ "$output" = "2" ]; then |
8 | exit 1 | ||
9 | else | ||
10 | exit 0 | 8 | exit 0 |
9 | else | ||
10 | make lint | ||
11 | fi | 11 | fi |
diff --git a/roles/lxde/files/config_files/libfm/libfm.conf b/roles/lxde/files/config_files/libfm/libfm.conf index 0d79919..1cf07b8 100644 --- a/roles/lxde/files/config_files/libfm/libfm.conf +++ b/roles/lxde/files/config_files/libfm/libfm.conf | |||
@@ -1,4 +1,4 @@ | |||
1 | # Configuration file for the libfm version 1.3.0.2. | 1 | # Configuration file for the libfm version 1.3.1. |
2 | # Autogenerated file, don't edit, your changes will be overwritten. | 2 | # Autogenerated file, don't edit, your changes will be overwritten. |
3 | 3 | ||
4 | [config] | 4 | [config] |
diff --git a/roles/lxde/files/config_files/pcmanfm/LXDE/pcmanfm.conf b/roles/lxde/files/config_files/pcmanfm/LXDE/pcmanfm.conf index 75e164d..ad0422b 100644 --- a/roles/lxde/files/config_files/pcmanfm/LXDE/pcmanfm.conf +++ b/roles/lxde/files/config_files/pcmanfm/LXDE/pcmanfm.conf | |||
@@ -7,6 +7,7 @@ mount_removable=1 | |||
7 | autorun=1 | 7 | autorun=1 |
8 | 8 | ||
9 | [autorun] | 9 | [autorun] |
10 | x-content/win32-software=pcmanfm | ||
10 | x-content/bootable-media=pcmanfm | 11 | x-content/bootable-media=pcmanfm |
11 | 12 | ||
12 | [ui] | 13 | [ui] |
diff --git a/roles/tools/files/ssh/known_hosts b/roles/tools/files/ssh/known_hosts index 92545ea..e219361 100644 --- a/roles/tools/files/ssh/known_hosts +++ b/roles/tools/files/ssh/known_hosts | |||
@@ -1,2 +1,3 @@ | |||
1 | immae.eu,git.immae.eu ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM/7mizTNieTOU4i263zZeKBf/3U9O1rP7YEvR8qZWSFZXmEAlXsH3C+v2c1AS2udQpbgioKuqoRj2ZQImyScnU= | 1 | immae.eu ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM/7mizTNieTOU4i263zZeKBf/3U9O1rP7YEvR8qZWSFZXmEAlXsH3C+v2c1AS2udQpbgioKuqoRj2ZQImyScnU= |
2 | github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== | 2 | github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== |
3 | eldiron.immae.eu,git.immae.eu ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIFbhFTl2A2RJn5L51yxJM4XfCS2ZaiSX/jo9jFSdghF | ||
diff --git a/roles/tools/templates/youtube-viewer.conf.j2 b/roles/tools/templates/youtube-viewer.conf.j2 index 3107584..b12a0a1 100644 --- a/roles/tools/templates/youtube-viewer.conf.j2 +++ b/roles/tools/templates/youtube-viewer.conf.j2 | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/perl | 1 | #!/usr/bin/perl |
2 | 2 | ||
3 | # Youtube Viewer 3.3.4 - configuration file | 3 | # Youtube Viewer 3.5.1 - configuration file |
4 | 4 | ||
5 | our $CONFIG = { | 5 | our $CONFIG = { |
6 | auto_captions => 0, | 6 | auto_captions => 0, |
@@ -10,10 +10,13 @@ our $CONFIG = { | |||
10 | clobber => 0, | 10 | clobber => 0, |
11 | colors => 1, | 11 | colors => 1, |
12 | combine_multiple_videos => 0, | 12 | combine_multiple_videos => 0, |
13 | comments_order => "time", | ||
13 | confirm => 0, | 14 | confirm => 0, |
14 | convert_cmd => "ffmpeg -i *IN* *OUT*", | 15 | convert_cmd => "ffmpeg -i *IN* *OUT*", |
15 | convert_to => undef, | 16 | convert_to => undef, |
16 | copy_caption => 0, | 17 | copy_caption => 0, |
18 | custom_layout => 0, | ||
19 | custom_layout_format => "*NO*. *TITLE* (*AUTHOR*) (*RATING*) [*TIME*]\\n", | ||
17 | dash_mp4_audio => 1, | 20 | dash_mp4_audio => 1, |
18 | dash_support => 1, | 21 | dash_support => 1, |
19 | debug => 0, | 22 | debug => 0, |
@@ -23,6 +26,7 @@ our $CONFIG = { | |||
23 | downloads_dir => ".", | 26 | downloads_dir => ".", |
24 | env_proxy => 1, | 27 | env_proxy => 1, |
25 | fat32safe => 0, | 28 | fat32safe => 0, |
29 | ffmpeg_cmd => "/usr/bin/ffmpeg", | ||
26 | fullscreen => 0, | 30 | fullscreen => 0, |
27 | get_captions => 1, | 31 | get_captions => 1, |
28 | get_term_width => 1, | 32 | get_term_width => 1, |
@@ -36,8 +40,12 @@ our $CONFIG = { | |||
36 | interactive => 1, | 40 | interactive => 1, |
37 | keep_original_video => 0, | 41 | keep_original_video => 0, |
38 | maxResults => 20, | 42 | maxResults => 20, |
43 | merge_into_mkv => 1, | ||
44 | merge_into_mkv_args => "-loglevel warning -c:s srt -c:v copy -c:a copy -disposition:s forced", | ||
45 | merge_with_captions => 1, | ||
39 | order => undef, | 46 | order => undef, |
40 | page => 1, | 47 | page => 1, |
48 | prefer_mp4 => 0, | ||
41 | publishedAfter => undef, | 49 | publishedAfter => undef, |
42 | publishedBefore => undef, | 50 | publishedBefore => undef, |
43 | regionCode => undef, | 51 | regionCode => undef, |
@@ -85,5 +93,6 @@ our $CONFIG = { | |||
85 | videoDuration => undef, | 93 | videoDuration => undef, |
86 | videoLicense => undef, | 94 | videoLicense => undef, |
87 | videoSyndicated => undef, | 95 | videoSyndicated => undef, |
96 | wget_cmd => "wget", | ||
88 | youtube_video_url => "https://www.youtube.com/watch?v=%s", | 97 | youtube_video_url => "https://www.youtube.com/watch?v=%s", |
89 | } | 98 | } |