-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from nicklewis/APPMGMT-881-orchestrator-answers
(APPMGMT-882) Add orchestrator answers for 2015.3
- Loading branch information
Showing
4 changed files
with
69 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
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') | ||
|
||
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 | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters