Class: BeakerAnswers::Version40 Private
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This class provides answer file information for PE version 4.0
Direct Known Subclasses
Constant Summary
Constants inherited from Answers
Answers::DEFAULT_ANSWERS, Answers::DEFAULT_FORMAT, Answers::DEFAULT_HIERA_ANSWERS
Class Method Summary collapse
-
.pe_version_matcher ⇒ Object
private
The version of PE that this set of answers is appropriate for.
Instance Method Summary collapse
- #generate_answers ⇒ Object private
Methods inherited from Version30
Methods inherited from Answers
#answer_for, #answer_hiera, #answer_string, #answers, create, #get_defaults_or_answers, #initialize, #installer_configuration_string, #only_host_with_role, supported_upgrade_versions, supported_versions
Constructor Details
This class inherits a constructor from BeakerAnswers::Answers
Class Method Details
.pe_version_matcher ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The version of PE that this set of answers is appropriate for
9 10 11 |
# File 'lib/beaker-answers/versions/version40.rb', line 9 def self.pe_version_matcher /(\A3\.99)|(\A4\.0)|(\A2015\.[012])/ end |
Instance Method Details
#generate_answers ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/beaker-answers/versions/version40.rb', line 13 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 |