]> git.immae.eu Git - perso/Immae/Config/Ansible.git/commitdiff
New configuration as of 2019-08-21
authorIsmaël Bouya <ismael.bouya@fretlink.com>
Wed, 21 Aug 2019 07:49:01 +0000 (09:49 +0200)
committerIsmaël Bouya <ismael.bouya@fretlink.com>
Wed, 21 Aug 2019 07:49:01 +0000 (09:49 +0200)
roles/contexts/fretlink/files/workdir/start
roles/contexts/fretlink/templates/environment.j2
roles/lxde/files/config_files/lxterminal/lxterminal.conf
roles/lxde/files/config_files/openbox/lxde-rc.xml
roles/lxde/files/config_files/pcmanfm/LXDE/pcmanfm.conf
roles/shell/bash/templates/bashrc.j2
roles/tools/files/vimrc
roles/tools/templates/ssh_config.j2

index 840943a223cb8e0b63a54948e4c8ca4e89976d2b..8f440bf79a1acb4a12dc79e84de9c902d28b1348 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/bash
 
 APP="$1"
+shift
 
 if [ -z "$APP" ]; then
   if [ $(dirname $(pwd)) = "$HOME/workdir" ]; then
@@ -11,9 +12,12 @@ if [ -z "$APP" ]; then
   fi
 fi
 
-if [ "$APP" != "psql" ]; then
+if [ "$APP" != "psql" -a "$APP" != "pg_restore" ]; then
   cd $HOME/workdir/$APP
   source ../environment
+elif [ "$APP" = "pg_restore" ]; then
+  source ../environment
+  APP=pg_restore
 else
   source ../environment
   APP=psql
@@ -41,14 +45,22 @@ function start_psql() {
   psql -h $POSTGRESQL_ADDON_HOST -p $POSTGRESQL_ADDON_PORT -U $POSTGRESQL_ADDON_USER -d $POSTGRESQL_ADDON_DB
 }
 
+function start_pg_restore() {
+  export PGPASSWORD=$POSTGRESQL_ADDON_PASSWORD
+  pg_restore -h $POSTGRESQL_ADDON_HOST -p $POSTGRESQL_ADDON_PORT -U $POSTGRESQL_ADDON_USER -d $POSTGRESQL_ADDON_DB
+}
+
 case "$APP${FLAVOR:+-}$FLAVOR" in
   "psql") start_psql;;
+  "pg_restore") start_pg_restore;;
   "app") start_app;;
   "admin-root") start_stack server;;
+  "admin-user") start_stack server;;
   "carrier-directory") start_stack server;;
   "freight") start_stack freight-server;;
   "notifier") start_stack notifier-exe;;
   "notifier-amqp") start_stack notifier-exe-amqp;;
   "pricer") start_stack pricer;;
+  "third-parties") start_stack server;;
   "toolbox") start_stack toolbox-api;;
 esac
index 652fc8dc6be7578b8e6b483b40a20a18d58b599d..85d3dc74a9c874fd1f603ab66fb8a4830849f53e 100644 (file)
@@ -50,6 +50,11 @@ APP=$(basename $(pwd))
 FL_APPS_HOST="localhost"
 FL_APPS_SCHEME="http"
 
+FL_ADMIN_USER_PORT=8078
+FL_ADMIN_USER_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/AdminUser subkey=Secret') }}"
+FL_ADMIN_USER_PRIVATE_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/AdminUser subkey=PrivateKey') }}"
+FL_ADMIN_USER_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_ADMIN_ROOT_PORT/api/"
+
 FL_ADMIN_ROOT_PORT=8079
 FL_ADMIN_ROOT_PRIVATE_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/AdminRoot subkey=PrivateKey') }}"
 FL_ADMIN_ROOT_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_ADMIN_ROOT_PORT/api/"
