Sha256: 272537a76db7e14cff1bcd78ddf9ed840a4dd63e958126723b42263afb434e3f

Contents?: true

Size: 1.35 KB

Versions: 8

Compression:

Stored size: 1.35 KB

Contents

require 'beaker/answers/version38'

module Beaker
  # This class provides answer file information for PE version 4.0
  #
  # @api private
  class Version40 < Version38
    def generate_answers
      masterless = @options[:masterless]
      return super if masterless

      master = only_host_with_role(@hosts, 'master')

      the_answers = super

      # remove some old answers
      # - q_puppet_cloud_install
      # - q_puppet_enterpriseconsole_database_name 
      # - q_puppet_enterpriseconsole_database_password 
      # - q_puppet_enterpriseconsole_database_user

      the_answers.map do |vm, as|
        if as
          as.delete_if do |key, value|
            key =~ /q_puppet_cloud_install/
            #to be deleted in the future
            #|q_puppet_enterpriseconsole_database_name|q_puppet_enterpriseconsole_database_password|q_puppet_enterpriseconsole_database_user/
          end
        end
      end

      # add some new answers
      update_server_host    = answer_for(@options, :q_update_server_host, master.to_s)
      install_update_server = answer_for(@options, :q_install_update_server, 'y')

      the_answers.map do |key, value|
        the_answers[key][:q_update_server_host] = update_server_host if the_answers[key]
      end
      the_answers[master.name][:q_install_update_server] = install_update_server

      return the_answers
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
beaker-2.18.3 lib/beaker/answers/version40.rb
beaker-2.18.2 lib/beaker/answers/version40.rb
beaker-2.18.1 lib/beaker/answers/version40.rb
beaker-2.18.0 lib/beaker/answers/version40.rb
beaker-2.17.0 lib/beaker/answers/version40.rb
beaker-2.16.0 lib/beaker/answers/version40.rb
beaker-2.15.1 lib/beaker/answers/version40.rb
beaker-2.15.0 lib/beaker/answers/version40.rb