beaker 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/HISTORY.md +222 -4
- data/ext/completion/beaker-completion.bash +53 -0
- data/lib/beaker/answers/version30.rb +98 -93
- data/lib/beaker/answers/version32.rb +3 -0
- data/lib/beaker/answers/version34.rb +4 -1
- data/lib/beaker/dsl/helpers.rb +42 -1
- data/lib/beaker/dsl/install_utils.rb +76 -35
- data/lib/beaker/dsl/roles.rb +43 -15
- data/lib/beaker/host.rb +1 -0
- data/lib/beaker/host_prebuilt_steps.rb +10 -4
- data/lib/beaker/hypervisor/aws_sdk.rb +24 -9
- data/lib/beaker/hypervisor/openstack.rb +26 -1
- data/lib/beaker/hypervisor/vagrant.rb +8 -2
- data/lib/beaker/hypervisor/vagrant_virtualbox.rb +2 -0
- data/lib/beaker/options/presets.rb +1 -0
- data/lib/beaker/shared/host_manager.rb +21 -0
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/answers_spec.rb +38 -0
- data/spec/beaker/dsl/helpers_spec.rb +52 -0
- data/spec/beaker/dsl/install_utils_spec.rb +58 -1
- data/spec/beaker/dsl/roles_spec.rb +27 -2
- data/spec/beaker/host_spec.rb +18 -0
- data/spec/beaker/hypervisor/vagrant_spec.rb +11 -0
- data/spec/beaker/shared/host_manager_spec.rb +20 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjZjMDRmZTM0YjZiNDcyYmQ1M2FhZjJmOTk5NTM3YTVmOWRhODkxMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWQwNTBlZDExNGZiZWRkMmUxZjk2YjgxYTZiODA3N2NiYmJmYTc5Ng==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWQ2Yjc3ZDIzODAzMWViNTc5YmUxMmUyNjU0MWUyY2FkOTcwNzMyNTU4NjEx
|
10
|
+
NDQ3NTU5YTZjZDE1ZmMzYzExM2Y4MTFjMjMyMjRmMjNjZDljY2IzOGM2NWI1
|
11
|
+
NWMwMGU2ZDI2YTRjZTI0NzJiYWY1MTZhY2YxN2I1ZTI3MjVmZWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDM5N2I3YTE3MzViOWQ3MGUxZGNlYWE5YjEwMjE1ZTA3NjMzMjgwZWIwYWFi
|
14
|
+
ZjFiNTkwYjk0ZTY4NDdmNGZjMDJkMWM5ZTU4NTQ4YWRhNWU2ZTY2ZjBiMTA4
|
15
|
+
YjgzYWM4MGI0OTEzNDU0NDMwZDgxM2ZkMmEzOWI2ZWUwM2IwNTM=
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# default - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 29 Jan, 2015 (41028a79)](#LATEST)
|
4
|
+
* [beaker2.2.0 - 8 Jan, 2015 (cba5f7ed)](#beaker2.2.0)
|
4
5
|
* [beaker2.1.0 - 17 Dec, 2014 (ec089b1a)](#beaker2.1.0)
|
5
6
|
* [beaker2.0.0 - 5 Dec, 2014 (fb4b620b)](#beaker2.0.0)
|
6
7
|
* [beaker1.20.1 - 17 Oct, 2014 (be250ad6)](#beaker1.20.1)
|
@@ -67,7 +68,224 @@
|
|
67
68
|
* [pe1.2 - 6 Sep, 2011 (ba3dadd2)](#pe1.2)
|
68
69
|
|
69
70
|
## Details
|
70
|
-
### <a name = "LATEST">LATEST -
|
71
|
+
### <a name = "LATEST">LATEST - 29 Jan, 2015 (41028a79)
|
72
|
+
|
73
|
+
* (GEM) update beaker version to 2.3.0 (41028a79)
|
74
|
+
|
75
|
+
* Merge pull request #644 from electrical/hiera_config (420b01f2)
|
76
|
+
|
77
|
+
|
78
|
+
```
|
79
|
+
Merge pull request #644 from electrical/hiera_config
|
80
|
+
|
81
|
+
Add helper function to write hiera.yaml file
|
82
|
+
```
|
83
|
+
* Merge pull request #631 from mcanevet/feature/no_sync_folder (2920fe63)
|
84
|
+
|
85
|
+
|
86
|
+
```
|
87
|
+
Merge pull request #631 from mcanevet/feature/no_sync_folder
|
88
|
+
|
89
|
+
(GH-630) Add synced_folder option
|
90
|
+
```
|
91
|
+
* Merge pull request #645 from kevpl/qeng1714_aio_masterrolepaths (b825c65a)
|
92
|
+
|
93
|
+
|
94
|
+
```
|
95
|
+
Merge pull request #645 from kevpl/qeng1714_aio_masterrolepaths
|
96
|
+
|
97
|
+
(QENG-1714) fixed get_type for a machine with only non-agent roles
|
98
|
+
```
|
99
|
+
* (QENG-1714) fixed non-agent AIO path issue (eacd3d31)
|
100
|
+
|
101
|
+
* Merge pull request #657 from mcanevet/fix/el (25296221)
|
102
|
+
|
103
|
+
|
104
|
+
```
|
105
|
+
Merge pull request #657 from mcanevet/fix/el
|
106
|
+
|
107
|
+
(gh-656) fix "sudo: sorry, you must have a tty to run sudo"
|
108
|
+
```
|
109
|
+
* (gh-656) fix "sudo: sorry, you must have a tty to run sudo" (0cde5cc7)
|
110
|
+
|
111
|
+
* Merge pull request #649 from branan/maint (60993e0c)
|
112
|
+
|
113
|
+
|
114
|
+
```
|
115
|
+
Merge pull request #649 from branan/maint
|
116
|
+
|
117
|
+
(maint) Fix options access in PE 3.7 answers gen on upgrades
|
118
|
+
```
|
119
|
+
* (maint) Fix options access in PE 3.7 answers gen on upgrades (673015be)
|
120
|
+
|
121
|
+
* Merge pull request #638 from kevpl/qeng1690_aio_installpackages (c9535a35)
|
122
|
+
|
123
|
+
|
124
|
+
```
|
125
|
+
Merge pull request #638 from kevpl/qeng1690_aio_installpackages
|
126
|
+
|
127
|
+
(QENG-1690) added in helper installation method for packages
|
128
|
+
```
|
129
|
+
* Add helper functions to manage hiera config and data files (c464f5f6)
|
130
|
+
|
131
|
+
|
132
|
+
```
|
133
|
+
Add helper functions to manage hiera config and data files
|
134
|
+
|
135
|
+
- Added helper functions to manage hiera.yaml config file.
|
136
|
+
- Added helper functions to copy over hiera data files.
|
137
|
+
```
|
138
|
+
* Merge pull request #640 from petems/QENG-1695-improve_osx_support (5b050f6c)
|
139
|
+
|
140
|
+
|
141
|
+
```
|
142
|
+
Merge pull request #640 from petems/QENG-1695-improve_osx_support
|
143
|
+
|
144
|
+
(QENG-1695) Improves OSX Support
|
145
|
+
```
|
146
|
+
* (QENG-1690) added in helper installation method for packages (bba212cf)
|
147
|
+
|
148
|
+
|
149
|
+
```
|
150
|
+
(QENG-1690) added in helper installation method for packages
|
151
|
+
|
152
|
+
I had misunderstood the install_puppetlabs_dev_repo method before, thinking that it would install packages
|
153
|
+
from within the dev repo, but it's actually just installing the dev repo itself. These changes add a
|
154
|
+
corresponding installation method to install the packages found in these repos after they've been installed
|
155
|
+
```
|
156
|
+
* (QENG-1695) Improves OSX Support (9f78eeed)
|
157
|
+
|
158
|
+
|
159
|
+
```
|
160
|
+
(QENG-1695) Improves OSX Support
|
161
|
+
|
162
|
+
* Fixes for root key location copy
|
163
|
+
* Adds a Vagrant VB OSX option
|
164
|
+
* Fixes PermitRootLogin regex
|
165
|
+
* Adds option to enable GUI
|
166
|
+
* Raises error if version not given for DMG
|
167
|
+
|
168
|
+
Now works with an example OSX Virtualbox image :+1:
|
169
|
+
```
|
170
|
+
* Merge pull request #621 from stefanmortensen/fix_root_login (a5d4d9b4)
|
171
|
+
|
172
|
+
|
173
|
+
```
|
174
|
+
Merge pull request #621 from stefanmortensen/fix_root_login
|
175
|
+
|
176
|
+
(gh-620) Enable root if user is not root for the OpenStack hypervisor
|
177
|
+
```
|
178
|
+
* Merge pull request #622 from doug-rosser/volume_size (76b8def6)
|
179
|
+
|
180
|
+
|
181
|
+
```
|
182
|
+
Merge pull request #622 from doug-rosser/volume_size
|
183
|
+
|
184
|
+
(QENG-1676) Enable root volume size changes with volume_size in the config file
|
185
|
+
```
|
186
|
+
* Merge pull request #564 from mcanevet/fix/openstack_hypervisor (7c1c52b1)
|
187
|
+
|
188
|
+
|
189
|
+
```
|
190
|
+
Merge pull request #564 from mcanevet/fix/openstack_hypervisor
|
191
|
+
|
192
|
+
(GH-632) Fix Network creation
|
193
|
+
```
|
194
|
+
* Merge pull request #636 from branan/lol_old_el (e7545fa0)
|
195
|
+
|
196
|
+
|
197
|
+
```
|
198
|
+
Merge pull request #636 from branan/lol_old_el
|
199
|
+
|
200
|
+
(QENG-1684) Allow exit code of '1' when stopping puppet agent on centos4
|
201
|
+
```
|
202
|
+
* (QENG-1684) Allow exit code of '1' when stopping puppet agent on centos4 (589ea1e1)
|
203
|
+
|
204
|
+
|
205
|
+
```
|
206
|
+
(QENG-1684) Allow exit code of '1' when stopping puppet agent on centos4
|
207
|
+
|
208
|
+
When upgrading, the agent service is already stopped. On Centos4, this
|
209
|
+
causes a failure from the init script. We want to ignore that failure.
|
210
|
+
```
|
211
|
+
* (GH-630) Add synced_folder option (619ead3d)
|
212
|
+
|
213
|
+
* Merge pull request #597 from kevpl/qeng144_masterless_supportadd (7c88b74a)
|
214
|
+
|
215
|
+
|
216
|
+
```
|
217
|
+
Merge pull request #597 from kevpl/qeng144_masterless_supportadd
|
218
|
+
|
219
|
+
(QENG-144) created masterless option, and support for masterless installs
|
220
|
+
```
|
221
|
+
* (QENG-1676) Enable root volume size changes with volume_size in the config file (f62ba27d)
|
222
|
+
|
223
|
+
* Merge pull request #614 from anodelman/aws (981ab44d)
|
224
|
+
|
225
|
+
|
226
|
+
```
|
227
|
+
Merge pull request #614 from anodelman/aws
|
228
|
+
|
229
|
+
(QENG-1662) beaker smoketests failing on ec2 with security group error
|
230
|
+
```
|
231
|
+
* (gh-620) Enable root if user is not root for the OpenStack hypervisor (3062d505)
|
232
|
+
|
233
|
+
* (QENG-1662) beaker smoketests failing on ec2 with security group error (9948ff49)
|
234
|
+
|
235
|
+
|
236
|
+
```
|
237
|
+
(QENG-1662) beaker smoketests failing on ec2 with security group error
|
238
|
+
|
239
|
+
- ensure when looking for an appropriate security group that you are
|
240
|
+
looking in a) the provided vpc, b) in the default vpc or c) the
|
241
|
+
appropriate region if no default vpc is defined - do not allow
|
242
|
+
a mix of vpcs.
|
243
|
+
```
|
244
|
+
* Merge pull request #602 from er0ck/feature/master/QENG-1628-add_bash_completion_scripts_for_beaker (1d6c9437)
|
245
|
+
|
246
|
+
|
247
|
+
```
|
248
|
+
Merge pull request #602 from er0ck/feature/master/QENG-1628-add_bash_completion_scripts_for_beaker
|
249
|
+
|
250
|
+
(QENG-1628) Add bash completion scripts for beaker
|
251
|
+
```
|
252
|
+
* Merge pull request #604 from kevpl/qeng1631_eos_successfail (d93961d8)
|
253
|
+
|
254
|
+
|
255
|
+
```
|
256
|
+
Merge pull request #604 from kevpl/qeng1631_eos_successfail
|
257
|
+
|
258
|
+
(QENG-1631) allowed exit code 0 for puppet agent call for EOS during install
|
259
|
+
```
|
260
|
+
* Merge pull request #610 from electrical/vagrant_stderr (1c2e33d4)
|
261
|
+
|
262
|
+
|
263
|
+
```
|
264
|
+
Merge pull request #610 from electrical/vagrant_stderr
|
265
|
+
|
266
|
+
Add stderr output to stacktrace
|
267
|
+
```
|
268
|
+
* (QENG-1631) allowed exit code 0 for puppet agent call for EOS during install (8b466d81)
|
269
|
+
|
270
|
+
* (MAINT) Add stderr output to stacktrace (f43a94c4)
|
271
|
+
|
272
|
+
* (QENG-1628) Add bash completion scripts for beaker (a71896b4)
|
273
|
+
|
274
|
+
|
275
|
+
```
|
276
|
+
(QENG-1628) Add bash completion scripts for beaker
|
277
|
+
|
278
|
+
using this script, one can press tab after any portion (or none)
|
279
|
+
of a beaker option/command and bash will complete it or offer
|
280
|
+
suggestions.
|
281
|
+
```
|
282
|
+
* (QENG-144) created masterless option, and support for masterless installs (57391c27)
|
283
|
+
|
284
|
+
* (GH-632) Fix Network creation (3ffff71e)
|
285
|
+
|
286
|
+
### <a name = "beaker2.2.0">beaker2.2.0 - 8 Jan, 2015 (cba5f7ed)
|
287
|
+
|
288
|
+
* (HISTORY) update beaker history for gem release 2.2.0 (cba5f7ed)
|
71
289
|
|
72
290
|
* (GEM) update beaker version to 2.2.0 (4dde5f3a)
|
73
291
|
|
@@ -363,10 +581,10 @@ Once that was fixed, beaker worked.
|
|
363
581
|
```
|
364
582
|
* (gh-568) Throw descriptive exception when no snapshot exists (2496a73e)
|
365
583
|
|
366
|
-
* (gh-568) Allow snapshot option to be optional (d7b6d4e6)
|
367
|
-
|
368
584
|
* (gh-568) Allow snapshot option to be optional (838709b5)
|
369
585
|
|
586
|
+
* (gh-568) Allow snapshot option to be optional (d7b6d4e6)
|
587
|
+
|
370
588
|
* (MAINT) exclude copying vendor dir to clients (5fec6251)
|
371
589
|
|
372
590
|
* (QENG-1562) added AIO installation support for yum/apt on FOSS (eb4528c5)
|
@@ -0,0 +1,53 @@
|
|
1
|
+
## bash completion script for beaker
|
2
|
+
|
3
|
+
# The contained completion routines provide support for completing:
|
4
|
+
#
|
5
|
+
# *) any option specified in beaker --help
|
6
|
+
# but not yet the arguments to the options
|
7
|
+
|
8
|
+
# To use these routines:
|
9
|
+
#
|
10
|
+
# 1) Copy this file to somewhere (e.g. ~/.beaker-completion.sh).
|
11
|
+
# 2) Add the following line to your .bashrc/.zshrc:
|
12
|
+
# source ~/.beaker-completion.sh
|
13
|
+
# 3) tab will now complete beaker's command line options
|
14
|
+
|
15
|
+
_beaker_complete()
|
16
|
+
{
|
17
|
+
# COMP_WORDS is an array of words in the current command line.
|
18
|
+
# COMP_CWORD is the index of the current word (the one the cursor is
|
19
|
+
# in). So COMP_WORDS[COMP_CWORD] is the current word; we also record
|
20
|
+
# the previous word here, although this specific script doesn't
|
21
|
+
# use it yet.
|
22
|
+
local cur_word="${COMP_WORDS[COMP_CWORD]}"
|
23
|
+
local prev_word="${COMP_WORDS[COMP_CWORD-1]}"
|
24
|
+
|
25
|
+
# Ask beaker to generate a list of args
|
26
|
+
# ensure other warnings/errors on stderr go to null
|
27
|
+
local beaker_help=`beaker --help 2>/dev/null`
|
28
|
+
|
29
|
+
# parse out commands and switches
|
30
|
+
# grep extended regex, only print match
|
31
|
+
local dash_words=`echo "${beaker_help}" | grep -oE ' \-(\w|\[|\]|-)+' | uniq`
|
32
|
+
# parse for negated commands
|
33
|
+
local negative_words=`echo "${dash_words}" | grep -oE '\-\-\[\w+-\](\w|-)+' | sed 's/\[//' | sed 's/\]//'`
|
34
|
+
# remove the negative portion from dash_words
|
35
|
+
local dash_words=`echo "${dash_words}" | sed 's/\[no\-\]//g'`
|
36
|
+
|
37
|
+
# TODO:
|
38
|
+
# Parse out arguments to commands
|
39
|
+
# Perform completion if the previous word is doubledash option and current word in argslist,
|
40
|
+
|
41
|
+
# Perform completion if the current word starts with a dash ('-'),
|
42
|
+
if [[ ${cur_word} == -* ]] ; then
|
43
|
+
# COMPREPLY is the array of possible completions, generated with
|
44
|
+
# the compgen builtin.
|
45
|
+
COMPREPLY=( $(compgen -W "${dash_words} ${negative_words}" -- ${cur_word}) )
|
46
|
+
else
|
47
|
+
COMPREPLY=()
|
48
|
+
fi
|
49
|
+
return 0
|
50
|
+
}
|
51
|
+
|
52
|
+
# Register _beaker_complete to provide completion for the following commands
|
53
|
+
complete -F _beaker_complete beaker pe-beaker
|
@@ -15,6 +15,7 @@ module Beaker
|
|
15
15
|
def host_answers(host, master, database, dashboard, options)
|
16
16
|
# Windows hosts don't have normal answers...
|
17
17
|
return nil if host['platform'] =~ /windows/
|
18
|
+
masterless = options[:masterless]
|
18
19
|
|
19
20
|
# Everything's an agent
|
20
21
|
agent_a = {
|
@@ -23,7 +24,6 @@ module Beaker
|
|
23
24
|
:q_verify_packages => options[:answers][:q_verify_packages],
|
24
25
|
:q_puppet_symlinks_install => 'y',
|
25
26
|
:q_puppetagent_certname => host,
|
26
|
-
:q_puppetagent_server => master,
|
27
27
|
|
28
28
|
# Disable database, console, and master by default
|
29
29
|
# This will be overridden by other blocks being merged in.
|
@@ -33,6 +33,8 @@ module Beaker
|
|
33
33
|
:q_puppetdb_install => 'n',
|
34
34
|
:q_database_install => 'n',
|
35
35
|
}
|
36
|
+
agent_a[:q_puppetagent_server] = masterless ? host : master
|
37
|
+
agent_a[:q_continue_or_reenter_master_hostname] = 'c' if masterless
|
36
38
|
|
37
39
|
# These base answers are needed by all
|
38
40
|
common_a = {
|
@@ -40,98 +42,100 @@ module Beaker
|
|
40
42
|
:q_vendor_packages_install => 'y',
|
41
43
|
}
|
42
44
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
45
|
+
unless masterless
|
46
|
+
# master/database answers
|
47
|
+
master_database_a = {
|
48
|
+
:q_puppetmaster_certname => master
|
49
|
+
}
|
50
|
+
|
51
|
+
# Master/dashboard answers
|
52
|
+
master_console_a = {
|
53
|
+
:q_puppetdb_hostname => database,
|
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 => 'y',
|
61
|
+
:q_puppetmaster_dnsaltnames => master_dns_altnames,
|
62
|
+
:q_puppetmaster_enterpriseconsole_hostname => dashboard,
|
63
|
+
:q_puppetmaster_enterpriseconsole_port => answer_for(options, :q_puppetmaster_enterpriseconsole_port, 443),
|
64
|
+
}
|
65
|
+
|
66
|
+
# Common answers for console and database
|
67
|
+
database_name = answer_for(options, :q_puppetdb_database_name, 'pe-puppetdb')
|
68
|
+
database_user = answer_for(options, :q_puppetdb_database_user, 'mYpdBu3r')
|
69
|
+
dashboard_password = "'#{options[:answers][:q_puppet_enterpriseconsole_auth_password]}'"
|
70
|
+
puppetdb_password = "'#{options[:answers][:q_puppetdb_password]}'"
|
71
|
+
auth_database_name = answer_for(options, :q_puppet_enterpriseconsole_auth_database_name, 'console_auth')
|
72
|
+
auth_database_user = answer_for(options, :q_puppet_enterpriseconsole_auth_database_user, 'mYu7hu3r')
|
73
|
+
console_database_name = answer_for(options, :q_puppet_enterpriseconsole_database_name, 'console')
|
74
|
+
console_database_user = answer_for(options, :q_puppet_enterpriseconsole_database_user, 'mYc0nS03u3r')
|
75
|
+
database_port = answer_for(options, :q_database_port, 5432)
|
76
|
+
|
77
|
+
console_database_a = {
|
78
|
+
:q_puppetdb_database_name => database_name,
|
79
|
+
:q_puppetdb_database_user => database_user,
|
80
|
+
:q_puppetdb_database_password => puppetdb_password,
|
81
|
+
:q_puppet_enterpriseconsole_auth_database_name => auth_database_name,
|
82
|
+
:q_puppet_enterpriseconsole_auth_database_user => auth_database_user,
|
83
|
+
:q_puppet_enterpriseconsole_auth_database_password => dashboard_password,
|
84
|
+
:q_puppet_enterpriseconsole_database_name => console_database_name,
|
85
|
+
:q_puppet_enterpriseconsole_database_user => console_database_user,
|
86
|
+
:q_puppet_enterpriseconsole_database_password => dashboard_password,
|
87
|
+
|
88
|
+
:q_database_host => database,
|
89
|
+
:q_database_port => database_port,
|
90
|
+
}
|
91
|
+
|
92
|
+
# Console only answers
|
93
|
+
dashboard_user = "'#{options[:answers][:q_puppet_enterpriseconsole_auth_user_email]}'"
|
94
|
+
|
95
|
+
|
96
|
+
smtp_host = "'#{options[:answers][:q_puppet_enterpriseconsole_smtp_host] || dashboard}'"
|
97
|
+
smtp_port = "'#{options[:answers][:q_puppet_enterpriseconsole_smtp_port]}'"
|
98
|
+
smtp_username = options[:answers][:q_puppet_enterpriseconsole_smtp_username]
|
99
|
+
smtp_password = options[:answers][:q_puppet_enterpriseconsole_smtp_password]
|
100
|
+
smtp_use_tls = "'#{options[:answers][:q_puppet_enterpriseconsole_smtp_use_tls]}'"
|
101
|
+
console_inventory_port = answer_for(options, :q_puppet_enterpriseconsole_inventory_port, 8140)
|
102
|
+
console_httpd_port = answer_for(options, :q_puppet_enterpriseconsole_httpd_port, 443)
|
103
|
+
|
104
|
+
console_a = {
|
105
|
+
:q_puppet_enterpriseconsole_install => 'y',
|
106
|
+
:q_puppet_enterpriseconsole_inventory_hostname => host,
|
107
|
+
:q_puppet_enterpriseconsole_inventory_certname => host,
|
108
|
+
:q_puppet_enterpriseconsole_inventory_dnsaltnames => dashboard,
|
109
|
+
:q_puppet_enterpriseconsole_inventory_port => console_inventory_port,
|
110
|
+
:q_puppet_enterpriseconsole_master_hostname => master,
|
111
|
+
|
112
|
+
:q_puppet_enterpriseconsole_auth_user_email => dashboard_user,
|
113
|
+
:q_puppet_enterpriseconsole_auth_password => dashboard_password,
|
114
|
+
|
115
|
+
:q_puppet_enterpriseconsole_httpd_port => console_httpd_port,
|
116
|
+
|
117
|
+
:q_puppet_enterpriseconsole_smtp_host => smtp_host,
|
118
|
+
:q_puppet_enterpriseconsole_smtp_use_tls => smtp_use_tls,
|
119
|
+
:q_puppet_enterpriseconsole_smtp_port => smtp_port,
|
120
|
+
}
|
121
|
+
|
122
|
+
if smtp_password and smtp_username
|
123
|
+
console_a.merge!({
|
124
|
+
:q_puppet_enterpriseconsole_smtp_password => "'#{smtp_password}'",
|
125
|
+
:q_puppet_enterpriseconsole_smtp_username => "'#{smtp_username}'",
|
126
|
+
:q_puppet_enterpriseconsole_smtp_user_auth => 'y'
|
127
|
+
})
|
128
|
+
end
|
118
129
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
130
|
+
# Database only answers
|
131
|
+
database_a = {
|
132
|
+
:q_puppetdb_install => 'y',
|
133
|
+
:q_database_install => 'y',
|
134
|
+
:q_database_root_password => "'#{answer_for(options, :q_database_root_password, '=ZYdjiP3jCwV5eo9s1MBd')}'",
|
135
|
+
:q_database_root_user => answer_for(options, :q_database_root_user, 'pe-postgres'),
|
136
|
+
}
|
125
137
|
end
|
126
138
|
|
127
|
-
# Database only answers
|
128
|
-
database_a = {
|
129
|
-
:q_puppetdb_install => 'y',
|
130
|
-
:q_database_install => 'y',
|
131
|
-
:q_database_root_password => "'#{answer_for(options, :q_database_root_password, '=ZYdjiP3jCwV5eo9s1MBd')}'",
|
132
|
-
:q_database_root_user => answer_for(options, :q_database_root_user, 'pe-postgres'),
|
133
|
-
}
|
134
|
-
|
135
139
|
# Special answers for special hosts
|
136
140
|
aix_a = {
|
137
141
|
:q_run_updtvpkg => 'y',
|
@@ -193,9 +197,10 @@ module Beaker
|
|
193
197
|
# data.
|
194
198
|
def generate_answers
|
195
199
|
the_answers = {}
|
196
|
-
|
197
|
-
|
198
|
-
|
200
|
+
masterless = @options[:masterless]
|
201
|
+
database = masterless ? nil : only_host_with_role(@hosts, 'database')
|
202
|
+
dashboard = masterless ? nil : only_host_with_role(@hosts, 'dashboard')
|
203
|
+
master = masterless ? nil : only_host_with_role(@hosts, 'master')
|
199
204
|
@hosts.each do |h|
|
200
205
|
if @options[:type] == :upgrade and h[:pe_ver] =~ /\A3.0/
|
201
206
|
# 3.0.x to 3.0.x should require no answers
|