]> git.immae.eu Git - perso/Immae/Config/Ansible.git/commitdiff
Fix a few strings and configurations, and add a fl_restoreDump script
authorIsmaël Bouya <ismael.bouya@fretlink.com>
Wed, 27 Feb 2019 18:18:55 +0000 (19:18 +0100)
committerIsmaël Bouya <ismael.bouya@fretlink.com>
Wed, 27 Feb 2019 18:18:55 +0000 (19:18 +0100)
roles/contexts/fretlink/files/scripts/fl_restoreDump [new file with mode: 0644]
roles/contexts/fretlink/files/scripts/fl_tmux_dev
roles/contexts/fretlink/tasks/main.yml
roles/contexts/fretlink/templates/environment.j2
roles/git/files/config_files/git/templates_fretlink/hooks/pre-push
roles/lxde/files/config_files/libfm/libfm.conf
roles/lxde/files/config_files/pcmanfm/LXDE/pcmanfm.conf
roles/tools/files/ssh/known_hosts
roles/tools/templates/youtube-viewer.conf.j2

diff --git a/roles/contexts/fretlink/files/scripts/fl_restoreDump b/roles/contexts/fretlink/files/scripts/fl_restoreDump
new file mode 100644 (file)
index 0000000..c76406b
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+if [ -z "$1" ]; then
+  echo "$(basename $0) zip-file-to-restore.zip"
+  exit 1
+fi
+
+file=$(pwd)/$1
+
+cd $HOME/workdir/app
+
+unzip "$file"
+
+source ../environment
+mongorestore --drop --uri $FRETLINK_MONGO_URI $(pwd)/.dump/
+
+if [ -e "../fixtures" ]; then
+  source ../fixtures
+fi
index ca89e27cea3aace87f9d01d8dece165436095489..174c4a725028d914dab2619dfc501211e67c399f 100644 (file)
@@ -1,5 +1,9 @@
 #!/bin/bash
 
+tmux_conf() {
+  tmux -f $XDG_CONFIG_HOME/tmux/tmux.conf "$@"
+}
+
 type="${1:-bash}"
 if [ -n "$TMUX" ]; then
   m=switch-client
@@ -17,14 +21,14 @@ if tmux has-session -t "$type" 2>/dev/null; then
   tmux $m -t "$type"
 else
   if [ "$type" = "remote" ]; then
-    tmux new-session -d -c $start_dir -s "$type" mosh immae.eu \; \
+    tmux_conf new-session -d -c $start_dir -s "$type" mosh immae.eu \; \
         $m -t "$type"
   elif [ -n "$start_dir" ]; then
-    tmux new-session -d -c $start_dir -s "$type" \; \
+    tmux_conf new-session -d -c $start_dir -s "$type" \; \
         $m -t "$type" \; \
         new-window -c $start_dir
   elif [ -d "$HOME/workdir/$type" ]; then
-    tmux new-session -d -c "$HOME/workdir/$type" -s "$type" \; \
+    tmux_conf new-session -d -c "$HOME/workdir/$type" -s "$type" \; \
         $m -t "$type" \; \
         send-keys "../start" C-m \; \
         rename-window "running" \; \
index 0908eca1a9aff8d478336ecdee36b95cbe8e86d9..5b75f9b66295f0526f4fbe99517a0c3332404b20 100644 (file)
         - fl_tmux_dev
         - fl_vpn
         - fl_getDump
+        - fl_restoreDump
     - name: completion scripts
       copy:
         src: "scripts/_{{ item }}"
index 36e4bfd656bb2ee9fea382c822433bb5944f0073..91a6f6ab6a4403e6367f9ef23a009b05bf0cb754 100644 (file)
@@ -58,7 +58,7 @@ FL_APP_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_APP_PORT"
 FL_CARRIER_DIRECTORY_PORT=8082
 FL_CARRIER_DIRECTORY_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/CarrierDirectory subkey=Secret') }}"
 FL_CARRIER_DIRECTORY_PRIVATE_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/CarrierDirectory subkey=PrivateKey') }}"
-FL_CARRIER_DIRECTORY_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_CARRIER_DIRECTORY_PORT/api/"
+FL_CARRIER_DIRECTORY_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_CARRIER_DIRECTORY_PORT/api"
 
 FL_NOTIFIER_PORT=8081
 FL_NOTIFIER_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Notifier subkey=Secret') }}"
@@ -149,14 +149,16 @@ if [ "$APP" = "app" ]; then
   export FRETLINK_AMAZON_PUBLIC_KEY="password"
   export FRETLINK_AMAZON_PRIVATE_KEY="password"
   export FRETLINK_GMAPS_API_KEY="password"
+  export FRETLINK_PASSWORD_REQUEST_SECRET="password"
 
   # secret
   export FRETLINK_MACAROON_SECRET=$FL_APP_SECRET
 
   # carrier directory
-  export CARRIER_DIRECTORY_URI="$FL_CARRIER_DIRECTORY_URL"
+  export CARRIER_DIRECTORY_URI="$FL_CARRIER_DIRECTORY_URL/"
   export FRETLINK_CARDIR_URL="$FL_CARRIER_DIRECTORY_URL"
   export FRETLINK_CARDIR_ENABLED="true"
