tmux-management: autoreconnect
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# Bootstrap Ansible environment
|
||||
# Usage: ./bootstrap [--force]
|
||||
|
||||
pip install --upgrade pip "$@"
|
||||
python -m ensurepip --upgrade
|
||||
pip install --upgrade pip
|
||||
pip install --upgrade --requirement pip-requirements "$@"
|
||||
ansible-galaxy install --role-file galaxy-requirements.yml "$@"
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
# ansible-playbook playbook.yml -l testing-remote --ask-vault-pass --ask-become-pass --check --diff
|
||||
|
||||
ansible-playbook playbook.yml -l testing-remote --ask-vault-pass --ask-become-pass --diff "$@"
|
||||
ansible-playbook playbook.yml -l workstation-remote-testing --ask-vault-pass --ask-become-pass --diff "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
}
|
||||
],
|
||||
"settings": {
|
||||
"ansible.python.interpreterPath": "/home/bryan/.virtualenvs/deploy/bin/python",
|
||||
"ansible.python.interpreterPath": "/home/bryan/develop/deploy/.venv/bin/python",
|
||||
"search.followSymlinks": false,
|
||||
},
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ Host home-router
|
||||
Hostname home-router
|
||||
User root
|
||||
|
||||
Host ax6000
|
||||
Hostname ax6000.lan
|
||||
Host w1700k
|
||||
Hostname w1700k.lan
|
||||
User root
|
||||
|
||||
Host bryanroessler.com
|
||||
@@ -35,8 +35,8 @@ Host workstation
|
||||
Host laptop
|
||||
Hostname laptop
|
||||
|
||||
Host vm-fedora42
|
||||
Hostname vm-fedora42
|
||||
Host vm-fedora43
|
||||
Hostname 192.168.122.169
|
||||
|
||||
Host vm-alma9
|
||||
Hostname 192.168.122.235
|
||||
|
||||
@@ -31,7 +31,7 @@ mounts:
|
||||
create_dir: false
|
||||
|
||||
- path: /mnt/downloads
|
||||
src: /dev/disk/by-uuid/ee6247ed-5bcf-481e-802e-74efbc02eb45
|
||||
src: /dev/disk/by-uuid/56a4fe2f-ce26-48cc-b602-548db7357549
|
||||
fstype: btrfs
|
||||
opts: defaults,compress=zstd:1
|
||||
state: mounted
|
||||
@@ -41,7 +41,7 @@ mounts:
|
||||
create_dir: false
|
||||
|
||||
- path: /home/bryan/downloads
|
||||
src: /dev/disk/by-uuid/ee6247ed-5bcf-481e-802e-74efbc02eb45
|
||||
src: /dev/disk/by-uuid/56a4fe2f-ce26-48cc-b602-548db7357549
|
||||
fstype: btrfs
|
||||
opts: subvol=downloads,defaults,compress=zstd:1,x-systemd.requires=home.mount,x-gvfs-hide
|
||||
state: mounted
|
||||
|
||||
@@ -5,16 +5,18 @@ htpc-remote ansible_host=htpc ansible_user=bryan
|
||||
[workstation]
|
||||
workstation-local ansible_connection=local ansible_user=bryan
|
||||
workstation-remote ansible_host=workstation ansible_user=bryan
|
||||
workstation-remote-testing ansible_host=vm-fedora43 ansible_user=bryan
|
||||
|
||||
[laptop]
|
||||
laptop-local ansible_connection=local ansible_user=bryan
|
||||
laptop-remote ansible_host=laptop ansible_user=bryan
|
||||
laptop-remote-testing ansible_host=192.168.122.95 ansible_user=bryan
|
||||
|
||||
[server]
|
||||
bryanroessler.com ansible_host=bryanroessler.com ansible_user=bryan
|
||||
|
||||
[testing]
|
||||
testing-remote ansible_host=192.168.122.205 ansible_user=bryan
|
||||
# [testing]
|
||||
# testing-remote ansible_host=192.168.122.205 ansible_user=bryan
|
||||
|
||||
# [desktops:children]
|
||||
# workstation
|
||||
|
||||
@@ -35,6 +35,12 @@
|
||||
- role: services
|
||||
tags: ['services']
|
||||
|
||||
- name: Deploy quadlets
|
||||
hosts: all
|
||||
roles:
|
||||
- role: quadlets
|
||||
tags: ['quadlets']
|
||||
|
||||
- name: Deploy sysconfig
|
||||
hosts: all
|
||||
roles:
|
||||
|
||||
@@ -71,6 +71,12 @@ done
|
||||
tmux select-layout -t "$SESSION:0" tiled
|
||||
((SYNCHRONIZE)) && tmux setw -t "$SESSION:0" synchronize-panes on
|
||||
|
||||
# Keep panes visible when commands exit
|
||||
tmux set-option -t "$SESSION:0" remain-on-exit on
|
||||
|
||||
# Auto-respawn any pane whose command dies
|
||||
tmux set-hook -t "$SESSION" pane-died "run-shell 'tmux respawn-pane -k -t #{pane_id}'"
|
||||
|
||||
# Activate the last pane (local host)
|
||||
local_index=$(( ${#TARGETS[@]} - 1 ))
|
||||
tmux select-pane -t "$SESSION:0.$local_index"
|
||||
|
||||
Reference in New Issue
Block a user