vagrant-registration 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/lib/vagrant-registration/version.rb +1 -1
  4. data/vagrant-registration.gemspec +6 -1
  5. metadata +2 -94
  6. data/.gitignore +0 -34
  7. data/Vagrantfile +0 -44
  8. data/dummy.box +0 -0
  9. data/vagrant-registration-0.0.16/.gitignore +0 -34
  10. data/vagrant-registration-0.0.16/CHANGELOG.md +0 -3
  11. data/vagrant-registration-0.0.16/Gemfile +0 -9
  12. data/vagrant-registration-0.0.16/LICENSE.md +0 -339
  13. data/vagrant-registration-0.0.16/README.md +0 -149
  14. data/vagrant-registration-0.0.16/Rakefile +0 -25
  15. data/vagrant-registration-0.0.16/Vagrantfile +0 -44
  16. data/vagrant-registration-0.0.16/dummy.box +0 -0
  17. data/vagrant-registration-0.0.16/lib/vagrant-registration/action/register.rb +0 -113
  18. data/vagrant-registration-0.0.16/lib/vagrant-registration/action/unregister.rb +0 -56
  19. data/vagrant-registration-0.0.16/lib/vagrant-registration/action.rb +0 -22
  20. data/vagrant-registration-0.0.16/lib/vagrant-registration/config.rb +0 -39
  21. data/vagrant-registration-0.0.16/lib/vagrant-registration/plugin.rb +0 -74
  22. data/vagrant-registration-0.0.16/lib/vagrant-registration/version.rb +0 -5
  23. data/vagrant-registration-0.0.16/lib/vagrant-registration.rb +0 -21
  24. data/vagrant-registration-0.0.16/plugins/guests/redhat/cap/registration.rb +0 -72
  25. data/vagrant-registration-0.0.16/plugins/guests/redhat/cap/subscription_manager.rb +0 -63
  26. data/vagrant-registration-0.0.16/plugins/guests/redhat/plugin.rb +0 -62
  27. data/vagrant-registration-0.0.16/tests/helpers.sh +0 -128
  28. data/vagrant-registration-0.0.16/tests/run.sh +0 -59
  29. data/vagrant-registration-0.0.16/tests/vagrantfiles/Vagrantfile.rhel_multi_machine +0 -19
  30. data/vagrant-registration-0.0.16/tests/vagrantfiles/Vagrantfile.rhel_wrong_credentials +0 -14
  31. data/vagrant-registration-0.0.16/vagrant-registration.gemspec +0 -49
  32. data/vagrant-registration-0.0.17/.gitignore +0 -34
  33. data/vagrant-registration-0.0.17/CHANGELOG.md +0 -3
  34. data/vagrant-registration-0.0.17/Gemfile +0 -9
  35. data/vagrant-registration-0.0.17/LICENSE.md +0 -339
  36. data/vagrant-registration-0.0.17/README.md +0 -149
  37. data/vagrant-registration-0.0.17/Rakefile +0 -25
  38. data/vagrant-registration-0.0.17/Vagrantfile +0 -44
  39. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap/ChangeHostName.html +0 -1016
  40. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap/ConfigureNetworks.html +0 -355
  41. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap/Flavor.html +0 -209
  42. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap/NFSClient.html +0 -189
  43. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap/NetworkScriptsDir.html +0 -205
  44. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Cap.html +0 -117
  45. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Guest.html +0 -211
  46. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora/Plugin.html +0 -120
  47. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestFedora.html +0 -119
  48. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Cap/RedHatCertification.html +0 -189
  49. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Cap/Register.html +0 -191
  50. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Cap/SubscriptionManager.html +0 -189
  51. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Cap/Unregister.html +0 -189
  52. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Cap.html +0 -117
  53. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat/Plugin.html +0 -120
  54. data/vagrant-registration-0.0.17/doc/VagrantPlugins/GuestRedHat.html +0 -119
  55. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Action/Register.html +0 -345
  56. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Action/Unregister.html +0 -315
  57. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Action.html +0 -246
  58. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Config.html +0 -433
  59. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Errors/RegisterError.html +0 -123
  60. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Errors/UnregisterError.html +0 -123
  61. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Errors/VagrantRHELError.html +0 -123
  62. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Errors.html +0 -115
  63. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration/Plugin.html +0 -356
  64. data/vagrant-registration-0.0.17/doc/VagrantPlugins/Registration.html +0 -226
  65. data/vagrant-registration-0.0.17/doc/VagrantPlugins.html +0 -117
  66. data/vagrant-registration-0.0.17/doc/_index.html +0 -375
  67. data/vagrant-registration-0.0.17/doc/class_list.html +0 -58
  68. data/vagrant-registration-0.0.17/doc/css/common.css +0 -1
  69. data/vagrant-registration-0.0.17/doc/css/full_list.css +0 -57
  70. data/vagrant-registration-0.0.17/doc/css/style.css +0 -339
  71. data/vagrant-registration-0.0.17/doc/file.README.html +0 -135
  72. data/vagrant-registration-0.0.17/doc/file_list.html +0 -60
  73. data/vagrant-registration-0.0.17/doc/frames.html +0 -26
  74. data/vagrant-registration-0.0.17/doc/index.html +0 -135
  75. data/vagrant-registration-0.0.17/doc/js/app.js +0 -219
  76. data/vagrant-registration-0.0.17/doc/js/full_list.js +0 -181
  77. data/vagrant-registration-0.0.17/doc/js/jquery.js +0 -4
  78. data/vagrant-registration-0.0.17/doc/method_list.html +0 -279
  79. data/vagrant-registration-0.0.17/doc/top-level-namespace.html +0 -112
  80. data/vagrant-registration-0.0.17/dummy.box +0 -0
  81. data/vagrant-registration-0.0.17/lib/vagrant-registration/action/register.rb +0 -113
  82. data/vagrant-registration-0.0.17/lib/vagrant-registration/action/unregister.rb +0 -56
  83. data/vagrant-registration-0.0.17/lib/vagrant-registration/action.rb +0 -22
  84. data/vagrant-registration-0.0.17/lib/vagrant-registration/config.rb +0 -39
  85. data/vagrant-registration-0.0.17/lib/vagrant-registration/plugin.rb +0 -74
  86. data/vagrant-registration-0.0.17/lib/vagrant-registration/version.rb +0 -5
  87. data/vagrant-registration-0.0.17/lib/vagrant-registration.rb +0 -21
  88. data/vagrant-registration-0.0.17/plugins/guests/redhat/cap/registration.rb +0 -72
  89. data/vagrant-registration-0.0.17/plugins/guests/redhat/cap/subscription_manager.rb +0 -63
  90. data/vagrant-registration-0.0.17/plugins/guests/redhat/plugin.rb +0 -62
  91. data/vagrant-registration-0.0.17/tests/helpers.sh +0 -128
  92. data/vagrant-registration-0.0.17/tests/run.sh +0 -59
  93. data/vagrant-registration-0.0.17/tests/vagrantfiles/Vagrantfile.rhel_multi_machine +0 -19
  94. data/vagrant-registration-0.0.17/tests/vagrantfiles/Vagrantfile.rhel_wrong_credentials +0 -14
  95. data/vagrant-registration-0.0.17/vagrant-registration.gemspec +0 -49
  96. data/vagrant-registration-0.0.17/vagrant-registration.spec +0 -90
  97. data/vagrant-registration.spec +0 -90
