Class: BeakerAnswers::Version20172 Private
- Inherits:
-
Version20171
- Object
- Answers
- Version30
- Version32
- Version34
- Version38
- Version40
- Version20153
- Version20161
- Version20162
- Version20163
- Version20164
- Version20165
- Version20171
- BeakerAnswers::Version20172
- Defined in:
- lib/beaker-answers/versions/version20172.rb
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 2017.2
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_hiera_config ⇒ Object private
-
#hiera_host_config ⇒ Object
private
This is used to generate the profile host parameters, but now passes the options to determine which form of pe.conf is to be generated.
Methods inherited from Version20163
Methods inherited from Version20162
#answer_hiera, #generate_answers, #generate_bash_answers, #hiera_db_config, #installer_configuration_string
Methods inherited from Version20153
Methods inherited from Version40
Methods inherited from Version38
Methods inherited from Version34
Methods inherited from Version32
Methods inherited from Version30
#generate_answers, #host_answers
Methods inherited from Answers
#answer_for, #answer_hiera, #answer_string, #answers, create, #generate_answers, #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/version20172.rb', line 9 def self.pe_version_matcher /\A2017\.2/ end |
Instance Method Details
#generate_hiera_config ⇒ 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 |
# File 'lib/beaker-answers/versions/version20172.rb', line 13 def generate_hiera_config hiera_hash = super if hiera_hash.include?('meep_schema_version') && @options[:answers] # The meep 2.0 schema format includes structured data, which you could # conceivably overwrite in your :answers and not want flattened. # We're removing the flattened keys added in the Version20162 and # reading them here rather than breaking compatibilty with existing # Version20162 behavior. We're sorry. hiera_hash.reject! do |k,v| flatten_keys_to_joined_string(@options[:answers]).include?(k) end stringified_answers = @options[:answers].inject({}) do |hash,entry| key = entry[0] value = entry[1] hash[key.to_s] = value hash end hiera_hash.merge!(stringified_answers) end hiera_hash end |
#hiera_host_config ⇒ 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.
This is used to generate the profile host parameters, but now passes the options to determine which form of pe.conf is to be generated.
39 40 41 42 |
# File 'lib/beaker-answers/versions/version20172.rb', line 39 def hiera_host_config pe_conf = BeakerAnswers::PeConf.new(@hosts, @options[:meep_schema_version]) pe_conf.configuration_hash end |