beaker 2.18.0 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/HISTORY.md +699 -2
- data/acceptance/lib/beaker/acceptance/install_utils.rb +58 -0
- data/acceptance/pre_suite/puppet_gem/install.rb +1 -8
- data/acceptance/pre_suite/puppet_git/install.rb +6 -65
- data/acceptance/pre_suite/puppet_pkg/install.rb +1 -1
- data/acceptance/tests/foss_utils/clone_git_repo_on.rb +49 -0
- data/beaker.gemspec +2 -0
- data/lib/beaker/command.rb +1 -1
- data/lib/beaker/dsl/helpers/puppet_helpers.rb +8 -6
- data/lib/beaker/dsl/helpers/web_helpers.rb +2 -1
- data/lib/beaker/dsl/install_utils/aio_defaults.rb +0 -3
- data/lib/beaker/dsl/install_utils/foss_defaults.rb +19 -0
- data/lib/beaker/dsl/install_utils/foss_utils.rb +164 -67
- data/lib/beaker/dsl/install_utils/pe_defaults.rb +9 -11
- data/lib/beaker/dsl/install_utils/pe_utils.rb +48 -64
- data/lib/beaker/dsl/install_utils/puppet_utils.rb +43 -0
- data/lib/beaker/dsl/install_utils/windows_utils.rb +144 -0
- data/lib/beaker/dsl/roles.rb +20 -3
- data/lib/beaker/dsl/structure.rb +14 -3
- data/lib/beaker/host/freebsd/pkg.rb +18 -0
- data/lib/beaker/host/freebsd.rb +2 -0
- data/lib/beaker/host/unix/exec.rb +3 -3
- data/lib/beaker/host/unix/pkg.rb +37 -0
- data/lib/beaker/host/windows/exec.rb +3 -0
- data/lib/beaker/host.rb +38 -9
- data/lib/beaker/host_prebuilt_steps.rb +21 -11
- data/lib/beaker/hypervisor/aws_sdk.rb +22 -18
- data/lib/beaker/hypervisor/docker.rb +7 -0
- data/lib/beaker/hypervisor/openstack.rb +1 -0
- data/lib/beaker/hypervisor/vagrant_virtualbox.rb +10 -5
- data/lib/beaker/hypervisor/vmpooler.rb +4 -0
- data/lib/beaker/logger.rb +12 -1
- data/lib/beaker/options/command_line_parser.rb +9 -0
- data/lib/beaker/options/options_hash.rb +3 -296
- data/lib/beaker/options/parser.rb +12 -0
- data/lib/beaker/options/presets.rb +0 -1
- data/lib/beaker/platform.rb +3 -1
- data/lib/beaker/ssh_connection.rb +48 -23
- data/lib/beaker/test_case.rb +1 -1
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/dsl/helpers/puppet_helpers_spec.rb +0 -1
- data/spec/beaker/dsl/helpers/web_helpers_spec.rb +10 -1
- data/spec/beaker/dsl/install_utils/foss_utils_spec.rb +247 -49
- data/spec/beaker/dsl/install_utils/pe_utils_spec.rb +116 -26
- data/spec/beaker/dsl/install_utils/puppet_utils_spec.rb +57 -0
- data/spec/beaker/dsl/install_utils/windows_utils_spec.rb +132 -0
- data/spec/beaker/dsl/roles_spec.rb +36 -5
- data/spec/beaker/dsl/structure_spec.rb +9 -2
- data/spec/beaker/host/unix/pkg_spec.rb +26 -6
- data/spec/beaker/host_prebuilt_steps_spec.rb +3 -2
- data/spec/beaker/host_spec.rb +24 -6
- data/spec/beaker/hypervisor/aixer_spec.rb +1 -1
- data/spec/beaker/hypervisor/aws_sdk_spec.rb +595 -58
- data/spec/beaker/hypervisor/docker_spec.rb +2 -1
- data/spec/beaker/hypervisor/solaris_spec.rb +1 -0
- data/spec/beaker/hypervisor/vagrant_spec.rb +20 -5
- data/spec/beaker/hypervisor/vagrant_virtualbox_spec.rb +1 -1
- data/spec/beaker/logger_spec.rb +39 -0
- data/spec/beaker/options/command_line_parser_spec.rb +2 -2
- data/spec/beaker/options/options_hash_spec.rb +1 -102
- data/spec/beaker/options/parser_spec.rb +19 -0
- data/spec/beaker/options/pe_version_scaper_spec.rb +11 -1
- data/spec/beaker/options/presets_spec.rb +8 -0
- data/spec/beaker/ssh_connection_spec.rb +39 -21
- data/spec/helpers.rb +9 -3
- data/spec/mocks.rb +2 -0
- metadata +35 -11
- data/lib/beaker/answers/version20.rb +0 -120
- data/lib/beaker/answers/version28.rb +0 -121
- data/lib/beaker/answers/version30.rb +0 -227
- data/lib/beaker/answers/version32.rb +0 -44
- data/lib/beaker/answers/version34.rb +0 -51
- data/lib/beaker/answers/version38.rb +0 -29
- data/lib/beaker/answers/version40.rb +0 -44
- data/lib/beaker/answers.rb +0 -143
- data/spec/beaker/answers_spec.rb +0 -547
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: beaker
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.19.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Puppetlabs
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-08-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|
|
@@ -248,6 +248,34 @@ dependencies:
|
|
|
248
248
|
- - ~>
|
|
249
249
|
- !ruby/object:Gem::Version
|
|
250
250
|
version: 0.2.1
|
|
251
|
+
- !ruby/object:Gem::Dependency
|
|
252
|
+
name: beaker-answers
|
|
253
|
+
requirement: !ruby/object:Gem::Requirement
|
|
254
|
+
requirements:
|
|
255
|
+
- - ~>
|
|
256
|
+
- !ruby/object:Gem::Version
|
|
257
|
+
version: '0.0'
|
|
258
|
+
type: :runtime
|
|
259
|
+
prerelease: false
|
|
260
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
261
|
+
requirements:
|
|
262
|
+
- - ~>
|
|
263
|
+
- !ruby/object:Gem::Version
|
|
264
|
+
version: '0.0'
|
|
265
|
+
- !ruby/object:Gem::Dependency
|
|
266
|
+
name: stringify-hash
|
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
|
268
|
+
requirements:
|
|
269
|
+
- - ~>
|
|
270
|
+
- !ruby/object:Gem::Version
|
|
271
|
+
version: '0.0'
|
|
272
|
+
type: :runtime
|
|
273
|
+
prerelease: false
|
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
275
|
+
requirements:
|
|
276
|
+
- - ~>
|
|
277
|
+
- !ruby/object:Gem::Version
|
|
278
|
+
version: '0.0'
|
|
251
279
|
- !ruby/object:Gem::Dependency
|
|
252
280
|
name: rbvmomi
|
|
253
281
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -390,6 +418,7 @@ files:
|
|
|
390
418
|
- acceptance/fixtures/module/spec/spec_helper_acceptance.rb
|
|
391
419
|
- acceptance/fixtures/module/tests/init.pp
|
|
392
420
|
- acceptance/fixtures/module/vendor/bundle/ruby/gems.txt
|
|
421
|
+
- acceptance/lib/beaker/acceptance/install_utils.rb
|
|
393
422
|
- acceptance/pre_suite/README.md
|
|
394
423
|
- acceptance/pre_suite/pe/install.rb
|
|
395
424
|
- acceptance/pre_suite/puppet_gem/install.rb
|
|
@@ -397,6 +426,7 @@ files:
|
|
|
397
426
|
- acceptance/pre_suite/puppet_pkg/install.rb
|
|
398
427
|
- acceptance/tests/base/README.md
|
|
399
428
|
- acceptance/tests/base/host.rb
|
|
429
|
+
- acceptance/tests/foss_utils/clone_git_repo_on.rb
|
|
400
430
|
- acceptance/tests/hypervisor/communication.rb
|
|
401
431
|
- acceptance/tests/puppet/README.md
|
|
402
432
|
- acceptance/tests/puppet/install_smoke.rb
|
|
@@ -404,14 +434,6 @@ files:
|
|
|
404
434
|
- bin/beaker
|
|
405
435
|
- ext/completion/beaker-completion.bash
|
|
406
436
|
- lib/beaker.rb
|
|
407
|
-
- lib/beaker/answers.rb
|
|
408
|
-
- lib/beaker/answers/version20.rb
|
|
409
|
-
- lib/beaker/answers/version28.rb
|
|
410
|
-
- lib/beaker/answers/version30.rb
|
|
411
|
-
- lib/beaker/answers/version32.rb
|
|
412
|
-
- lib/beaker/answers/version34.rb
|
|
413
|
-
- lib/beaker/answers/version38.rb
|
|
414
|
-
- lib/beaker/answers/version40.rb
|
|
415
437
|
- lib/beaker/cli.rb
|
|
416
438
|
- lib/beaker/command.rb
|
|
417
439
|
- lib/beaker/command_factory.rb
|
|
@@ -434,6 +456,7 @@ files:
|
|
|
434
456
|
- lib/beaker/dsl/install_utils/pe_defaults.rb
|
|
435
457
|
- lib/beaker/dsl/install_utils/pe_utils.rb
|
|
436
458
|
- lib/beaker/dsl/install_utils/puppet_utils.rb
|
|
459
|
+
- lib/beaker/dsl/install_utils/windows_utils.rb
|
|
437
460
|
- lib/beaker/dsl/outcomes.rb
|
|
438
461
|
- lib/beaker/dsl/patterns.rb
|
|
439
462
|
- lib/beaker/dsl/roles.rb
|
|
@@ -447,6 +470,7 @@ files:
|
|
|
447
470
|
- lib/beaker/host/aix/user.rb
|
|
448
471
|
- lib/beaker/host/freebsd.rb
|
|
449
472
|
- lib/beaker/host/freebsd/exec.rb
|
|
473
|
+
- lib/beaker/host/freebsd/pkg.rb
|
|
450
474
|
- lib/beaker/host/mac.rb
|
|
451
475
|
- lib/beaker/host/mac/exec.rb
|
|
452
476
|
- lib/beaker/host/mac/group.rb
|
|
@@ -518,7 +542,6 @@ files:
|
|
|
518
542
|
- lib/beaker/test_case.rb
|
|
519
543
|
- lib/beaker/test_suite.rb
|
|
520
544
|
- lib/beaker/version.rb
|
|
521
|
-
- spec/beaker/answers_spec.rb
|
|
522
545
|
- spec/beaker/cli_spec.rb
|
|
523
546
|
- spec/beaker/command_spec.rb
|
|
524
547
|
- spec/beaker/dsl/assertions_spec.rb
|
|
@@ -535,6 +558,7 @@ files:
|
|
|
535
558
|
- spec/beaker/dsl/install_utils/pe_defaults_spec.rb
|
|
536
559
|
- spec/beaker/dsl/install_utils/pe_utils_spec.rb
|
|
537
560
|
- spec/beaker/dsl/install_utils/puppet_utils_spec.rb
|
|
561
|
+
- spec/beaker/dsl/install_utils/windows_utils_spec.rb
|
|
538
562
|
- spec/beaker/dsl/outcomes_spec.rb
|
|
539
563
|
- spec/beaker/dsl/roles_spec.rb
|
|
540
564
|
- spec/beaker/dsl/structure_spec.rb
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
module Beaker
|
|
2
|
-
# This class provides answer file information for PE version 2.0
|
|
3
|
-
#
|
|
4
|
-
# @api private
|
|
5
|
-
class Version20 < Answers
|
|
6
|
-
# Return answer data for a host
|
|
7
|
-
#
|
|
8
|
-
# @param [Beaker::Host] host Host to return data for
|
|
9
|
-
# @param [Beaker::Host] master Host object representing the master
|
|
10
|
-
# @param [Beaker::Host] dashboard Host object representing the dashboard
|
|
11
|
-
# @param [Hash] options options for answer files
|
|
12
|
-
# @option options [Symbol] :type Should be one of :upgrade or :install.
|
|
13
|
-
# @return [Hash] A hash (keyed from hosts) containing hashes of answer file
|
|
14
|
-
# data.
|
|
15
|
-
def host_answers(host, master, dashboard, options)
|
|
16
|
-
return nil if host['platform'] =~ /windows/
|
|
17
|
-
|
|
18
|
-
agent_a = {
|
|
19
|
-
:q_install => 'y',
|
|
20
|
-
:q_puppetagent_install => 'y',
|
|
21
|
-
:q_puppet_cloud_install => 'y',
|
|
22
|
-
:q_puppet_symlinks_install => 'y',
|
|
23
|
-
:q_vendor_packages_install => 'y',
|
|
24
|
-
:q_puppetagent_certname => host.to_s,
|
|
25
|
-
:q_puppetagent_server => master.to_s,
|
|
26
|
-
|
|
27
|
-
# Disable console and master by default
|
|
28
|
-
# This will be overridden by other blocks being merged in
|
|
29
|
-
:q_puppetmaster_install => 'n',
|
|
30
|
-
:q_puppet_enterpriseconsole_install => 'n',
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
master_dns_altnames = [master.to_s, master['ip'], 'puppet'].compact.uniq.join(',')
|
|
34
|
-
master_a = {
|
|
35
|
-
:q_puppetmaster_install => 'y',
|
|
36
|
-
:q_puppetmaster_certname => master.to_s,
|
|
37
|
-
:q_puppetmaster_dnsaltnames => master_dns_altnames,
|
|
38
|
-
:q_puppetmaster_enterpriseconsole_hostname => dashboard.to_s,
|
|
39
|
-
:q_puppetmaster_enterpriseconsole_port => answer_for(options, :q_puppetmaster_enterpriseconsole_port, 443),
|
|
40
|
-
:q_puppetmaster_forward_facts => 'y',
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
dashboard_user = "'#{answer_for(options, :q_puppet_enterpriseconsole_auth_user_email)}'"
|
|
44
|
-
smtp_host = "'#{answer_for(options, :q_puppet_enterpriseconsole_smtp_host, dashboard.to_s)}'"
|
|
45
|
-
dashboard_password = "'#{answer_for(options, :q_puppet_enterpriseconsole_auth_password)}'"
|
|
46
|
-
smtp_port = "'#{answer_for(options, :q_puppet_enterpriseconsole_smtp_port)}'"
|
|
47
|
-
smtp_username = answer_for(options, :q_puppet_enterpriseconsole_smtp_username)
|
|
48
|
-
smtp_password = answer_for(options, :q_puppet_enterpriseconsole_smtp_password)
|
|
49
|
-
smtp_use_tls = "'#{answer_for(options, :q_puppet_enterpriseconsole_smtp_use_tls)}'"
|
|
50
|
-
auth_database_name = answer_for(options, :q_puppet_enterpriseconsole_auth_database_name, 'console_auth')
|
|
51
|
-
auth_database_user = answer_for(options, :q_puppet_enterpriseconsole_auth_database_user, 'mYu7hu3r')
|
|
52
|
-
console_database_name = answer_for(options, :q_puppet_enterpriseconsole_database_name, 'console')
|
|
53
|
-
console_database_user = answer_for(options, :q_puppet_enterpriseconsole_database_user, 'mYc0nS03u3r')
|
|
54
|
-
console_inventory_port = answer_for(options, :q_puppet_enterpriseconsole_inventory_port, 8140)
|
|
55
|
-
console_httpd_port = answer_for(options, :q_puppet_enterpriseconsole_httpd_port, 443)
|
|
56
|
-
|
|
57
|
-
console_a = {
|
|
58
|
-
:q_puppet_enterpriseconsole_install => 'y',
|
|
59
|
-
:q_puppet_enterpriseconsole_database_install => 'y',
|
|
60
|
-
:q_puppet_enterpriseconsole_auth_database_name => auth_database_name,
|
|
61
|
-
:q_puppet_enterpriseconsole_auth_database_user => auth_database_user,
|
|
62
|
-
:q_puppet_enterpriseconsole_auth_database_password => dashboard_password,
|
|
63
|
-
:q_puppet_enterpriseconsole_database_name => console_database_name,
|
|
64
|
-
:q_puppet_enterpriseconsole_database_user => console_database_user,
|
|
65
|
-
:q_puppet_enterpriseconsole_database_root_password => dashboard_password,
|
|
66
|
-
:q_puppet_enterpriseconsole_database_password => dashboard_password,
|
|
67
|
-
:q_puppet_enterpriseconsole_inventory_hostname => host.to_s,
|
|
68
|
-
:q_puppet_enterpriseconsole_inventory_certname => host.to_s,
|
|
69
|
-
:q_puppet_enterpriseconsole_inventory_dnsaltnames => master.to_s,
|
|
70
|
-
:q_puppet_enterpriseconsole_inventory_port => console_inventory_port,
|
|
71
|
-
:q_puppet_enterpriseconsole_master_hostname => master.to_s,
|
|
72
|
-
:q_puppet_enterpriseconsole_auth_user_email => dashboard_user,
|
|
73
|
-
:q_puppet_enterpriseconsole_auth_password => dashboard_password,
|
|
74
|
-
:q_puppet_enterpriseconsole_httpd_port => console_httpd_port,
|
|
75
|
-
:q_puppet_enterpriseconsole_smtp_host => smtp_host,
|
|
76
|
-
:q_puppet_enterpriseconsole_smtp_use_tls => smtp_use_tls,
|
|
77
|
-
:q_puppet_enterpriseconsole_smtp_port => smtp_port,
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
console_a[:q_puppet_enterpriseconsole_auth_user] = console_a[:q_puppet_enterpriseconsole_auth_user_email]
|
|
81
|
-
|
|
82
|
-
if smtp_password and smtp_username
|
|
83
|
-
console_a.merge!({
|
|
84
|
-
:q_puppet_enterpriseconsole_smtp_password => "'#{smtp_password}'",
|
|
85
|
-
:q_puppet_enterpriseconsole_smtp_username => "'#{smtp_username}'",
|
|
86
|
-
:q_puppet_enterpriseconsole_smtp_user_auth => 'y'
|
|
87
|
-
})
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
answers = agent_a.dup
|
|
91
|
-
if host == master
|
|
92
|
-
answers.merge! master_a
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
if host == dashboard
|
|
96
|
-
answers.merge! console_a
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
return answers
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
# Return answer data for all hosts.
|
|
103
|
-
#
|
|
104
|
-
# @return [Hash] A hash (keyed from hosts) containing hashes of answer file
|
|
105
|
-
# data.
|
|
106
|
-
def generate_answers
|
|
107
|
-
the_answers = {}
|
|
108
|
-
dashboard = only_host_with_role(@hosts, 'dashboard')
|
|
109
|
-
master = only_host_with_role(@hosts, 'master')
|
|
110
|
-
@hosts.each do |h|
|
|
111
|
-
the_answers[h.name] = host_answers(h, master, dashboard, @options)
|
|
112
|
-
if the_answers[h.name] && h[:custom_answers]
|
|
113
|
-
the_answers[h.name] = the_answers[h.name].merge(h[:custom_answers])
|
|
114
|
-
end
|
|
115
|
-
h[:answers] = the_answers[h.name]
|
|
116
|
-
end
|
|
117
|
-
return the_answers
|
|
118
|
-
end
|
|
119
|
-
end
|
|
120
|
-
end
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
module Beaker
|
|
2
|
-
# This class provides answer file information for PE version 2.8
|
|
3
|
-
#
|
|
4
|
-
# @api private
|
|
5
|
-
class Version28 < Answers
|
|
6
|
-
|
|
7
|
-
# Return answer data for a host
|
|
8
|
-
#
|
|
9
|
-
# @param [Beaker::Host] host Host to return data for
|
|
10
|
-
# @param [Beaker::Host] master Host object representing the master
|
|
11
|
-
# @param [Beaker::Host] dashboard Host object representing the dashboard
|
|
12
|
-
# @param [Hash] options options for answer files
|
|
13
|
-
# @option options [Symbol] :type Should be one of :upgrade or :install.
|
|
14
|
-
# @return [Hash] A hash (keyed from hosts) containing hashes of answer file
|
|
15
|
-
# data.
|
|
16
|
-
def host_answers(host, master, dashboard, options)
|
|
17
|
-
return nil if host['platform'] =~ /windows/
|
|
18
|
-
|
|
19
|
-
agent_a = {
|
|
20
|
-
:q_install => 'y',
|
|
21
|
-
:q_puppetagent_install => 'y',
|
|
22
|
-
:q_puppet_cloud_install => 'y',
|
|
23
|
-
:q_puppet_symlinks_install => 'y',
|
|
24
|
-
:q_vendor_packages_install => 'y',
|
|
25
|
-
:q_puppetagent_certname => host.to_s,
|
|
26
|
-
:q_puppetagent_server => master.to_s,
|
|
27
|
-
|
|
28
|
-
# Disable console and master by default
|
|
29
|
-
# This will be overridden by other blocks being merged in
|
|
30
|
-
:q_puppetmaster_install => 'n',
|
|
31
|
-
:q_puppet_enterpriseconsole_install => 'n',
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
master_dns_altnames = [master.to_s, master['ip'], 'puppet'].compact.uniq.join(',')
|
|
35
|
-
master_a = {
|
|
36
|
-
:q_puppetmaster_install => 'y',
|
|
37
|
-
:q_puppetmaster_certname => master.to_s,
|
|
38
|
-
:q_puppetmaster_dnsaltnames => master_dns_altnames,
|
|
39
|
-
:q_puppetmaster_enterpriseconsole_hostname => dashboard.to_s,
|
|
40
|
-
:q_puppetmaster_enterpriseconsole_port => answer_for(options, :q_puppetmaster_enterpriseconsole_port, 443),
|
|
41
|
-
:q_puppetmaster_forward_facts => 'y',
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
dashboard_user = "'#{answer_for(options, :q_puppet_enterpriseconsole_auth_user_email)}'"
|
|
45
|
-
smtp_host = "'#{answer_for(options, :q_puppet_enterpriseconsole_smtp_host, dashboard.to_s)}'"
|
|
46
|
-
dashboard_password = "'#{answer_for(options, :q_puppet_enterpriseconsole_auth_password)}'"
|
|
47
|
-
smtp_port = "'#{answer_for(options, :q_puppet_enterpriseconsole_smtp_port)}'"
|
|
48
|
-
smtp_username = answer_for(options, :q_puppet_enterpriseconsole_smtp_username)
|
|
49
|
-
smtp_password = answer_for(options, :q_puppet_enterpriseconsole_smtp_password)
|
|
50
|
-
smtp_use_tls = "'#{answer_for(options, :q_puppet_enterpriseconsole_smtp_use_tls)}'"
|
|
51
|
-
auth_database_name = answer_for(options, :q_puppet_enterpriseconsole_auth_database_name, 'console_auth')
|
|
52
|
-
auth_database_user = answer_for(options, :q_puppet_enterpriseconsole_auth_database_user, 'mYu7hu3r')
|
|
53
|
-
console_database_name = answer_for(options, :q_puppet_enterpriseconsole_database_name, 'console')
|
|
54
|
-
console_database_user = answer_for(options, :q_puppet_enterpriseconsole_database_user, 'mYc0nS03u3r')
|
|
55
|
-
console_inventory_port = answer_for(options, :q_puppet_enterpriseconsole_inventory_port, 8140)
|
|
56
|
-
console_httpd_port = answer_for(options, :q_puppet_enterpriseconsole_httpd_port, 443)
|
|
57
|
-
|
|
58
|
-
console_a = {
|
|
59
|
-
:q_puppet_enterpriseconsole_install => 'y',
|
|
60
|
-
:q_puppet_enterpriseconsole_database_install => 'y',
|
|
61
|
-
:q_puppet_enterpriseconsole_auth_database_name => auth_database_name,
|
|
62
|
-
:q_puppet_enterpriseconsole_auth_database_user => auth_database_user,
|
|
63
|
-
:q_puppet_enterpriseconsole_auth_database_password => dashboard_password,
|
|
64
|
-
:q_puppet_enterpriseconsole_database_name => console_database_name,
|
|
65
|
-
:q_puppet_enterpriseconsole_database_user => console_database_user,
|
|
66
|
-
:q_puppet_enterpriseconsole_database_password => dashboard_password,
|
|
67
|
-
:q_puppet_enterpriseconsole_inventory_hostname => host.to_s,
|
|
68
|
-
:q_puppet_enterpriseconsole_inventory_certname => host.to_s,
|
|
69
|
-
:q_puppet_enterpriseconsole_inventory_dnsaltnames => master.to_s,
|
|
70
|
-
:q_puppet_enterpriseconsole_inventory_port => console_inventory_port,
|
|
71
|
-
:q_puppet_enterpriseconsole_master_hostname => master.to_s,
|
|
72
|
-
:q_puppet_enterpriseconsole_auth_user_email => dashboard_user,
|
|
73
|
-
:q_puppet_enterpriseconsole_auth_password => dashboard_password,
|
|
74
|
-
:q_puppet_enterpriseconsole_httpd_port => console_httpd_port,
|
|
75
|
-
:q_puppet_enterpriseconsole_smtp_host => smtp_host,
|
|
76
|
-
:q_puppet_enterpriseconsole_smtp_use_tls => smtp_use_tls,
|
|
77
|
-
:q_puppet_enterpriseconsole_smtp_port => smtp_port,
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
console_a[:q_puppet_enterpriseconsole_auth_user] = console_a[:q_puppet_enterpriseconsole_auth_user_email]
|
|
81
|
-
|
|
82
|
-
if smtp_password and smtp_username
|
|
83
|
-
console_a.merge!({
|
|
84
|
-
:q_puppet_enterpriseconsole_smtp_password => "'#{smtp_password}'",
|
|
85
|
-
:q_puppet_enterpriseconsole_smtp_username => "'#{smtp_username}'",
|
|
86
|
-
:q_puppet_enterpriseconsole_smtp_user_auth => 'y'
|
|
87
|
-
})
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
answers = agent_a.dup
|
|
91
|
-
if host == master
|
|
92
|
-
answers.merge! master_a
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
if host == dashboard
|
|
96
|
-
answers.merge! console_a
|
|
97
|
-
end
|
|
98
|
-
|
|
99
|
-
return answers
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
# Return answer data for all hosts.
|
|
103
|
-
#
|
|
104
|
-
# @return [Hash] A hash (keyed from hosts) containing hashes of answer file
|
|
105
|
-
# data.
|
|
106
|
-
def generate_answers
|
|
107
|
-
the_answers = {}
|
|
108
|
-
dashboard = only_host_with_role(@hosts, 'dashboard')
|
|
109
|
-
master = only_host_with_role(@hosts, 'master')
|
|
110
|
-
@hosts.each do |h|
|
|
111
|
-
the_answers[h.name] = host_answers(h, master, dashboard, @options)
|
|
112
|
-
if the_answers[h.name] && h[:custom_answers]
|
|
113
|
-
the_answers[h.name] = the_answers[h.name].merge(h[:custom_answers])
|
|
114
|
-
end
|
|
115
|
-
h[:answers] = the_answers[h.name]
|
|
116
|
-
end
|
|
117
|
-
return the_answers
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
end
|
|
121
|
-
end
|
|
@@ -1,227 +0,0 @@
|
|
|
1
|
-
module Beaker
|
|
2
|
-
# This class provides answer file information for PE version 3.x
|
|
3
|
-
#
|
|
4
|
-
# @api private
|
|
5
|
-
class Version30 < Answers
|
|
6
|
-
# Return answer data for a host
|
|
7
|
-
#
|
|
8
|
-
# @param [Beaker::Host] host Host to return data for
|
|
9
|
-
# @param [Beaker::Host] master Host object representing the master
|
|
10
|
-
# @param [Beaker::Host] dashboard Host object representing the dashboard
|
|
11
|
-
# @param [Hash] options options for answer files
|
|
12
|
-
# @option options [Symbol] :type Should be one of :upgrade or :install.
|
|
13
|
-
# @return [Hash] A hash (keyed from hosts) containing hashes of answer file
|
|
14
|
-
# data.
|
|
15
|
-
def host_answers(host, master, database, dashboard, options)
|
|
16
|
-
# Windows hosts don't have normal answers...
|
|
17
|
-
return nil if host['platform'] =~ /windows/
|
|
18
|
-
masterless = options[:masterless]
|
|
19
|
-
|
|
20
|
-
# Everything's an agent
|
|
21
|
-
agent_a = {
|
|
22
|
-
:q_puppetagent_install => answer_for(options, :q_puppetagent_install, 'y'),
|
|
23
|
-
:q_puppet_cloud_install => answer_for(options, :q_puppet_cloud_install, 'y'),
|
|
24
|
-
:q_verify_packages => answer_for(options, :q_verify_packages, 'y'),
|
|
25
|
-
:q_puppet_symlinks_install => answer_for(options, :q_puppet_symlinks_install, 'y'),
|
|
26
|
-
:q_puppetagent_certname => answer_for(options, :q_puppetagent_certname, host.to_s),
|
|
27
|
-
|
|
28
|
-
# Disable database, console, and master by default
|
|
29
|
-
# This will be overridden by other blocks being merged in.
|
|
30
|
-
:q_puppetmaster_install => answer_for(options, :q_puppetmaster_install, 'n'),
|
|
31
|
-
:q_all_in_one_install => answer_for(options, :q_all_in_one_install, 'n'),
|
|
32
|
-
:q_puppet_enterpriseconsole_install => answer_for(options, :q_puppet_enterpriseconsole_install, 'n'),
|
|
33
|
-
:q_puppetdb_install => answer_for(options, :q_puppetdb_install, 'n'),
|
|
34
|
-
:q_database_install => answer_for(options, :q_database_install, 'n'),
|
|
35
|
-
}
|
|
36
|
-
agent_a[:q_puppetagent_server] = masterless ? host.to_s : master.to_s
|
|
37
|
-
agent_a[:q_continue_or_reenter_master_hostname] = 'c' if masterless
|
|
38
|
-
|
|
39
|
-
# These base answers are needed by all
|
|
40
|
-
common_a = {
|
|
41
|
-
:q_install => answer_for(options, :q_install, 'y'),
|
|
42
|
-
:q_vendor_packages_install => answer_for(options, :q_vendor_packages_install, 'y'),
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
unless masterless
|
|
46
|
-
# master/database answers
|
|
47
|
-
master_database_a = {
|
|
48
|
-
:q_puppetmaster_certname => answer_for(options, :q_puppetmaster_certname, master.to_s)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
# Master/dashboard answers
|
|
52
|
-
master_console_a = {
|
|
53
|
-
:q_puppetdb_hostname => answer_for(options, :q_puppetdb_hostname, database.to_s),
|
|
54
|
-
:q_puppetdb_port => answer_for(options, :q_puppetdb_port, 8081)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
# Master only answers
|
|
58
|
-
master_dns_altnames = [master.to_s, master['ip'], 'puppet'].compact.uniq.join(',')
|
|
59
|
-
master_a = {
|
|
60
|
-
:q_puppetmaster_install => answer_for(options, :q_puppetmaster_install, 'y'),
|
|
61
|
-
:q_puppetmaster_dnsaltnames => master_dns_altnames,
|
|
62
|
-
:q_puppetmaster_enterpriseconsole_hostname => answer_for(options, :q_puppetmaster_enterpriseconsole_hostname, dashboard.to_s),
|
|
63
|
-
:q_puppetmaster_enterpriseconsole_port => answer_for(options, :q_puppetmaster_enterpriseconsole_port, 443),
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
# Common answers for console and database
|
|
67
|
-
console_auth_password = "'#{answer_for(options, :q_puppet_enterpriseconsole_auth_password)}'"
|
|
68
|
-
puppetdb_database_name = answer_for(options, :q_puppetdb_database_name, 'pe-puppetdb')
|
|
69
|
-
puppetdb_database_user = answer_for(options, :q_puppetdb_database_user, 'mYpdBu3r')
|
|
70
|
-
puppetdb_database_password = answer_for(options, :q_puppetdb_database_password, "'#{answer_for(options, :q_puppetdb_password)}'")
|
|
71
|
-
console_auth_database_name = answer_for(options, :q_puppet_enterpriseconsole_auth_database_name, 'console_auth')
|
|
72
|
-
console_auth_database_user = answer_for(options, :q_puppet_enterpriseconsole_auth_database_user, 'mYu7hu3r')
|
|
73
|
-
console_auth_database_password = answer_for(options, :q_puppet_enterpriseconsole_auth_database_password, console_auth_password)
|
|
74
|
-
console_database_name = answer_for(options, :q_puppet_enterpriseconsole_database_name, 'console')
|
|
75
|
-
console_database_user = answer_for(options, :q_puppet_enterpriseconsole_database_user, 'mYc0nS03u3r')
|
|
76
|
-
console_database_host = answer_for(options, :q_database_host, database.to_s)
|
|
77
|
-
console_database_port = answer_for(options, :q_database_port, 5432)
|
|
78
|
-
console_database_password = answer_for(options, :q_puppet_enterpriseconsole_database_password, console_auth_password)
|
|
79
|
-
|
|
80
|
-
console_database_a = {
|
|
81
|
-
:q_puppetdb_database_name => puppetdb_database_name,
|
|
82
|
-
:q_puppetdb_database_user => puppetdb_database_user,
|
|
83
|
-
:q_puppetdb_database_password => puppetdb_database_password,
|
|
84
|
-
:q_puppet_enterpriseconsole_auth_database_name => console_auth_database_name,
|
|
85
|
-
:q_puppet_enterpriseconsole_auth_database_user => console_auth_database_user,
|
|
86
|
-
:q_puppet_enterpriseconsole_auth_database_password => console_auth_database_password,
|
|
87
|
-
:q_puppet_enterpriseconsole_database_name => console_database_name,
|
|
88
|
-
:q_puppet_enterpriseconsole_database_user => console_database_user,
|
|
89
|
-
:q_puppet_enterpriseconsole_database_password => console_database_password,
|
|
90
|
-
:q_database_host => console_database_host,
|
|
91
|
-
:q_database_port => console_database_port,
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
# Console only answers
|
|
95
|
-
dashboard_user = "'#{answer_for(options, :q_puppet_enterpriseconsole_auth_user_email)}'"
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
console_install = answer_for(options, :q_puppet_enterpriseconsole_install, 'y')
|
|
99
|
-
console_inventory_hostname = answer_for(options, :q_puppet_enterpriseconsole_inventory_hostname, host.to_s)
|
|
100
|
-
console_inventory_certname = answer_for(options, :q_puppet_enterpriseconsole_inventory_certname, host.to_s)
|
|
101
|
-
console_inventory_dnsaltnames = answer_for(options, :q_puppet_enterpriseconsole_inventory_dnsaltnames, dashboard.to_s)
|
|
102
|
-
smtp_host = "'#{answer_for(options, :q_puppet_enterpriseconsole_smtp_host, dashboard.to_s)}'"
|
|
103
|
-
smtp_port = "'#{answer_for(options, :q_puppet_enterpriseconsole_smtp_port)}'"
|
|
104
|
-
smtp_username = answer_for(options, :q_puppet_enterpriseconsole_smtp_username)
|
|
105
|
-
smtp_password = answer_for(options, :q_puppet_enterpriseconsole_smtp_password)
|
|
106
|
-
smtp_use_tls = "'#{answer_for(options, :q_puppet_enterpriseconsole_smtp_use_tls)}'"
|
|
107
|
-
console_inventory_port = answer_for(options, :q_puppet_enterpriseconsole_inventory_port, 8140)
|
|
108
|
-
master_hostname = answer_for(options, :q_puppet_enterpriseconsole_master_hostname, master.to_s)
|
|
109
|
-
console_httpd_port = answer_for(options, :q_puppet_enterpriseconsole_httpd_port, 443)
|
|
110
|
-
|
|
111
|
-
console_a = {
|
|
112
|
-
:q_puppet_enterpriseconsole_install => console_install,
|
|
113
|
-
:q_puppet_enterpriseconsole_inventory_hostname => console_inventory_hostname,
|
|
114
|
-
:q_puppet_enterpriseconsole_inventory_certname => console_inventory_certname,
|
|
115
|
-
:q_puppet_enterpriseconsole_inventory_dnsaltnames => console_inventory_dnsaltnames,
|
|
116
|
-
:q_puppet_enterpriseconsole_inventory_port => console_inventory_port,
|
|
117
|
-
:q_puppet_enterpriseconsole_master_hostname => master_hostname,
|
|
118
|
-
:q_puppet_enterpriseconsole_auth_user_email => dashboard_user,
|
|
119
|
-
:q_puppet_enterpriseconsole_auth_password => console_auth_password,
|
|
120
|
-
:q_puppet_enterpriseconsole_httpd_port => console_httpd_port,
|
|
121
|
-
:q_puppet_enterpriseconsole_smtp_host => smtp_host,
|
|
122
|
-
:q_puppet_enterpriseconsole_smtp_use_tls => smtp_use_tls,
|
|
123
|
-
:q_puppet_enterpriseconsole_smtp_port => smtp_port,
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
if smtp_password and smtp_username
|
|
127
|
-
console_smtp_user_auth = answer_for(options, :q_puppet_enterpriseconsole_smtp_user_auth, 'y')
|
|
128
|
-
console_a.merge!({
|
|
129
|
-
:q_puppet_enterpriseconsole_smtp_password => "'#{smtp_password}'",
|
|
130
|
-
:q_puppet_enterpriseconsole_smtp_username => "'#{smtp_username}'",
|
|
131
|
-
:q_puppet_enterpriseconsole_smtp_user_auth => console_smtp_user_auth
|
|
132
|
-
})
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
# Database only answers
|
|
136
|
-
database_a = {
|
|
137
|
-
:q_puppetdb_install => answer_for(options, :q_puppetdb_install, 'y'),
|
|
138
|
-
:q_database_install => answer_for(options, :q_database_install, 'y'),
|
|
139
|
-
:q_database_root_password => "'#{answer_for(options, :q_database_root_password, '=ZYdjiP3jCwV5eo9s1MBd')}'",
|
|
140
|
-
:q_database_root_user => answer_for(options, :q_database_root_user, 'pe-postgres'),
|
|
141
|
-
}
|
|
142
|
-
end
|
|
143
|
-
|
|
144
|
-
# Special answers for special hosts
|
|
145
|
-
aix_a = {
|
|
146
|
-
:q_run_updtvpkg => answer_for(options, :q_run_updtvpkg, 'y'),
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
answers = common_a.dup
|
|
150
|
-
|
|
151
|
-
unless options[:type] == :upgrade
|
|
152
|
-
answers.merge! agent_a
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
if host == master
|
|
156
|
-
answers.merge! master_console_a
|
|
157
|
-
unless options[:type] == :upgrade
|
|
158
|
-
answers.merge! master_a
|
|
159
|
-
answers.merge! master_database_a
|
|
160
|
-
end
|
|
161
|
-
end
|
|
162
|
-
|
|
163
|
-
if host == dashboard
|
|
164
|
-
answers.merge! master_console_a
|
|
165
|
-
answers.merge! console_database_a
|
|
166
|
-
answers[:q_pe_database] = answer_for(options, :q_pe_database, 'y')
|
|
167
|
-
unless options[:type] == :upgrade
|
|
168
|
-
answers.merge! console_a
|
|
169
|
-
else
|
|
170
|
-
answers[:q_database_export_dir] = answer_for(options, :q_database_export_dir, '/tmp')
|
|
171
|
-
end
|
|
172
|
-
end
|
|
173
|
-
|
|
174
|
-
if host == database
|
|
175
|
-
if database != master
|
|
176
|
-
if options[:type] == :upgrade
|
|
177
|
-
# This is kinda annoying - if we're upgrading to 3.0 and are
|
|
178
|
-
# puppetdb, we're actually doing a clean install. We thus
|
|
179
|
-
# need the core agent answers.
|
|
180
|
-
answers.merge! agent_a
|
|
181
|
-
end
|
|
182
|
-
answers.merge! master_database_a
|
|
183
|
-
end
|
|
184
|
-
answers.merge! database_a
|
|
185
|
-
answers.merge! console_database_a
|
|
186
|
-
end
|
|
187
|
-
|
|
188
|
-
if host == master and host == database and host == dashboard
|
|
189
|
-
answers[:q_all_in_one_install] = 'y'
|
|
190
|
-
end
|
|
191
|
-
|
|
192
|
-
if host['platform'].include? 'aix'
|
|
193
|
-
answers.merge! aix_a
|
|
194
|
-
end
|
|
195
|
-
|
|
196
|
-
return answers
|
|
197
|
-
end
|
|
198
|
-
|
|
199
|
-
# Return answer data for all hosts.
|
|
200
|
-
#
|
|
201
|
-
# @return [Hash] A hash (keyed from hosts) containing hashes of answer file
|
|
202
|
-
# data.
|
|
203
|
-
def generate_answers
|
|
204
|
-
the_answers = {}
|
|
205
|
-
masterless = @options[:masterless]
|
|
206
|
-
database = masterless ? nil : only_host_with_role(@hosts, 'database')
|
|
207
|
-
dashboard = masterless ? nil : only_host_with_role(@hosts, 'dashboard')
|
|
208
|
-
master = masterless ? nil : only_host_with_role(@hosts, 'master')
|
|
209
|
-
@hosts.each do |h|
|
|
210
|
-
if @options[:type] == :upgrade and h[:pe_ver] =~ /\A3.0/
|
|
211
|
-
# 3.0.x to 3.0.x should require no answers
|
|
212
|
-
the_answers[h.name] = {
|
|
213
|
-
:q_install => answer_for(@options, :q_install, 'y'),
|
|
214
|
-
:q_install_vendor_packages => answer_for(@options, :q_install_vendor_packages, 'y'),
|
|
215
|
-
}
|
|
216
|
-
else
|
|
217
|
-
the_answers[h.name] = host_answers(h, master, database, dashboard, @options)
|
|
218
|
-
end
|
|
219
|
-
if the_answers[h.name] && h[:custom_answers]
|
|
220
|
-
the_answers[h.name] = the_answers[h.name].merge(h[:custom_answers])
|
|
221
|
-
end
|
|
222
|
-
h[:answers] = the_answers[h.name]
|
|
223
|
-
end
|
|
224
|
-
return the_answers
|
|
225
|
-
end
|
|
226
|
-
end
|
|
227
|
-
end
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
require 'beaker/answers/version30'
|
|
2
|
-
|
|
3
|
-
module Beaker
|
|
4
|
-
# This class provides answer file information for PE version 3.2
|
|
5
|
-
#
|
|
6
|
-
# @api private
|
|
7
|
-
class Version32 < Version30
|
|
8
|
-
# Return answer data for all hosts.
|
|
9
|
-
#
|
|
10
|
-
# @return [Hash] A hash (keyed from hosts) containing hashes of answer file
|
|
11
|
-
# data.
|
|
12
|
-
def generate_answers
|
|
13
|
-
masterless = @options[:masterless]
|
|
14
|
-
return super if masterless
|
|
15
|
-
|
|
16
|
-
dashboard = only_host_with_role(@hosts, 'dashboard')
|
|
17
|
-
database = only_host_with_role(@hosts, 'database')
|
|
18
|
-
master = only_host_with_role(@hosts, 'master')
|
|
19
|
-
|
|
20
|
-
the_answers = super
|
|
21
|
-
if dashboard != master
|
|
22
|
-
# in 3.2, dashboard needs the master certname
|
|
23
|
-
the_answers[dashboard.name][:q_puppetmaster_certname] = master.to_s
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# do we want to check for updates?
|
|
27
|
-
pe_check_for_updates = answer_for(@options, :q_pe_check_for_updates, 'n')
|
|
28
|
-
the_answers[dashboard.name][:q_pe_check_for_updates] = pe_check_for_updates
|
|
29
|
-
the_answers[master.name][:q_pe_check_for_updates] = pe_check_for_updates
|
|
30
|
-
|
|
31
|
-
if @options[:type] == :upgrade && dashboard != database
|
|
32
|
-
# In a split configuration, there is no way for the upgrader
|
|
33
|
-
# to know how much disk space is available for the database
|
|
34
|
-
# migration. We tell it to continue on, because we're
|
|
35
|
-
# awesome.
|
|
36
|
-
the_answers[dashboard.name][:q_upgrade_with_unknown_disk_space] = 'y'
|
|
37
|
-
end
|
|
38
|
-
@hosts.each do |h|
|
|
39
|
-
h[:answers] = the_answers[h.name]
|
|
40
|
-
end
|
|
41
|
-
return the_answers
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
require 'beaker/answers/version32'
|
|
2
|
-
|
|
3
|
-
module Beaker
|
|
4
|
-
# This class provides answer file information for PE version 3.4
|
|
5
|
-
#
|
|
6
|
-
# @api private
|
|
7
|
-
class Version34 < Version32
|
|
8
|
-
def generate_answers
|
|
9
|
-
masterless = @options[:masterless]
|
|
10
|
-
return super if masterless
|
|
11
|
-
|
|
12
|
-
dashboard = only_host_with_role(@hosts, 'dashboard')
|
|
13
|
-
database = only_host_with_role(@hosts, 'database')
|
|
14
|
-
|
|
15
|
-
the_answers = super
|
|
16
|
-
|
|
17
|
-
classifier_database_user = answer_for(@options, :q_classifier_database_user, 'DFGhjlkj')
|
|
18
|
-
classifier_database_name = answer_for(@options, :q_database_name, 'pe-classifier')
|
|
19
|
-
classifier_database_password = "'#{answer_for(@options, :q_classifier_database_password)}'"
|
|
20
|
-
activity_database_user = answer_for(@options, :q_activity_database_user, 'adsfglkj')
|
|
21
|
-
activity_database_name = answer_for(@options, :q_activity_database_name, 'pe-activity')
|
|
22
|
-
activity_database_password = "'#{answer_for(@options, :q_activity_database_password)}'"
|
|
23
|
-
rbac_database_user = answer_for(@options, :q_rbac_database_user, 'RbhNBklm')
|
|
24
|
-
rbac_database_name = answer_for(@options, :q_rbac_database_name, 'pe-rbac')
|
|
25
|
-
rbac_database_password = "'#{answer_for(@options, :q_rbac_database_password)}'"
|
|
26
|
-
|
|
27
|
-
console_services_hash = {
|
|
28
|
-
:q_classifier_database_user => classifier_database_user,
|
|
29
|
-
:q_classifier_database_name => classifier_database_name,
|
|
30
|
-
:q_classifier_database_password => classifier_database_password,
|
|
31
|
-
:q_activity_database_user => activity_database_user,
|
|
32
|
-
:q_activity_database_name => activity_database_name,
|
|
33
|
-
:q_activity_database_password => activity_database_password,
|
|
34
|
-
:q_rbac_database_user => rbac_database_user,
|
|
35
|
-
:q_rbac_database_name => rbac_database_name,
|
|
36
|
-
:q_rbac_database_password => rbac_database_password,
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
# If we're installing or upgrading from a non-RBAC version, set the 'admin' password
|
|
40
|
-
if @options[:type] == :upgrade && @options[:set_console_password]
|
|
41
|
-
dashboard_password = "'#{answer_for(@options, :q_puppet_enterpriseconsole_auth_password)}'"
|
|
42
|
-
the_answers[dashboard.name][:q_puppet_enterpriseconsole_auth_password] = dashboard_password
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
the_answers[dashboard.name].merge!(console_services_hash)
|
|
46
|
-
the_answers[database.name].merge!(console_services_hash)
|
|
47
|
-
|
|
48
|
-
return the_answers
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|