From fe1cb340f12310fd7cdd189da425b900f9d372c6 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Sun, 19 May 2019 18:48:58 +0200 Subject: [PATCH 01/27] tmux: Begin basic role which installs tmux and templates the config --- roles/tmux/tasks/.main.yml.swp | Bin 0 -> 12288 bytes roles/tmux/tasks/main.yml | 12 ++++++++++++ .../tmux/templates/{tmux.conf => tmux.conf.j2} | 0 3 files changed, 12 insertions(+) create mode 100644 roles/tmux/tasks/.main.yml.swp create mode 100644 roles/tmux/tasks/main.yml rename roles/tmux/templates/{tmux.conf => tmux.conf.j2} (100%) diff --git a/roles/tmux/tasks/.main.yml.swp b/roles/tmux/tasks/.main.yml.swp new file mode 100644 index 0000000000000000000000000000000000000000..da76f1107b38d8521da59505cd8193e41d20976a GIT binary patch literal 12288 zcmeI&y-ve05C?F#5*uHF7cd~PC27lox~@<)Wl;smi2{OyOT$KDvsWutOW=Lg{dv zXLDVUfB*y*6If#ht!Bg5?(OdI?X9!L+Mo&o5P$##AOHafKmY;|SV{p`*4Q;oUazKK zt@hfly*grp00bZa0SG_<0uX=z1Rwwb2tZ&71w_Kw>pEk{8#Fxq|Nr^?|4!#OiYJOk ziU*2&iaUx4g`wzCbSS2^OZeL{G6Wz10SG_<0uX=z1Rwwb2teRp0-RPNt!wj16#6^t zVO;2x`Ls20n}4Ok%NAvw%*#wT*=7OPBA0D`T4lJeQv>er#B-%x!7qwj^0dejY1pix t^Od|b(n{^7saX&IC3GxBJQRa(y*t{DjGWHEm8GuM(KUTZ&;3CVun#aEa%uno literal 0 HcmV?d00001 diff --git a/roles/tmux/tasks/main.yml b/roles/tmux/tasks/main.yml new file mode 100644 index 0000000..0091816 --- /dev/null +++ b/roles/tmux/tasks/main.yml @@ -0,0 +1,12 @@ +--- + +- name: Ensure tmux is installed + package: + name: tmux + state: present + +- name: Template config file into home folder + template: + src: tmux.conf.j2 + dest: ~/.tmux.conf + diff --git a/roles/tmux/templates/tmux.conf b/roles/tmux/templates/tmux.conf.j2 similarity index 100% rename from roles/tmux/templates/tmux.conf rename to roles/tmux/templates/tmux.conf.j2 From bce29cabdbbd9d21b2850701094087fd85160b38 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Sun, 19 May 2019 19:05:03 +0200 Subject: [PATCH 02/27] tmux: add to inventory and add play for tmux --- inventory.yaml | 4 ++++ tmux.yml | 7 +++++++ 2 files changed, 11 insertions(+) create mode 100644 tmux.yml diff --git a/inventory.yaml b/inventory.yaml index 5b46f5c..dcac6a3 100644 --- a/inventory.yaml +++ b/inventory.yaml @@ -18,3 +18,7 @@ redshift: hosts: xenon: +tmux: + hosts: + xenon: + diff --git a/tmux.yml b/tmux.yml new file mode 100644 index 0000000..4a91874 --- /dev/null +++ b/tmux.yml @@ -0,0 +1,7 @@ +--- + +- name: Set up tmux + hosts: tmux + become: true + roles: + - tmux From 3ff61351ba5e563cef21e96200bb9ba0569139e5 Mon Sep 17 00:00:00 2001 From: jreichmann Date: Thu, 23 May 2019 21:11:26 +0200 Subject: [PATCH 03/27] Add i3 config --- legacy/i3/i3config | 161 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 legacy/i3/i3config diff --git a/legacy/i3/i3config b/legacy/i3/i3config new file mode 100644 index 0000000..966396d --- /dev/null +++ b/legacy/i3/i3config @@ -0,0 +1,161 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:monospace 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# Before i3 v4.8, we used to recommend this one as the default: +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +# The font above is very space-efficient, that is, it looks good, sharp and +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec xfce4-terminal + +# kill focused window +bindsym $mod+Shift+q kill + +# For use with xfce4 whisker popup menu in Mint XFCE: +bindsym $mod+d exec xfce4-popup-whiskermenu + +# Lock the screen +bindsym $mod+l exec i3lock + +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +# bindsym $mod+d focus child + +# switch to workspace +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace 1 +bindsym $mod+Shift+2 move container to workspace 2 +bindsym $mod+Shift+3 move container to workspace 3 +bindsym $mod+Shift+4 move container to workspace 4 +bindsym $mod+Shift+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 7 +bindsym $mod+Shift+8 move container to workspace 8 +bindsym $mod+Shift+9 move container to workspace 9 +bindsym $mod+Shift+0 move container to workspace 10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +#-old-#bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit' +bindsym $mod+Shift+e exec xfce4-session-logout + +# class border backgr. text indicator child_border +client.focused #ff33cc #ff33cc #ffffff #ff33cc #ff33cc +client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a +client.unfocused #333333 #222222 #888888 #292d2e #222222 +client.urgent #ff0000 #ff0000 #ffffff #ff0000 #ff0000 +client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) + + +#-old-#bar { +#-old-# status_command i3status +#-old-#} +exec --no-startup-id nitrogen --restore +exec --no-startup-id synergy + From 051a8879d42a7da3c42d3aeebce69bf1de44bcf7 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Fri, 24 May 2019 22:46:04 +0200 Subject: [PATCH 04/27] vim: add role --- inventory.yaml | 4 ++++ roles/vim/tasks/main.yml | 23 +++++++++++++++++++ .../{colors/kuroi.vim => kuroi.vim.j2} | 0 roles/vim/templates/{vimrc => vimrc.j2} | 0 vim.yml | 7 ++++++ vim/.netrwhist | 3 +++ 6 files changed, 37 insertions(+) create mode 100644 roles/vim/tasks/main.yml rename roles/vim/templates/{colors/kuroi.vim => kuroi.vim.j2} (100%) rename roles/vim/templates/{vimrc => vimrc.j2} (100%) create mode 100644 vim.yml create mode 100644 vim/.netrwhist diff --git a/inventory.yaml b/inventory.yaml index dcac6a3..99ff4d7 100644 --- a/inventory.yaml +++ b/inventory.yaml @@ -22,3 +22,7 @@ tmux: hosts: xenon: +vim: + hosts: + xenon: + diff --git a/roles/vim/tasks/main.yml b/roles/vim/tasks/main.yml new file mode 100644 index 0000000..f7a2078 --- /dev/null +++ b/roles/vim/tasks/main.yml @@ -0,0 +1,23 @@ +--- + +- name: Ensure vim is installed + package: + name: vim + state: present + +- name.: Ensure ~/.vim/colors folder exists + file: + path: ~/.vim/colors + state: directory + recurse: yes + +- name: Copy kuroi color scheme + copy: + src: kuroi.vim.j2 + dest: ~/.vim/colors/kuroi.vim + +- name: Template vim config + template: + src: vimrc.j2 + dest: ~/.vimrc + diff --git a/roles/vim/templates/colors/kuroi.vim b/roles/vim/templates/kuroi.vim.j2 similarity index 100% rename from roles/vim/templates/colors/kuroi.vim rename to roles/vim/templates/kuroi.vim.j2 diff --git a/roles/vim/templates/vimrc b/roles/vim/templates/vimrc.j2 similarity index 100% rename from roles/vim/templates/vimrc rename to roles/vim/templates/vimrc.j2 diff --git a/vim.yml b/vim.yml new file mode 100644 index 0000000..a339248 --- /dev/null +++ b/vim.yml @@ -0,0 +1,7 @@ +--- + +- name: Install vim and copy color scheme and template its config + hosts: vim + become: true + roles: + - vim diff --git a/vim/.netrwhist b/vim/.netrwhist new file mode 100644 index 0000000..b54aaa8 --- /dev/null +++ b/vim/.netrwhist @@ -0,0 +1,3 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =1 +let g:netrw_dirhist_1='/home/electron/git/critical_infrastructure' From 95fd08b44ad3631ccaf8587426900a9d16ceba78 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Fri, 24 May 2019 23:04:31 +0200 Subject: [PATCH 05/27] i3: Install and template config --- roles/i3/tasks/main.yml | 18 ++++ roles/i3/templates/config.j2 | 161 +++++++++++++++++++++++++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 roles/i3/tasks/main.yml create mode 100644 roles/i3/templates/config.j2 diff --git a/roles/i3/tasks/main.yml b/roles/i3/tasks/main.yml new file mode 100644 index 0000000..ab368bf --- /dev/null +++ b/roles/i3/tasks/main.yml @@ -0,0 +1,18 @@ +--- + +- name: Ensure i3 is installed + package: + name: i3 + state: present + +- name: Ensure folder for configuration exists + file: + path: ~/.config/i3 + state: directory + recurse: yes + +- name: Template config into configuration directory + template: + src: config.j2 + dest: ~/.config/i3/config + diff --git a/roles/i3/templates/config.j2 b/roles/i3/templates/config.j2 new file mode 100644 index 0000000..966396d --- /dev/null +++ b/roles/i3/templates/config.j2 @@ -0,0 +1,161 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see http://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:monospace 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# Before i3 v4.8, we used to recommend this one as the default: +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +# The font above is very space-efficient, that is, it looks good, sharp and +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec xfce4-terminal + +# kill focused window +bindsym $mod+Shift+q kill + +# For use with xfce4 whisker popup menu in Mint XFCE: +bindsym $mod+d exec xfce4-popup-whiskermenu + +# Lock the screen +bindsym $mod+l exec i3lock + +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +# bindsym $mod+d focus child + +# switch to workspace +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace 1 +bindsym $mod+Shift+2 move container to workspace 2 +bindsym $mod+Shift+3 move container to workspace 3 +bindsym $mod+Shift+4 move container to workspace 4 +bindsym $mod+Shift+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 7 +bindsym $mod+Shift+8 move container to workspace 8 +bindsym $mod+Shift+9 move container to workspace 9 +bindsym $mod+Shift+0 move container to workspace 10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +#-old-#bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit' +bindsym $mod+Shift+e exec xfce4-session-logout + +# class border backgr. text indicator child_border +client.focused #ff33cc #ff33cc #ffffff #ff33cc #ff33cc +client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a +client.unfocused #333333 #222222 #888888 #292d2e #222222 +client.urgent #ff0000 #ff0000 #ffffff #ff0000 #ff0000 +client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) + + +#-old-#bar { +#-old-# status_command i3status +#-old-#} +exec --no-startup-id nitrogen --restore +exec --no-startup-id synergy + From 7e2a5118eca9e4dd04f1eec23408e315b7c78022 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Sun, 26 May 2019 19:49:27 +0200 Subject: [PATCH 06/27] vim: Allow install task to fail, fix copy task for colorscheme --- .../{templates/kuroi.vim.j2 => files/kuroi.vim} | 0 roles/vim/tasks/.main.yml.swp | Bin 0 -> 12288 bytes roles/vim/tasks/main.yml | 7 +++++-- 3 files changed, 5 insertions(+), 2 deletions(-) rename roles/vim/{templates/kuroi.vim.j2 => files/kuroi.vim} (100%) create mode 100644 roles/vim/tasks/.main.yml.swp diff --git a/roles/vim/templates/kuroi.vim.j2 b/roles/vim/files/kuroi.vim similarity index 100% rename from roles/vim/templates/kuroi.vim.j2 rename to roles/vim/files/kuroi.vim diff --git a/roles/vim/tasks/.main.yml.swp b/roles/vim/tasks/.main.yml.swp new file mode 100644 index 0000000000000000000000000000000000000000..14be621854e0ebe86089b88dde6da13912d76d3b GIT binary patch literal 12288 zcmeI2F>ezw6vy2P#sUI~fyuy#a@Q6KRkv0QsOkm?B&5o5-lZmY_R03OWC=UsLomU} zcVL1IAvPG9Ipxl_eQVY5qS=D?fBLD~(lEHPsFqD5G{|_3W>N`PjsKuMzl2iO1`IJ<#1mV=!Qad&%bGi|!!SR_0ie$@D4V>2G{@_U;}J` z4X^<=zy{8(f!M5xm#BWdzrl^ZU;C%;hupCNHoykh02^QfY=8~00XDz}*Z><~1Lx3y z8VT`rLx?ArP(1$sUwr@nzAVHq@C|$hAHaL?2D}Ex;0Wx2U2q3n2N%Hw@B{h2gHPZc zcne;E8K}Th(4Bb>opH%*fDNz#Hoykh02^QfY=8~00XDE?K%$K(#6r&U4DY(V7AX|G zE@U^%o^K-(sctG2sSpEcRZWF_*hkVTshus&Sae&Lv*p@V&WC)`dS_DlZbg@TIiy`P zJNv2~sf$a~ylaq5t?tLdN(q$CIkj7$vRS~}X2ZMq519ULQ)Bpeg literal 0 HcmV?d00001 diff --git a/roles/vim/tasks/main.yml b/roles/vim/tasks/main.yml index f7a2078..d0c8003 100644 --- a/roles/vim/tasks/main.yml +++ b/roles/vim/tasks/main.yml @@ -4,8 +4,11 @@ package: name: vim state: present + become: true + become_user: root + ignore_errors: yes -- name.: Ensure ~/.vim/colors folder exists +- name: Ensure ~/.vim/colors folder exists file: path: ~/.vim/colors state: directory @@ -13,7 +16,7 @@ - name: Copy kuroi color scheme copy: - src: kuroi.vim.j2 + src: kuroi.vim dest: ~/.vim/colors/kuroi.vim - name: Template vim config From 6f5077f32731515ed7168e848f9e4bd931359e94 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Wed, 29 May 2019 19:49:29 +0200 Subject: [PATCH 07/27] tmux: Add controller configuration into auto-generation aswell --- roles/tmux/tasks/main.yml | 6 +++ roles/tmux/templates/controller.tmux.conf.j2 | 39 ++++++++++++++++ roles/tmux/templates/tmux.conf.j2 | 48 ++++++++++---------- 3 files changed, 69 insertions(+), 24 deletions(-) create mode 100644 roles/tmux/templates/controller.tmux.conf.j2 diff --git a/roles/tmux/tasks/main.yml b/roles/tmux/tasks/main.yml index 0091816..1d75f9b 100644 --- a/roles/tmux/tasks/main.yml +++ b/roles/tmux/tasks/main.yml @@ -4,9 +4,15 @@ package: name: tmux state: present + ignore_errors: true - name: Template config file into home folder template: src: tmux.conf.j2 dest: ~/.tmux.conf +- name: Template controller config file to home folder + template: + src: controller.tmux.conf.j2 + dest: ~/.controller.tmux.conf + diff --git a/roles/tmux/templates/controller.tmux.conf.j2 b/roles/tmux/templates/controller.tmux.conf.j2 new file mode 100644 index 0000000..6bbc3a3 --- /dev/null +++ b/roles/tmux/templates/controller.tmux.conf.j2 @@ -0,0 +1,39 @@ +# Reload controller config with "r" key +unbind t +bind t source-file ~/.controller.tmux.conf \; display-message "Controller config reloaded..." + +# No automatic renaming of windows +set -g automatic-rename off + +# Enable 256-color terminal +set -g default-terminal "screen-256color" + +# Set titles to be informative +set set-titles on +set set-titles-string "tmux: [#H] [#S] [#W:#D #I:#P]" + +# Change colors on the pane seperators +set pane-border-fg colour237 +set pane-active-border-fg colour27 + +# Tweak currently highlighted window ('active') +setw window-status-current-fg colour236 +setw window-status-current-bg colour27 +setw window-status-current-format " #F[#W] " +setw window-status-current-attr none + +# Tweak overview of windows +setw window-status-format " #F[#I][#W] " +setw window-status-bg colour237 +setw window-status-fg colour255 + +# Tweak status line design +set status-bg colour237 +set status-fg colour27 +set status-justify centre +set status-left " [#H] [#S] " +set status-left-length 100 +set status-right ' [#(curl https://wttr.in/berlin?format=3)] [%Y-%m-%d %H:%M.%S] ' +# Refresh status bar every second +set status-interval 1 + diff --git a/roles/tmux/templates/tmux.conf.j2 b/roles/tmux/templates/tmux.conf.j2 index 0c3af9e..791afa3 100644 --- a/roles/tmux/templates/tmux.conf.j2 +++ b/roles/tmux/templates/tmux.conf.j2 @@ -2,39 +2,39 @@ bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." # No automatic renaming of windows -set -g automatic-rename off +set automatic-rename off # Enable 256-color terminal -set -g default-terminal "screen-256color" +set default-terminal "screen-256color" # Set titles to be informative -set -g set-titles on -set -g set-titles-string "tmux: [#H] [#S] [#W:#D #I:#P]" +set set-titles on +set set-titles-string "tmux: [#H] [#S] [#W:#D #I:#P]" -# Install tmux-plugin-manager, first run `git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm` -#set -g @plugin 'tmux-plugins/tpm' -#set -g @plugin 'tmux-plugins/tmux-sensible' +# Change pane colors +set pane-border-fg colour237 +set pane-active-border-fg colour199 -# Tweak currently highlighted pane -setw -g window-status-current-fg colour236 -setw -g window-status-current-bg colour199 -setw -g window-status-current-format " #F[#W] " -setw -g window-status-current-attr none +# Tweak currently active window +setw window-status-current-fg colour236 +setw window-status-current-bg colour199 +setw window-status-current-format " #F[#W] " +setw window-status-current-attr none -# Tweak pane display -setw -g window-status-format " #F[#W][#I] " -setw -g window-status-bg colour237 -setw -g window-status-fg colour255 +# Tweak display of window overview +setw window-status-format " #F[#W][#I] " +setw window-status-bg colour237 +setw window-status-fg colour255 # Tweak status line design -set -g status-bg colour235 -set -g status-fg colour199 -set -g status-justify centre -set -g status-left " [#H] [#S] " -set -g status-left-length 100 -set -g status-right '[FFKA: #(ip addr show freifunk | grep inet6 | grep -v fe80 | cut -d/ -f1 | cut -d " " -f6)] [%Y-%m-%d %H:%M.%S]' -# Refresh status bar every 5s -set -g status-interval 5 +set status-bg colour235 +set status-fg colour199 +set status-justify centre +set status-left " [#H] [#S] " +set status-left-length 100 +set status-right '[FFKA: #(ip addr show freifunk | grep inet6 | grep -v fe80 | cut -d/ -f1 | cut -d " " -f6)] [%Y-%m-%d %H:%M.%S]' +# Refresh status bar every 2s +set status-interval 2 # Initialize tmux-plugin-manager run '~/.tmux/plugins/tpm/tpm' From d58e51d61afa239fa359d5a23a92d5abac4598b2 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Wed, 29 May 2019 19:50:55 +0200 Subject: [PATCH 08/27] Add gitignore to ignore those .swp and .retry files.. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8793994 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.swp +*.retry From 56b991d127640d75a3cc6e7e3b87f87f7fa253a4 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Wed, 29 May 2019 20:04:55 +0200 Subject: [PATCH 09/27] tmux: pane colors global, controller active window readable --- roles/tmux/templates/controller.tmux.conf.j2 | 2 +- roles/tmux/templates/tmux.conf.j2 | 6 ++++-- roles/vim/tasks/.main.yml.swp | Bin 12288 -> 0 bytes 3 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 roles/vim/tasks/.main.yml.swp diff --git a/roles/tmux/templates/controller.tmux.conf.j2 b/roles/tmux/templates/controller.tmux.conf.j2 index 6bbc3a3..429a343 100644 --- a/roles/tmux/templates/controller.tmux.conf.j2 +++ b/roles/tmux/templates/controller.tmux.conf.j2 @@ -17,7 +17,7 @@ set pane-border-fg colour237 set pane-active-border-fg colour27 # Tweak currently highlighted window ('active') -setw window-status-current-fg colour236 +setw window-status-current-fg colour255 setw window-status-current-bg colour27 setw window-status-current-format " #F[#W] " setw window-status-current-attr none diff --git a/roles/tmux/templates/tmux.conf.j2 b/roles/tmux/templates/tmux.conf.j2 index 791afa3..cfac24a 100644 --- a/roles/tmux/templates/tmux.conf.j2 +++ b/roles/tmux/templates/tmux.conf.j2 @@ -12,8 +12,8 @@ set set-titles on set set-titles-string "tmux: [#H] [#S] [#W:#D #I:#P]" # Change pane colors -set pane-border-fg colour237 -set pane-active-border-fg colour199 +set -g pane-border-fg colour237 +set -g pane-active-border-fg colour199 # Tweak currently active window setw window-status-current-fg colour236 @@ -36,5 +36,7 @@ set status-right '[FFKA: #(ip addr show freifunk | grep inet6 | grep -v fe80 | c # Refresh status bar every 2s set status-interval 2 +set -g mouse on + # Initialize tmux-plugin-manager run '~/.tmux/plugins/tpm/tpm' diff --git a/roles/vim/tasks/.main.yml.swp b/roles/vim/tasks/.main.yml.swp deleted file mode 100644 index 14be621854e0ebe86089b88dde6da13912d76d3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2F>ezw6vy2P#sUI~fyuy#a@Q6KRkv0QsOkm?B&5o5-lZmY_R03OWC=UsLomU} zcVL1IAvPG9Ipxl_eQVY5qS=D?fBLD~(lEHPsFqD5G{|_3W>N`PjsKuMzl2iO1`IJ<#1mV=!Qad&%bGi|!!SR_0ie$@D4V>2G{@_U;}J` z4X^<=zy{8(f!M5xm#BWdzrl^ZU;C%;hupCNHoykh02^QfY=8~00XDz}*Z><~1Lx3y z8VT`rLx?ArP(1$sUwr@nzAVHq@C|$hAHaL?2D}Ex;0Wx2U2q3n2N%Hw@B{h2gHPZc zcne;E8K}Th(4Bb>opH%*fDNz#Hoykh02^QfY=8~00XDE?K%$K(#6r&U4DY(V7AX|G zE@U^%o^K-(sctG2sSpEcRZWF_*hkVTshus&Sae&Lv*p@V&WC)`dS_DlZbg@TIiy`P zJNv2~sf$a~ylaq5t?tLdN(q$CIkj7$vRS~}X2ZMq519ULQ)Bpeg From ec381d9e2bf6314a8adc4d562b857e594042fdc1 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Wed, 29 May 2019 20:10:25 +0200 Subject: [PATCH 10/27] tmux: Increase pane scrollback buffer to 50k lines --- roles/tmux/templates/tmux.conf.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/tmux/templates/tmux.conf.j2 b/roles/tmux/templates/tmux.conf.j2 index cfac24a..aa65e4f 100644 --- a/roles/tmux/templates/tmux.conf.j2 +++ b/roles/tmux/templates/tmux.conf.j2 @@ -36,7 +36,9 @@ set status-right '[FFKA: #(ip addr show freifunk | grep inet6 | grep -v fe80 | c # Refresh status bar every 2s set status-interval 2 +# Set some helpful limits & modes set -g mouse on +set -g history-limit 50000 # Initialize tmux-plugin-manager run '~/.tmux/plugins/tpm/tpm' From 6ebf8ab59de83ede50277a80f5f7361be175ffcd Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Wed, 29 May 2019 20:13:17 +0200 Subject: [PATCH 11/27] tmux: Resize aggressively, based on clients actually viewing, not just attached --- roles/tmux/templates/tmux.conf.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/tmux/templates/tmux.conf.j2 b/roles/tmux/templates/tmux.conf.j2 index aa65e4f..0d1d631 100644 --- a/roles/tmux/templates/tmux.conf.j2 +++ b/roles/tmux/templates/tmux.conf.j2 @@ -40,5 +40,8 @@ set status-interval 2 set -g mouse on set -g history-limit 50000 +# Make tmux resize based on smallest client actually viewing the window, not just attached +setw -g aggressive-resize on + # Initialize tmux-plugin-manager run '~/.tmux/plugins/tpm/tpm' From 9d2c018564567038b38aee261740690bfd069629 Mon Sep 17 00:00:00 2001 From: jreichmann Date: Thu, 30 May 2019 22:01:14 +0200 Subject: [PATCH 12/27] tmux: turn mouse mode off, it annoys me more than it is useful --- roles/tmux/templates/tmux.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/tmux/templates/tmux.conf.j2 b/roles/tmux/templates/tmux.conf.j2 index 0d1d631..3900024 100644 --- a/roles/tmux/templates/tmux.conf.j2 +++ b/roles/tmux/templates/tmux.conf.j2 @@ -37,7 +37,7 @@ set status-right '[FFKA: #(ip addr show freifunk | grep inet6 | grep -v fe80 | c set status-interval 2 # Set some helpful limits & modes -set -g mouse on +set -g mouse off set -g history-limit 50000 # Make tmux resize based on smallest client actually viewing the window, not just attached From dfe47e9bbd6bad26c48a268a1d1bf512e79d37f8 Mon Sep 17 00:00:00 2001 From: jreichmann Date: Sat, 15 Jun 2019 23:19:21 +0200 Subject: [PATCH 13/27] tmux: use new notation for styles --- roles/tmux/templates/tmux.conf.j2 | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/roles/tmux/templates/tmux.conf.j2 b/roles/tmux/templates/tmux.conf.j2 index 3900024..f1a5c44 100644 --- a/roles/tmux/templates/tmux.conf.j2 +++ b/roles/tmux/templates/tmux.conf.j2 @@ -16,15 +16,17 @@ set -g pane-border-fg colour237 set -g pane-active-border-fg colour199 # Tweak currently active window -setw window-status-current-fg colour236 -setw window-status-current-bg colour199 -setw window-status-current-format " #F[#W] " -setw window-status-current-attr none +setw -g window-status-current-style fg=colour255 #fg=colour236 +setw -g window-status-current-style bg=colour199 +#setw window-status-current-bg colour199 +setw -g window-status-current-format " #F[#W] " +setw -g window-status-current-style none # Tweak display of window overview -setw window-status-format " #F[#W][#I] " -setw window-status-bg colour237 -setw window-status-fg colour255 +setw -g window-status-format " #F[#W][#I] " +setw -g window-status-style bg=colour237 +setw -g window-status-style fg=colour255 +#setw window-status-fg colour255 # Tweak status line design set status-bg colour235 From 3704d8a67c976196a76ec0ca1d4ffbeca0446c62 Mon Sep 17 00:00:00 2001 From: jreichmann Date: Sun, 16 Jun 2019 12:18:43 +0200 Subject: [PATCH 14/27] tmux: Migrate to 2.9 syntax --- roles/tmux/templates/tmux.conf.j2 | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/roles/tmux/templates/tmux.conf.j2 b/roles/tmux/templates/tmux.conf.j2 index f1a5c44..f11f514 100644 --- a/roles/tmux/templates/tmux.conf.j2 +++ b/roles/tmux/templates/tmux.conf.j2 @@ -1,3 +1,4 @@ +# vi:syntax=tmux # Reload the config with the "r" key bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." @@ -12,25 +13,21 @@ set set-titles on set set-titles-string "tmux: [#H] [#S] [#W:#D #I:#P]" # Change pane colors -set -g pane-border-fg colour237 -set -g pane-active-border-fg colour199 +set -g pane-border-style fg=colour237 +set -g pane-active-border-style fg=colour199 # Tweak currently active window -setw -g window-status-current-style fg=colour255 #fg=colour236 -setw -g window-status-current-style bg=colour199 -#setw window-status-current-bg colour199 +setw -g window-status-current-style bg=colour199,fg=colour255,none setw -g window-status-current-format " #F[#W] " -setw -g window-status-current-style none +# Tweak last active window style +setw -g window-status-last-style fg=colour255,bg=colour238,none # Tweak display of window overview setw -g window-status-format " #F[#W][#I] " -setw -g window-status-style bg=colour237 -setw -g window-status-style fg=colour255 -#setw window-status-fg colour255 +setw -g window-status-style bg=colour233,fg=colour255,none # Tweak status line design -set status-bg colour235 -set status-fg colour199 +set -g status-style bg=colour235,fg=colour199 set status-justify centre set status-left " [#H] [#S] " set status-left-length 100 From 7fae82e438d0c44c2b29bbf85a24fb0f518bfe3d Mon Sep 17 00:00:00 2001 From: jreichmann Date: Tue, 18 Jun 2019 20:44:37 +0200 Subject: [PATCH 15/27] tmux: do not show ffka IP (inconsistent) --- roles/tmux/templates/tmux.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/tmux/templates/tmux.conf.j2 b/roles/tmux/templates/tmux.conf.j2 index f11f514..5d7c28e 100644 --- a/roles/tmux/templates/tmux.conf.j2 +++ b/roles/tmux/templates/tmux.conf.j2 @@ -31,7 +31,7 @@ set -g status-style bg=colour235,fg=colour199 set status-justify centre set status-left " [#H] [#S] " set status-left-length 100 -set status-right '[FFKA: #(ip addr show freifunk | grep inet6 | grep -v fe80 | cut -d/ -f1 | cut -d " " -f6)] [%Y-%m-%d %H:%M.%S]' +set status-right '[%Y-%m-%d %H:%M.%S]' # Refresh status bar every 2s set status-interval 2 From 37cf0c84187ae316e04d966abfe8cc7989fa445d Mon Sep 17 00:00:00 2001 From: jreichmann Date: Wed, 19 Jun 2019 19:26:37 +0200 Subject: [PATCH 16/27] vim: delete orphaned folder --- vim/.netrwhist | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 vim/.netrwhist diff --git a/vim/.netrwhist b/vim/.netrwhist deleted file mode 100644 index b54aaa8..0000000 --- a/vim/.netrwhist +++ /dev/null @@ -1,3 +0,0 @@ -let g:netrw_dirhistmax =10 -let g:netrw_dirhist_cnt =1 -let g:netrw_dirhist_1='/home/electron/git/critical_infrastructure' From 0d9b1432f8dfd13bfb165c62999875406e3a52eb Mon Sep 17 00:00:00 2001 From: jreichmann Date: Wed, 19 Jun 2019 20:05:50 +0200 Subject: [PATCH 17/27] all: import playbooks into master playbook --- all.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 all.yml diff --git a/all.yml b/all.yml new file mode 100644 index 0000000..c54fb98 --- /dev/null +++ b/all.yml @@ -0,0 +1,5 @@ +--- + +- import_playbook: vim.yml +- import_playbook: tmux.yml +- import_playbook: gnupg.yml From 8f50e2390fe2ca678fb1e89baab4842667c7c1f8 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Fri, 21 Jun 2019 21:12:18 +0200 Subject: [PATCH 18/27] gnupg: ignore errors if user may not install gnupg --- roles/gnupg/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/gnupg/tasks/main.yml b/roles/gnupg/tasks/main.yml index 79ae2b6..872b566 100644 --- a/roles/gnupg/tasks/main.yml +++ b/roles/gnupg/tasks/main.yml @@ -6,6 +6,7 @@ name: gnupg2 state: latest when: ansible_os_family == "RedHat" + ignore_errors: true - name: Install gnupg (Arch) package: From 65483fb394210aec89c759b6d125a10781ca8153 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Fri, 21 Jun 2019 21:16:12 +0200 Subject: [PATCH 19/27] redshift: ignore if user may not install the redshift package, add to master playbook --- all.yml | 2 ++ roles/redshift/tasks/main.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/all.yml b/all.yml index c54fb98..8994f8f 100644 --- a/all.yml +++ b/all.yml @@ -3,3 +3,5 @@ - import_playbook: vim.yml - import_playbook: tmux.yml - import_playbook: gnupg.yml +- import_playbook: redshift.yml + diff --git a/roles/redshift/tasks/main.yml b/roles/redshift/tasks/main.yml index 04d6944..cd77c4a 100644 --- a/roles/redshift/tasks/main.yml +++ b/roles/redshift/tasks/main.yml @@ -4,7 +4,7 @@ package: name: redshift state: present - + ignore_errors: true - name: Ensure .config folder for redshift exists file: From 173351702f0c4ebd6b081d70b8b7c47cb3e70477 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Sat, 22 Jun 2019 22:00:37 +0200 Subject: [PATCH 20/27] network: draft tasks which need to be executed --- roles/network/tasks/main.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 roles/network/tasks/main.yml diff --git a/roles/network/tasks/main.yml b/roles/network/tasks/main.yml new file mode 100644 index 0000000..3f31537 --- /dev/null +++ b/roles/network/tasks/main.yml @@ -0,0 +1,14 @@ +--- + +- name: Install network manager + +- name: Template config for default network + +- name: Copy KIT VPN configuration + +- name: Copy flauschekatze.space VPN configuration + +- name: Copy FFKA VLAN config + +- name: Copy int.finallycofffee.eu VPN/VLAN config + From 7389769b6d80b7e15bb1d264ae9495756949c93d Mon Sep 17 00:00:00 2001 From: jreichmann Date: Wed, 26 Jun 2019 22:26:00 +0200 Subject: [PATCH 21/27] i3: remind myself to fill this with the appropiate .desktop entry --- roles/i3/tasks/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/i3/tasks/main.yml b/roles/i3/tasks/main.yml index ab368bf..655b71d 100644 --- a/roles/i3/tasks/main.yml +++ b/roles/i3/tasks/main.yml @@ -16,3 +16,7 @@ src: config.j2 dest: ~/.config/i3/config +- name: Create autostart entry + template: + src: "" + dest: ~/.config/autostart/i3.desktop From bb2ad4b2bb88c47b272a15fa3adf285b84397fe0 Mon Sep 17 00:00:00 2001 From: jreichmann Date: Fri, 28 Jun 2019 21:08:52 +0200 Subject: [PATCH 22/27] meta: split into playbook which only runs local and playbook which tries to run on all hosts --- global.yml | 35 +++++++++++++++++++++++++++++++++++ inventory.yaml => local.yml | 0 2 files changed, 35 insertions(+) create mode 100644 global.yml rename inventory.yaml => local.yml (100%) diff --git a/global.yml b/global.yml new file mode 100644 index 0000000..b30f101 --- /dev/null +++ b/global.yml @@ -0,0 +1,35 @@ +--- + +all: + hosts: + carbon: + ansible_host: carbon.int.finallycoffee.eu + iron: + ansible_host: iron.int.finallycoffee.eu + platinum: + ansible_host: platinum.int.finallycoffee.eu + xenon: + ansible_host: xenon.int.finallycoffee.eu + yttrium: + ansible_host: yttrium.int.finallycoffee.eu + vars: + ansible_user: transcaffeine + ansible_become_user: transcaffeine + ansible_become: true + +gnupg: + hosts: + all: + +redshift: + hosts: + all: + +tmux: + hosts: + all: + +vim: + hosts: + all: + diff --git a/inventory.yaml b/local.yml similarity index 100% rename from inventory.yaml rename to local.yml From 81271372d496219ab625950e1f1fdc8f00f4137d Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Mon, 1 Jul 2019 05:11:42 +0200 Subject: [PATCH 23/27] add roles for firefox and thunderbird configuration --- roles/firefox/tasks/main.yml | 0 roles/thunderbird/tasks/main.yml | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 roles/firefox/tasks/main.yml create mode 100644 roles/thunderbird/tasks/main.yml diff --git a/roles/firefox/tasks/main.yml b/roles/firefox/tasks/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/roles/thunderbird/tasks/main.yml b/roles/thunderbird/tasks/main.yml new file mode 100644 index 0000000..e69de29 From 9d7ccc82469ce91459619bfb642c6256b7fea53b Mon Sep 17 00:00:00 2001 From: jreichmann Date: Fri, 30 Aug 2019 20:51:27 +0200 Subject: [PATCH 24/27] i3: clean up config template --- roles/i3/templates/config.j2 | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/roles/i3/templates/config.j2 b/roles/i3/templates/config.j2 index 966396d..0201d94 100644 --- a/roles/i3/templates/config.j2 +++ b/roles/i3/templates/config.j2 @@ -1,10 +1,3 @@ -# This file has been auto-generated by i3-config-wizard(1). -# It will not be overwritten, so edit it as you like. -# -# Should you change your keyboard layout some time, delete -# this file and re-run i3-config-wizard(1). -# - # i3 config file (v4) # # Please see http://i3wm.org/docs/userguide.html for a complete reference! @@ -149,13 +142,6 @@ mode "resize" { bindsym $mod+r mode "resize" -# Start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) - - -#-old-#bar { -#-old-# status_command i3status -#-old-#} exec --no-startup-id nitrogen --restore exec --no-startup-id synergy From 60c3ab0403c5be53b1a85048416fae0f8daadc8d Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Fri, 15 May 2020 16:52:47 +0200 Subject: [PATCH 25/27] inventory: up-to-date, split by server/client, enhance some auth in roles --- global.yml | 46 +++++++++++++++++++-------------- gnupg.yml | 3 +-- redshift.yml | 2 +- roles/gnupg/tasks/main.yml | 3 +++ roles/tmux/tasks/.main.yml.swp | Bin 12288 -> 0 bytes roles/tmux/tasks/main.yml | 3 +++ tmux.yml | 2 +- vim.yml | 2 +- 8 files changed, 37 insertions(+), 24 deletions(-) delete mode 100644 roles/tmux/tasks/.main.yml.swp diff --git a/global.yml b/global.yml index b30f101..7f2fe39 100644 --- a/global.yml +++ b/global.yml @@ -2,34 +2,42 @@ all: hosts: + iodine: + ansible_host: iodine.int.finallycoffee.eu + ansible_user: jdreichmann + ansible_become_user: jdreichmann + ansible_become: true carbon: ansible_host: carbon.int.finallycoffee.eu - iron: - ansible_host: iron.int.finallycoffee.eu - platinum: - ansible_host: platinum.int.finallycoffee.eu - xenon: - ansible_host: xenon.int.finallycoffee.eu - yttrium: - ansible_host: yttrium.int.finallycoffee.eu +# iron: +# ansible_host: iron.int.finallycoffee.eu +# platinum: +# ansible_host: platinum.int.finallycoffee.eu +# xenon: +# ansible_host: xenon.int.finallycoffee.eu +# yttrium: +# ansible_host: yttrium.int.finallycoffee.eu + + munich: + ansible_host: munich.finallycoffee.eu + ansible_user: jdreichmann + ansible_become_user: jdreichmann + ansible_become: true vars: ansible_user: transcaffeine ansible_become_user: transcaffeine ansible_become: true -gnupg: - hosts: - all: -redshift: +servers: hosts: - all: + iodine: + munich: +# iron: +# platinum: -tmux: +clients: hosts: - all: - -vim: - hosts: - all: +# carbon: +# xenon: diff --git a/gnupg.yml b/gnupg.yml index cd2ae7a..5696855 100644 --- a/gnupg.yml +++ b/gnupg.yml @@ -1,8 +1,7 @@ --- - name: Sets up gpg and the configs for using it as a ssh-agent - #connection: local - hosts: gnupg + hosts: all become: true roles: - gnupg diff --git a/redshift.yml b/redshift.yml index 21ef9f3..aaf462c 100644 --- a/redshift.yml +++ b/redshift.yml @@ -1,7 +1,7 @@ --- - name: Sets up redshift and creates an autostart file - hosts: redshift + hosts: clients become: true roles: - redshift diff --git a/roles/gnupg/tasks/main.yml b/roles/gnupg/tasks/main.yml index 872b566..1fb1d1b 100644 --- a/roles/gnupg/tasks/main.yml +++ b/roles/gnupg/tasks/main.yml @@ -5,6 +5,9 @@ package: name: gnupg2 state: latest + become: yes + become_user: root + become_method: sudo when: ansible_os_family == "RedHat" ignore_errors: true diff --git a/roles/tmux/tasks/.main.yml.swp b/roles/tmux/tasks/.main.yml.swp deleted file mode 100644 index da76f1107b38d8521da59505cd8193e41d20976a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI&y-ve05C?F#5*uHF7cd~PC27lox~@<)Wl;smi2{OyOT$KDvsWutOW=Lg{dv zXLDVUfB*y*6If#ht!Bg5?(OdI?X9!L+Mo&o5P$##AOHafKmY;|SV{p`*4Q;oUazKK zt@hfly*grp00bZa0SG_<0uX=z1Rwwb2tZ&71w_Kw>pEk{8#Fxq|Nr^?|4!#OiYJOk ziU*2&iaUx4g`wzCbSS2^OZeL{G6Wz10SG_<0uX=z1Rwwb2teRp0-RPNt!wj16#6^t zVO;2x`Ls20n}4Ok%NAvw%*#wT*=7OPBA0D`T4lJeQv>er#B-%x!7qwj^0dejY1pix t^Od|b(n{^7saX&IC3GxBJQRa(y*t{DjGWHEm8GuM(KUTZ&;3CVun#aEa%uno diff --git a/roles/tmux/tasks/main.yml b/roles/tmux/tasks/main.yml index 1d75f9b..3a1ba68 100644 --- a/roles/tmux/tasks/main.yml +++ b/roles/tmux/tasks/main.yml @@ -4,6 +4,9 @@ package: name: tmux state: present + become: yes + become_user: root + become_method: sudo ignore_errors: true - name: Template config file into home folder diff --git a/tmux.yml b/tmux.yml index 4a91874..d782211 100644 --- a/tmux.yml +++ b/tmux.yml @@ -1,7 +1,7 @@ --- - name: Set up tmux - hosts: tmux + hosts: all become: true roles: - tmux diff --git a/vim.yml b/vim.yml index a339248..3d4b5f6 100644 --- a/vim.yml +++ b/vim.yml @@ -1,7 +1,7 @@ --- - name: Install vim and copy color scheme and template its config - hosts: vim + hosts: all become: true roles: - vim From 54c6316ca9ea6ebf138bca633f22452874f9b2e8 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Sun, 5 Jul 2020 11:21:26 +0200 Subject: [PATCH 26/27] meta: add ansible-gpg-vault --- .gitmodules | 3 +++ ansible-gpg-vault | 1 + ansible-gpg-vault-store/gpg_ids.list | 1 + ansible-gpg-vault-store/vault_passphrase.gpg | 20 ++++++++++++++++++++ ansible.cfg | 3 +++ 5 files changed, 28 insertions(+) create mode 100644 .gitmodules create mode 160000 ansible-gpg-vault create mode 100644 ansible-gpg-vault-store/gpg_ids.list create mode 100644 ansible-gpg-vault-store/vault_passphrase.gpg create mode 100644 ansible.cfg diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..69177c0 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ansible-gpg-vault"] + path = ansible-gpg-vault + url = https://git.finallycoffee.eu/finallycoffee.eu/ansible-gpg-vault.git diff --git a/ansible-gpg-vault b/ansible-gpg-vault new file mode 160000 index 0000000..6b06b79 --- /dev/null +++ b/ansible-gpg-vault @@ -0,0 +1 @@ +Subproject commit 6b06b795cc769033fbb913167c88a7c41da30ebd diff --git a/ansible-gpg-vault-store/gpg_ids.list b/ansible-gpg-vault-store/gpg_ids.list new file mode 100644 index 0000000..63a8761 --- /dev/null +++ b/ansible-gpg-vault-store/gpg_ids.list @@ -0,0 +1 @@ +johanna.reichmann@delta-industries.de diff --git a/ansible-gpg-vault-store/vault_passphrase.gpg b/ansible-gpg-vault-store/vault_passphrase.gpg new file mode 100644 index 0000000..8693e02 --- /dev/null +++ b/ansible-gpg-vault-store/vault_passphrase.gpg @@ -0,0 +1,20 @@ +-----BEGIN PGP MESSAGE----- + +hQIMAxEs7W/4x4lxAQ//ZkLnB+f9bD12wnnRJm8S6j/iaxbxsV9vSe0xfGZH0mup +7f9Kpg8kCxDaTnbgQw9HIPJPc4m/Kwlo8Jx+Zk3+AIvuEkqll3OjmiwstlH9EPBg +VzDDnpWHb4EG0xYWv7+pztudwX2Ghp1xMqHYIokJNliU01vn/igoeZjLg+uogKWf +4+qFest0CLONfHM2LUj3qfMJc1dndRM46i2YybjTC6BFmqtXGNuEeVOHNUV3AgTw +M6gpq26rr+YdVElft43o2+sdZH/USlL/ga5+K0Ea272qhmO/fPbTeffqlUHtkkWs +bURsLmPQYkgZxy8TflSVeB8qol5i30hqkD3WTuEHB+m92KkxveZcV2jHeNrI1OEP +r/kbMcxivDod0eNaEwe7pMlm7NstrHrnIExm9pG5y8YIIRlaELNJbXPcZAHTG+o9 +j+kfPnRyqFrF1raktY0AO99jsNn13uXYMPb0TB78jR6Qs0HAm56GUtO+enZhUEBo +3igpeiU5lMEhua8fD+xSUhA4Hx8InS/Oj2FxzK4GRyRhXag2xFoBEM9FMJnRr9cR +m5mPFBvqMadZkejRrv+QpAy6phauR4Zo9M7qBwsZ79adeFFTMneYONuF8l6okjBu +OSHFPeR9R+O+iv+toAMCyqfH93RM7NWKBbawhnBBvaS7bIzMw0x+xKJo+c5lkQXS +wC0BupdYkeee+5KeD+LejKJK2UBRtYPhDYZRPbHu0Hu837liuXhrJYuKz6SFfoPU +kQcyYUlFVcaqjIwKGLYQdwumZetGlw8DlfmQ9nax5n5wvVm+fv6ZF8wy60Wsehbi +fqE2jTTBRStyIqScPOZKTu1OR17va9KKhDnAPLXVPZ/ROxJftIrsa2FFRhItJBJx +fqCe73K8zvT5jcHlN+qQlHgmV2KdTbMa0i6IC+VMWgdlK8HhE+nzYfl5Z4cf6ZwA +BHnAXdwgtnj8FxZmC1NgRQuhXj3UucPO9/HrqEToAUydUQvbT1YbX+RLnzIysrU= +=cikY +-----END PGP MESSAGE----- diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..510b5e0 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,3 @@ +[defaults] + +vault_password_file = ansible-gpg-vault/vault.sh From 2659a1cc190a43c5bfcc7a56b03ae73e19ffa372 Mon Sep 17 00:00:00 2001 From: jdreichmann Date: Sun, 5 Jul 2020 11:38:49 +0200 Subject: [PATCH 27/27] git: template .gitconfig --- git.yml | 7 +++++++ group_vars/git.yml | 30 ++++++++++++++++++++++++++++ local.yml | 3 +++ roles/git/defaults/main.yml | 17 ++++++++++++++++ roles/git/tasks/main.yml | 9 +++++++++ roles/git/templates/gitconfig.j2 | 34 ++++++++++++++++++++++++++++++++ 6 files changed, 100 insertions(+) create mode 100644 git.yml create mode 100644 group_vars/git.yml create mode 100644 roles/git/defaults/main.yml create mode 100644 roles/git/tasks/main.yml create mode 100644 roles/git/templates/gitconfig.j2 diff --git a/git.yml b/git.yml new file mode 100644 index 0000000..323109e --- /dev/null +++ b/git.yml @@ -0,0 +1,7 @@ +--- + +- name: Install & template git configuration + hosts: git + become: true + roles: + - git diff --git a/group_vars/git.yml b/group_vars/git.yml new file mode 100644 index 0000000..8a0c006 --- /dev/null +++ b/group_vars/git.yml @@ -0,0 +1,30 @@ +$ANSIBLE_VAULT;1.1;AES256 +61636132613664626434323334356466303734666664616338633036343865313331623734306331 +3533333362613430633461333832363163323766323265370a643039643361666132386166396334 +33643330396433626238363738356438653534666465663462636635353434333862373933666334 +6134376464623233310a663833646336643665626335386335623337623538383765633337313065 +32626132346632336237353931666166343639353339303935343732393337333032643638626539 +35623239653438666665366539346136346235663537663961366662323333613631613066393365 +37636265373832303862326163656639663762653061636261303836613638306133383132306236 +33353731363230633536353030626236366465613062616434656431333961323634313163356266 +30363062376532323864643737316335366231633433663536383032636335326338663137366131 +61396161336365633861646266336663363863383231616364326233623435356339333237653430 +61313563373939363437313466356133376632643431316461376265373833313537633832656337 +34356536373533303862373262386661643938366363363062373766373664653461383039666136 +65323038346632373230626664316638663636626338373166343433386635613066636637613465 +37633034626236353130636533316339653162303938316637666461363739653736323830316561 +35393865346436623861653036616263343731626633353336303637643035663362653465656134 +38653262373864306462643937636539373665626139623138336334343130636262353162633338 +33636636333064633431613863363530613165323064383132623935666338303464373466313964 +63316630323336643936356362643331383733626161633264346265326533653163303561333130 +36343834616432353937623161373531383234626634303335393665623335306462393762376235 +38306666656266363664636431613339303365623832343137666232323964333531653933383266 +32663135633664383866313339666461303034303539613532306362353336346163306662396561 +33343361313834643033323065376466346236396364386436343034393431353930353537353139 +34356363313730303032336566303433323730623638623264383833363566356266313265343538 +35633861383637383331326634363966393638333235373034353161633665343330383165316632 +39613032356638383062373731633834643864663433323832396430646362626563373831643531 +64323165326262343935646466366136343531656661626434613563646430343261306461303437 +38303863303230613065643431663432653734616239626337303363643263316236383364383739 +63393539346137393237613430396438373933656130376136613563613134386265663565626337 +66353235383937646661643734323533643731313764373435383833393532363362 diff --git a/local.yml b/local.yml index 99ff4d7..bb64759 100644 --- a/local.yml +++ b/local.yml @@ -26,3 +26,6 @@ vim: hosts: xenon: +git: + hosts: + xenon: diff --git a/roles/git/defaults/main.yml b/roles/git/defaults/main.yml new file mode 100644 index 0000000..1fb408f --- /dev/null +++ b/roles/git/defaults/main.yml @@ -0,0 +1,17 @@ +--- + +git_user: your-username +git_email: your-email@example.com +git_signkey: +git_signingkey: +git_do_sign: false + +git_user_home: "/home/{{ git_system_user }}" +git_system_user: "{{ git_user }}" +git_system_group: "{{ git_system_user }}" + +git_gpg_program: ~ + +git_aliases: [] + +git_credentials: [] diff --git a/roles/git/tasks/main.yml b/roles/git/tasks/main.yml new file mode 100644 index 0000000..3146540 --- /dev/null +++ b/roles/git/tasks/main.yml @@ -0,0 +1,9 @@ +--- + +- name: Template .gitconfig + template: + src: gitconfig.j2 + dest: "{{ git_user_home }}/.gitconfig" + owner: "{{ git_system_user }}" + group: "{{ git_system_group }}" + mode: 0660 diff --git a/roles/git/templates/gitconfig.j2 b/roles/git/templates/gitconfig.j2 new file mode 100644 index 0000000..b7aede9 --- /dev/null +++ b/roles/git/templates/gitconfig.j2 @@ -0,0 +1,34 @@ +# This is Git's per-user configuration file. +[user] +# Please adapt and uncomment the following lines: + name = {{ git_user }} + email = {{ git_email }} +{% if git_do_sign %} + signkey = {{ git_signkey }} + signingkey = {{ git_signingkey }} +{% endif %} + +{% if git_do_sign %} +[gpg] + program = {{ git_gpg_program }} + +{% endif %} +[commit] + +{% if git_do_sign %} + gpgsign = true +{% endif %} + + +[alias] +{% for alias in git_aliases %} + {{ alias.name }} = {{ alias.cmd }} +{% endfor %} + +{% for cred in git_credentials %} +[credential "{{ cred.remote_url }}"] + username = {{ cred.username }} +{% if cred.helper is defined %} + helper = {{ cred.helper }} +{% endif %} +{% endfor %}