Sha256: add6b3ce70c516edfed69f8cdd9e9f3be3e1d0e234ef8b2e4b631a822b289465

Contents?: true

Size: 1.47 KB

Versions: 36

Compression:

Stored size: 1.47 KB

Contents

require 'beaker-answers/versions/version40'

module BeakerAnswers
  # This class provides answer file information for PE version 2015.3
  #
  # @api private
  class Version20153 < Version40
    # The version of PE that this set of answers is appropriate for
    def self.pe_version_matcher
      /\A2015\.3/
    end

    def generate_answers
      the_answers = super

      return the_answers if @options[:masterless]

      master = only_host_with_role(@hosts, 'master')
      database = only_host_with_role(@hosts, 'database')
      console = only_host_with_role(@hosts, 'dashboard')

      orchestrator_db = {
        :q_orchestrator_database_name     => answer_for(@options, :q_orchestrator_database_name),
        :q_orchestrator_database_user     => answer_for(@options, :q_orchestrator_database_user),
        :q_orchestrator_database_password => "'#{answer_for(@options, :q_orchestrator_database_password)}'",
      }

      the_answers[master.name].merge!(orchestrator_db)
      the_answers[database.name].merge!(orchestrator_db)

      the_answers[master.name][:q_database_host] = answer_for(@options, :q_database_host, database.to_s)
      the_answers[master.name][:q_database_port] = answer_for(@options, :q_database_port)
      the_answers[master.name][:q_use_application_services] = answer_for(@options, :q_use_application_services, 'y')
      the_answers[console.name][:q_use_application_services] = answer_for(@options, :q_use_application_services, 'y')

      the_answers
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
beaker-answers-1.0.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.29.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.28.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.27.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.26.3 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.26.2 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.26.1 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.26.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.25.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.24.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.23.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.22.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.21.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.20.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.19.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.18.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.17.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.16.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.15.0 lib/beaker-answers/versions/version20153.rb
beaker-answers-0.14.0 lib/beaker-answers/versions/version20153.rb