Sha256: 0cea234d395d46955eba858daa1e161125fc4cdfdbed8c754b6ead24e184c2fc
Contents?: true
Size: 675 Bytes
Versions: 78
Compression:
Stored size: 675 Bytes
Contents
module Kontena module Callbacks class ListAndSelectGrid < Kontena::Callback include Kontena::Cli::Common matches_commands 'master login' def after_load command.class_eval do option ['--skip-grid-auto-select'], :flag, 'Do not auto select grid' end end # Runs kontena grids list --use which will auto join the first available # grid def after return if command.skip_grid_auto_select? return unless current_master return unless command.exit_code == 0 return unless current_master.grid.nil? Kontena.run('grid list --use --verbose') end end end end
Version data entries
78 entries across 78 versions & 1 rubygems