beaker 1.19.1 → 1.20.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 +295 -4
- data/README.md +4 -0
- data/lib/beaker/answers/version20.rb +103 -107
- data/lib/beaker/answers/version28.rb +111 -115
- data/lib/beaker/answers/version30.rb +194 -192
- data/lib/beaker/answers/version32.rb +27 -22
- data/lib/beaker/answers/version34.rb +6 -6
- data/lib/beaker/answers.rb +55 -21
- data/lib/beaker/cli.rb +13 -11
- data/lib/beaker/dsl/helpers.rb +2 -2
- data/lib/beaker/dsl/install_utils.rb +2 -4
- data/lib/beaker/host.rb +9 -5
- data/lib/beaker/host_prebuilt_steps.rb +33 -20
- data/lib/beaker/hypervisor/aws_sdk.rb +12 -10
- data/lib/beaker/hypervisor/ec2_helper.rb +1 -0
- data/lib/beaker/hypervisor/google_compute.rb +0 -1
- data/lib/beaker/hypervisor/vagrant.rb +11 -16
- data/lib/beaker/hypervisor/vagrant_fusion.rb +17 -0
- data/lib/beaker/hypervisor/vagrant_virtualbox.rb +26 -0
- data/lib/beaker/hypervisor/vagrant_workstation.rb +13 -0
- data/lib/beaker/hypervisor/vcloud_pooled.rb +3 -1
- data/lib/beaker/hypervisor.rb +22 -13
- data/lib/beaker/logger.rb +29 -0
- data/lib/beaker/options/command_line_parser.rb +2 -0
- data/lib/beaker/options/parser.rb +5 -4
- data/lib/beaker/options/presets.rb +58 -35
- data/lib/beaker/version.rb +1 -1
- data/spec/beaker/answers_spec.rb +156 -135
- data/spec/beaker/cli_spec.rb +35 -2
- data/spec/beaker/dsl/install_utils_spec.rb +2 -3
- data/spec/beaker/host_prebuilt_steps_spec.rb +47 -24
- data/spec/beaker/host_spec.rb +6 -6
- data/spec/beaker/hypervisor/ec2_helper_spec.rb +2 -2
- data/spec/beaker/hypervisor/hypervisor_spec.rb +35 -0
- data/spec/beaker/hypervisor/vagrant_fusion_spec.rb +34 -0
- data/spec/beaker/hypervisor/vagrant_spec.rb +39 -2
- data/spec/beaker/hypervisor/vagrant_virtualbox_spec.rb +34 -0
- data/spec/beaker/hypervisor/vagrant_workstation_spec.rb +34 -0
- data/spec/beaker/logger_spec.rb +30 -0
- data/spec/beaker/options/presets_spec.rb +4 -4
- data/spec/helpers.rb +2 -1
- data/spec/mocks.rb +5 -1
- metadata +9 -60
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTYxMDEzNzUwMmQwMDgwOTYyMTc3NzAyZTY5MzRlMzVmOTc1MmUzNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTVjNjAzZjE5ODUyOWUwZTgzZTY1MzEyZDg3NmNkMzMwOGFkODdjZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjNhZThjMGM2NzNlZWVjZTEwYjRiMjgzNDg2MzcyMWQ5N2IxODM0NTA4MTdj
|
10
|
+
NDAwZDY5MGQwOTU3ZDQ3MDFkOTc0ZTI1NWFiNWIyZDUxMDVmMmRhNjQ1ODU2
|
11
|
+
ZjZhOGZhMmI1YmE4NWE3ODRiOWE4NmFhNjlmNzc1MzU3ZDcyNWU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YTA2ZGVjNTk0MTI5MjMwYmNlYjdhMWI3NWEwNTE3MzIzNzU1ZTg2NTJmYzdm
|
14
|
+
YWQxYjY5ZjQ3MDZmN2UzM2U5ODVjYzY2YjNlNDc4MzgzMjA1NTJhN2JmYmQ1
|
15
|
+
OGZhNWZlOWVhNDNmYjkwYmQ3YTE1NTI1ZTAxZTU1MTI0YzcwZDc=
|
data/HISTORY.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
-
#
|
1
|
+
# default - History
|
2
2
|
## Tags
|
3
|
-
* [LATEST -
|
3
|
+
* [LATEST - 17 Oct, 2014 (ab118389)](#LATEST)
|
4
|
+
* [beaker1.19.1 - 19 Sep, 2014 (3aafc71d)](#beaker1.19.1)
|
4
5
|
* [beaker1.19.0 - 19 Sep, 2014 (6a56cc90)](#beaker1.19.0)
|
5
6
|
* [beaker1.18.0 - 18 Sep, 2014 (b9171d9c)](#beaker1.18.0)
|
6
7
|
* [beaker1.17.7 - 2 Sep, 2014 (e47881f0)](#beaker1.17.7)
|
@@ -62,9 +63,299 @@
|
|
62
63
|
* [pe1.2 - 6 Sep, 2011 (ba3dadd2)](#pe1.2)
|
63
64
|
|
64
65
|
## Details
|
65
|
-
### <a name = "LATEST">LATEST -
|
66
|
+
### <a name = "LATEST">LATEST - 17 Oct, 2014 (ab118389)
|
66
67
|
|
67
|
-
* (
|
68
|
+
* (GEM) update beaker version to 1.20.0 (ab118389)
|
69
|
+
|
70
|
+
* Merge pull request #497 from briancain/QENG1391/master/use-tls-for-pe-curl (d03ec9b6)
|
71
|
+
|
72
|
+
|
73
|
+
```
|
74
|
+
Merge pull request #497 from briancain/QENG1391/master/use-tls-for-pe-curl
|
75
|
+
|
76
|
+
[UNDER REVIEW](QENG-1391) Use TLSv1 over SSLv3 for curl against PE
|
77
|
+
```
|
78
|
+
* Merge pull request #498 from anodelman/ec2 (57f30946)
|
79
|
+
|
80
|
+
|
81
|
+
```
|
82
|
+
Merge pull request #498 from anodelman/ec2
|
83
|
+
|
84
|
+
(MAINT) open port 4435 for dashboard
|
85
|
+
```
|
86
|
+
* (MAINT) open port 4435 for dashboard (aa4af898)
|
87
|
+
|
88
|
+
|
89
|
+
```
|
90
|
+
(MAINT) open port 4435 for dashboard
|
91
|
+
|
92
|
+
yup, do that
|
93
|
+
```
|
94
|
+
* Merge pull request #446 from branan/use_vmpooler_fqdn (00e77f59)
|
95
|
+
|
96
|
+
|
97
|
+
```
|
98
|
+
Merge pull request #446 from branan/use_vmpooler_fqdn
|
99
|
+
|
100
|
+
(QENG-1192) Use hostname specified by hypervisor everywhere.
|
101
|
+
```
|
102
|
+
* (QENG-1391) Use TLSv1 over SSLv3 for curl against PE (6449a3b6)
|
103
|
+
|
104
|
+
|
105
|
+
```
|
106
|
+
(QENG-1391) Use TLSv1 over SSLv3 for curl against PE
|
107
|
+
|
108
|
+
Prior to this commit, beaker was exclusively using SSLv3 against Puppet
|
109
|
+
Enterprise. Due to the recent information with POODLE, this commit updates
|
110
|
+
beaker to use TLS over SSL since we are disabling the use
|
111
|
+
of SSLv3.
|
112
|
+
```
|
113
|
+
* Merge pull request #475 from er0ck/feature/master/QENG-1231-preserve_hosts_onpass (fa56d804)
|
114
|
+
|
115
|
+
|
116
|
+
```
|
117
|
+
Merge pull request #475 from er0ck/feature/master/QENG-1231-preserve_hosts_onpass
|
118
|
+
|
119
|
+
(QENG-1231) add onpass option to --preserve-hosts
|
120
|
+
```
|
121
|
+
* Merge pull request #486 from kevpl/qeng270_ntp_addoption (821884e6)
|
122
|
+
|
123
|
+
|
124
|
+
```
|
125
|
+
Merge pull request #486 from kevpl/qeng270_ntp_addoption
|
126
|
+
|
127
|
+
(QENG-270) Added ntp_server as an option for host config
|
128
|
+
```
|
129
|
+
* Merge pull request #490 from anodelman/ec2 (d12ba02d)
|
130
|
+
|
131
|
+
|
132
|
+
```
|
133
|
+
Merge pull request #490 from anodelman/ec2
|
134
|
+
|
135
|
+
(QENG-1205) EC2 zombie killer can fail when instance not found
|
136
|
+
```
|
137
|
+
* (QENG-1205) EC2 zombie killer can fail when instance not found (270d6417)
|
138
|
+
|
139
|
+
|
140
|
+
```
|
141
|
+
(QENG-1205) EC2 zombie killer can fail when instance not found
|
142
|
+
|
143
|
+
- better error handling around zombie killing
|
144
|
+
```
|
145
|
+
* (QENG-270) Added ntp_server as an option for host config (b148b657)
|
146
|
+
|
147
|
+
|
148
|
+
```
|
149
|
+
(QENG-270) Added ntp_server as an option for host config
|
150
|
+
|
151
|
+
Before this, you couldn't specify an ntp server, so if you used the timesync option, it would only use the hard-coded value 'pool.ntp.org'.
|
152
|
+
This was a problem because occasionally that service couldn't be reached. In order to fix this, we've allowed people to specify a server, so that they can get more reliable ntp services, and not see failures based on being able to reach one.
|
153
|
+
```
|
154
|
+
* Merge pull request #377 from waynr/feature/qeng-967-disable-iptables-on-el-hosts (c9145e5d)
|
155
|
+
|
156
|
+
|
157
|
+
```
|
158
|
+
Merge pull request #377 from waynr/feature/qeng-967-disable-iptables-on-el-hosts
|
159
|
+
|
160
|
+
(QENG-967) Disable iptables on el hosts bringup.
|
161
|
+
```
|
162
|
+
* Merge pull request #452 from anodelman/maint (c46271e0)
|
163
|
+
|
164
|
+
|
165
|
+
```
|
166
|
+
Merge pull request #452 from anodelman/maint
|
167
|
+
|
168
|
+
(QENG-1209) scp in debug output shows far too much output
|
169
|
+
```
|
170
|
+
* (QENG-1192) Use hostname specified by hypervisor everywhere (db171537)
|
171
|
+
|
172
|
+
|
173
|
+
```
|
174
|
+
(QENG-1192) Use hostname specified by hypervisor everywhere
|
175
|
+
|
176
|
+
reviously, we would call out to `hostname` on the SUT when deploying
|
177
|
+
PE. This may give us a name that isn't resolvable our routable by
|
178
|
+
every host in the configuration. We should instead just use whatever
|
179
|
+
the hypervisor tells us is the correct way to connect to the host.
|
180
|
+
|
181
|
+
This also sneaks in a small change to the vmpooler hypervisor, to make
|
182
|
+
it return FQDNs. Using these FQDNs is really what this is all about.
|
183
|
+
```
|
184
|
+
* Merge pull request #271 from hunner/add_fusion (9a00806f)
|
185
|
+
|
186
|
+
|
187
|
+
```
|
188
|
+
Merge pull request #271 from hunner/add_fusion
|
189
|
+
|
190
|
+
(QENG-1146) Add vagrant_fusion, vagrant_workstation and vagrant_virtualbox providers
|
191
|
+
```
|
192
|
+
* remove non-capture from regex groups (8e65b146)
|
193
|
+
|
194
|
+
* Merge pull request #462 from er0ck/fix/master/QENG-1261-fix_ntpdate_on_solaris10 (6f5162e7)
|
195
|
+
|
196
|
+
|
197
|
+
```
|
198
|
+
Merge pull request #462 from er0ck/fix/master/QENG-1261-fix_ntpdate_on_solaris10
|
199
|
+
|
200
|
+
(QENG-1261) remove solaris-10 specific ntpdate options
|
201
|
+
```
|
202
|
+
* Merge pull request #464 from anodelman/answers (e145c964)
|
203
|
+
|
204
|
+
|
205
|
+
```
|
206
|
+
Merge pull request #464 from anodelman/answers
|
207
|
+
|
208
|
+
(QENG-1054) Add functionality to install_pe to modify answers...
|
209
|
+
```
|
210
|
+
* Merge pull request #476 from leoarnold/master (189eb410)
|
211
|
+
|
212
|
+
|
213
|
+
```
|
214
|
+
Merge pull request #476 from leoarnold/master
|
215
|
+
|
216
|
+
Added link to installation instructions to README.md
|
217
|
+
```
|
218
|
+
* Merge pull request #479 from anodelman/epel (6ee6fe4c)
|
219
|
+
|
220
|
+
|
221
|
+
```
|
222
|
+
Merge pull request #479 from anodelman/epel
|
223
|
+
|
224
|
+
(QENG-1206) Acceptance failing when trying to install epel-release...
|
225
|
+
```
|
226
|
+
* (QENG-1206) Acceptance failing when trying to install epel-release... (17bd48be)
|
227
|
+
|
228
|
+
|
229
|
+
```
|
230
|
+
(QENG-1206) Acceptance failing when trying to install epel-release...
|
231
|
+
|
232
|
+
and EPEL packages from public mirrors
|
233
|
+
- add ability to set epel_url, epel_arch and epel_package as global
|
234
|
+
options or on a per-host basis
|
235
|
+
- added reasonable default values
|
236
|
+
```
|
237
|
+
* Added link to installation instructions to README.md (5b513899)
|
238
|
+
|
239
|
+
* (QENG-1231) add onpass option to --preserve-hosts (e772e289)
|
240
|
+
|
241
|
+
|
242
|
+
```
|
243
|
+
(QENG-1231) add onpass option to --preserve-hosts
|
244
|
+
* add spec tests similar to onfail spec tests
|
245
|
+
* add cleanup to rescue when --preserve-hosts onpass
|
246
|
+
* add help statement for onpass
|
247
|
+
```
|
248
|
+
* Merge pull request #418 from liamjbennett/vagrant_box_update (decdb05c)
|
249
|
+
|
250
|
+
|
251
|
+
```
|
252
|
+
Merge pull request #418 from liamjbennett/vagrant_box_update
|
253
|
+
|
254
|
+
Adding support to vagrant for box_version and box_check_update.
|
255
|
+
```
|
256
|
+
* Merge pull request #422 from liamjbennett/vagrant_natdns (a64a3bac)
|
257
|
+
|
258
|
+
|
259
|
+
```
|
260
|
+
Merge pull request #422 from liamjbennett/vagrant_natdns
|
261
|
+
|
262
|
+
Enable natresolver and natdnsproxy for vagrant.
|
263
|
+
```
|
264
|
+
* (QENG-1261) remove solaris-10 specific ntpdate options. -w causes an (a795d859)
|
265
|
+
|
266
|
+
|
267
|
+
```
|
268
|
+
(QENG-1261) remove solaris-10 specific ntpdate options. -w causes an
|
269
|
+
error.
|
270
|
+
remove related spec test.
|
271
|
+
```
|
272
|
+
* (gh-470) refactoring natdns to use the unless syntax (3d67a83a)
|
273
|
+
|
274
|
+
* (QENG-1054) Add functionality to install_pe to modify answers... (6a35cda6)
|
275
|
+
|
276
|
+
|
277
|
+
```
|
278
|
+
(QENG-1054) Add functionality to install_pe to modify answers...
|
279
|
+
|
280
|
+
...file before install
|
281
|
+
|
282
|
+
- add ability to add custom_answers to individual hosts to be appended
|
283
|
+
to answer file
|
284
|
+
- rework answer file code so that answers are an object that can be
|
285
|
+
queried for an answer string
|
286
|
+
- instead of querying env for individual answers just pull in anything
|
287
|
+
that matches q_*
|
288
|
+
- pull the default answer values into the presets so that it is more
|
289
|
+
easily tracked
|
290
|
+
```
|
291
|
+
* (QENG-1209) scp in debug output shows far too much output (059248e7)
|
292
|
+
|
293
|
+
|
294
|
+
```
|
295
|
+
(QENG-1209) scp in debug output shows far too much output
|
296
|
+
|
297
|
+
- move detailed output into a new log level called 'trace', could still
|
298
|
+
be useful for tracking networking failures - but will be disabled by
|
299
|
+
default
|
300
|
+
- add ability to flip on/off quiet output to logging
|
301
|
+
```
|
302
|
+
* Enable natresolver and natdnsproxy for vagrant. (613ddba8)
|
303
|
+
|
304
|
+
|
305
|
+
```
|
306
|
+
Enable natresolver and natdnsproxy for vagrant.
|
307
|
+
|
308
|
+
There are cases where tests run will fail when trying to download
|
309
|
+
from the outside world due to dns issues. In order to resolve this
|
310
|
+
I configured the natdnsproxy1 and natdnshostresolver1 vagrant settings
|
311
|
+
```
|
312
|
+
* (gh-471) Adding support to vagrant for box_version and box_check_update. (24bb0951)
|
313
|
+
|
314
|
+
|
315
|
+
```
|
316
|
+
(gh-471) Adding support to vagrant for box_version and box_check_update.
|
317
|
+
|
318
|
+
If using versioned boxes from vagrant cloud and a new update is
|
319
|
+
published, by default vagrant will attempt to update that box to
|
320
|
+
the latest version. This may be undesired behaviour. Like any other
|
321
|
+
versioned object you way wish to fix that initial download to a
|
322
|
+
fixed version or a version range.
|
323
|
+
```
|
324
|
+
* (QENG-967) Disable iptables on el hosts bringup. (11cb16ef)
|
325
|
+
|
326
|
+
|
327
|
+
```
|
328
|
+
(QENG-967) Disable iptables on el hosts bringup.
|
329
|
+
|
330
|
+
Also fixes bug in `disable_iptables` where per-array-element was invoking wrong
|
331
|
+
method. Looks like `disable_iptables` was originally copied from
|
332
|
+
`copy_ssh_to_root`
|
333
|
+
|
334
|
+
Also adds rspec for Beaker::Hypervisor.configure
|
335
|
+
|
336
|
+
Signed-off-by: Wayne <wayne@puppetlabs.com>
|
337
|
+
```
|
338
|
+
* (QENG-1146) Add vagrant_fusion, vmware_workstation, and vagrant_virtualbox providers (fdcbac3d)
|
339
|
+
|
340
|
+
|
341
|
+
```
|
342
|
+
(QENG-1146) Add vagrant_fusion, vmware_workstation, and vagrant_virtualbox providers
|
343
|
+
|
344
|
+
Currently the vagrant hypervisor provider just does virtualbox. This
|
345
|
+
allows the vagrant vmware_fusion and vmware_workstation plugins to be
|
346
|
+
used instead.
|
347
|
+
```
|
348
|
+
### <a name = "beaker1.19.1">beaker1.19.1 - 19 Sep, 2014 (3aafc71d)
|
349
|
+
|
350
|
+
* Merge pull request #467 from anodelman/master (3aafc71d)
|
351
|
+
|
352
|
+
|
353
|
+
```
|
354
|
+
Merge pull request #467 from anodelman/master
|
355
|
+
|
356
|
+
create beaker 1.19.1 gem
|
357
|
+
```
|
358
|
+
* (HISTORY) history update for beaker 1.19.1 gem (d5bea586)
|
68
359
|
|
69
360
|
* (GEM) version bump for 1.19.1 gem (7538dc00)
|
70
361
|
|
data/README.md
CHANGED
@@ -1,125 +1,121 @@
|
|
1
1
|
module Beaker
|
2
|
-
|
3
|
-
|
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
|
4
7
|
#
|
5
|
-
# @
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
# @option options [Symbol] :type Should be one of :upgrade or :install.
|
15
|
-
# @return [Hash] A hash (keyed from hosts) containing hashes of answer file
|
16
|
-
# data.
|
17
|
-
def self.host_answers(host, master_certname, master, dashboard, options)
|
18
|
-
return nil if host['platform'] =~ /windows/
|
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/
|
19
17
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
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,
|
25
|
+
:q_puppetagent_server => master,
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
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
|
+
}
|
34
32
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
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,
|
37
|
+
:q_puppetmaster_install => 'y',
|
38
|
+
:q_puppetmaster_dnsaltnames => master_dns_altnames,
|
39
|
+
:q_puppetmaster_enterpriseconsole_hostname => dashboard,
|
40
|
+
:q_puppetmaster_enterpriseconsole_port => answer_for(options, :q_puppetmaster_enterpriseconsole_port, 443),
|
41
|
+
:q_puppetmaster_forward_facts => 'y',
|
42
|
+
}
|
44
43
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
:q_puppet_enterpriseconsole_install => 'y',
|
59
|
-
:q_puppet_enterpriseconsole_database_install => 'y',
|
60
|
-
:q_puppet_enterpriseconsole_auth_database_name => 'console_auth',
|
61
|
-
:q_puppet_enterpriseconsole_auth_database_user => 'mYu7hu3r',
|
62
|
-
:q_puppet_enterpriseconsole_auth_database_password => "'#{dashboard_password}'",
|
63
|
-
:q_puppet_enterpriseconsole_database_name => 'console',
|
64
|
-
:q_puppet_enterpriseconsole_database_user => 'mYc0nS03u3r',
|
65
|
-
:q_puppet_enterpriseconsole_database_root_password => "'#{dashboard_password}'",
|
66
|
-
:q_puppet_enterpriseconsole_database_password => "'#{dashboard_password}'",
|
67
|
-
:q_puppet_enterpriseconsole_inventory_hostname => host,
|
68
|
-
:q_puppet_enterpriseconsole_inventory_certname => host,
|
69
|
-
:q_puppet_enterpriseconsole_inventory_dnsaltnames => master,
|
70
|
-
:q_puppet_enterpriseconsole_inventory_port => 8140,
|
71
|
-
:q_puppet_enterpriseconsole_master_hostname => master,
|
72
|
-
|
73
|
-
:q_puppet_enterpriseconsole_auth_user_email => dashboard_user,
|
74
|
-
:q_puppet_enterpriseconsole_auth_password => "'#{dashboard_password}'",
|
44
|
+
dashboard_user = "'#{answer_for(options, :q_puppet_enterpriseconsole_auth_user_email)}'"
|
45
|
+
smtp_host = "'#{answer_for(options, :q_puppet_enterpriseconsole_smtp_host, dashboard)}'"
|
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)
|
75
57
|
|
76
|
-
|
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_root_password => dashboard_password,
|
67
|
+
:q_puppet_enterpriseconsole_database_password => dashboard_password,
|
68
|
+
:q_puppet_enterpriseconsole_inventory_hostname => host,
|
69
|
+
:q_puppet_enterpriseconsole_inventory_certname => host,
|
70
|
+
:q_puppet_enterpriseconsole_inventory_dnsaltnames => master,
|
71
|
+
:q_puppet_enterpriseconsole_inventory_port => console_inventory_port,
|
72
|
+
:q_puppet_enterpriseconsole_master_hostname => master,
|
73
|
+
:q_puppet_enterpriseconsole_auth_user_email => dashboard_user,
|
74
|
+
:q_puppet_enterpriseconsole_auth_password => dashboard_password,
|
75
|
+
:q_puppet_enterpriseconsole_httpd_port => console_httpd_port,
|
76
|
+
:q_puppet_enterpriseconsole_smtp_host => smtp_host,
|
77
|
+
:q_puppet_enterpriseconsole_smtp_use_tls => smtp_use_tls,
|
78
|
+
:q_puppet_enterpriseconsole_smtp_port => smtp_port,
|
79
|
+
}
|
77
80
|
|
78
|
-
|
79
|
-
:q_puppet_enterpriseconsole_smtp_use_tls => smtp_use_tls,
|
80
|
-
:q_puppet_enterpriseconsole_smtp_port => smtp_port,
|
81
|
-
}
|
82
|
-
|
83
|
-
console_a[:q_puppet_enterpriseconsole_auth_user] = console_a[:q_puppet_enterpriseconsole_auth_user_email]
|
84
|
-
|
85
|
-
if smtp_password and smtp_username
|
86
|
-
console_a.merge!({
|
87
|
-
:q_puppet_enterpriseconsole_smtp_password => "'#{smtp_password}'",
|
88
|
-
:q_puppet_enterpriseconsole_smtp_username => "'#{smtp_username}'",
|
89
|
-
:q_puppet_enterpriseconsole_smtp_user_auth => 'y'
|
90
|
-
})
|
91
|
-
end
|
81
|
+
console_a[:q_puppet_enterpriseconsole_auth_user] = console_a[:q_puppet_enterpriseconsole_auth_user_email]
|
92
82
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
83
|
+
if smtp_password and smtp_username
|
84
|
+
console_a.merge!({
|
85
|
+
:q_puppet_enterpriseconsole_smtp_password => "'#{smtp_password}'",
|
86
|
+
:q_puppet_enterpriseconsole_smtp_username => "'#{smtp_username}'",
|
87
|
+
:q_puppet_enterpriseconsole_smtp_user_auth => 'y'
|
88
|
+
})
|
89
|
+
end
|
97
90
|
|
98
|
-
|
99
|
-
|
100
|
-
|
91
|
+
answers = agent_a.dup
|
92
|
+
if host == master
|
93
|
+
answers.merge! master_a
|
94
|
+
end
|
101
95
|
|
102
|
-
|
96
|
+
if host == dashboard
|
97
|
+
answers.merge! console_a
|
103
98
|
end
|
104
99
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
h
|
100
|
+
return answers
|
101
|
+
end
|
102
|
+
|
103
|
+
# Return answer data for all hosts.
|
104
|
+
#
|
105
|
+
# @return [Hash] A hash (keyed from hosts) containing hashes of answer file
|
106
|
+
# data.
|
107
|
+
def generate_answers
|
108
|
+
the_answers = {}
|
109
|
+
dashboard = only_host_with_role(@hosts, 'dashboard')
|
110
|
+
master = only_host_with_role(@hosts, 'master')
|
111
|
+
@hosts.each do |h|
|
112
|
+
the_answers[h.name] = host_answers(h, master, dashboard, @options)
|
113
|
+
if h[:custom_answers]
|
114
|
+
the_answers[h.name] = the_answers[h.name].merge(h[:custom_answers])
|
120
115
|
end
|
121
|
-
|
116
|
+
h[:answers] = the_answers[h.name]
|
122
117
|
end
|
118
|
+
return the_answers
|
123
119
|
end
|
124
120
|
end
|
125
121
|
end
|