Sha256: 684cd866724e12d25e96d5428ec2025d910ca41078b90d2ef1db5bf2e0613036
Contents?: true
Size: 587 Bytes
Versions: 33
Compression:
Stored size: 587 Bytes
Contents
class Subspace::Commands::MaintenanceMode < Subspace::Commands::Base PASS_THROUGH_PARAMS = ["private-key", "limit"] def initialize(args, options) @hosts = args.first @options = options run end def run on_off = @options.__hash__[:on] ? "on" : "off" ansible_options = ["--diff", "-e maintenance_hosts=#{@hosts}", "--tags=maintenance_#{on_off}"] ansible_options = ansible_options | pass_through_params ansible_command "ansible-playbook", File.join(File.dirname(__FILE__), "../../../ansible/playbooks/maintenance_mode.yml"), *ansible_options end end
Version data entries
33 entries across 33 versions & 1 rubygems