Class: Flotte::CLI::Service
- Inherits:
-
Thor
- Object
- Thor
- Flotte::CLI::Service
- Includes:
- SSHKit::DSL
- Defined in:
- lib/flotte/cli/service.rb
Instance Method Summary collapse
Instance Method Details
#hosts(service_name) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/flotte/cli/service.rb', line 14 def hosts(service_name) service = Flotte.registry.services[service_name] Flotte.registry.roles.select { |role| role.service == service }.flat_map(&:hosts).uniq.each do |host| Flotte.output.puts host.name end end |