Sha256: 22d846fa9dcb20b66f5b80a50d5d4246cbf15488131062df6451155732dd3df7

Contents?: true

Size: 1.83 KB

Versions: 4

Compression:

Stored size: 1.83 KB

Contents

# frozen_string_literal: true

module Capistrano
  module ASG
    module Rolling
      # Singleton that holds the configuration.
      module Configuration
        extend Capistrano::DSL

        module_function

        # Registered Auto Scaling Groups.
        def autoscale_groups
          @autoscale_groups ||= AutoscaleGroups.new
        end

        # Launched Instances.
        def instances
          @instances ||= Instances.new
        end

        # Updated Launch Templates.
        def launch_templates
          @launch_templates ||= LaunchTemplates.new
        end

        def aws_access_key_id
          fetch(:aws_access_key_id)
        end

        def aws_secret_access_key
          fetch(:aws_secret_access_key)
        end

        def aws_session_token
          fetch(:aws_session_token)
        end

        def aws_region
          fetch(:aws_region)
        end

        def auto_scaling_group_name
          fetch(:asg_rolling_group_name)
        end

        def ssh_options
          fetch(:asg_rolling_ssh_options, fetch(:ssh_options))
        end

        def instance_overrides
          fetch(:asg_rolling_instance_overrides)
        end

        def use_private_ip_address?
          fetch(:asg_rolling_use_private_ip_address)
        end

        def keep_versions
          fetch(:asg_rolling_keep_versions, fetch(:keep_releases))
        end

        def verbose?
          fetch(:asg_rolling_verbose)
        end

        def rolling_update=(value)
          set(:asg_rolling_update, value)
        end

        def rolling_update?
          fetch(:asg_rolling_update)
        end

        def wait_for_instance_refresh?
          fetch(:asg_wait_for_instance_refresh, false)
        end

        def instance_refresh_polling_interval
          fetch(:asg_instance_refresh_polling_interval, 30)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
capistrano-asg-rolling-0.5.1 lib/capistrano/asg/rolling/configuration.rb
capistrano-asg-rolling-0.5.0 lib/capistrano/asg/rolling/configuration.rb
capistrano-asg-rolling-0.4.1 lib/capistrano/asg/rolling/configuration.rb
capistrano-asg-rolling-0.4.0 lib/capistrano/asg/rolling/configuration.rb