Sha256: 846297729c6f3342cb8c59d943b472bf57a96a13823230cffde70a647bd95286
Contents?: true
Size: 711 Bytes
Versions: 77
Compression:
Stored size: 711 Bytes
Contents
module Kontena module Callbacks class SetServerProviderAfterDeploy < Kontena::Callback matches_commands 'master create' def after extend Kontena::Cli::Common return unless command.exit_code == 0 return unless config.current_master return unless config.current_master.name == command.result[:name] return unless command.result[:provider] require 'shellwords' cmd = ['master', 'config', 'set', "server.provider=#{command.result[:provider]}"] spinner "Setting Master configuration server.provider to '#{command.result[:provider]}'" do |spin| spin.fail! unless Kontena.run(cmd) end end end end end
Version data entries
77 entries across 77 versions & 2 rubygems