Sha256: 2139cae61eeea980ecb27e78833f43c0067bf3c459749b160727c3cfe49e22f0
Contents?: true
Size: 1016 Bytes
Versions: 2
Compression:
Stored size: 1016 Bytes
Contents
# frozen_string_literal: true require 'rake' namespace :data_plane_api do namespace :server do desc "Set the server's admin state to DRAIN through the HAProxy Data Plane API" task :set_drain do on roles :web do next if ::Capistrano::DataPlaneApi.no_haproxy? ::Capistrano::DataPlaneApi.server_set_drain fetch(:stage), force: ::Capistrano::DataPlaneApi.force_haproxy? end end desc "Set the server's admin state to READY through the HAProxy Data Plane API" task :set_ready do on roles :web do next if ::Capistrano::DataPlaneApi.no_haproxy? sleep 3 ::Capistrano::DataPlaneApi.server_set_ready fetch(:stage) end end desc "Set the server's admin state to MAINT through the HAProxy Data Plane API" task :set_maint do on roles :web do next if ::Capistrano::DataPlaneApi.no_haproxy? sleep 3 ::Capistrano::DataPlaneApi.server_set_maint fetch(:stage), force: true end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
capistrano-data_plane_api-0.1.5 | lib/capistrano/data_plane_api/tasks.rb |
capistrano-data_plane_api-0.1.4 | lib/capistrano/data_plane_api/tasks.rb |