+  export FRETLINK_CARDIRV3_ACCESS_KEY="$(build_macaroon $FL_CARRIER_DIRECTORY_SECRET carrier-directory carrier-directory carrier-directory::read)"
 
   # notifier
   export FRETLINK_NOTIFIER_API=$FL_NOTIFIER_URL
@@ -183,6 +185,7 @@ if [ "$APP" = "app" ]; then
   # geodata
   export FRETLINK_GEODATA_API="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/GeodataDev subkey=Url') }}"
   export FRETLINK_GEODATA_ACCESS_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/GeodataDev') }}"
+  export GEODATA_URI="$FRETLINK_GEODATA_API"
 fi
 
 if [ "$APP" = "admin-root" ]; then
@@ -199,6 +202,7 @@ fi
 
 if [ "$APP" = "carrier-directory" ]; then
   export ADMIN_BASE_URL=$FL_APP_URL
+  export ACCESS_KEY="$(build_macaroon $FL_CARRIER_DIRECTORY_SECRET carrier-directory carrier-directory carrier-directory::read)"
 fi
 
 if [ "$APP" = "notifier" ]; then
index 1197641aeddba57f8ceaa66b140d27b8c2397fc7..e223b1cba05a5547bf826686ea76c2b366412915 100755 (executable)
@@ -1,11 +1,11 @@
 #!/usr/bin/env bash
 
 echo "[+] Running the linter"
-make lint
+make -q lint
 output=$?
 
-if [ "$output" = 1 ]; then
-  exit 1
-else
+if [ "$output" = "2" ]; then
   exit 0
+else
+  make lint
 fi
index 0d7991971dd741f442bb7611b30eb0ecba6363a0..1cf07b810ac7c28d61feeddb2c706d3b12f334c6 100644 (file)
@@ -1,4 +1,4 @@
-# Configuration file for the libfm version 1.3.0.2.
+# Configuration file for the libfm version 1.3.1.
 # Autogenerated file, don't edit, your changes will be overwritten.
 
 [config]
index 75e164deb7baa6c9f04c7369a143046eaed53425..ad0422bc31e9ccb71da9778ee1f1a17d69434949 100644 (file)
@@ -7,6 +7,7 @@ mount_removable=1
 autorun=1
 
 [autorun]
+x-content/win32-software=pcmanfm
 x-content/bootable-media=pcmanfm
 
 [ui]
index 92545ea541c83996a5f42f3e6bcb2222d6f7b736..e21936117e42ccc498f28100dde49d0bb691b145 100644 (file)
@@ -1,2 +1,3 @@
-immae.eu,git.immae.eu ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM/7mizTNieTOU4i263zZeKBf/3U9O1rP7YEvR8qZWSFZXmEAlXsH3C+v2c1AS2udQpbgioKuqoRj2ZQImyScnU=
+immae.eu ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBM/7mizTNieTOU4i263zZeKBf/3U9O1rP7YEvR8qZWSFZXmEAlXsH3C+v2c1AS2udQpbgioKuqoRj2ZQImyScnU=
 github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
+eldiron.immae.eu,git.immae.eu ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIFbhFTl2A2RJn5L51yxJM4XfCS2ZaiSX/jo9jFSdghF
index 310758457f917681d2822307cce00bfb63e938b8..b12a0a1b8db8ff852ec8a87f9ca81b7f85bce621 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# Youtube Viewer 3.3.4 - configuration file
+# Youtube Viewer 3.5.1 - configuration file
 
 our $CONFIG = {
   auto_captions           => 0,
@@ -10,10 +10,13 @@ our $CONFIG = {
   clobber                 => 0,
   colors                  => 1,
   combine_multiple_videos => 0,
+  comments_order          => "time",
   confirm                 => 0,
   convert_cmd             => "ffmpeg -i *IN* *OUT*",
   convert_to              => undef,
   copy_caption            => 0,
+  custom_layout           => 0,
+  custom_layout_format    => "*NO*. *TITLE* (*AUTHOR*) (*RATING*) [*TIME*]\\n",
   dash_mp4_audio          => 1,
   dash_support            => 1,
   debug                   => 0,
@@ -23,6 +26,7 @@ our $CONFIG = {
   downloads_dir           => ".",
   env_proxy               => 1,
   fat32safe               => 0,
+  ffmpeg_cmd              => "/usr/bin/ffmpeg",
   fullscreen              => 0,
   get_captions            => 1,
   get_term_width          => 1,
@@ -36,8 +40,12 @@ our $CONFIG = {
   interactive             => 1,
   keep_original_video     => 0,
   maxResults              => 20,
+  merge_into_mkv          => 1,
+  merge_into_mkv_args     => "-loglevel warning -c:s srt -c:v copy -c:a copy -disposition:s forced",
+  merge_with_captions     => 1,
   order                   => undef,
   page                    => 1,
+  prefer_mp4              => 0,
   publishedAfter          => undef,
   publishedBefore         => undef,
   regionCode              => undef,
@@ -85,5 +93,6 @@ our $CONFIG = {
   videoDuration           => undef,
   videoLicense            => undef,
   videoSyndicated         => undef,
+  wget_cmd                => "wget",
   youtube_video_url       => "https://www.youtube.com/watch?v=%s",
 }