]> git.aero2k.de Git - urlbot-v3.git/commit
Fix NATS provisioning for hosts where the bot user lacks passwordless sudo
authorThorsten <mail@aero2k.de>
Sat, 18 Jul 2026 11:09:25 +0000 (13:09 +0200)
committerThorsten <mail@aero2k.de>
Sat, 18 Jul 2026 11:09:25 +0000 (13:09 +0200)
commit1361f8926185217cae7666dffc848bd9370cfddb
tree1cb458bb668d1113e2028d68f916ef63e2640d9f
parent9d1315090d043f6551f05410e695f288d6e58781
Fix NATS provisioning for hosts where the bot user lacks passwordless sudo

nats_server.yml's tasks use become: true, which worked fine on munin (the
"pi" user has passwordless sudo) but hung waiting for a sudo password
prompt on aero2k.de, where "jabberbot" doesn't - discovered deploying NATS
there for the first time.

Moved "provision local nats server" into deploy.yml's first play, which
already connects as root directly (no become needed at all), instead of
the second play that connects as botuser. Also switched from a raw
include_tasks path to include_role(tasks_from: nats_server), since a bare
include_tasks doesn't pull in the role's defaults/main.yml (nats_version
was undefined otherwise) while include_role does regardless of which
tasks file is requested.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
deploy/deploy.yml
deploy/roles/urlbot/tasks/main.yml