Sha256: 3b2166c8aad44236beae2c9b742cc26b2bacff51f5441411e8c9fa0d8b597c19

Contents?: true

Size: 1.52 KB

Versions: 41

Compression:

Stored size: 1.52 KB

Contents

require 'beaker-answers/versions/version38'
module BeakerAnswers
  # This class provides answer file information for PE version 4.0
  #
  # @api private
  class Version40 < Version38

    # The version of PE that this set of answers is appropriate for
    def self.pe_version_matcher
      /(\A3\.99)|(\A4\.0)|(\A2015\.[012])/
    end

    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

41 entries across 41 versions & 1 rubygems

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