@@ -69,12 +74,18 @@ FL_NOTIFIER_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Notif
 FL_NOTIFIER_PRIVATE_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Notifier subkey=PrivateKey') }}"
 FL_NOTIFIER_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_NOTIFIER_PORT/api"
 
+FL_THIRD_PARTIES_PORT=8086
+FL_THIRD_PARTIES_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/ThirdParties subkey=Secret') }}"
+
 FL_PRICER_PORT=8083
 FL_PRICER_PRIVATE_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Pricer subkey=PrivateKey') }}"
+FL_PRICER_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Pricer subkey=Secret') }}"
 
 FL_FREIGHT_PORT=8084
 FL_FREIGHT_SECRET="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/Freight subkey=Secret') }}"
 
+FL_HOMEPAGE_PORT=8085
+
 FL_BOOKKEEPING_SECRET="dummy"
 FL_LANE_EXPLORER_SECRET="dummy"
 
@@ -112,6 +123,7 @@ if [ "$APP" != "app" ]; then
     export POSTGRESQL_ADDON_USER="$FL_PSQL_USER"
     export POSTGRESQL_ADDON_PASSWORD="$FL_PSQL_PASSWORD"
     export POSTGRESQL_ADDON_DB="$name"
+    export PG_URI="postgresql://$POSTGRESQL_ADDON_USER:$POSTGRESQL_ADDON_PASSWORD@localhost:$POSTGRESQL_ADDON_PORT/$POSTGRESQL_ADDON_DB"
   else
     key=Psql/$(capitalize $FL_ENV)/$(capitalize $APP)
     export POSTGRESQL_ADDON_HOST=$(p $key Host)
@@ -119,7 +131,15 @@ if [ "$APP" != "app" ]; then
     export POSTGRESQL_ADDON_USER=$(p $key User)
     export POSTGRESQL_ADDON_PASSWORD=$(p $key)
     export POSTGRESQL_ADDON_DB=$(p $key Database)
+    export PG_URI="postgresql://$POSTGRESQL_ADDON_USER:$POSTGRESQL_ADDON_PASSWORD@$POSTGRESQL_ADDON_HOST:$POSTGRESQL_ADDON_PORT/$POSTGRESQL_ADDON_DB"
   fi
+
+  export GRAYLOG_HOST="localhost"
+  export GRAYLOG_PORT="1111"
+  export ENVIRONMENT_NAME="local"
+  export APPLICATION_NAME="$APP"
+  export SENTRY_DSN="test"
+  export ACCEPTED_ORIGINS="*"
 fi
 
 if [ "$APP" = "app" ]; then
@@ -140,6 +160,7 @@ if [ "$APP" = "app" ]; then
   # carrier directory
   export CARRIER_DIRECTORY_URI="$FL_CARRIER_DIRECTORY_URL/"
   export FRETLINK_CARDIR_URL="$FL_CARRIER_DIRECTORY_URL"
+  export FRETLINK_CARDIR_URL_FRONTEND="$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)"
 
@@ -160,6 +181,13 @@ if [ "$APP" = "app" ]; then
   export FRETLINK_NOTIFIER_AMQP_PORT="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Port') }}"
   export FRETLINK_NOTIFIER_AMQP_VHOST="{{ lookup('passwordstore', 'Travail/Fretlink/Rabbitmq/Local/Notifier subkey=Vhost') }}"
 
+  # pricer
+  export FRETLINK_PRICER_USE_CARGO_OUTPUT="true"
+  export FRETLINK_PRICER_SHIPPER_PRICE_V2_KEY=$(build_macaroon $FL_PRICER_SECRET pricer pricer pricing::cargo)
+  export FRETLINK_PRICER_SHIPPER_PRICE_KEY=$(build_macaroon --old $FL_PRICER_SECRET pricer pricer internal-cargo-pricing)
+  export FRETLINK_PRICER_CARRIER_SUGGESTION_KEY=$(build_macaroon --old $FL_PRICER_SECRET pricer pricer internal-cargo-pricing)
+  export FRETLINK_PRICER_MACAROON="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/PricerDev') }}"
+  export FRETLINK_PRICER_URL="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/PricerDev subkey=Url') }}"
 
   # admin-root
   export FRETLINK_ADMINROOT_URL=$FL_ADMIN_ROOT_URL
