tmux-management: autoreconnect
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
# Bootstrap Ansible environment
|
# Bootstrap Ansible environment
|
||||||
# Usage: ./bootstrap [--force]
|
# Usage: ./bootstrap [--force]
|
||||||
|
|
||||||
pip install --upgrade pip "$@"
|
python -m ensurepip --upgrade
|
||||||
|
pip install --upgrade pip
|
||||||
pip install --upgrade --requirement pip-requirements "$@"
|
pip install --upgrade --requirement pip-requirements "$@"
|
||||||
ansible-galaxy install --role-file galaxy-requirements.yml "$@"
|
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 --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": {
|
"settings": {
|
||||||
"ansible.python.interpreterPath": "/home/bryan/.virtualenvs/deploy/bin/python",
|
"ansible.python.interpreterPath": "/home/bryan/develop/deploy/.venv/bin/python",
|
||||||
"search.followSymlinks": false,
|
"search.followSymlinks": false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ Host home-router
|
|||||||
Hostname home-router
|
Hostname home-router
|
||||||
User root
|
User root
|
||||||
|
|
||||||
Host ax6000
|
Host w1700k
|
||||||
Hostname ax6000.lan
|
Hostname w1700k.lan
|
||||||
User root
|
User root
|
||||||
|
|
||||||
Host bryanroessler.com
|
Host bryanroessler.com
|
||||||
@@ -35,8 +35,8 @@ Host workstation
|
|||||||
Host laptop
|
Host laptop
|
||||||
Hostname laptop
|
Hostname laptop
|
||||||
|
|
||||||
Host vm-fedora42
|
Host vm-fedora43
|
||||||
Hostname vm-fedora42
|
Hostname 192.168.122.169
|
||||||
|
|
||||||
Host vm-alma9
|
Host vm-alma9
|
||||||
Hostname 192.168.122.235
|
Hostname 192.168.122.235
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ mounts:
|
|||||||
create_dir: false
|
create_dir: false
|
||||||
|
|
||||||
- path: /mnt/downloads
|
- 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
|
fstype: btrfs
|
||||||
opts: defaults,compress=zstd:1
|
opts: defaults,compress=zstd:1
|
||||||
state: mounted
|
state: mounted
|
||||||
@@ -41,7 +41,7 @@ mounts:
|
|||||||
create_dir: false
|
create_dir: false
|
||||||
|
|
||||||
- path: /home/bryan/downloads
|
- 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
|
fstype: btrfs
|
||||||
opts: subvol=downloads,defaults,compress=zstd:1,x-systemd.requires=home.mount,x-gvfs-hide
|
opts: subvol=downloads,defaults,compress=zstd:1,x-systemd.requires=home.mount,x-gvfs-hide
|
||||||
state: mounted
|
state: mounted
|
||||||
|
|||||||
@@ -5,16 +5,18 @@ htpc-remote ansible_host=htpc ansible_user=bryan
|
|||||||
[workstation]
|
[workstation]
|
||||||
workstation-local ansible_connection=local ansible_user=bryan
|
workstation-local ansible_connection=local ansible_user=bryan
|
||||||
workstation-remote ansible_host=workstation ansible_user=bryan
|
workstation-remote ansible_host=workstation ansible_user=bryan
|
||||||
|
workstation-remote-testing ansible_host=vm-fedora43 ansible_user=bryan
|
||||||
|
|
||||||
[laptop]
|
[laptop]
|
||||||
laptop-local ansible_connection=local ansible_user=bryan
|
laptop-local ansible_connection=local ansible_user=bryan
|
||||||
laptop-remote ansible_host=laptop ansible_user=bryan
|
laptop-remote ansible_host=laptop ansible_user=bryan
|
||||||
|
laptop-remote-testing ansible_host=192.168.122.95 ansible_user=bryan
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
bryanroessler.com ansible_host=bryanroessler.com ansible_user=bryan
|
bryanroessler.com ansible_host=bryanroessler.com ansible_user=bryan
|
||||||
|
|
||||||
[testing]
|
# [testing]
|
||||||
testing-remote ansible_host=192.168.122.205 ansible_user=bryan
|
# testing-remote ansible_host=192.168.122.205 ansible_user=bryan
|
||||||
|
|
||||||
# [desktops:children]
|
# [desktops:children]
|
||||||
# workstation
|
# workstation
|
||||||
|
|||||||
@@ -35,6 +35,12 @@
|
|||||||
- role: services
|
- role: services
|
||||||
tags: ['services']
|
tags: ['services']
|
||||||
|
|
||||||
|
- name: Deploy quadlets
|
||||||
|
hosts: all
|
||||||
|
roles:
|
||||||
|
- role: quadlets
|
||||||
|
tags: ['quadlets']
|
||||||
|
|
||||||
- name: Deploy sysconfig
|
- name: Deploy sysconfig
|
||||||
hosts: all
|
hosts: all
|
||||||
roles:
|
roles:
|
||||||
|
|||||||
@@ -71,6 +71,12 @@ done
|
|||||||
tmux select-layout -t "$SESSION:0" tiled
|
tmux select-layout -t "$SESSION:0" tiled
|
||||||
((SYNCHRONIZE)) && tmux setw -t "$SESSION:0" synchronize-panes on
|
((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)
|
# Activate the last pane (local host)
|
||||||
local_index=$(( ${#TARGETS[@]} - 1 ))
|
local_index=$(( ${#TARGETS[@]} - 1 ))
|
||||||
tmux select-pane -t "$SESSION:0.$local_index"
|
tmux select-pane -t "$SESSION:0.$local_index"
|
||||||
|
|||||||
Reference in New Issue
Block a user