@@ -1,1016 +0,0 @@
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: VagrantPlugins::GuestFedora::Cap::ChangeHostName
8
-
9
- &mdash; 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#!VagrantPlugins/GuestFedora/Cap/ChangeHostName.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> &raquo;
35
- <span class='title'><span class='object_link'><a href="../../../VagrantPlugins.html" title="VagrantPlugins (module)">VagrantPlugins</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../GuestFedora.html" title="VagrantPlugins::GuestFedora (module)">GuestFedora</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Cap.html" title="VagrantPlugins::GuestFedora::Cap (module)">Cap</a></span></span>
36
- &raquo;
37
- <span class="title">ChangeHostName</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: VagrantPlugins::GuestFedora::Cap::ChangeHostName
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">VagrantPlugins::GuestFedora::Cap::ChangeHostName</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">plugins/guests/fedora/cap/change_host_name.rb</dd>
98
-
99
- </dl>
100
- <div class="clear"></div>
101
-
102
-
103
-
104
-
105
-
106
- <h2>Instance 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="#machine-instance_method" title="#machine (instance method)">- (Object) <strong>machine</strong> </a>
113
-
114
-
115
-
116
- </span>
117
-
118
-
119
-
120
-
121
- <span class="note title readonly">readonly</span>
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
- <span class="summary_desc"><div class='inline'>
132
- <p>Returns the value of attribute machine.</p>
133
- </div></span>
134
-
135
- </li>
136
-
137
-
138
- <li class="public ">
139
- <span class="summary_signature">
140
-
141
- <a href="#new_hostname-instance_method" title="#new_hostname (instance method)">- (Object) <strong>new_hostname</strong> </a>
142
-
143
-
144
-
145
- </span>
146
-
147
-
148
-
149
-
150
- <span class="note title readonly">readonly</span>
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
- <span class="summary_desc"><div class='inline'>
161
- <p>Returns the value of attribute new_hostname.</p>
162
- </div></span>
163
-
164
- </li>
165
-
166
-
167
- </ul>
168
-
169
-
170
-
171
-
172
-
173
- <h2>
174
- Class Method Summary
175
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
176
- </h2>
177
-
178
- <ul class="summary">
179
-
180
- <li class="public ">
181
- <span class="summary_signature">
182
-
183
- <a href="#change_host_name-class_method" title="change_host_name (class method)">+ (Object) <strong>change_host_name</strong>(machine, name) </a>
184
-
185
-
186
-
187
- </span>
188
-
189
-
190
-
191
-
192
-
193
-
194
-
195
-
196
-
197
- <span class="summary_desc"><div class='inline'></div></span>
198
-
199
- </li>
200
-
201
-
202
- </ul>
203
-
204
- <h2>
205
- Instance Method Summary
206
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
207
- </h2>
208
-
209
- <ul class="summary">
210
-
211
- <li class="public ">
212
- <span class="summary_signature">
213
-
214
- <a href="#change%21-instance_method" title="#change! (instance method)">- (Object) <strong>change!</strong> </a>
215
-
216
-
217
-
218
- </span>
219
-
220
-
221
-
222
-
223
-
224
-
225
-
226
-
227
-
228
- <span class="summary_desc"><div class='inline'></div></span>
229
-
230
- </li>
231
-
232
-
233
- <li class="public ">
234
- <span class="summary_signature">
235
-
236
- <a href="#current_hostname-instance_method" title="#current_hostname (instance method)">- (Object) <strong>current_hostname</strong> </a>
237
-
238
-
239
-
240
- </span>
241
-
242
-
243
-
244
-
245
-
246
-
247
-
248
-
249
-
250
- <span class="summary_desc"><div class='inline'></div></span>
251
-
252
- </li>
253
-
254
-
255
- <li class="public ">
256
- <span class="summary_signature">
257
-
258
- <a href="#fqdn-instance_method" title="#fqdn (instance method)">- (Object) <strong>fqdn</strong> </a>
259
-
260
-
261
-
262
- </span>
263
-
264
-
265
-
266
-
267
-
268
-
269
-
270
-
271
-
272
- <span class="summary_desc"><div class='inline'></div></span>
273
-
274
- </li>
275
-
276
-
277
- <li class="public ">
278
- <span class="summary_signature">
279
-
280
- <a href="#get_current_hostname-instance_method" title="#get_current_hostname (instance method)">- (Object) <strong>get_current_hostname</strong> </a>
281
-
282
-
283
-
284
- </span>
285
-
286
-
287
-
288
-
289
-
290
-
291
-
292
-
293
-
294
- <span class="summary_desc"><div class='inline'></div></span>
295
-
296
- </li>
297
-
298
-
299
- <li class="public ">
300
- <span class="summary_signature">
301
-
302
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (ChangeHostName) <strong>initialize</strong>(machine, new_hostname) </a>
303
-
304
-
305
-
306
- </span>
307
-
308
-
309
- <span class="note title constructor">constructor</span>
310
-
311
-
312
-
313
-
314
-
315
-
316
-
317
-
318
- <span class="summary_desc"><div class='inline'>
319
- <p>A new instance of ChangeHostName.</p>
320
- </div></span>
321
-
322
- </li>
323
-
324
-
325
- <li class="public ">
326
- <span class="summary_signature">
327
-
328
- <a href="#refresh_hostname_service-instance_method" title="#refresh_hostname_service (instance method)">- (Object) <strong>refresh_hostname_service</strong> </a>
329
-
330
-
331
-
332
- </span>
333
-
334
-
335
-
336
-
337
-
338
-
339
-
340
-
341
-
342
- <span class="summary_desc"><div class='inline'></div></span>
343
-
344
- </li>
345
-
346
-
347
- <li class="public ">
348
- <span class="summary_signature">
349
-
350
- <a href="#short_hostname-instance_method" title="#short_hostname (instance method)">- (Object) <strong>short_hostname</strong> </a>
351
-
352
-
353
-
354
- </span>
355
-
356
-
357
-
358
-
359
-
360
-
361
-
362
-
363
-
364
- <span class="summary_desc"><div class='inline'></div></span>
365
-
366
- </li>
367
-
368
-
369
- <li class="public ">
370
- <span class="summary_signature">
371
-
372
- <a href="#should_change%3F-instance_method" title="#should_change? (instance method)">- (Boolean) <strong>should_change?</strong> </a>
373
-
374
-
375
-
376
- </span>
377
-
378
-
379
-
380
-
381
-
382
-
383
-
384
-
385
-
386
- <span class="summary_desc"><div class='inline'></div></span>
387
-
388
- </li>
389
-
390
-
391
- <li class="public ">
392
- <span class="summary_signature">
393
-
394
- <a href="#sudo-instance_method" title="#sudo (instance method)">- (Object) <strong>sudo</strong>(cmd, &amp;block) </a>
395
-
396
-
397
-
398
- </span>
399
-
400
-
401
-
402
-
403
-
404
-
405
-
406
-
407
-
408
- <span class="summary_desc"><div class='inline'></div></span>
409
-
410
- </li>
411
-
412
-
413
- <li class="public ">
414
- <span class="summary_signature">
415
-
416
- <a href="#update_etc_hostname-instance_method" title="#update_etc_hostname (instance method)">- (Object) <strong>update_etc_hostname</strong> </a>
417
-
418
-
419
-
420
- </span>
421
-
422
-
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
- <span class="summary_desc"><div class='inline'></div></span>
431
-
432
- </li>
433
-
434
-
435
- <li class="public ">
436
- <span class="summary_signature">
437
-
438
- <a href="#update_etc_hosts-instance_method" title="#update_etc_hosts (instance method)">- (Object) <strong>update_etc_hosts</strong> </a>
439
-
440
-
441
-
442
- </span>
443
-
444
-
445
-
446
-
447
-
448
-
449
-
450
-
451
-
452
- <span class="summary_desc"><div class='inline'>
453
- <p>/etc/hosts should resemble: 127.0.0.1 localhost 127.0.1.1 host.fqdn.com
454
- host.fqdn host.</p>
455
- </div></span>
456
-
457
- </li>
458
-
459
-
460
- </ul>
461
-
462
-
463
- <div id="constructor_details" class="method_details_list">
464
- <h2>Constructor Details</h2>
465
-
466
- <div class="method_details first">
467
- <h3 class="signature first" id="initialize-instance_method">
468
-
469
- - (<tt><span class='object_link'><a href="" title="VagrantPlugins::GuestFedora::Cap::ChangeHostName (class)">ChangeHostName</a></span></tt>) <strong>initialize</strong>(machine, new_hostname)
470
-
471
-
472
-
473
-
474
-
475
- </h3><div class="docstring">
476
- <div class="discussion">
477
-
478
- <p>Returns a new instance of ChangeHostName</p>
479
-
480
-
481
- </div>
482
- </div>
483
- <div class="tags">
484
-
485
-
486
- </div><table class="source_code">
487
- <tr>
488
- <td>
489
- <pre class="lines">
490
-
491
-
492
- 11
493
- 12
494
- 13
495
- 14</pre>
496
- </td>
497
- <td>
498
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 11</span>
499
-
500
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_machine'>machine</span><span class='comma'>,</span> <span class='id identifier rubyid_new_hostname'>new_hostname</span><span class='rparen'>)</span>
501
- <span class='ivar'>@machine</span> <span class='op'>=</span> <span class='id identifier rubyid_machine'>machine</span>
502
- <span class='ivar'>@new_hostname</span> <span class='op'>=</span> <span class='id identifier rubyid_new_hostname'>new_hostname</span>
503
- <span class='kw'>end</span></pre>
504
- </td>
505
- </tr>
506
- </table>
507
- </div>
508
-
509
- </div>
510
-
511
- <div id="instance_attr_details" class="attr_details">
512
- <h2>Instance Attribute Details</h2>
513
-
514
-
515
- <span id=""></span>
516
- <div class="method_details first">
517
- <h3 class="signature first" id="machine-instance_method">
518
-
519
- - (<tt>Object</tt>) <strong>machine</strong> <span class="extras">(readonly)</span>
520
-
521
-
522
-
523
-
524
-
525
- </h3><div class="docstring">
526
- <div class="discussion">
527
-
528
- <p>Returns the value of attribute machine</p>
529
-
530
-
531
- </div>
532
- </div>
533
- <div class="tags">
534
-
535
-
536
- </div><table class="source_code">
537
- <tr>
538
- <td>
539
- <pre class="lines">
540
-
541
-
542
- 9
543
- 10
544
- 11</pre>
545
- </td>
546
- <td>
547
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 9</span>
548
-
549
- <span class='kw'>def</span> <span class='id identifier rubyid_machine'>machine</span>
550
- <span class='ivar'>@machine</span>
551
- <span class='kw'>end</span></pre>
552
- </td>
553
- </tr>
554
- </table>
555
- </div>
556
-
557
-
558
- <span id=""></span>
559
- <div class="method_details ">
560
- <h3 class="signature " id="new_hostname-instance_method">
561
-
562
- - (<tt>Object</tt>) <strong>new_hostname</strong> <span class="extras">(readonly)</span>
563
-
564
-
565
-
566
-
567
-
568
- </h3><div class="docstring">
569
- <div class="discussion">
570
-
571
- <p>Returns the value of attribute new_hostname</p>
572
-
573
-
574
- </div>
575
- </div>
576
- <div class="tags">
577
-
578
-
579
- </div><table class="source_code">
580
- <tr>
581
- <td>
582
- <pre class="lines">
583
-
584
-
585
- 9
586
- 10
587
- 11</pre>
588
- </td>
589
- <td>
590
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 9</span>
591
-
592
- <span class='kw'>def</span> <span class='id identifier rubyid_new_hostname'>new_hostname</span>
593
- <span class='ivar'>@new_hostname</span>
594
- <span class='kw'>end</span></pre>
595
- </td>
596
- </tr>
597
- </table>
598
- </div>
599
-
600
- </div>
601
-
602
-
603
- <div id="class_method_details" class="method_details_list">
604
- <h2>Class Method Details</h2>
605
-
606
-
607
- <div class="method_details first">
608
- <h3 class="signature first" id="change_host_name-class_method">
609
-
610
- + (<tt>Object</tt>) <strong>change_host_name</strong>(machine, name)
611
-
612
-
613
-
614
-
615
-
616
- </h3><table class="source_code">
617
- <tr>
618
- <td>
619
- <pre class="lines">
620
-
621
-
622
- 5
623
- 6
624
- 7</pre>
625
- </td>
626
- <td>
627
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 5</span>
628
-
629
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_change_host_name'>change_host_name</span><span class='lparen'>(</span><span class='id identifier rubyid_machine'>machine</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
630
- <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_machine'>machine</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_change!'>change!</span>
631
- <span class='kw'>end</span></pre>
632
- </td>
633
- </tr>
634
- </table>
635
- </div>
636
-
637
- </div>
638
-
639
- <div id="instance_method_details" class="method_details_list">
640
- <h2>Instance Method Details</h2>
641
-
642
-
643
- <div class="method_details first">
644
- <h3 class="signature first" id="change!-instance_method">
645
-
646
- - (<tt>Object</tt>) <strong>change!</strong>
647
-
648
-
649
-
650
-
651
-
652
- </h3><table class="source_code">
653
- <tr>
654
- <td>
655
- <pre class="lines">
656
-
657
-
658
- 16
659
- 17
660
- 18
661
- 19
662
- 20
663
- 21
664
- 22</pre>
665
- </td>
666
- <td>
667
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 16</span>
668
-
669
- <span class='kw'>def</span> <span class='id identifier rubyid_change!'>change!</span>
670
- <span class='kw'>return</span> <span class='kw'>unless</span> <span class='id identifier rubyid_should_change?'>should_change?</span>
671
-
672
- <span class='id identifier rubyid_update_etc_hostname'>update_etc_hostname</span>
673
- <span class='id identifier rubyid_update_etc_hosts'>update_etc_hosts</span>
674
- <span class='id identifier rubyid_refresh_hostname_service'>refresh_hostname_service</span>
675
- <span class='kw'>end</span></pre>
676
- </td>
677
- </tr>
678
- </table>
679
- </div>
680
-
681
- <div class="method_details ">
682
- <h3 class="signature " id="current_hostname-instance_method">
683
-
684
- - (<tt>Object</tt>) <strong>current_hostname</strong>
685
-
686
-
687
-
688
-
689
-
690
- </h3><table class="source_code">
691
- <tr>
692
- <td>
693
- <pre class="lines">
694
-
695
-
696
- 28
697
- 29
698
- 30</pre>
699
- </td>
700
- <td>
701
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 28</span>
702
-
703
- <span class='kw'>def</span> <span class='id identifier rubyid_current_hostname'>current_hostname</span>
704
- <span class='ivar'>@current_hostname</span> <span class='op'>||=</span> <span class='id identifier rubyid_get_current_hostname'>get_current_hostname</span>
705
- <span class='kw'>end</span></pre>
706
- </td>
707
- </tr>
708
- </table>
709
- </div>
710
-
711
- <div class="method_details ">
712
- <h3 class="signature " id="fqdn-instance_method">
713
-
714
- - (<tt>Object</tt>) <strong>fqdn</strong>
715
-
716
-
717
-
718
-
719
-
720
- </h3><table class="source_code">
721
- <tr>
722
- <td>
723
- <pre class="lines">
724
-
725
-
726
- 61
727
- 62
728
- 63</pre>
729
- </td>
730
- <td>
731
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 61</span>
732
-
733
- <span class='kw'>def</span> <span class='id identifier rubyid_fqdn'>fqdn</span>
734
- <span class='id identifier rubyid_new_hostname'>new_hostname</span>
735
- <span class='kw'>end</span></pre>
736
- </td>
737
- </tr>
738
- </table>
739
- </div>
740
-
741
- <div class="method_details ">
742
- <h3 class="signature " id="get_current_hostname-instance_method">
743
-
744
- - (<tt>Object</tt>) <strong>get_current_hostname</strong>
745
-
746
-
747
-
748
-
749
-
750
- </h3><table class="source_code">
751
- <tr>
752
- <td>
753
- <pre class="lines">
754
-
755
-
756
- 32
757
- 33
758
- 34
759
- 35
760
- 36
761
- 37
762
- 38
763
- 39</pre>
764
- </td>
765
- <td>
766
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 32</span>
767
-
768
- <span class='kw'>def</span> <span class='id identifier rubyid_get_current_hostname'>get_current_hostname</span>
769
- <span class='id identifier rubyid_hostname'>hostname</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span>
770
- <span class='id identifier rubyid_sudo'>sudo</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hostname -f</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_data'>data</span><span class='op'>|</span>
771
- <span class='id identifier rubyid_hostname'>hostname</span> <span class='op'>=</span> <span class='id identifier rubyid_data'>data</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span> <span class='kw'>if</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:stdout</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_hostname'>hostname</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
772
- <span class='kw'>end</span>
773
-
774
- <span class='id identifier rubyid_hostname'>hostname</span>
775
- <span class='kw'>end</span></pre>
776
- </td>
777
- </tr>
778
- </table>
779
- </div>
780
-
781
- <div class="method_details ">
782
- <h3 class="signature " id="refresh_hostname_service-instance_method">
783
-
784
- - (<tt>Object</tt>) <strong>refresh_hostname_service</strong>
785
-
786
-
787
-
788
-
789
-
790
- </h3><table class="source_code">
791
- <tr>
792
- <td>
793
- <pre class="lines">
794
-
795
-
796
- 57
797
- 58
798
- 59</pre>
799
- </td>
800
- <td>
801
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 57</span>
802
-
803
- <span class='kw'>def</span> <span class='id identifier rubyid_refresh_hostname_service'>refresh_hostname_service</span>
804
- <span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hostname -F /etc/hostname</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
805
- <span class='kw'>end</span></pre>
806
- </td>
807
- </tr>
808
- </table>
809
- </div>
810
-
811
- <div class="method_details ">
812
- <h3 class="signature " id="short_hostname-instance_method">
813
-
814
- - (<tt>Object</tt>) <strong>short_hostname</strong>
815
-
816
-
817
-
818
-
819
-
820
- </h3><table class="source_code">
821
- <tr>
822
- <td>
823
- <pre class="lines">
824
-
825
-
826
- 65
827
- 66
828
- 67</pre>
829
- </td>
830
- <td>
831
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 65</span>
832
-
833
- <span class='kw'>def</span> <span class='id identifier rubyid_short_hostname'>short_hostname</span>
834
- <span class='id identifier rubyid_new_hostname'>new_hostname</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
835
- <span class='kw'>end</span></pre>
836
- </td>
837
- </tr>
838
- </table>
839
- </div>
840
-
841
- <div class="method_details ">
842
- <h3 class="signature " id="should_change?-instance_method">
843
-
844
- - (<tt>Boolean</tt>) <strong>should_change?</strong>
845
-
846
-
847
-
848
-
849
-
850
- </h3><div class="docstring">
851
- <div class="discussion">
852
-
853
-
854
- </div>
855
- </div>
856
- <div class="tags">
857
-
858
- <p class="tag_title">Returns:</p>
859
- <ul class="return">
860
-
861
- <li>
862
-
863
-
864
- <span class='type'>(<tt>Boolean</tt>)</span>
865
-
866
-
867
-
868
- </li>
869
-
870
- </ul>
871
-
872
- </div><table class="source_code">
873
- <tr>
874
- <td>
875
- <pre class="lines">
876
-
877
-
878
- 24
879
- 25
880
- 26</pre>
881
- </td>
882
- <td>
883
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 24</span>
884
-
885
- <span class='kw'>def</span> <span class='id identifier rubyid_should_change?'>should_change?</span>
886
- <span class='id identifier rubyid_new_hostname'>new_hostname</span> <span class='op'>!=</span> <span class='id identifier rubyid_current_hostname'>current_hostname</span>
887
- <span class='kw'>end</span></pre>
888
- </td>
889
- </tr>
890
- </table>
891
- </div>
892
-
893
- <div class="method_details ">
894
- <h3 class="signature " id="sudo-instance_method">
895
-
896
- - (<tt>Object</tt>) <strong>sudo</strong>(cmd, &amp;block)
897
-
898
-
899
-
900
-
901
-
902
- </h3><table class="source_code">
903
- <tr>
904
- <td>
905
- <pre class="lines">
906
-
907
-
908
- 69
909
- 70
910
- 71</pre>
911
- </td>
912
- <td>
913
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 69</span>
914
-
915
- <span class='kw'>def</span> <span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd'>cmd</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
916
- <span class='id identifier rubyid_machine'>machine</span><span class='period'>.</span><span class='id identifier rubyid_communicate'>communicate</span><span class='period'>.</span><span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd'>cmd</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
917
- <span class='kw'>end</span></pre>
918
- </td>
919
- </tr>
920
- </table>
921
- </div>
922
-
923
- <div class="method_details ">
924
- <h3 class="signature " id="update_etc_hostname-instance_method">
925
-
926
- - (<tt>Object</tt>) <strong>update_etc_hostname</strong>
927
-
928
-
929
-
930
-
931
-
932
- </h3><table class="source_code">
933
- <tr>
934
- <td>
935
- <pre class="lines">
936
-
937
-
938
- 41
939
- 42
940
- 43</pre>
941
- </td>
942
- <td>
943
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 41</span>
944
-
945
- <span class='kw'>def</span> <span class='id identifier rubyid_update_etc_hostname'>update_etc_hostname</span>
946
- <span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>echo &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_short_hostname'>short_hostname</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; &gt; /etc/hostname</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
947
- <span class='kw'>end</span></pre>
948
- </td>
949
- </tr>
950
- </table>
951
- </div>
952
-
953
- <div class="method_details ">
954
- <h3 class="signature " id="update_etc_hosts-instance_method">
955
-
956
- - (<tt>Object</tt>) <strong>update_etc_hosts</strong>
957
-
958
-
959
-
960
-
961
-
962
- </h3><div class="docstring">
963
- <div class="discussion">
964
-
965
- <p>/etc/hosts should resemble: 127.0.0.1 localhost 127.0.1.1 host.fqdn.com
966
- host.fqdn host</p>
967
-
968
-
969
- </div>
970
- </div>
971
- <div class="tags">
972
-
973
-
974
- </div><table class="source_code">
975
- <tr>
976
- <td>
977
- <pre class="lines">
978
-
979
-
980
- 48
981
- 49
982
- 50
983
- 51
984
- 52
985
- 53
986
- 54
987
- 55</pre>
988
- </td>
989
- <td>
990
- <pre class="code"><span class="info file"># File 'plugins/guests/fedora/cap/change_host_name.rb', line 48</span>
991
-
992
- <span class='kw'>def</span> <span class='id identifier rubyid_update_etc_hosts'>update_etc_hosts</span>
993
- <span class='id identifier rubyid_ip_address'>ip_address</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>([0-9]{1,3}\.){3}[0-9]{1,3}</span><span class='tstring_end'>&#39;</span></span>
994
- <span class='id identifier rubyid_search'>search</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>^(</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_ip_address'>ip_address</span><span class='embexpr_end'>}</span><span class='tstring_content'>)\\s+</span><span class='embexpr_beg'>#{</span><span class='const'>Regexp</span><span class='period'>.</span><span class='id identifier rubyid_escape'>escape</span><span class='lparen'>(</span><span class='id identifier rubyid_current_hostname'>current_hostname</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>(\\s.*)?$</span><span class='tstring_end'>&quot;</span></span>
995
- <span class='id identifier rubyid_replace'>replace</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\\1 </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_fqdn'>fqdn</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_short_hostname'>short_hostname</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span>
996
- <span class='id identifier rubyid_expression'>expression</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>s</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_search'>search</span><span class='comma'>,</span> <span class='id identifier rubyid_replace'>replace</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>g</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>@</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
997
-
998
- <span class='id identifier rubyid_sudo'>sudo</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sed -ri &#39;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_expression'>expression</span><span class='embexpr_end'>}</span><span class='tstring_content'>&#39; /etc/hosts</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
999
- <span class='kw'>end</span></pre>
1000
- </td>
1001
- </tr>
1002
- </table>
1003
- </div>
1004
-
1005
- </div>
1006
-
1007
- </div>
1008
-
1009
- <div id="footer">
1010
- Generated on Fri Apr 17 13:41:46 2015 by
1011
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1012
- 0.8.7.6 (ruby-2.1.5).
1013
- </div>
1014
-
1015
- </body>
1016
- </html>