@@ -183,6 +211,24 @@ if [ "$APP" = "admin-root" ]; then
   export LANE_EXPLORER_MACAROON_SECRET=$FL_LANE_EXPLORER_SECRET
 fi
 
+if [ "$APP" = "admin-user" ]; then
+  export BASE_URL=$FL_APPS_HOST
+  export API_ROOT="http://$BASE_URL:$PORT/api"
+  export UI_ROOT="http://$BASE_URL:$PORT/admin"
+  export ACCEPTED_ORIGINS="http://$BASE_URL:$PORT/admin"
+  export TOK="$(build_macaroon $FL_ADMIN_USER_PRIVATE_KEY admin-user admin-user admin-user::provisioning)"
+  export ADMIN_TOKEN="$(build_macaroon $FL_ADMIN_USER_SECRET admin-user admin-user admin-user::user-management)"
+  export SERVICE_TOKEN="$(build_macaroon $FL_ADMIN_USER_SECRET admin-user admin-user admin-user::some-service)"
+fi
+
+if [ "$APP" = "homepage" ]; then
+  export HOMEPAGE_API_KEY="{{ lookup('passwordstore', 'Travail/Fretlink/Macaroons/HomepageDev subkey=ApiKey') }}"
+  export HOMEPAGE_API_ROOT_REDIRECT="https://next.www.fretlink.com"
+  export HOMEPAGE_API_BLOG_URL="https://blog.fretlink.com"
+  export HOMEPAGE_API_CIO_API_KEY="123"
+  export HOMEPAGE_API_CIO_SITE_ID="321"
+ 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)"
@@ -194,7 +240,7 @@ if [ "$APP" = "notifier" ]; then
   export TEMPLATES_ASSETS_BASE_URL="http://dummy/"
   export TRANSPOREON_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/ApiTest subkey=Login') }}"
   export TRANSPOREON_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/ApiTest') }}"
-  export TRANSPOREON_HOST="api.test.transporeon.com"
+  export TRANSPOREON_HOST="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/ApiTest subkey=Host') }}"
   export TRANSPOREON_CALLBACK_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest subkey=Login') }}"
   export TRANSPOREON_CALLBACK_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest') }}"
 
@@ -203,6 +249,7 @@ if [ "$APP" = "notifier" ]; then
   #export MACAROON="$(build_macaroon $FL_NOTIFIER_SECRET notifier notifier external)"
   # v1
   export MACAROON="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier external)"
+  export MONITORING_MACAROON="$(build_macaroon --old $FL_NOTIFIER_PRIVATE_KEY notifier notifier monitoring)"
 
   # To push transporeon cargos to app
   export TRANSPOREON_APP_PUSH_URL="http://localhost:8080/api/transporeon/cargo"
@@ -217,6 +264,17 @@ if [ "$APP" = "notifier" ]; then
   export AMQP_TLS="false"
 fi
 
