ec2-host 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.yardopts +6 -0
- data/CHANGELOG.md +8 -0
- data/README.md +42 -8
- data/docs/EC2.html +132 -0
- data/docs/EC2/Host.html +889 -0
- data/docs/EC2/Host/CLI.html +616 -0
- data/docs/EC2/Host/Config.html +1193 -0
- data/docs/EC2/Host/EC2Client.html +273 -0
- data/docs/EC2/Host/HashUtil.html +178 -0
- data/docs/EC2/Host/HostData.html +1772 -0
- data/docs/EC2/Host/RoleData.html +932 -0
- data/docs/EC2/Host/StringUtil.html +359 -0
- data/docs/_index.html +201 -0
- data/docs/class_list.html +58 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +57 -0
- data/docs/css/style.css +339 -0
- data/docs/file.LICENSE.html +95 -0
- data/docs/file.README.html +323 -0
- data/docs/file_list.html +63 -0
- data/docs/frames.html +26 -0
- data/docs/index.html +323 -0
- data/docs/js/app.js +219 -0
- data/docs/js/full_list.js +181 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +489 -0
- data/docs/top-level-namespace.html +112 -0
- data/ec2-host.gemspec +1 -2
- data/{sample.conf → example/example.conf} +1 -1
- data/lib/ec2-host.rb +1 -1
- data/lib/ec2/host.rb +12 -4
- data/lib/ec2/host/config.rb +13 -15
- data/lib/ec2/host/ec2_client.rb +60 -0
- data/lib/ec2/host/host_data.rb +156 -103
- data/lib/ec2/host/role_data.rb +11 -7
- data/spec/host_spec.rb +67 -42
- data/spec/spec_helper.rb +6 -6
- data/terraform.tf +39 -0
- metadata +31 -22
- data/doc.sh +0 -5
- data/lib/ec2/host/client_util.rb +0 -44
- data/spec/README.md +0 -35
@@ -0,0 +1,1193 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
Class: EC2::Host::Config
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../../';
|
20
|
+
framesUrl = "../../frames.html#!EC2/Host/Config.html";
|
21
|
+
</script>
|
22
|
+
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
+
|
26
|
+
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
+
|
28
|
+
|
29
|
+
</head>
|
30
|
+
<body>
|
31
|
+
<div id="header">
|
32
|
+
<div id="menu">
|
33
|
+
|
34
|
+
<a href="../../_index.html">Index (C)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../EC2.html" title="EC2 (class)">EC2</a></span></span> » <span class='title'><span class='object_link'><a href="../Host.html" title="EC2::Host (class)">Host</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Config</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: EC2::Host::Config
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">EC2::Host::Config</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/ec2/host/config.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<h2>Class Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
107
|
+
<ul class="summary">
|
108
|
+
|
109
|
+
<li class="public ">
|
110
|
+
<span class="summary_signature">
|
111
|
+
|
112
|
+
<a href="#aws_access_key_id-class_method" title="aws_access_key_id (class method)">+ (Object) <strong>aws_access_key_id</strong> </a>
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
</span>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
130
|
+
|
131
|
+
</li>
|
132
|
+
|
133
|
+
|
134
|
+
<li class="public ">
|
135
|
+
<span class="summary_signature">
|
136
|
+
|
137
|
+
<a href="#aws_credential_file-class_method" title="aws_credential_file (class method)">+ (Object) <strong>aws_credential_file</strong> </a>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
</span>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
155
|
+
|
156
|
+
</li>
|
157
|
+
|
158
|
+
|
159
|
+
<li class="public ">
|
160
|
+
<span class="summary_signature">
|
161
|
+
|
162
|
+
<a href="#aws_profile-class_method" title="aws_profile (class method)">+ (Object) <strong>aws_profile</strong> </a>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
</span>
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
180
|
+
|
181
|
+
</li>
|
182
|
+
|
183
|
+
|
184
|
+
<li class="public ">
|
185
|
+
<span class="summary_signature">
|
186
|
+
|
187
|
+
<a href="#aws_region-class_method" title="aws_region (class method)">+ (Object) <strong>aws_region</strong> </a>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
</span>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
205
|
+
|
206
|
+
</li>
|
207
|
+
|
208
|
+
|
209
|
+
<li class="public ">
|
210
|
+
<span class="summary_signature">
|
211
|
+
|
212
|
+
<a href="#aws_secret_access_key-class_method" title="aws_secret_access_key (class method)">+ (Object) <strong>aws_secret_access_key</strong> </a>
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
</span>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
230
|
+
|
231
|
+
</li>
|
232
|
+
|
233
|
+
|
234
|
+
<li class="public ">
|
235
|
+
<span class="summary_signature">
|
236
|
+
|
237
|
+
<a href="#config_file-class_method" title="config_file (class method)">+ (Object) <strong>config_file</strong> </a>
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
</span>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
255
|
+
|
256
|
+
</li>
|
257
|
+
|
258
|
+
|
259
|
+
<li class="public ">
|
260
|
+
<span class="summary_signature">
|
261
|
+
|
262
|
+
<a href="#hostname_tag-class_method" title="hostname_tag (class method)">+ (Object) <strong>hostname_tag</strong> </a>
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
</span>
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
280
|
+
|
281
|
+
</li>
|
282
|
+
|
283
|
+
|
284
|
+
<li class="public ">
|
285
|
+
<span class="summary_signature">
|
286
|
+
|
287
|
+
<a href="#log_level-class_method" title="log_level (class method)">+ (Object) <strong>log_level</strong> </a>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
</span>
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
305
|
+
|
306
|
+
</li>
|
307
|
+
|
308
|
+
|
309
|
+
<li class="public ">
|
310
|
+
<span class="summary_signature">
|
311
|
+
|
312
|
+
<a href="#optional_array_tags-class_method" title="optional_array_tags (class method)">+ (Object) <strong>optional_array_tags</strong> </a>
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
</span>
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
330
|
+
|
331
|
+
</li>
|
332
|
+
|
333
|
+
|
334
|
+
<li class="public ">
|
335
|
+
<span class="summary_signature">
|
336
|
+
|
337
|
+
<a href="#optional_string_tags-class_method" title="optional_string_tags (class method)">+ (Object) <strong>optional_string_tags</strong> </a>
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
</span>
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
|
354
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
355
|
+
|
356
|
+
</li>
|
357
|
+
|
358
|
+
|
359
|
+
<li class="public ">
|
360
|
+
<span class="summary_signature">
|
361
|
+
|
362
|
+
<a href="#roles_tag-class_method" title="roles_tag (class method)">+ (Object) <strong>roles_tag</strong> </a>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
</span>
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
380
|
+
|
381
|
+
</li>
|
382
|
+
|
383
|
+
|
384
|
+
</ul>
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
<h2>
|
391
|
+
Class Method Summary
|
392
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
393
|
+
</h2>
|
394
|
+
|
395
|
+
<ul class="summary">
|
396
|
+
|
397
|
+
<li class="public ">
|
398
|
+
<span class="summary_signature">
|
399
|
+
|
400
|
+
<a href="#array_tag_delimiter-class_method" title="array_tag_delimiter (class method)">+ (Object) <strong>array_tag_delimiter</strong> </a>
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
</span>
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
415
|
+
|
416
|
+
</li>
|
417
|
+
|
418
|
+
|
419
|
+
<li class="public ">
|
420
|
+
<span class="summary_signature">
|
421
|
+
|
422
|
+
<a href="#config-class_method" title="config (class method)">+ (Object) <strong>config</strong> </a>
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
</span>
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
437
|
+
|
438
|
+
</li>
|
439
|
+
|
440
|
+
|
441
|
+
<li class="public ">
|
442
|
+
<span class="summary_signature">
|
443
|
+
|
444
|
+
<a href="#configure-class_method" title="configure (class method)">+ (Object) <strong>configure</strong>(params) </a>
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
</span>
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
459
|
+
|
460
|
+
</li>
|
461
|
+
|
462
|
+
|
463
|
+
<li class="public ">
|
464
|
+
<span class="summary_signature">
|
465
|
+
|
466
|
+
<a href="#optional_array_options-class_method" title="optional_array_options (class method)">+ (Object) <strong>optional_array_options</strong> </a>
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
</span>
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
<span class="summary_desc"><div class='inline'>
|
481
|
+
<p>private.</p>
|
482
|
+
</div></span>
|
483
|
+
|
484
|
+
</li>
|
485
|
+
|
486
|
+
|
487
|
+
<li class="public ">
|
488
|
+
<span class="summary_signature">
|
489
|
+
|
490
|
+
<a href="#optional_options-class_method" title="optional_options (class method)">+ (Object) <strong>optional_options</strong> </a>
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
</span>
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
505
|
+
|
506
|
+
</li>
|
507
|
+
|
508
|
+
|
509
|
+
<li class="public ">
|
510
|
+
<span class="summary_signature">
|
511
|
+
|
512
|
+
<a href="#optional_string_options-class_method" title="optional_string_options (class method)">+ (Object) <strong>optional_string_options</strong> </a>
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
</span>
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
527
|
+
|
528
|
+
</li>
|
529
|
+
|
530
|
+
|
531
|
+
<li class="public ">
|
532
|
+
<span class="summary_signature">
|
533
|
+
|
534
|
+
<a href="#role_tag_delimiter-class_method" title="role_tag_delimiter (class method)">+ (Object) <strong>role_tag_delimiter</strong> </a>
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
</span>
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
|
545
|
+
|
546
|
+
|
547
|
+
|
548
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
549
|
+
|
550
|
+
</li>
|
551
|
+
|
552
|
+
|
553
|
+
</ul>
|
554
|
+
|
555
|
+
|
556
|
+
|
557
|
+
<div id="class_attr_details" class="attr_details">
|
558
|
+
<h2>Class Attribute Details</h2>
|
559
|
+
|
560
|
+
|
561
|
+
<span id="aws_access_key_id=-class_method"></span>
|
562
|
+
<div class="method_details first">
|
563
|
+
<h3 class="signature first" id="aws_access_key_id-class_method">
|
564
|
+
|
565
|
+
+ (<tt>Object</tt>) <strong>aws_access_key_id</strong>
|
566
|
+
|
567
|
+
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
</h3><table class="source_code">
|
572
|
+
<tr>
|
573
|
+
<td>
|
574
|
+
<pre class="lines">
|
575
|
+
|
576
|
+
|
577
|
+
43
|
578
|
+
44
|
579
|
+
45
|
580
|
+
46</pre>
|
581
|
+
</td>
|
582
|
+
<td>
|
583
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 43</span>
|
584
|
+
|
585
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aws_access_key_id'>aws_access_key_id</span>
|
586
|
+
<span class='comment'># ref. aws cli and terraform
|
587
|
+
</span> <span class='ivar'>@aws_access_key_id</span> <span class='op'>||=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_ACCESS_KEY_ID</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_ACCESS_KEY_ID</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
588
|
+
<span class='kw'>end</span></pre>
|
589
|
+
</td>
|
590
|
+
</tr>
|
591
|
+
</table>
|
592
|
+
</div>
|
593
|
+
|
594
|
+
|
595
|
+
<span id="aws_credential_file=-class_method"></span>
|
596
|
+
<div class="method_details ">
|
597
|
+
<h3 class="signature " id="aws_credential_file-class_method">
|
598
|
+
|
599
|
+
+ (<tt>Object</tt>) <strong>aws_credential_file</strong>
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
</h3><table class="source_code">
|
606
|
+
<tr>
|
607
|
+
<td>
|
608
|
+
<pre class="lines">
|
609
|
+
|
610
|
+
|
611
|
+
53
|
612
|
+
54
|
613
|
+
55
|
614
|
+
56
|
615
|
+
57</pre>
|
616
|
+
</td>
|
617
|
+
<td>
|
618
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 53</span>
|
619
|
+
|
620
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aws_credential_file'>aws_credential_file</span>
|
621
|
+
<span class='ivar'>@aws_credential_file</span> <span class='op'>||=</span>
|
622
|
+
<span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_CREDENTIALS_FILE</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_CREDENTIALS_FILE</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='op'>||</span>
|
623
|
+
<span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_CREDENTIAL_FILE</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_CREDENTIAL_FILE</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='comment'># ref. aws cli (supported lately)
|
624
|
+
</span><span class='kw'>end</span></pre>
|
625
|
+
</td>
|
626
|
+
</tr>
|
627
|
+
</table>
|
628
|
+
</div>
|
629
|
+
|
630
|
+
|
631
|
+
<span id="aws_profile=-class_method"></span>
|
632
|
+
<div class="method_details ">
|
633
|
+
<h3 class="signature " id="aws_profile-class_method">
|
634
|
+
|
635
|
+
+ (<tt>Object</tt>) <strong>aws_profile</strong>
|
636
|
+
|
637
|
+
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
</h3><table class="source_code">
|
642
|
+
<tr>
|
643
|
+
<td>
|
644
|
+
<pre class="lines">
|
645
|
+
|
646
|
+
|
647
|
+
37
|
648
|
+
38
|
649
|
+
39
|
650
|
+
40
|
651
|
+
41</pre>
|
652
|
+
</td>
|
653
|
+
<td>
|
654
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 37</span>
|
655
|
+
|
656
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aws_profile'>aws_profile</span>
|
657
|
+
<span class='ivar'>@aws_profile</span> <span class='op'>||=</span>
|
658
|
+
<span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_PROFILE</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_PROFILE</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>nil</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='op'>||</span> <span class='comment'># ref. old aws cli
|
659
|
+
</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_DEFAULT_PROFILE</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_DEFAULT_PROFILE</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>default</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='comment'># ref. aws cli and terraform
|
660
|
+
</span><span class='kw'>end</span></pre>
|
661
|
+
</td>
|
662
|
+
</tr>
|
663
|
+
</table>
|
664
|
+
</div>
|
665
|
+
|
666
|
+
|
667
|
+
<span id="aws_region=-class_method"></span>
|
668
|
+
<div class="method_details ">
|
669
|
+
<h3 class="signature " id="aws_region-class_method">
|
670
|
+
|
671
|
+
+ (<tt>Object</tt>) <strong>aws_region</strong>
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
</h3><table class="source_code">
|
678
|
+
<tr>
|
679
|
+
<td>
|
680
|
+
<pre class="lines">
|
681
|
+
|
682
|
+
|
683
|
+
31
|
684
|
+
32
|
685
|
+
33
|
686
|
+
34
|
687
|
+
35</pre>
|
688
|
+
</td>
|
689
|
+
<td>
|
690
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 31</span>
|
691
|
+
|
692
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aws_region'>aws_region</span>
|
693
|
+
<span class='ivar'>@aws_region</span> <span class='op'>||=</span>
|
694
|
+
<span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_REGION</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_REGION</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='comment'># ref. old aws cli
|
695
|
+
</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_DEFAULT_REGION</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_DEFAULT_REGION</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='comment'># ref. aws cli and terraform
|
696
|
+
</span><span class='kw'>end</span></pre>
|
697
|
+
</td>
|
698
|
+
</tr>
|
699
|
+
</table>
|
700
|
+
</div>
|
701
|
+
|
702
|
+
|
703
|
+
<span id="aws_secret_access_key=-class_method"></span>
|
704
|
+
<div class="method_details ">
|
705
|
+
<h3 class="signature " id="aws_secret_access_key-class_method">
|
706
|
+
|
707
|
+
+ (<tt>Object</tt>) <strong>aws_secret_access_key</strong>
|
708
|
+
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
</h3><table class="source_code">
|
714
|
+
<tr>
|
715
|
+
<td>
|
716
|
+
<pre class="lines">
|
717
|
+
|
718
|
+
|
719
|
+
48
|
720
|
+
49
|
721
|
+
50
|
722
|
+
51</pre>
|
723
|
+
</td>
|
724
|
+
<td>
|
725
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 48</span>
|
726
|
+
|
727
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_aws_secret_access_key'>aws_secret_access_key</span>
|
728
|
+
<span class='comment'># ref. aws cli and terraform
|
729
|
+
</span> <span class='ivar'>@aws_secret_access_key</span> <span class='op'>||=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_SECRET_ACCESS_KEY</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>AWS_SECRET_ACCESS_KEY</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
730
|
+
<span class='kw'>end</span></pre>
|
731
|
+
</td>
|
732
|
+
</tr>
|
733
|
+
</table>
|
734
|
+
</div>
|
735
|
+
|
736
|
+
|
737
|
+
<span id="config_file=-class_method"></span>
|
738
|
+
<div class="method_details ">
|
739
|
+
<h3 class="signature " id="config_file-class_method">
|
740
|
+
|
741
|
+
+ (<tt>Object</tt>) <strong>config_file</strong>
|
742
|
+
|
743
|
+
|
744
|
+
|
745
|
+
|
746
|
+
|
747
|
+
</h3><table class="source_code">
|
748
|
+
<tr>
|
749
|
+
<td>
|
750
|
+
<pre class="lines">
|
751
|
+
|
752
|
+
|
753
|
+
27
|
754
|
+
28
|
755
|
+
29</pre>
|
756
|
+
</td>
|
757
|
+
<td>
|
758
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 27</span>
|
759
|
+
|
760
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config_file'>config_file</span>
|
761
|
+
<span class='ivar'>@config_file</span> <span class='op'>||=</span> <span class='const'>ENV</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>EC2_HOST_CONFIG_FILE</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/etc/sysconfig/ec2-host</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
762
|
+
<span class='kw'>end</span></pre>
|
763
|
+
</td>
|
764
|
+
</tr>
|
765
|
+
</table>
|
766
|
+
</div>
|
767
|
+
|
768
|
+
|
769
|
+
<span id="hostname_tag=-class_method"></span>
|
770
|
+
<div class="method_details ">
|
771
|
+
<h3 class="signature " id="hostname_tag-class_method">
|
772
|
+
|
773
|
+
+ (<tt>Object</tt>) <strong>hostname_tag</strong>
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
</h3><table class="source_code">
|
780
|
+
<tr>
|
781
|
+
<td>
|
782
|
+
<pre class="lines">
|
783
|
+
|
784
|
+
|
785
|
+
63
|
786
|
+
64
|
787
|
+
65</pre>
|
788
|
+
</td>
|
789
|
+
<td>
|
790
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 63</span>
|
791
|
+
|
792
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hostname_tag'>hostname_tag</span>
|
793
|
+
<span class='ivar'>@hostname_tag</span> <span class='op'>||=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>HOSTNAME_TAG</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>HOSTNAME_TAG</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Name</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
794
|
+
<span class='kw'>end</span></pre>
|
795
|
+
</td>
|
796
|
+
</tr>
|
797
|
+
</table>
|
798
|
+
</div>
|
799
|
+
|
800
|
+
|
801
|
+
<span id="log_level=-class_method"></span>
|
802
|
+
<div class="method_details ">
|
803
|
+
<h3 class="signature " id="log_level-class_method">
|
804
|
+
|
805
|
+
+ (<tt>Object</tt>) <strong>log_level</strong>
|
806
|
+
|
807
|
+
|
808
|
+
|
809
|
+
|
810
|
+
|
811
|
+
</h3><table class="source_code">
|
812
|
+
<tr>
|
813
|
+
<td>
|
814
|
+
<pre class="lines">
|
815
|
+
|
816
|
+
|
817
|
+
59
|
818
|
+
60
|
819
|
+
61</pre>
|
820
|
+
</td>
|
821
|
+
<td>
|
822
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 59</span>
|
823
|
+
|
824
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log_level'>log_level</span>
|
825
|
+
<span class='ivar'>@log_level</span> <span class='op'>||=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>LOG_LEVEL</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>LOG_LEVEL</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>info</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
826
|
+
<span class='kw'>end</span></pre>
|
827
|
+
</td>
|
828
|
+
</tr>
|
829
|
+
</table>
|
830
|
+
</div>
|
831
|
+
|
832
|
+
|
833
|
+
<span id="optional_array_tags=-class_method"></span>
|
834
|
+
<div class="method_details ">
|
835
|
+
<h3 class="signature " id="optional_array_tags-class_method">
|
836
|
+
|
837
|
+
+ (<tt>Object</tt>) <strong>optional_array_tags</strong>
|
838
|
+
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
|
843
|
+
</h3><table class="source_code">
|
844
|
+
<tr>
|
845
|
+
<td>
|
846
|
+
<pre class="lines">
|
847
|
+
|
848
|
+
|
849
|
+
71
|
850
|
+
72
|
851
|
+
73</pre>
|
852
|
+
</td>
|
853
|
+
<td>
|
854
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 71</span>
|
855
|
+
|
856
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_optional_array_tags'>optional_array_tags</span>
|
857
|
+
<span class='ivar'>@optional_array_tags</span> <span class='op'>||=</span> <span class='lparen'>(</span><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OPTIONAL_ARRAY_TAGS</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OPTIONAL_ARRAY_TAGS</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>,</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
858
|
+
<span class='kw'>end</span></pre>
|
859
|
+
</td>
|
860
|
+
</tr>
|
861
|
+
</table>
|
862
|
+
</div>
|
863
|
+
|
864
|
+
|
865
|
+
<span id="optional_string_tags=-class_method"></span>
|
866
|
+
<div class="method_details ">
|
867
|
+
<h3 class="signature " id="optional_string_tags-class_method">
|
868
|
+
|
869
|
+
+ (<tt>Object</tt>) <strong>optional_string_tags</strong>
|
870
|
+
|
871
|
+
|
872
|
+
|
873
|
+
|
874
|
+
|
875
|
+
</h3><table class="source_code">
|
876
|
+
<tr>
|
877
|
+
<td>
|
878
|
+
<pre class="lines">
|
879
|
+
|
880
|
+
|
881
|
+
75
|
882
|
+
76
|
883
|
+
77</pre>
|
884
|
+
</td>
|
885
|
+
<td>
|
886
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 75</span>
|
887
|
+
|
888
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_optional_string_tags'>optional_string_tags</span>
|
889
|
+
<span class='ivar'>@optional_string_tags</span> <span class='op'>||=</span> <span class='lparen'>(</span><span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OPTIONAL_STRING_TAGS</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>OPTIONAL_STRING_TAGS</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>,</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
890
|
+
<span class='kw'>end</span></pre>
|
891
|
+
</td>
|
892
|
+
</tr>
|
893
|
+
</table>
|
894
|
+
</div>
|
895
|
+
|
896
|
+
|
897
|
+
<span id="roles_tag=-class_method"></span>
|
898
|
+
<div class="method_details ">
|
899
|
+
<h3 class="signature " id="roles_tag-class_method">
|
900
|
+
|
901
|
+
+ (<tt>Object</tt>) <strong>roles_tag</strong>
|
902
|
+
|
903
|
+
|
904
|
+
|
905
|
+
|
906
|
+
|
907
|
+
</h3><table class="source_code">
|
908
|
+
<tr>
|
909
|
+
<td>
|
910
|
+
<pre class="lines">
|
911
|
+
|
912
|
+
|
913
|
+
67
|
914
|
+
68
|
915
|
+
69</pre>
|
916
|
+
</td>
|
917
|
+
<td>
|
918
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 67</span>
|
919
|
+
|
920
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_roles_tag'>roles_tag</span>
|
921
|
+
<span class='ivar'>@roles_tag</span> <span class='op'>||=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ROLES_TAG</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ROLES_TAG</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Roles</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
922
|
+
<span class='kw'>end</span></pre>
|
923
|
+
</td>
|
924
|
+
</tr>
|
925
|
+
</table>
|
926
|
+
</div>
|
927
|
+
|
928
|
+
</div>
|
929
|
+
|
930
|
+
|
931
|
+
<div id="class_method_details" class="method_details_list">
|
932
|
+
<h2>Class Method Details</h2>
|
933
|
+
|
934
|
+
|
935
|
+
<div class="method_details first">
|
936
|
+
<h3 class="signature first" id="array_tag_delimiter-class_method">
|
937
|
+
|
938
|
+
+ (<tt>Object</tt>) <strong>array_tag_delimiter</strong>
|
939
|
+
|
940
|
+
|
941
|
+
|
942
|
+
|
943
|
+
|
944
|
+
</h3><table class="source_code">
|
945
|
+
<tr>
|
946
|
+
<td>
|
947
|
+
<pre class="lines">
|
948
|
+
|
949
|
+
|
950
|
+
83
|
951
|
+
84
|
952
|
+
85</pre>
|
953
|
+
</td>
|
954
|
+
<td>
|
955
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 83</span>
|
956
|
+
|
957
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_array_tag_delimiter'>array_tag_delimiter</span>
|
958
|
+
<span class='ivar'>@array_tag_delimiter</span> <span class='op'>||=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ARRAY_TAG_DELIMITER</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ARRAY_TAG_DELIMITER</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>,</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
959
|
+
<span class='kw'>end</span></pre>
|
960
|
+
</td>
|
961
|
+
</tr>
|
962
|
+
</table>
|
963
|
+
</div>
|
964
|
+
|
965
|
+
<div class="method_details ">
|
966
|
+
<h3 class="signature " id="config-class_method">
|
967
|
+
|
968
|
+
+ (<tt>Object</tt>) <strong>config</strong>
|
969
|
+
|
970
|
+
|
971
|
+
|
972
|
+
|
973
|
+
|
974
|
+
</h3><table class="source_code">
|
975
|
+
<tr>
|
976
|
+
<td>
|
977
|
+
<pre class="lines">
|
978
|
+
|
979
|
+
|
980
|
+
105
|
981
|
+
106
|
982
|
+
107
|
983
|
+
108
|
984
|
+
109
|
985
|
+
110
|
986
|
+
111
|
987
|
+
112
|
988
|
+
113
|
989
|
+
114</pre>
|
990
|
+
</td>
|
991
|
+
<td>
|
992
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 105</span>
|
993
|
+
|
994
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span>
|
995
|
+
<span class='kw'>return</span> <span class='ivar'>@config</span> <span class='kw'>if</span> <span class='ivar'>@config</span>
|
996
|
+
<span class='ivar'>@config</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
997
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_readlines'>readlines</span><span class='lparen'>(</span><span class='id identifier rubyid_config_file'>config_file</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_line'>line</span><span class='op'>|</span>
|
998
|
+
<span class='kw'>next</span> <span class='kw'>if</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_start_with?'>start_with?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>#</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
999
|
+
<span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>=</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='int'>2</span><span class='rparen'>)</span>
|
1000
|
+
<span class='ivar'>@config</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_val'>val</span>
|
1001
|
+
<span class='kw'>end</span>
|
1002
|
+
<span class='ivar'>@config</span>
|
1003
|
+
<span class='kw'>end</span></pre>
|
1004
|
+
</td>
|
1005
|
+
</tr>
|
1006
|
+
</table>
|
1007
|
+
</div>
|
1008
|
+
|
1009
|
+
<div class="method_details ">
|
1010
|
+
<h3 class="signature " id="configure-class_method">
|
1011
|
+
|
1012
|
+
+ (<tt>Object</tt>) <strong>configure</strong>(params)
|
1013
|
+
|
1014
|
+
|
1015
|
+
|
1016
|
+
|
1017
|
+
|
1018
|
+
</h3><table class="source_code">
|
1019
|
+
<tr>
|
1020
|
+
<td>
|
1021
|
+
<pre class="lines">
|
1022
|
+
|
1023
|
+
|
1024
|
+
21
|
1025
|
+
22
|
1026
|
+
23
|
1027
|
+
24
|
1028
|
+
25</pre>
|
1029
|
+
</td>
|
1030
|
+
<td>
|
1031
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 21</span>
|
1032
|
+
|
1033
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_configure'>configure</span><span class='lparen'>(</span><span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
|
1034
|
+
<span class='id identifier rubyid_params'>params</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='op'>|</span>
|
1035
|
+
<span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_val'>val</span><span class='rparen'>)</span>
|
1036
|
+
<span class='kw'>end</span>
|
1037
|
+
<span class='kw'>end</span></pre>
|
1038
|
+
</td>
|
1039
|
+
</tr>
|
1040
|
+
</table>
|
1041
|
+
</div>
|
1042
|
+
|
1043
|
+
<div class="method_details ">
|
1044
|
+
<h3 class="signature " id="optional_array_options-class_method">
|
1045
|
+
|
1046
|
+
+ (<tt>Object</tt>) <strong>optional_array_options</strong>
|
1047
|
+
|
1048
|
+
|
1049
|
+
|
1050
|
+
|
1051
|
+
|
1052
|
+
</h3><div class="docstring">
|
1053
|
+
<div class="discussion">
|
1054
|
+
|
1055
|
+
<p>private</p>
|
1056
|
+
|
1057
|
+
|
1058
|
+
</div>
|
1059
|
+
</div>
|
1060
|
+
<div class="tags">
|
1061
|
+
|
1062
|
+
|
1063
|
+
</div><table class="source_code">
|
1064
|
+
<tr>
|
1065
|
+
<td>
|
1066
|
+
<pre class="lines">
|
1067
|
+
|
1068
|
+
|
1069
|
+
89
|
1070
|
+
90
|
1071
|
+
91
|
1072
|
+
92
|
1073
|
+
93</pre>
|
1074
|
+
</td>
|
1075
|
+
<td>
|
1076
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 89</span>
|
1077
|
+
|
1078
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_optional_array_options'>optional_array_options</span>
|
1079
|
+
<span class='ivar'>@optional_array_options</span> <span class='op'>||=</span> <span class='const'>Hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_optional_array_tags'>optional_array_tags</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_tag'>tag</span><span class='op'>|</span>
|
1080
|
+
<span class='lbracket'>[</span><span class='const'>StringUtil</span><span class='period'>.</span><span class='id identifier rubyid_singularize'>singularize</span><span class='lparen'>(</span><span class='const'>StringUtil</span><span class='period'>.</span><span class='id identifier rubyid_underscore'>underscore</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_tag'>tag</span><span class='rbracket'>]</span>
|
1081
|
+
<span class='rbrace'>}</span><span class='rbracket'>]</span>
|
1082
|
+
<span class='kw'>end</span></pre>
|
1083
|
+
</td>
|
1084
|
+
</tr>
|
1085
|
+
</table>
|
1086
|
+
</div>
|
1087
|
+
|
1088
|
+
<div class="method_details ">
|
1089
|
+
<h3 class="signature " id="optional_options-class_method">
|
1090
|
+
|
1091
|
+
+ (<tt>Object</tt>) <strong>optional_options</strong>
|
1092
|
+
|
1093
|
+
|
1094
|
+
|
1095
|
+
|
1096
|
+
|
1097
|
+
</h3><table class="source_code">
|
1098
|
+
<tr>
|
1099
|
+
<td>
|
1100
|
+
<pre class="lines">
|
1101
|
+
|
1102
|
+
|
1103
|
+
101
|
1104
|
+
102
|
1105
|
+
103</pre>
|
1106
|
+
</td>
|
1107
|
+
<td>
|
1108
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 101</span>
|
1109
|
+
|
1110
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_optional_options'>optional_options</span>
|
1111
|
+
<span class='ivar'>@optional_options</span> <span class='op'>||=</span> <span class='id identifier rubyid_optional_array_options'>optional_array_options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='id identifier rubyid_optional_string_options'>optional_string_options</span><span class='rparen'>)</span>
|
1112
|
+
<span class='kw'>end</span></pre>
|
1113
|
+
</td>
|
1114
|
+
</tr>
|
1115
|
+
</table>
|
1116
|
+
</div>
|
1117
|
+
|
1118
|
+
<div class="method_details ">
|
1119
|
+
<h3 class="signature " id="optional_string_options-class_method">
|
1120
|
+
|
1121
|
+
+ (<tt>Object</tt>) <strong>optional_string_options</strong>
|
1122
|
+
|
1123
|
+
|
1124
|
+
|
1125
|
+
|
1126
|
+
|
1127
|
+
</h3><table class="source_code">
|
1128
|
+
<tr>
|
1129
|
+
<td>
|
1130
|
+
<pre class="lines">
|
1131
|
+
|
1132
|
+
|
1133
|
+
95
|
1134
|
+
96
|
1135
|
+
97
|
1136
|
+
98
|
1137
|
+
99</pre>
|
1138
|
+
</td>
|
1139
|
+
<td>
|
1140
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 95</span>
|
1141
|
+
|
1142
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_optional_string_options'>optional_string_options</span>
|
1143
|
+
<span class='ivar'>@optional_string_options</span> <span class='op'>||=</span> <span class='const'>Hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_optional_string_tags'>optional_string_tags</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_tag'>tag</span><span class='op'>|</span>
|
1144
|
+
<span class='lbracket'>[</span><span class='const'>StringUtil</span><span class='period'>.</span><span class='id identifier rubyid_underscore'>underscore</span><span class='lparen'>(</span><span class='id identifier rubyid_tag'>tag</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_tag'>tag</span><span class='rbracket'>]</span>
|
1145
|
+
<span class='rbrace'>}</span><span class='rbracket'>]</span>
|
1146
|
+
<span class='kw'>end</span></pre>
|
1147
|
+
</td>
|
1148
|
+
</tr>
|
1149
|
+
</table>
|
1150
|
+
</div>
|
1151
|
+
|
1152
|
+
<div class="method_details ">
|
1153
|
+
<h3 class="signature " id="role_tag_delimiter-class_method">
|
1154
|
+
|
1155
|
+
+ (<tt>Object</tt>) <strong>role_tag_delimiter</strong>
|
1156
|
+
|
1157
|
+
|
1158
|
+
|
1159
|
+
|
1160
|
+
|
1161
|
+
</h3><table class="source_code">
|
1162
|
+
<tr>
|
1163
|
+
<td>
|
1164
|
+
<pre class="lines">
|
1165
|
+
|
1166
|
+
|
1167
|
+
79
|
1168
|
+
80
|
1169
|
+
81</pre>
|
1170
|
+
</td>
|
1171
|
+
<td>
|
1172
|
+
<pre class="code"><span class="info file"># File 'lib/ec2/host/config.rb', line 79</span>
|
1173
|
+
|
1174
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_role_tag_delimiter'>role_tag_delimiter</span>
|
1175
|
+
<span class='ivar'>@role_tag_delimiter</span> <span class='op'>||=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ROLE_TAG_DELIMITER</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>ROLE_TAG_DELIMITER</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>:</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1176
|
+
<span class='kw'>end</span></pre>
|
1177
|
+
</td>
|
1178
|
+
</tr>
|
1179
|
+
</table>
|
1180
|
+
</div>
|
1181
|
+
|
1182
|
+
</div>
|
1183
|
+
|
1184
|
+
</div>
|
1185
|
+
|
1186
|
+
<div id="footer">
|
1187
|
+
Generated on Thu Nov 24 10:25:36 2016 by
|
1188
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1189
|
+
0.8.7.6 (ruby-2.3.2).
|
1190
|
+
</div>
|
1191
|
+
|
1192
|
+
</body>
|
1193
|
+
</html>
|