Capture current Ansible control plane state
Commit the accumulated infrastructure work that was living only in the working tree: monitoring stack, emergency access/bot, gyro allocator, grimmory, adguard, backup audit and the OpenCode agent definitions. Also ignore Python bytecode, local archives and Nix/direnv artifacts. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTocXkGUUazHdKKd3r9k71
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
case "${SSH_ORIGINAL_COMMAND:-}" in
|
||||
start)
|
||||
/usr/bin/sudo /usr/bin/systemctl start emergency-reverse-ssh.service
|
||||
/usr/bin/sudo /usr/bin/systemctl restart emergency-reverse-ssh.timer
|
||||
/usr/bin/systemctl is-active --quiet emergency-reverse-ssh.service
|
||||
printf 'started; expires in {{ emergency_tunnel_ttl }}\nConnect:\nssh -i ~/.ssh/id_ed25519_homelab_ansible -o IdentitiesOnly=yes -J vps -p 22010 ansible@127.0.0.1\n'
|
||||
;;
|
||||
stop)
|
||||
/usr/bin/sudo /usr/bin/systemctl stop emergency-reverse-ssh.timer
|
||||
/usr/bin/sudo /usr/bin/systemctl stop emergency-reverse-ssh.service
|
||||
printf 'stopped\n'
|
||||
;;
|
||||
status)
|
||||
if /usr/bin/systemctl is-active --quiet emergency-reverse-ssh.service; then
|
||||
/usr/bin/systemctl show --property=ActiveState --property=ActiveEnterTimestamp --value emergency-reverse-ssh.service
|
||||
else
|
||||
printf 'stopped\n'
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
printf 'unsupported command\n' >&2
|
||||
exit 64
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user