+if [ "$APP" = "third-parties" ]; then
+  export PROCTER_GAMBLE_APP_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET third-parties app app::proctergamble-cargos-write)"
+  export PROCTER_GAMBLE_APP_PUSH_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_APP_PORT/api/proctergamble/cargo"
+  export TRANSPOREON_APP_PUSH_MACAROON="$(build_macaroon $FL_APP_SECRET third-parties app app::transporeon-cargos-write)"
+  export TRANSPOREON_APP_PUSH_URL="$FL_APPS_SCHEME://$FL_APPS_HOST:$FL_APP_PORT/api/transporeon/cargo"
+  export PROCTER_GAMBLE_CALLBACK_USER="{{ lookup('passwordstore', 'Travail/Fretlink/ProcterGamble/NotifierCallbackTest subkey=Login') }}"
+  export PROCTER_GAMBLE_CALLBACK_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/ProcterGamble/NotifierCallbackTest') }}"
+  export TRANSPOREON_CALLBACK_USER="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest subkey=Login') }}"
+  export TRANSPOREON_CALLBACK_PASSWORD="{{ lookup('passwordstore', 'Travail/Fretlink/Transporeon/NotifierCallbackTest') }}"
+fi
+
 if [ "$APP" = "pricer" ]; then
   export GOOGLE_AUTH_CLIENT_ID="dummy"
 fi
index ef04c8965bacee34ef30dcdc023966f2e281b55f..82d5242ee8271a0dca6466ddebea79d26f03abbf 100644 (file)
@@ -3,24 +3,24 @@ fontname=Monospace 10
 selchars=-A-Za-z0-9,./?%&#:_
 scrollback=1000
 bgcolor=rgb(0,0,0)
-fgcolor=rgb(170,170,170)
+fgcolor=rgb(211,215,207)
 palette_color_0=rgb(0,0,0)
-palette_color_1=rgb(170,0,0)
-palette_color_2=rgb(0,170,0)
-palette_color_3=rgb(170,85,0)
-palette_color_4=rgb(0,0,170)
-palette_color_5=rgb(170,0,170)
-palette_color_6=rgb(0,170,170)
-palette_color_7=rgb(170,170,170)
-palette_color_8=rgb(85,85,85)
-palette_color_9=rgb(255,85,85)
-palette_color_10=rgb(85,255,85)
-palette_color_11=rgb(255,255,85)
-palette_color_12=rgb(85,85,255)
-palette_color_13=rgb(255,85,255)
-palette_color_14=rgb(85,255,255)
-palette_color_15=rgb(255,255,255)
-color_preset=VGA
+palette_color_1=rgb(205,0,0)
+palette_color_2=rgb(78,154,6)
+palette_color_3=rgb(196,160,0)
+palette_color_4=rgb(52,101,164)
+palette_color_5=rgb(117,80,123)
+palette_color_6=rgb(6,152,154)
+palette_color_7=rgb(211,215,207)
+palette_color_8=rgb(85,87,83)
+palette_color_9=rgb(239,41,41)
+palette_color_10=rgb(138,226,52)
+palette_color_11=rgb(252,233,79)
+palette_color_12=rgb(114,159,207)
+palette_color_13=rgb(173,127,168)
+palette_color_14=rgb(52,226,226)
+palette_color_15=rgb(238,238,236)
+color_preset=Tango
 disallowbold=false
 cursorblinks=false
 cursorunderline=false
index 5003f1599dcf444fb76cd488cfec4234f93dd0f0..db5393ed20d0ee04574562de163ec91dd97dbd28 100644 (file)
         </keybind>
         <keybind key='XF86AudioRaiseVolume'>
             <action name='Execute'>
-                <command>bash -c &quot;pamixer --allow-boost -u -i 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] &amp;&amp; echo normal || echo critical`; dunstify -r $(($(cat $v))) -p Volume --hints=int:value:$vol -i &apos; &apos; -a Openbox-volume -t 1000 -u $color &gt; $v&quot;</command>
+                <command>bash -c &quot;pamixer --allow-boost -u -i 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] &amp;&amp; echo normal || echo critical`; dunstify -r $(($(head -n1 $v))) -p Volume --hints=int:value:$vol -i &apos; &apos; -a Openbox-volume -t 1000 -u $color &gt; $v&quot;</command>
             </action>
         </keybind>
         <keybind key='XF86AudioLowerVolume'>
             <action name='Execute'>
