Handle role filter when booting accessories

Filter the accessory hosts via KAMAL.accessory_hosts, which correctly
handles role and host filters.

Fixes: https://github.com/basecamp/kamal/issues/935
This commit is contained in:
Donal McBreen
2025-04-18 10:20:54 +01:00
parent 84fa30e376
commit 399f1526af
2 changed files with 14 additions and 5 deletions

View File

@@ -275,11 +275,7 @@ class Kamal::Cli::Accessory < Kamal::Cli::Base
end
def accessory_hosts(accessory)
if KAMAL.specific_hosts&.any?
KAMAL.specific_hosts & accessory.hosts
else
accessory.hosts
end
KAMAL.accessory_hosts & accessory.hosts
end
def remove_accessory(name)