From 4cba5cc1d3c6de0e563bb4e1f57ea9ab3c08bcad Mon Sep 17 00:00:00 2001 From: Douglas J Hunley Date: Wed, 15 Apr 2026 11:27:30 -0400 Subject: [PATCH 1/5] feat: add tmux to base image and auto-launch it --- ansible/files/tmux.conf.j2 | 64 ++++++++++++++++++++++++++++++++++++ ansible/playbook.yml | 3 ++ ansible/tasks/setup-tmux.yml | 33 +++++++++++++++++++ 3 files changed, 100 insertions(+) create mode 100644 ansible/files/tmux.conf.j2 create mode 100644 ansible/tasks/setup-tmux.yml diff --git a/ansible/files/tmux.conf.j2 b/ansible/files/tmux.conf.j2 new file mode 100644 index 000000000..1711feeba --- /dev/null +++ b/ansible/files/tmux.conf.j2 @@ -0,0 +1,64 @@ +# Keep the default prefix +set-option -g prefix C-b + +# Add Ctrl-a as a second prefix +set-option -g prefix2 C-a + +# Ensure that pressing Ctrl-a twice sends the prefix to the inner application +# (Useful for nested tmux sessions or programs that use Ctrl-a) +bind-key C-a send-prefix -2 + +# split panes using | and - +bind | split-window -h +bind - split-window -v + +# switch panes using Alt-arrow without prefix +bind -n M-Left select-pane -L +bind -n M-Right select-pane -R +bind -n M-Up select-pane -U +bind -n M-Down select-pane -D + +# Enable mouse control (clickable windows, panes, resizable panes) +set -g mouse on + +# DESIGN TWEAKS + +# don't do anything when a 'bell' rings +set -g visual-activity off +set -g visual-bell off +set -g visual-silence off +setw -g monitor-activity off +set -g bell-action none + +# clock mode +setw -g clock-mode-colour yellow + +# copy mode +setw -g mode-style 'fg=black bg=red bold' + +# panes +set -g pane-border-style 'fg=red' +set -g pane-active-border-style 'fg=yellow' + +# statusbar +set -g status-position bottom +set -g status-justify left +set -g status-style 'fg=red' + +set -g status-left '' +set -g status-left-length 10 + +set -g status-right-style 'fg=black bg=yellow' +set -g status-right '%Y-%m-%d %H:%M ' +set -g status-right-length 50 + +setw -g window-status-current-style 'fg=black bg=red' +setw -g window-status-current-format ' #I #W #F ' + +setw -g window-status-style 'fg=red bg=black' +setw -g window-status-format ' #I #[fg=white]#W #[fg=yellow]#F ' + +setw -g window-status-bell-style 'fg=yellow bg=red bold' + +# messages +set -g message-style 'fg=yellow bg=red bold' diff --git a/ansible/playbook.yml b/ansible/playbook.yml index fbc3d5d81..f2d5b6837 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -29,6 +29,9 @@ - name: Install tuned import_tasks: tasks/setup-tuned.yml + - name: Install tmux + import_tasks: tasks/setup-tmux.yml + - name: Install Postgres from source import_tasks: tasks/setup-postgres.yml diff --git a/ansible/tasks/setup-tmux.yml b/ansible/tasks/setup-tmux.yml new file mode 100644 index 000000000..9ede1ebc4 --- /dev/null +++ b/ansible/tasks/setup-tmux.yml @@ -0,0 +1,33 @@ +- name: tmux - Install tmux + ansible.builtin.apt: + name: 'tmux' + state: 'present' + update_cache: true + become: true + +- name: tmux - Configure shell auto-logout + ansible.builtin.copy: + content: 'export TMOUT=600' + dest: '/etc/profile.d/11-shell_timeout.sh' + group: 'root' + mode: '0644' + owner: 'root' + become: true + +- name: tmux - Configure tmux + ansible.builtin.template: + dest: '/etc/tmux.conf' + group: 'root' + mode: '0644' + owner: 'root' + src: 'tmux.conf.j2' + become: true + +- name: tmux - Auto-launch tmux as needed + ansible.builtin.copy: + content: '[[ $- == *i* ]] && [[ $TERM == tmux* ]] || tmux' + dest: '/etc/profile.d/12-tmux.sh' + group: 'root' + mode: '0644' + owner: 'root' + become: true From 6773f5869748a6fc0a7a6fc9702a043c0001d16a Mon Sep 17 00:00:00 2001 From: Douglas J Hunley Date: Wed, 15 Apr 2026 11:51:48 -0400 Subject: [PATCH 2/5] Update ansible/tasks/setup-tmux.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- ansible/tasks/setup-tmux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/tasks/setup-tmux.yml b/ansible/tasks/setup-tmux.yml index 9ede1ebc4..42b33c62d 100644 --- a/ansible/tasks/setup-tmux.yml +++ b/ansible/tasks/setup-tmux.yml @@ -20,7 +20,7 @@ group: 'root' mode: '0644' owner: 'root' - src: 'tmux.conf.j2' + src: 'files/tmux.conf.j2' become: true - name: tmux - Auto-launch tmux as needed From 434b43a8ea0162a1f3454fdc3b5f43c7c292a88d Mon Sep 17 00:00:00 2001 From: Douglas J Hunley Date: Wed, 15 Apr 2026 12:06:09 -0400 Subject: [PATCH 3/5] fix: fixups from copilot --- ansible/tasks/setup-tmux.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ansible/tasks/setup-tmux.yml b/ansible/tasks/setup-tmux.yml index 9ede1ebc4..b65deac17 100644 --- a/ansible/tasks/setup-tmux.yml +++ b/ansible/tasks/setup-tmux.yml @@ -7,7 +7,10 @@ - name: tmux - Configure shell auto-logout ansible.builtin.copy: - content: 'export TMOUT=600' + content: | +case "$-" in + *i*) export TMOUT=600 ;; +esac dest: '/etc/profile.d/11-shell_timeout.sh' group: 'root' mode: '0644' @@ -25,7 +28,15 @@ - name: tmux - Auto-launch tmux as needed ansible.builtin.copy: - content: '[[ $- == *i* ]] && [[ $TERM == tmux* ]] || tmux' + content: | +case "$-" in + *i*) + case "$TERM" in + tmux*) ;; + *) tmux new-session -A -s supa ;; + esac + ;; +esac dest: '/etc/profile.d/12-tmux.sh' group: 'root' mode: '0644' From 5188069d0e419f16ce987437a73f4970946cd0c9 Mon Sep 17 00:00:00 2001 From: Douglas J Hunley Date: Wed, 15 Apr 2026 12:22:50 -0400 Subject: [PATCH 4/5] fix: formatting --- ansible/tasks/setup-tmux.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ansible/tasks/setup-tmux.yml b/ansible/tasks/setup-tmux.yml index cea2c51b7..1172399cc 100644 --- a/ansible/tasks/setup-tmux.yml +++ b/ansible/tasks/setup-tmux.yml @@ -8,9 +8,9 @@ - name: tmux - Configure shell auto-logout ansible.builtin.copy: content: | -case "$-" in - *i*) export TMOUT=600 ;; -esac + case "$-" in + *i*) export TMOUT=600 ;; + esac dest: '/etc/profile.d/11-shell_timeout.sh' group: 'root' mode: '0644' @@ -29,14 +29,14 @@ esac - name: tmux - Auto-launch tmux as needed ansible.builtin.copy: content: | -case "$-" in - *i*) - case "$TERM" in - tmux*) ;; - *) tmux new-session -A -s supa ;; - esac - ;; -esac + case "$-" in + *i*) + case "$TERM" in + tmux*) ;; + *) tmux new-session -A -s supa ;; + esac + ;; + esac dest: '/etc/profile.d/12-tmux.sh' group: 'root' mode: '0644' From b36d1d8ded56c0a848e8ad7aa6bc28e3e16009bf Mon Sep 17 00:00:00 2001 From: Douglas J Hunley Date: Wed, 15 Apr 2026 14:09:25 -0400 Subject: [PATCH 5/5] chore: bump ami version string --- ansible/vars.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ansible/vars.yml b/ansible/vars.yml index 1b2f62a4e..486ae75ee 100644 --- a/ansible/vars.yml +++ b/ansible/vars.yml @@ -10,9 +10,9 @@ postgres_major: # Full version strings for each major version postgres_release: - postgresorioledb-17: "17.6.0.064-orioledb" - postgres17: "17.6.1.107" - postgres15: "15.14.1.107" + postgresorioledb-17: "17.6.0.064-orioledb-indata574-1" + postgres17: "17.6.1.107-indata574-1" + postgres15: "15.14.1.107-indata574-1" # Non Postgres Extensions pgbouncer_release: 1.25.1