-                <command>bash -c &quot;pamixer --allow-boost -u -d 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] &amp;&amp; echo normal || echo critical`; dunstify -r $(($(cat $v))) -p Volume --hints=int:value:$vol -i &apos; &apos; -a Openbox-volume -t 1000 -u $color &gt; $v&quot;</command>
+                <command>bash -c &quot;pamixer --allow-boost -u -d 1; v=$HOME/.cache/dunstify_volume; vol=`pamixer --get-volume`; color=`[ $vol -le 100 ] &amp;&amp; echo normal || echo critical`; dunstify -r $(($(head -n1 $v))) -p Volume --hints=int:value:$vol -i &apos; &apos; -a Openbox-volume -t 1000 -u $color &gt; $v&quot;</command>
             </action>
         </keybind>
         <keybind key='XF86AudioMute'>
     </menu>
     <!-- show the manage desktops section in the client-list-(combined-)menu -->
     <applications/>
-</openbox_config>
\ No newline at end of file
+</openbox_config>
index ad0422bc31e9ccb71da9778ee1f1a17d69434949..cd38b552b85144a9e5dbe922c6c444e680f86884 100644 (file)
@@ -7,8 +7,10 @@ mount_removable=1
 autorun=1
 
 [autorun]
-x-content/win32-software=pcmanfm
+x-content/ebook-reader=pcmanfm
 x-content/bootable-media=pcmanfm
+x-content/win32-software=pcmanfm
+x-content/audio-player=pcmanfm
 
 [ui]
 always_show_tabs=0
index 2c5a999292339757da03e186af9e85f20bdd5e7f..1bf94e7d3064f90a5bba7d94c44f0f80a0206d15 100644 (file)
@@ -121,6 +121,10 @@ __prompt_command () {
   PS1+="$green\u@\h$blue \w \$$d "
 }
 
+source /usr/share/fzf/key-bindings.bash
+source /usr/share/fzf/completion.bash
+export FZF_COMPLETION_TRIGGER='#'
+
 {% if "nodejs" in features.get(profile, []) %}
 source /usr/share/nvm/init-nvm.sh
 {% endif %}
index 3c616216511a363b29d3db85ca9c0f00f0ecdd62..3ce13d192d26dcde201f56adbef94d3c4f2173e5 100644 (file)
@@ -30,6 +30,8 @@ Plug 'vim-scripts/slapd.vim'
 Plug 'vimwiki/vimwiki', { 'branch': 'dev' }
 Plug 'vim-vdebug/vdebug'
 Plug 'tpope/vim-fugitive'
+Plug 'tpope/vim-rhubarb'
+Plug 'shumphrey/fugitive-gitlab.vim'
 Plug 'tomlion/vim-solidity'
 Plug 'chrisbra/SudoEdit.vim'
 Plug 'Chiel92/vim-autoformat'
@@ -37,6 +39,9 @@ Plug 'pearofducks/ansible-vim'
 Plug 'juliosueiras/vim-terraform-completion'
 Plug 'sjl/gundo.vim'
 Plug 'LnL7/vim-nix'
+Plug 'purescript-contrib/purescript-vim'
+Plug 'vmchale/dhall-vim'
+Plug 'junegunn/fzf'
 
 call plug#end()
 
@@ -297,6 +302,7 @@ map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
 map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
 
 let g:ctrlp_extensions = ['tag', 'buffertag', 'dir', 'undo', 'line']
+let g:ctrlp_max_files = 0
 set modeline
 
 set grepprg=grep\ -rn\ $*\ /dev/null
@@ -308,4 +314,3 @@ endif
 
 set list
 set listchars=tab:>-,trail:-
-
index 63cfe81782b1bb01d5cdd59adfb4628488303eb8..f5a621019af028d5f764c38adb7e01446445be85 100644 (file)
@@ -11,3 +11,8 @@ User gitolite
 Host immae.eu
 HostName immae.eu
 User immae
+
+Host 443.immae.eu
+HostName 178.33.252.96
+User immae
+Port 443