corl 0.4.29 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/Gemfile.lock +16 -13
- data/VERSION +1 -1
- data/bin/corl +21 -1
- data/bootstrap/os/ubuntu/00_base.sh +2 -2
- data/bootstrap/os/ubuntu/06_puppet.sh +7 -12
- data/bootstrap/os/ubuntu/09_nucleon.sh +1 -1
- data/bootstrap/os/ubuntu/10_corl.sh +1 -4
- data/corl.gemspec +193 -40
- data/lib/CORL/builder/identity.rb +68 -0
- data/lib/CORL/builder/package.rb +75 -0
- data/lib/CORL/configuration/file.rb +5 -5
- data/lib/CORL/machine/{aws.rb → AWS.rb} +2 -2
- data/lib/CORL/machine/physical.rb +1 -1
- data/lib/CORL/machine/rackspace.rb +1 -1
- data/lib/CORL/machine/vagrant.rb +2 -2
- data/lib/CORL/network/{default.rb → CORL.rb} +1 -1
- data/lib/CORL/node/{aws.rb → AWS.rb} +1 -1
- data/lib/CORL/node/local.rb +1 -1
- data/lib/CORL/node/vagrant.rb +7 -2
- data/lib/CORL/provisioner/puppetnode.rb +139 -131
- data/lib/core/build.rb +112 -0
- data/lib/core/facade.rb +48 -8
- data/lib/core/mixin/builder.rb +158 -0
- data/lib/core/mixin/lookup.rb +51 -20
- data/lib/core/mixin/machine/ssh.rb +16 -4
- data/lib/core/plugin/builder.rb +49 -0
- data/lib/core/plugin/{action.rb → cloud_action.rb} +22 -16
- data/lib/core/plugin/configuration.rb +9 -3
- data/lib/core/plugin/fog_machine.rb +3 -3
- data/lib/core/plugin/fog_node.rb +1 -1
- data/lib/core/plugin/machine.rb +2 -2
- data/lib/core/plugin/network.rb +39 -10
- data/lib/core/plugin/node.rb +95 -35
- data/lib/core/plugin/provisioner.rb +133 -113
- data/lib/core/util/puppet/resource.rb +1 -1
- data/lib/core/vagrant/actions/delete_cache.rb +7 -1
- data/lib/core/vagrant/commands/launcher.rb +2 -2
- data/lib/core/vagrant/config.rb +29 -2
- data/lib/corl.rb +9 -8
- data/lib/facter/corl_config_ready.rb +1 -1
- data/lib/facter/vagrant_exists.rb +1 -1
- data/lib/nucleon/action/cloud/create.rb +51 -0
- data/lib/nucleon/action/cloud/hiera.rb +61 -0
- data/lib/{CORL/action → nucleon/action/cloud}/images.rb +11 -2
- data/lib/nucleon/action/cloud/inspect.rb +47 -0
- data/lib/{CORL/action → nucleon/action/cloud}/machines.rb +11 -2
- data/lib/{CORL/action → nucleon/action/cloud}/regions.rb +11 -2
- data/lib/{CORL/action → nucleon/action/cloud}/vagrantfile.rb +11 -2
- data/lib/{CORL/action/ip.rb → nucleon/action/node/IP.rb} +11 -2
- data/lib/{CORL/action/ssh.rb → nucleon/action/node/SSH.rb} +15 -7
- data/lib/{CORL/action → nucleon/action/node}/authorize.rb +11 -2
- data/lib/{CORL/action → nucleon/action/node}/bootstrap.rb +13 -4
- data/lib/nucleon/action/node/build.rb +49 -0
- data/lib/{CORL/action → nucleon/action/node}/destroy.rb +14 -5
- data/lib/{CORL/action → nucleon/action/node}/exec.rb +11 -2
- data/lib/{CORL/action → nucleon/action/node}/facts.rb +12 -3
- data/lib/{CORL/action → nucleon/action/node}/image.rb +13 -4
- data/lib/nucleon/action/node/keypair.rb +85 -0
- data/lib/{CORL/action → nucleon/action/node}/lookup.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/provision.rb +30 -8
- data/lib/{CORL/action → nucleon/action/node}/reboot.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/revoke.rb +11 -2
- data/lib/{CORL/action → nucleon/action/node}/seed.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/spawn.rb +19 -9
- data/lib/{CORL/action → nucleon/action/node}/start.rb +13 -4
- data/lib/{CORL/action → nucleon/action/node}/stop.rb +13 -4
- data/lib/{CORL → nucleon}/event/puppet.rb +2 -2
- data/lib/{CORL → nucleon}/template/environment.rb +2 -2
- data/lib/puppet/indirector/corl.rb +7 -4
- data/lib/puppet/parser/functions/corl_resources.rb +1 -0
- data/lib/puppet/parser/functions/global_array.rb +2 -1
- data/lib/puppet/parser/functions/global_hash.rb +2 -1
- data/lib/puppet/parser/functions/global_param.rb +2 -1
- data/lib/puppet/parser/functions/module_array.rb +2 -1
- data/lib/puppet/parser/functions/module_hash.rb +3 -2
- data/lib/puppet/parser/functions/module_param.rb +3 -2
- data/lib/puppet/parser/functions/render.rb +1 -0
- data/locales/en.yml +80 -0
- data/rdoc/site/0.4.29/CORL/Action/Authorize.html +485 -0
- data/rdoc/site/0.4.29/CORL/Action/Bootstrap.html +546 -0
- data/rdoc/site/0.4.29/CORL/Action/Build.html +396 -0
- data/rdoc/site/0.4.29/CORL/Action/Destroy.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Exec.html +472 -0
- data/rdoc/site/0.4.29/CORL/Action/Facts.html +398 -0
- data/rdoc/site/0.4.29/CORL/Action/Image.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Images.html +514 -0
- data/rdoc/site/0.4.29/CORL/Action/Ip.html +395 -0
- data/rdoc/site/0.4.29/CORL/Action/Keypair.html +494 -0
- data/rdoc/site/0.4.29/CORL/Action/Lookup.html +474 -0
- data/rdoc/site/0.4.29/CORL/Action/Machines.html +509 -0
- data/rdoc/site/0.4.29/CORL/Action/Provision.html +456 -0
- data/rdoc/site/0.4.29/CORL/Action/Reboot.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Regions.html +509 -0
- data/rdoc/site/0.4.29/CORL/Action/Revoke.html +483 -0
- data/rdoc/site/0.4.29/CORL/Action/Seed.html +544 -0
- data/rdoc/site/0.4.29/CORL/Action/Spawn.html +616 -0
- data/rdoc/site/0.4.29/CORL/Action/Ssh.html +526 -0
- data/rdoc/site/0.4.29/CORL/Action/Start.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Stop.html +515 -0
- data/rdoc/site/0.4.29/CORL/Action/Vagrantfile.html +457 -0
- data/rdoc/site/0.4.29/CORL/Action.html +360 -0
- data/rdoc/site/0.4.29/CORL/Configuration/File.html +1128 -0
- data/rdoc/site/0.4.29/CORL/Configuration.html +339 -0
- data/rdoc/site/0.4.29/CORL/Errors.html +339 -0
- data/rdoc/site/0.4.29/CORL/Event/Puppet.html +673 -0
- data/rdoc/site/0.4.29/CORL/Event.html +339 -0
- data/rdoc/site/0.4.29/CORL/Facade.html +742 -0
- data/rdoc/site/0.4.29/CORL/Machine/Aws.html +733 -0
- data/rdoc/site/0.4.29/CORL/Machine/Fog.html +1269 -0
- data/rdoc/site/0.4.29/CORL/Machine/Physical.html +1039 -0
- data/rdoc/site/0.4.29/CORL/Machine/Rackspace.html +514 -0
- data/rdoc/site/0.4.29/CORL/Machine/Vagrant.html +1300 -0
- data/rdoc/site/0.4.29/CORL/Machine.html +343 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Action/Keypair.html +572 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Action.html +339 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Lookup.html +954 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Machine/SSH.html +643 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Machine.html +339 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Macro/NetworkSettings.html +464 -0
- data/rdoc/site/0.4.29/CORL/Mixin/Macro.html +339 -0
- data/rdoc/site/0.4.29/CORL/Mixin.html +342 -0
- data/rdoc/site/0.4.29/CORL/Network/Default.html +391 -0
- data/rdoc/site/0.4.29/CORL/Network.html +339 -0
- data/rdoc/site/0.4.29/CORL/Node/Aws.html +716 -0
- data/rdoc/site/0.4.29/CORL/Node/Fog.html +1192 -0
- data/rdoc/site/0.4.29/CORL/Node/Local.html +424 -0
- data/rdoc/site/0.4.29/CORL/Node/Rackspace.html +709 -0
- data/rdoc/site/0.4.29/CORL/Node/Vagrant.html +1451 -0
- data/rdoc/site/0.4.29/CORL/Node.html +343 -0
- data/rdoc/site/0.4.29/CORL/Plugin/CloudAction.html +810 -0
- data/rdoc/site/0.4.29/CORL/Plugin.html +339 -0
- data/rdoc/site/0.4.29/CORL/Provisioner/Puppetnode.html +1095 -0
- data/rdoc/site/0.4.29/CORL/Provisioner.html +339 -0
- data/rdoc/site/0.4.29/CORL/Template/Environment.html +528 -0
- data/rdoc/site/0.4.29/CORL/Template.html +339 -0
- data/rdoc/site/0.4.29/CORL/Util/Puppet/Resource.html +1038 -0
- data/rdoc/site/0.4.29/CORL/Util/Puppet/ResourceGroup.html +920 -0
- data/rdoc/site/0.4.29/CORL/Util/Puppet.html +1087 -0
- data/rdoc/site/0.4.29/CORL/Util.html +341 -0
- data/rdoc/site/0.4.29/CORL/Vagrant/Config.html +896 -0
- data/rdoc/site/0.4.29/CORL/Vagrant.html +418 -0
- data/rdoc/site/0.4.29/CORL.html +465 -0
- data/rdoc/site/0.4.29/Facter/Util/Loader.html +396 -0
- data/rdoc/site/0.4.29/Facter/Util.html +339 -0
- data/rdoc/site/0.4.29/Facter.html +339 -0
- data/rdoc/site/0.4.29/Fog/Compute/AWS/Server.html +423 -0
- data/rdoc/site/0.4.29/Fog/Compute/AWS.html +345 -0
- data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2/Server.html +408 -0
- data/rdoc/site/0.4.29/Fog/Compute/RackspaceV2.html +345 -0
- data/rdoc/site/0.4.29/Fog/Compute.html +340 -0
- data/rdoc/site/0.4.29/Fog.html +340 -0
- data/rdoc/site/0.4.29/Hiera/Backend.html +422 -0
- data/rdoc/site/0.4.29/Hiera/Corl_logger.html +449 -0
- data/rdoc/site/0.4.29/Hiera.html +346 -0
- data/rdoc/site/0.4.29/Nucleon/Config.html +357 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Base.html +345 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Configuration.html +1213 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Machine.html +1279 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Network.html +1425 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Node.html +3715 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin/Provisioner.html +1297 -0
- data/rdoc/site/0.4.29/Nucleon/Plugin.html +344 -0
- data/rdoc/site/0.4.29/Nucleon.html +344 -0
- data/rdoc/site/0.4.29/Object.html +358 -0
- data/rdoc/site/0.4.29/Puppet/DataBinding/Corl.html +345 -0
- data/rdoc/site/0.4.29/Puppet/DataBinding.html +338 -0
- data/rdoc/site/0.4.29/Puppet/Indirector/Corl.html +454 -0
- data/rdoc/site/0.4.29/Puppet/Indirector.html +338 -0
- data/rdoc/site/0.4.29/Puppet/Parser/Functions.html +480 -0
- data/rdoc/site/0.4.29/Puppet/Parser.html +338 -0
- data/rdoc/site/0.4.29/Puppet.html +338 -0
- data/rdoc/site/0.4.29/README_rdoc.html +340 -0
- data/rdoc/site/0.4.29/Vagrant/Config/Loader.html +399 -0
- data/rdoc/site/0.4.29/Vagrant/Config.html +339 -0
- data/rdoc/site/0.4.29/Vagrant/Vagrantfile.html +392 -0
- data/rdoc/site/0.4.29/Vagrant.html +346 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/DeleteCache.html +396 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/InitKeys.html +408 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action/LinkNetwork.html +406 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Action.html +341 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/BaseAction.html +491 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command/Launcher.html +533 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Command.html +339 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config/CORL.html +732 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Config.html +339 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Plugin.html +345 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner/CORL.html +536 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL/Provisioner.html +339 -0
- data/rdoc/site/0.4.29/VagrantPlugins/CORL.html +346 -0
- data/rdoc/site/0.4.29/VagrantPlugins.html +346 -0
- data/rdoc/site/0.4.29/created.rid +96 -0
- data/rdoc/site/0.4.29/images/add.png +0 -0
- data/rdoc/site/0.4.29/images/brick.png +0 -0
- data/rdoc/site/0.4.29/images/brick_link.png +0 -0
- data/rdoc/site/0.4.29/images/bug.png +0 -0
- data/rdoc/site/0.4.29/images/bullet_black.png +0 -0
- data/rdoc/site/0.4.29/images/bullet_toggle_minus.png +0 -0
- data/rdoc/site/0.4.29/images/bullet_toggle_plus.png +0 -0
- data/rdoc/site/0.4.29/images/date.png +0 -0
- data/rdoc/site/0.4.29/images/delete.png +0 -0
- data/rdoc/site/0.4.29/images/find.png +0 -0
- data/rdoc/site/0.4.29/images/loadingAnimation.gif +0 -0
- data/rdoc/site/0.4.29/images/macFFBgHack.png +0 -0
- data/rdoc/site/0.4.29/images/package.png +0 -0
- data/rdoc/site/0.4.29/images/page_green.png +0 -0
- data/rdoc/site/0.4.29/images/page_white_text.png +0 -0
- data/rdoc/site/0.4.29/images/page_white_width.png +0 -0
- data/rdoc/site/0.4.29/images/plugin.png +0 -0
- data/rdoc/site/0.4.29/images/ruby.png +0 -0
- data/rdoc/site/0.4.29/images/tag_blue.png +0 -0
- data/rdoc/site/0.4.29/images/tag_green.png +0 -0
- data/rdoc/site/0.4.29/images/transparent.png +0 -0
- data/rdoc/site/0.4.29/images/wrench.png +0 -0
- data/rdoc/site/0.4.29/images/wrench_orange.png +0 -0
- data/rdoc/site/0.4.29/images/zoom.png +0 -0
- data/rdoc/site/0.4.29/index.html +339 -0
- data/rdoc/site/0.4.29/js/darkfish.js +155 -0
- data/rdoc/site/0.4.29/js/jquery.js +18 -0
- data/rdoc/site/0.4.29/js/navigation.js +142 -0
- data/rdoc/site/0.4.29/js/search.js +94 -0
- data/rdoc/site/0.4.29/js/search_index.js +1 -0
- data/rdoc/site/0.4.29/js/searcher.js +228 -0
- data/rdoc/site/0.4.29/rdoc.css +543 -0
- data/rdoc/site/0.4.29/table_of_contents.html +1561 -0
- metadata +192 -45
- data/lib/CORL/action/build.rb +0 -22
- data/lib/CORL/action/keypair.rb +0 -56
- data/lib/core/mod/facter_loader.rb +0 -15
@@ -0,0 +1,1095 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class CORL::Provisioner::Puppetnode - corl 0.4.29</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "../../";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body id="top" class="class">
|
24
|
+
<nav id="metadata">
|
25
|
+
<nav id="home-section" class="section">
|
26
|
+
<h3 class="section-header">
|
27
|
+
<a href="../../index.html">Home</a>
|
28
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
29
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
30
|
+
</h3>
|
31
|
+
</nav>
|
32
|
+
|
33
|
+
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
36
|
+
<h3 class="section-header">
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
39
|
+
</h3>
|
40
|
+
</form>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
<div id="file-metadata">
|
47
|
+
<nav id="file-list-section" class="section">
|
48
|
+
<h3 class="section-header">Defined In</h3>
|
49
|
+
<ul>
|
50
|
+
<li>lib/CORL/provisioner/puppetnode.rb
|
51
|
+
</ul>
|
52
|
+
</nav>
|
53
|
+
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div id="class-metadata">
|
58
|
+
|
59
|
+
<nav id="parent-class-section" class="section">
|
60
|
+
<h3 class="section-header">Parent</h3>
|
61
|
+
|
62
|
+
<p class="link">CORL.plugin_class(:provisioner)
|
63
|
+
|
64
|
+
</nav>
|
65
|
+
|
66
|
+
|
67
|
+
<!-- Method Quickref -->
|
68
|
+
<nav id="method-list-section" class="section">
|
69
|
+
<h3 class="section-header">Methods</h3>
|
70
|
+
|
71
|
+
<ul class="link-list">
|
72
|
+
|
73
|
+
<li><a href="#method-c-status">::status</a>
|
74
|
+
|
75
|
+
<li><a href="#method-i-add_search_path">#add_search_path</a>
|
76
|
+
|
77
|
+
<li><a href="#method-i-build">#build</a>
|
78
|
+
|
79
|
+
<li><a href="#method-i-compiler">#compiler</a>
|
80
|
+
|
81
|
+
<li><a href="#method-i-concatenate">#concatenate</a>
|
82
|
+
|
83
|
+
<li><a href="#method-i-get_node">#get_node</a>
|
84
|
+
|
85
|
+
<li><a href="#method-i-handle">#handle</a>
|
86
|
+
|
87
|
+
<li><a href="#method-i-import">#import</a>
|
88
|
+
|
89
|
+
<li><a href="#method-i-init_puppet">#init_puppet</a>
|
90
|
+
|
91
|
+
<li><a href="#method-i-lookup">#lookup</a>
|
92
|
+
|
93
|
+
<li><a href="#method-i-normalize">#normalize</a>
|
94
|
+
|
95
|
+
<li><a href="#method-i-profile_id">#profile_id</a>
|
96
|
+
|
97
|
+
<li><a href="#method-i-provision">#provision</a>
|
98
|
+
|
99
|
+
<li><a href="#method-i-register">#register</a>
|
100
|
+
|
101
|
+
<li><a href="#method-i-scope">#scope</a>
|
102
|
+
|
103
|
+
</ul>
|
104
|
+
</nav>
|
105
|
+
|
106
|
+
</div>
|
107
|
+
|
108
|
+
<div id="project-metadata">
|
109
|
+
<nav id="fileindex-section" class="section project-section">
|
110
|
+
<h3 class="section-header">Pages</h3>
|
111
|
+
|
112
|
+
<ul>
|
113
|
+
|
114
|
+
<li class="file"><a href="../../README_rdoc.html">README</a>
|
115
|
+
|
116
|
+
</ul>
|
117
|
+
</nav>
|
118
|
+
|
119
|
+
<nav id="classindex-section" class="section project-section">
|
120
|
+
<h3 class="section-header">Class and Module Index</h3>
|
121
|
+
|
122
|
+
<ul class="link-list">
|
123
|
+
|
124
|
+
<li><a href="../../CORL.html">CORL</a>
|
125
|
+
|
126
|
+
<li><a href="../../CORL/Action.html">CORL::Action</a>
|
127
|
+
|
128
|
+
<li><a href="../../CORL/Action/Authorize.html">CORL::Action::Authorize</a>
|
129
|
+
|
130
|
+
<li><a href="../../CORL/Action/Bootstrap.html">CORL::Action::Bootstrap</a>
|
131
|
+
|
132
|
+
<li><a href="../../CORL/Action/Build.html">CORL::Action::Build</a>
|
133
|
+
|
134
|
+
<li><a href="../../CORL/Action/Destroy.html">CORL::Action::Destroy</a>
|
135
|
+
|
136
|
+
<li><a href="../../CORL/Action/Exec.html">CORL::Action::Exec</a>
|
137
|
+
|
138
|
+
<li><a href="../../CORL/Action/Facts.html">CORL::Action::Facts</a>
|
139
|
+
|
140
|
+
<li><a href="../../CORL/Action/Image.html">CORL::Action::Image</a>
|
141
|
+
|
142
|
+
<li><a href="../../CORL/Action/Images.html">CORL::Action::Images</a>
|
143
|
+
|
144
|
+
<li><a href="../../CORL/Action/Ip.html">CORL::Action::Ip</a>
|
145
|
+
|
146
|
+
<li><a href="../../CORL/Action/Keypair.html">CORL::Action::Keypair</a>
|
147
|
+
|
148
|
+
<li><a href="../../CORL/Action/Lookup.html">CORL::Action::Lookup</a>
|
149
|
+
|
150
|
+
<li><a href="../../CORL/Action/Machines.html">CORL::Action::Machines</a>
|
151
|
+
|
152
|
+
<li><a href="../../CORL/Action/Provision.html">CORL::Action::Provision</a>
|
153
|
+
|
154
|
+
<li><a href="../../CORL/Action/Reboot.html">CORL::Action::Reboot</a>
|
155
|
+
|
156
|
+
<li><a href="../../CORL/Action/Regions.html">CORL::Action::Regions</a>
|
157
|
+
|
158
|
+
<li><a href="../../CORL/Action/Revoke.html">CORL::Action::Revoke</a>
|
159
|
+
|
160
|
+
<li><a href="../../CORL/Action/Seed.html">CORL::Action::Seed</a>
|
161
|
+
|
162
|
+
<li><a href="../../CORL/Action/Spawn.html">CORL::Action::Spawn</a>
|
163
|
+
|
164
|
+
<li><a href="../../CORL/Action/Ssh.html">CORL::Action::Ssh</a>
|
165
|
+
|
166
|
+
<li><a href="../../CORL/Action/Start.html">CORL::Action::Start</a>
|
167
|
+
|
168
|
+
<li><a href="../../CORL/Action/Stop.html">CORL::Action::Stop</a>
|
169
|
+
|
170
|
+
<li><a href="../../CORL/Action/Vagrantfile.html">CORL::Action::Vagrantfile</a>
|
171
|
+
|
172
|
+
<li><a href="../../CORL/Configuration.html">CORL::Configuration</a>
|
173
|
+
|
174
|
+
<li><a href="../../CORL/Configuration/File.html">CORL::Configuration::File</a>
|
175
|
+
|
176
|
+
<li><a href="../../CORL/Errors.html">CORL::Errors</a>
|
177
|
+
|
178
|
+
<li><a href="../../CORL/Event.html">CORL::Event</a>
|
179
|
+
|
180
|
+
<li><a href="../../CORL/Event/Puppet.html">CORL::Event::Puppet</a>
|
181
|
+
|
182
|
+
<li><a href="../../CORL/Facade.html">CORL::Facade</a>
|
183
|
+
|
184
|
+
<li><a href="../../CORL/Machine.html">CORL::Machine</a>
|
185
|
+
|
186
|
+
<li><a href="../../CORL/Machine/Aws.html">CORL::Machine::Aws</a>
|
187
|
+
|
188
|
+
<li><a href="../../CORL/Machine/Fog.html">CORL::Machine::Fog</a>
|
189
|
+
|
190
|
+
<li><a href="../../CORL/Machine/Physical.html">CORL::Machine::Physical</a>
|
191
|
+
|
192
|
+
<li><a href="../../CORL/Machine/Rackspace.html">CORL::Machine::Rackspace</a>
|
193
|
+
|
194
|
+
<li><a href="../../CORL/Machine/Vagrant.html">CORL::Machine::Vagrant</a>
|
195
|
+
|
196
|
+
<li><a href="../../CORL/Mixin.html">CORL::Mixin</a>
|
197
|
+
|
198
|
+
<li><a href="../../CORL/Mixin/Action.html">CORL::Mixin::Action</a>
|
199
|
+
|
200
|
+
<li><a href="../../CORL/Mixin/Action/Keypair.html">CORL::Mixin::Action::Keypair</a>
|
201
|
+
|
202
|
+
<li><a href="../../CORL/Mixin/Lookup.html">CORL::Mixin::Lookup</a>
|
203
|
+
|
204
|
+
<li><a href="../../CORL/Mixin/Machine.html">CORL::Mixin::Machine</a>
|
205
|
+
|
206
|
+
<li><a href="../../CORL/Mixin/Machine/SSH.html">CORL::Mixin::Machine::SSH</a>
|
207
|
+
|
208
|
+
<li><a href="../../CORL/Mixin/Macro.html">CORL::Mixin::Macro</a>
|
209
|
+
|
210
|
+
<li><a href="../../CORL/Mixin/Macro/NetworkSettings.html">CORL::Mixin::Macro::NetworkSettings</a>
|
211
|
+
|
212
|
+
<li><a href="../../CORL/Network.html">CORL::Network</a>
|
213
|
+
|
214
|
+
<li><a href="../../CORL/Network/Default.html">CORL::Network::Default</a>
|
215
|
+
|
216
|
+
<li><a href="../../CORL/Node.html">CORL::Node</a>
|
217
|
+
|
218
|
+
<li><a href="../../CORL/Node/Aws.html">CORL::Node::Aws</a>
|
219
|
+
|
220
|
+
<li><a href="../../CORL/Node/Fog.html">CORL::Node::Fog</a>
|
221
|
+
|
222
|
+
<li><a href="../../CORL/Node/Local.html">CORL::Node::Local</a>
|
223
|
+
|
224
|
+
<li><a href="../../CORL/Node/Rackspace.html">CORL::Node::Rackspace</a>
|
225
|
+
|
226
|
+
<li><a href="../../CORL/Node/Vagrant.html">CORL::Node::Vagrant</a>
|
227
|
+
|
228
|
+
<li><a href="../../CORL/Plugin.html">CORL::Plugin</a>
|
229
|
+
|
230
|
+
<li><a href="../../CORL/Plugin/CloudAction.html">CORL::Plugin::CloudAction</a>
|
231
|
+
|
232
|
+
<li><a href="../../CORL/Provisioner.html">CORL::Provisioner</a>
|
233
|
+
|
234
|
+
<li><a href="../../CORL/Provisioner/Puppetnode.html">CORL::Provisioner::Puppetnode</a>
|
235
|
+
|
236
|
+
<li><a href="../../CORL/Template.html">CORL::Template</a>
|
237
|
+
|
238
|
+
<li><a href="../../CORL/Template/Environment.html">CORL::Template::Environment</a>
|
239
|
+
|
240
|
+
<li><a href="../../CORL/Util.html">CORL::Util</a>
|
241
|
+
|
242
|
+
<li><a href="../../CORL/Util/Puppet.html">CORL::Util::Puppet</a>
|
243
|
+
|
244
|
+
<li><a href="../../CORL/Util/Puppet/Resource.html">CORL::Util::Puppet::Resource</a>
|
245
|
+
|
246
|
+
<li><a href="../../CORL/Util/Puppet/ResourceGroup.html">CORL::Util::Puppet::ResourceGroup</a>
|
247
|
+
|
248
|
+
<li><a href="../../CORL/Vagrant.html">CORL::Vagrant</a>
|
249
|
+
|
250
|
+
<li><a href="../../CORL/Vagrant/Config.html">CORL::Vagrant::Config</a>
|
251
|
+
|
252
|
+
<li><a href="../../VagrantPlugins.html">VagrantPlugins</a>
|
253
|
+
|
254
|
+
<li><a href="../../VagrantPlugins/CORL.html">VagrantPlugins::CORL</a>
|
255
|
+
|
256
|
+
<li><a href="../../VagrantPlugins/CORL/Action.html">VagrantPlugins::CORL::Action</a>
|
257
|
+
|
258
|
+
<li><a href="../../VagrantPlugins/CORL/Action/DeleteCache.html">VagrantPlugins::CORL::Action::DeleteCache</a>
|
259
|
+
|
260
|
+
<li><a href="../../VagrantPlugins/CORL/Action/InitKeys.html">VagrantPlugins::CORL::Action::InitKeys</a>
|
261
|
+
|
262
|
+
<li><a href="../../VagrantPlugins/CORL/Action/LinkNetwork.html">VagrantPlugins::CORL::Action::LinkNetwork</a>
|
263
|
+
|
264
|
+
<li><a href="../../VagrantPlugins/CORL/BaseAction.html">VagrantPlugins::CORL::BaseAction</a>
|
265
|
+
|
266
|
+
<li><a href="../../VagrantPlugins/CORL/Command.html">VagrantPlugins::CORL::Command</a>
|
267
|
+
|
268
|
+
<li><a href="../../VagrantPlugins/CORL/Command/Launcher.html">VagrantPlugins::CORL::Command::Launcher</a>
|
269
|
+
|
270
|
+
<li><a href="../../VagrantPlugins/CORL/Config.html">VagrantPlugins::CORL::Config</a>
|
271
|
+
|
272
|
+
<li><a href="../../VagrantPlugins/CORL/Config/CORL.html">VagrantPlugins::CORL::Config::CORL</a>
|
273
|
+
|
274
|
+
<li><a href="../../VagrantPlugins/CORL/Plugin.html">VagrantPlugins::CORL::Plugin</a>
|
275
|
+
|
276
|
+
<li><a href="../../VagrantPlugins/CORL/Provisioner.html">VagrantPlugins::CORL::Provisioner</a>
|
277
|
+
|
278
|
+
<li><a href="../../VagrantPlugins/CORL/Provisioner/CORL.html">VagrantPlugins::CORL::Provisioner::CORL</a>
|
279
|
+
|
280
|
+
<li><a href="../../Nucleon.html">Nucleon</a>
|
281
|
+
|
282
|
+
<li><a href="../../Nucleon/Config.html">Nucleon::Config</a>
|
283
|
+
|
284
|
+
<li><a href="../../Nucleon/Plugin.html">Nucleon::Plugin</a>
|
285
|
+
|
286
|
+
<li><a href="../../Nucleon/Plugin/Base.html">Nucleon::Plugin::Base</a>
|
287
|
+
|
288
|
+
<li><a href="../../Nucleon/Plugin/Configuration.html">Nucleon::Plugin::Configuration</a>
|
289
|
+
|
290
|
+
<li><a href="../../Nucleon/Plugin/Machine.html">Nucleon::Plugin::Machine</a>
|
291
|
+
|
292
|
+
<li><a href="../../Nucleon/Plugin/Network.html">Nucleon::Plugin::Network</a>
|
293
|
+
|
294
|
+
<li><a href="../../Nucleon/Plugin/Node.html">Nucleon::Plugin::Node</a>
|
295
|
+
|
296
|
+
<li><a href="../../Nucleon/Plugin/Provisioner.html">Nucleon::Plugin::Provisioner</a>
|
297
|
+
|
298
|
+
<li><a href="../../Puppet.html">Puppet</a>
|
299
|
+
|
300
|
+
<li><a href="../../Puppet/DataBinding.html">Puppet::DataBinding</a>
|
301
|
+
|
302
|
+
<li><a href="../../Puppet/DataBinding/Corl.html">Puppet::DataBinding::Corl</a>
|
303
|
+
|
304
|
+
<li><a href="../../Puppet/Indirector.html">Puppet::Indirector</a>
|
305
|
+
|
306
|
+
<li><a href="../../Puppet/Indirector/Corl.html">Puppet::Indirector::Corl</a>
|
307
|
+
|
308
|
+
<li><a href="../../Puppet/Parser.html">Puppet::Parser</a>
|
309
|
+
|
310
|
+
<li><a href="../../Puppet/Parser/Functions.html">Puppet::Parser::Functions</a>
|
311
|
+
|
312
|
+
<li><a href="../../Fog.html">Fog</a>
|
313
|
+
|
314
|
+
<li><a href="../../Fog/Compute.html">Fog::Compute</a>
|
315
|
+
|
316
|
+
<li><a href="../../Fog/Compute/AWS.html">Fog::Compute::AWS</a>
|
317
|
+
|
318
|
+
<li><a href="../../Fog/Compute/AWS/Server.html">Fog::Compute::AWS::Server</a>
|
319
|
+
|
320
|
+
<li><a href="../../Fog/Compute/RackspaceV2.html">Fog::Compute::RackspaceV2</a>
|
321
|
+
|
322
|
+
<li><a href="../../Fog/Compute/RackspaceV2/Server.html">Fog::Compute::RackspaceV2::Server</a>
|
323
|
+
|
324
|
+
<li><a href="../../Vagrant.html">Vagrant</a>
|
325
|
+
|
326
|
+
<li><a href="../../Vagrant/Config.html">Vagrant::Config</a>
|
327
|
+
|
328
|
+
<li><a href="../../Vagrant/Config/Loader.html">Vagrant::Config::Loader</a>
|
329
|
+
|
330
|
+
<li><a href="../../Vagrant/Vagrantfile.html">Vagrant::Vagrantfile</a>
|
331
|
+
|
332
|
+
<li><a href="../../Facter.html">Facter</a>
|
333
|
+
|
334
|
+
<li><a href="../../Facter/Util.html">Facter::Util</a>
|
335
|
+
|
336
|
+
<li><a href="../../Facter/Util/Loader.html">Facter::Util::Loader</a>
|
337
|
+
|
338
|
+
<li><a href="../../Hiera.html">Hiera</a>
|
339
|
+
|
340
|
+
<li><a href="../../Hiera/Backend.html">Hiera::Backend</a>
|
341
|
+
|
342
|
+
<li><a href="../../Hiera/Corl_logger.html">Hiera::Corl_logger</a>
|
343
|
+
|
344
|
+
<li><a href="../../Object.html">Object</a>
|
345
|
+
|
346
|
+
</ul>
|
347
|
+
</nav>
|
348
|
+
|
349
|
+
</div>
|
350
|
+
</nav>
|
351
|
+
|
352
|
+
<div id="documentation">
|
353
|
+
<h1 class="class">class CORL::Provisioner::Puppetnode</h1>
|
354
|
+
|
355
|
+
<div id="description" class="description">
|
356
|
+
|
357
|
+
</div><!-- description -->
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
<!-- Methods -->
|
372
|
+
|
373
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
374
|
+
<h3 class="section-header">Public Class Methods</h3>
|
375
|
+
|
376
|
+
|
377
|
+
<div id="method-c-status" class="method-detail ">
|
378
|
+
|
379
|
+
<div class="method-heading">
|
380
|
+
<span class="method-name">status</span><span
|
381
|
+
class="method-args">()</span>
|
382
|
+
<span class="method-click-advice">click to toggle source</span>
|
383
|
+
</div>
|
384
|
+
|
385
|
+
|
386
|
+
<div class="method-description">
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
<div class="method-source-code" id="status-source">
|
393
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 11</span>
|
394
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier">status</span>
|
395
|
+
<span class="ruby-identifier">@@status</span>
|
396
|
+
<span class="ruby-keyword">end</span></pre>
|
397
|
+
</div><!-- status-source -->
|
398
|
+
|
399
|
+
</div>
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
</div><!-- status-method -->
|
405
|
+
|
406
|
+
|
407
|
+
</section><!-- public-class-method-details -->
|
408
|
+
|
409
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
410
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
411
|
+
|
412
|
+
|
413
|
+
<div id="method-i-add_search_path" class="method-detail ">
|
414
|
+
|
415
|
+
<div class="method-heading">
|
416
|
+
<span class="method-name">add_search_path</span><span
|
417
|
+
class="method-args">(type, resource_name)</span>
|
418
|
+
<span class="method-click-advice">click to toggle source</span>
|
419
|
+
</div>
|
420
|
+
|
421
|
+
|
422
|
+
<div class="method-description">
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
<div class="method-source-code" id="add_search_path-source">
|
429
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 208</span>
|
430
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">add_search_path</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">resource_name</span>)
|
431
|
+
<span class="ruby-constant">Config</span>.<span class="ruby-identifier">set_options</span>([ <span class="ruby-value">:all</span>, <span class="ruby-identifier">type</span> ], { <span class="ruby-value">:search</span> =<span class="ruby-operator">></span> [ <span class="ruby-identifier">resource_name</span>.<span class="ruby-identifier">to_s</span> ] })
|
432
|
+
<span class="ruby-keyword">end</span></pre>
|
433
|
+
</div><!-- add_search_path-source -->
|
434
|
+
|
435
|
+
</div>
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
</div><!-- add_search_path-method -->
|
441
|
+
|
442
|
+
|
443
|
+
<div id="method-i-build" class="method-detail ">
|
444
|
+
|
445
|
+
<div class="method-heading">
|
446
|
+
<span class="method-name">build</span><span
|
447
|
+
class="method-args">(options = {})</span>
|
448
|
+
<span class="method-click-advice">click to toggle source</span>
|
449
|
+
</div>
|
450
|
+
|
451
|
+
|
452
|
+
<div class="method-description">
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
<div class="method-source-code" id="build-source">
|
459
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 129</span>
|
460
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">build</span>(<span class="ruby-identifier">options</span> = {})
|
461
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">locations</span>, <span class="ruby-identifier">package_info</span><span class="ruby-operator">|</span>
|
462
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
463
|
+
|
464
|
+
<span class="ruby-comment"># Build modules</span>
|
465
|
+
<span class="ruby-identifier">locations</span>[<span class="ruby-value">:module</span>] = {}
|
466
|
+
|
467
|
+
<span class="ruby-identifier">init_profile</span> = <span class="ruby-identifier">lambda</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">package_name</span>, <span class="ruby-identifier">profile_name</span>, <span class="ruby-identifier">profile_info</span><span class="ruby-operator">|</span>
|
468
|
+
<span class="ruby-identifier">package_id</span> = <span class="ruby-identifier">id</span>(<span class="ruby-identifier">package_name</span>)
|
469
|
+
<span class="ruby-identifier">base_directory</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">locations</span>[<span class="ruby-value">:build</span>], <span class="ruby-string">'modules'</span>, <span class="ruby-identifier">package_id</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">profile_name</span>.<span class="ruby-identifier">to_s</span>)
|
470
|
+
<span class="ruby-identifier">profile_success</span> = <span class="ruby-keyword">true</span>
|
471
|
+
|
472
|
+
<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Building CORL profile #{blue(profile_name)} modules into #{green(base_directory)}"</span>)
|
473
|
+
|
474
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">profile_info</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:modules</span>)
|
475
|
+
<span class="ruby-identifier">profile_info</span>[<span class="ruby-value">:modules</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">module_name</span>, <span class="ruby-identifier">module_reference</span><span class="ruby-operator">|</span>
|
476
|
+
<span class="ruby-identifier">module_directory</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">base_directory</span>, <span class="ruby-identifier">module_name</span>.<span class="ruby-identifier">to_s</span>)
|
477
|
+
|
478
|
+
<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span>(<span class="ruby-node">"Building Puppet module #{blue(module_name)} at #{purple(module_reference)} into #{green(module_directory)}"</span>)
|
479
|
+
|
480
|
+
<span class="ruby-identifier">full_module_directory</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">build_directory</span>, <span class="ruby-identifier">module_directory</span>)
|
481
|
+
|
482
|
+
<span class="ruby-identifier">module_project</span> = <span class="ruby-constant">CORL</span>.<span class="ruby-identifier">project</span>(<span class="ruby-identifier">extended_config</span>(<span class="ruby-value">:puppet_module</span>, {
|
483
|
+
<span class="ruby-value">:directory</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">full_module_directory</span>,
|
484
|
+
<span class="ruby-value">:url</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">module_reference</span>,
|
485
|
+
<span class="ruby-value">:create</span> =<span class="ruby-operator">></span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">full_module_directory</span>) <span class="ruby-operator">?</span> <span class="ruby-keyword">false</span> <span class="ruby-operator">:</span> <span class="ruby-keyword">true</span>,
|
486
|
+
<span class="ruby-value">:pull</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">true</span>
|
487
|
+
}))
|
488
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">module_project</span>
|
489
|
+
<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">warn</span>(<span class="ruby-node">"Puppet module #{cyan(module_name)} failed to initialize"</span>)
|
490
|
+
<span class="ruby-identifier">profile_success</span> = <span class="ruby-keyword">false</span>
|
491
|
+
<span class="ruby-keyword">break</span>
|
492
|
+
<span class="ruby-keyword">end</span>
|
493
|
+
<span class="ruby-keyword">end</span>
|
494
|
+
<span class="ruby-identifier">locations</span>[<span class="ruby-value">:module</span>][<span class="ruby-identifier">profile_id</span>(<span class="ruby-identifier">package_name</span>, <span class="ruby-identifier">profile_name</span>)] = <span class="ruby-identifier">base_directory</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">profile_success</span>
|
495
|
+
<span class="ruby-identifier">profile_success</span>
|
496
|
+
<span class="ruby-keyword">end</span>
|
497
|
+
<span class="ruby-keyword">end</span>
|
498
|
+
|
499
|
+
<span class="ruby-identifier">hash</span>(<span class="ruby-identifier">package_info</span>.<span class="ruby-identifier">get</span>([ <span class="ruby-value">:provisioners</span>, <span class="ruby-identifier">plugin_provider</span> ])).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">package_name</span>, <span class="ruby-identifier">info</span><span class="ruby-operator">|</span>
|
500
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">info</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-value">:profiles</span>)
|
501
|
+
<span class="ruby-identifier">info</span>[<span class="ruby-value">:profiles</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">profile_name</span>, <span class="ruby-identifier">profile_info</span><span class="ruby-operator">|</span>
|
502
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">init_profile</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">package_name</span>, <span class="ruby-identifier">profile_name</span>, <span class="ruby-identifier">profile_info</span>)
|
503
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">false</span>
|
504
|
+
<span class="ruby-keyword">break</span>
|
505
|
+
<span class="ruby-keyword">end</span>
|
506
|
+
<span class="ruby-keyword">end</span>
|
507
|
+
<span class="ruby-keyword">end</span>
|
508
|
+
<span class="ruby-keyword">end</span>
|
509
|
+
<span class="ruby-identifier">profiles</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">profile_name</span>, <span class="ruby-identifier">profile_info</span><span class="ruby-operator">|</span>
|
510
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">init_profile</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">plugin_name</span>, <span class="ruby-identifier">profile_name</span>, <span class="ruby-identifier">profile_info</span>)
|
511
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">false</span>
|
512
|
+
<span class="ruby-keyword">break</span>
|
513
|
+
<span class="ruby-keyword">end</span>
|
514
|
+
<span class="ruby-keyword">end</span>
|
515
|
+
<span class="ruby-identifier">success</span>
|
516
|
+
<span class="ruby-keyword">end</span>
|
517
|
+
<span class="ruby-keyword">end</span></pre>
|
518
|
+
</div><!-- build-source -->
|
519
|
+
|
520
|
+
</div>
|
521
|
+
|
522
|
+
|
523
|
+
|
524
|
+
|
525
|
+
</div><!-- build-method -->
|
526
|
+
|
527
|
+
|
528
|
+
<div id="method-i-compiler" class="method-detail ">
|
529
|
+
|
530
|
+
<div class="method-heading">
|
531
|
+
<span class="method-name">compiler</span><span
|
532
|
+
class="method-args">()</span>
|
533
|
+
<span class="method-click-advice">click to toggle source</span>
|
534
|
+
</div>
|
535
|
+
|
536
|
+
|
537
|
+
<div class="method-description">
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
<div class="method-source-code" id="compiler-source">
|
544
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 62</span>
|
545
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">compiler</span>
|
546
|
+
<span class="ruby-ivar">@compiler</span>
|
547
|
+
<span class="ruby-keyword">end</span></pre>
|
548
|
+
</div><!-- compiler-source -->
|
549
|
+
|
550
|
+
</div>
|
551
|
+
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
</div><!-- compiler-method -->
|
556
|
+
|
557
|
+
|
558
|
+
<div id="method-i-concatenate" class="method-detail ">
|
559
|
+
|
560
|
+
<div class="method-heading">
|
561
|
+
<span class="method-name">concatenate</span><span
|
562
|
+
class="method-args">(components, capitalize = false)</span>
|
563
|
+
<span class="method-click-advice">click to toggle source</span>
|
564
|
+
</div>
|
565
|
+
|
566
|
+
|
567
|
+
<div class="method-description">
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
|
572
|
+
|
573
|
+
<div class="method-source-code" id="concatenate-source">
|
574
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 320</span>
|
575
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">concatenate</span>(<span class="ruby-identifier">components</span>, <span class="ruby-identifier">capitalize</span> = <span class="ruby-keyword">false</span>)
|
576
|
+
<span class="ruby-keyword">super</span>(<span class="ruby-identifier">components</span>, <span class="ruby-identifier">capitalize</span>, <span class="ruby-string">'::'</span>)
|
577
|
+
<span class="ruby-keyword">end</span></pre>
|
578
|
+
</div><!-- concatenate-source -->
|
579
|
+
|
580
|
+
</div>
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
</div><!-- concatenate-method -->
|
586
|
+
|
587
|
+
|
588
|
+
<div id="method-i-handle" class="method-detail ">
|
589
|
+
|
590
|
+
<div class="method-heading">
|
591
|
+
<span class="method-name">handle</span><span
|
592
|
+
class="method-args">(msg)</span>
|
593
|
+
<span class="method-click-advice">click to toggle source</span>
|
594
|
+
</div>
|
595
|
+
|
596
|
+
|
597
|
+
<div class="method-description">
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
<div class="method-source-code" id="handle-source">
|
604
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 25</span>
|
605
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">handle</span>(<span class="ruby-identifier">msg</span>)
|
606
|
+
<span class="ruby-identifier">levels</span> = {
|
607
|
+
<span class="ruby-value">:emerg</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'emergency'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:error</span> },
|
608
|
+
<span class="ruby-value">:alert</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'alert'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:error</span> },
|
609
|
+
<span class="ruby-value">:crit</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'critical'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:error</span> },
|
610
|
+
<span class="ruby-value">:err</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'error'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:error</span> },
|
611
|
+
<span class="ruby-value">:warning</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'warning'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:warn</span> },
|
612
|
+
<span class="ruby-value">:notice</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'notice'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:success</span> },
|
613
|
+
<span class="ruby-value">:info</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'info'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:info</span> },
|
614
|
+
<span class="ruby-value">:debug</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'debug'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:info</span> }
|
615
|
+
}
|
616
|
+
<span class="ruby-identifier">str</span> = <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:multiline</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">multiline</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">to_s</span>
|
617
|
+
<span class="ruby-identifier">str</span> = <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Puppet"</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">str</span> <span class="ruby-operator">:</span> <span class="ruby-node">"#{CORL.blue(msg.source)}: #{str}"</span>
|
618
|
+
<span class="ruby-identifier">level</span> = <span class="ruby-identifier">levels</span>[<span class="ruby-identifier">msg</span>.<span class="ruby-identifier">level</span>]
|
619
|
+
|
620
|
+
<span class="ruby-keyword">if</span> [ <span class="ruby-value">:warn</span>, <span class="ruby-value">:error</span> ].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">level</span>[<span class="ruby-value">:send</span>])
|
621
|
+
<span class="ruby-operator">::</span><span class="ruby-constant">CORL</span><span class="ruby-operator">::</span><span class="ruby-constant">Provisioner</span><span class="ruby-operator">::</span><span class="ruby-constant">Puppetnode</span>.<span class="ruby-identifier">status</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-value">111</span>
|
622
|
+
<span class="ruby-keyword">end</span>
|
623
|
+
|
624
|
+
<span class="ruby-constant">CORL</span>.<span class="ruby-identifier">ui_group</span>(<span class="ruby-node">"puppetnode::#{name}(#{CORL.yellow(level[:name])})"</span>, <span class="ruby-value">:cyan</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ui</span><span class="ruby-operator">|</span>
|
625
|
+
<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">level</span>[<span class="ruby-value">:send</span>], <span class="ruby-identifier">str</span>)
|
626
|
+
<span class="ruby-keyword">end</span>
|
627
|
+
<span class="ruby-keyword">end</span></pre>
|
628
|
+
</div><!-- handle-source -->
|
629
|
+
|
630
|
+
</div>
|
631
|
+
|
632
|
+
|
633
|
+
|
634
|
+
|
635
|
+
</div><!-- handle-method -->
|
636
|
+
|
637
|
+
|
638
|
+
<div id="method-i-import" class="method-detail ">
|
639
|
+
|
640
|
+
<div class="method-heading">
|
641
|
+
<span class="method-name">import</span><span
|
642
|
+
class="method-args">(files, options = {})</span>
|
643
|
+
<span class="method-click-advice">click to toggle source</span>
|
644
|
+
</div>
|
645
|
+
|
646
|
+
|
647
|
+
<div class="method-description">
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
<div class="method-source-code" id="import-source">
|
654
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 199</span>
|
655
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">import</span>(<span class="ruby-identifier">files</span>, <span class="ruby-identifier">options</span> = {})
|
656
|
+
<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Puppet</span>.<span class="ruby-identifier">import</span>(<span class="ruby-identifier">files</span>, <span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">defaults</span>({
|
657
|
+
<span class="ruby-value">:puppet_scope</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">scope</span>,
|
658
|
+
<span class="ruby-value">:puppet_import_base</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">network</span>.<span class="ruby-identifier">directory</span>
|
659
|
+
}))
|
660
|
+
<span class="ruby-keyword">end</span></pre>
|
661
|
+
</div><!-- import-source -->
|
662
|
+
|
663
|
+
</div>
|
664
|
+
|
665
|
+
|
666
|
+
|
667
|
+
|
668
|
+
</div><!-- import-method -->
|
669
|
+
|
670
|
+
|
671
|
+
<div id="method-i-lookup" class="method-detail ">
|
672
|
+
|
673
|
+
<div class="method-heading">
|
674
|
+
<span class="method-name">lookup</span><span
|
675
|
+
class="method-args">(property, default = nil, options = {})</span>
|
676
|
+
<span class="method-click-advice">click to toggle source</span>
|
677
|
+
</div>
|
678
|
+
|
679
|
+
|
680
|
+
<div class="method-description">
|
681
|
+
|
682
|
+
|
683
|
+
|
684
|
+
|
685
|
+
|
686
|
+
<div class="method-source-code" id="lookup-source">
|
687
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 190</span>
|
688
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">lookup</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">default</span> = <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">options</span> = {})
|
689
|
+
<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Puppet</span>.<span class="ruby-identifier">lookup</span>(<span class="ruby-identifier">property</span>, <span class="ruby-identifier">default</span>, <span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">defaults</span>({
|
690
|
+
<span class="ruby-value">:provisioner</span> =<span class="ruby-operator">></span> <span class="ruby-value">:puppetnode</span>,
|
691
|
+
<span class="ruby-value">:puppet_scope</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">scope</span>
|
692
|
+
}))
|
693
|
+
<span class="ruby-keyword">end</span></pre>
|
694
|
+
</div><!-- lookup-source -->
|
695
|
+
|
696
|
+
</div>
|
697
|
+
|
698
|
+
|
699
|
+
|
700
|
+
|
701
|
+
</div><!-- lookup-method -->
|
702
|
+
|
703
|
+
|
704
|
+
<div id="method-i-normalize" class="method-detail ">
|
705
|
+
|
706
|
+
<div class="method-heading">
|
707
|
+
<span class="method-name">normalize</span><span
|
708
|
+
class="method-args">(reload)</span>
|
709
|
+
<span class="method-click-advice">click to toggle source</span>
|
710
|
+
</div>
|
711
|
+
|
712
|
+
|
713
|
+
<div class="method-description">
|
714
|
+
|
715
|
+
|
716
|
+
|
717
|
+
|
718
|
+
|
719
|
+
<div class="method-source-code" id="normalize-source">
|
720
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 18</span>
|
721
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">normalize</span>(<span class="ruby-identifier">reload</span>)
|
722
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span>
|
723
|
+
<span class="ruby-keyword">if</span> <span class="ruby-constant">CORL</span>.<span class="ruby-identifier">log_level</span> <span class="ruby-operator">==</span> <span class="ruby-value">:debug</span>
|
724
|
+
<span class="ruby-constant">Puppet</span>.<span class="ruby-identifier">debug</span> = <span class="ruby-keyword">true</span>
|
725
|
+
<span class="ruby-keyword">end</span>
|
726
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">reload</span>
|
727
|
+
<span class="ruby-constant">Puppet</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Log</span>.<span class="ruby-identifier">newdesttype</span> <span class="ruby-identifier">id</span> <span class="ruby-keyword">do</span>
|
728
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">handle</span>(<span class="ruby-identifier">msg</span>)
|
729
|
+
<span class="ruby-identifier">levels</span> = {
|
730
|
+
<span class="ruby-value">:emerg</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'emergency'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:error</span> },
|
731
|
+
<span class="ruby-value">:alert</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'alert'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:error</span> },
|
732
|
+
<span class="ruby-value">:crit</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'critical'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:error</span> },
|
733
|
+
<span class="ruby-value">:err</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'error'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:error</span> },
|
734
|
+
<span class="ruby-value">:warning</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'warning'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:warn</span> },
|
735
|
+
<span class="ruby-value">:notice</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'notice'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:success</span> },
|
736
|
+
<span class="ruby-value">:info</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'info'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:info</span> },
|
737
|
+
<span class="ruby-value">:debug</span> =<span class="ruby-operator">></span> { <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-string">'debug'</span>, <span class="ruby-value">:send</span> =<span class="ruby-operator">></span> <span class="ruby-value">:info</span> }
|
738
|
+
}
|
739
|
+
<span class="ruby-identifier">str</span> = <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value">:multiline</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">multiline</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">to_s</span>
|
740
|
+
<span class="ruby-identifier">str</span> = <span class="ruby-identifier">msg</span>.<span class="ruby-identifier">source</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Puppet"</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">str</span> <span class="ruby-operator">:</span> <span class="ruby-node">"#{CORL.blue(msg.source)}: #{str}"</span>
|
741
|
+
<span class="ruby-identifier">level</span> = <span class="ruby-identifier">levels</span>[<span class="ruby-identifier">msg</span>.<span class="ruby-identifier">level</span>]
|
742
|
+
|
743
|
+
<span class="ruby-keyword">if</span> [ <span class="ruby-value">:warn</span>, <span class="ruby-value">:error</span> ].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">level</span>[<span class="ruby-value">:send</span>])
|
744
|
+
<span class="ruby-operator">::</span><span class="ruby-constant">CORL</span><span class="ruby-operator">::</span><span class="ruby-constant">Provisioner</span><span class="ruby-operator">::</span><span class="ruby-constant">Puppetnode</span>.<span class="ruby-identifier">status</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-value">111</span>
|
745
|
+
<span class="ruby-keyword">end</span>
|
746
|
+
|
747
|
+
<span class="ruby-constant">CORL</span>.<span class="ruby-identifier">ui_group</span>(<span class="ruby-node">"puppetnode::#{name}(#{CORL.yellow(level[:name])})"</span>, <span class="ruby-value">:cyan</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ui</span><span class="ruby-operator">|</span>
|
748
|
+
<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">level</span>[<span class="ruby-value">:send</span>], <span class="ruby-identifier">str</span>)
|
749
|
+
<span class="ruby-keyword">end</span>
|
750
|
+
<span class="ruby-keyword">end</span>
|
751
|
+
<span class="ruby-keyword">end</span>
|
752
|
+
<span class="ruby-keyword">end</span>
|
753
|
+
<span class="ruby-keyword">end</span>
|
754
|
+
<span class="ruby-keyword">end</span></pre>
|
755
|
+
</div><!-- normalize-source -->
|
756
|
+
|
757
|
+
</div>
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
|
762
|
+
</div><!-- normalize-method -->
|
763
|
+
|
764
|
+
|
765
|
+
<div id="method-i-profile_id" class="method-detail ">
|
766
|
+
|
767
|
+
<div class="method-heading">
|
768
|
+
<span class="method-name">profile_id</span><span
|
769
|
+
class="method-args">(package_name, profile_name)</span>
|
770
|
+
<span class="method-click-advice">click to toggle source</span>
|
771
|
+
</div>
|
772
|
+
|
773
|
+
|
774
|
+
<div class="method-description">
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
|
779
|
+
|
780
|
+
<div class="method-source-code" id="profile_id-source">
|
781
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 314</span>
|
782
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">profile_id</span>(<span class="ruby-identifier">package_name</span>, <span class="ruby-identifier">profile_name</span>)
|
783
|
+
<span class="ruby-identifier">concatenate</span>([ <span class="ruby-identifier">package_name</span>, <span class="ruby-string">'profile'</span>, <span class="ruby-identifier">profile_name</span> ], <span class="ruby-keyword">false</span>)
|
784
|
+
<span class="ruby-keyword">end</span></pre>
|
785
|
+
</div><!-- profile_id-source -->
|
786
|
+
|
787
|
+
</div>
|
788
|
+
|
789
|
+
|
790
|
+
|
791
|
+
|
792
|
+
</div><!-- profile_id-method -->
|
793
|
+
|
794
|
+
|
795
|
+
<div id="method-i-provision" class="method-detail ">
|
796
|
+
|
797
|
+
<div class="method-heading">
|
798
|
+
<span class="method-name">provision</span><span
|
799
|
+
class="method-args">(profiles, options = {})</span>
|
800
|
+
<span class="method-click-advice">click to toggle source</span>
|
801
|
+
</div>
|
802
|
+
|
803
|
+
|
804
|
+
<div class="method-description">
|
805
|
+
|
806
|
+
|
807
|
+
|
808
|
+
|
809
|
+
|
810
|
+
<div class="method-source-code" id="provision-source">
|
811
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 214</span>
|
812
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">provision</span>(<span class="ruby-identifier">profiles</span>, <span class="ruby-identifier">options</span> = {})
|
813
|
+
<span class="ruby-keyword">super</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">config</span><span class="ruby-operator">|</span>
|
814
|
+
<span class="ruby-identifier">locations</span> = <span class="ruby-identifier">build_locations</span>
|
815
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">true</span>
|
816
|
+
|
817
|
+
<span class="ruby-identifier">include_location</span> = <span class="ruby-identifier">lambda</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">type</span>, <span class="ruby-identifier">parameters</span> = {}, <span class="ruby-identifier">add_search_path</span> = <span class="ruby-keyword">false</span><span class="ruby-operator">|</span>
|
818
|
+
<span class="ruby-identifier">classes</span> = {}
|
819
|
+
|
820
|
+
<span class="ruby-identifier">locations</span>[<span class="ruby-value">:package</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span>, <span class="ruby-identifier">package_directory</span><span class="ruby-operator">|</span>
|
821
|
+
<span class="ruby-identifier">type_gateway</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">build_directory</span>, <span class="ruby-identifier">package_directory</span>, <span class="ruby-node">"#{type}.pp"</span>)
|
822
|
+
<span class="ruby-identifier">resource_name</span> = <span class="ruby-identifier">concatenate</span>([ <span class="ruby-identifier">name</span>, <span class="ruby-identifier">type</span> ])
|
823
|
+
|
824
|
+
<span class="ruby-identifier">add_search_path</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">resource_name</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">add_search_path</span>
|
825
|
+
|
826
|
+
<span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">type_gateway</span>)
|
827
|
+
<span class="ruby-identifier">import</span>(<span class="ruby-identifier">type_gateway</span>)
|
828
|
+
<span class="ruby-identifier">classes</span>[<span class="ruby-identifier">resource_name</span>] = <span class="ruby-identifier">parameters</span>
|
829
|
+
<span class="ruby-keyword">end</span>
|
830
|
+
|
831
|
+
<span class="ruby-identifier">type_directory</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">build_directory</span>, <span class="ruby-identifier">package_directory</span>, <span class="ruby-identifier">type</span>.<span class="ruby-identifier">to_s</span>)
|
832
|
+
<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">type_directory</span>, <span class="ruby-string">'*.pp'</span>)).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
833
|
+
<span class="ruby-identifier">resource_name</span> = <span class="ruby-identifier">concatenate</span>([ <span class="ruby-identifier">name</span>, <span class="ruby-identifier">type</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">file</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-string">'.pp'</span>, <span class="ruby-string">''</span>) ])
|
834
|
+
<span class="ruby-identifier">import</span>(<span class="ruby-identifier">file</span>)
|
835
|
+
<span class="ruby-identifier">classes</span>[<span class="ruby-identifier">resource_name</span>] = <span class="ruby-identifier">parameters</span>
|
836
|
+
<span class="ruby-keyword">end</span>
|
837
|
+
<span class="ruby-keyword">end</span>
|
838
|
+
|
839
|
+
<span class="ruby-identifier">type_gateway</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">directory</span>, <span class="ruby-node">"#{type}.pp"</span>)
|
840
|
+
<span class="ruby-identifier">resource_name</span> = <span class="ruby-identifier">concatenate</span>([ <span class="ruby-identifier">plugin_name</span>, <span class="ruby-identifier">type</span> ])
|
841
|
+
|
842
|
+
<span class="ruby-identifier">add_search_path</span>(<span class="ruby-identifier">type</span>, <span class="ruby-identifier">resource_name</span>) <span class="ruby-keyword">if</span> <span class="ruby-identifier">add_search_path</span>
|
843
|
+
|
844
|
+
<span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span>(<span class="ruby-identifier">type_gateway</span>)
|
845
|
+
<span class="ruby-identifier">import</span>(<span class="ruby-identifier">type_gateway</span>)
|
846
|
+
<span class="ruby-identifier">classes</span>[<span class="ruby-identifier">resource_name</span>] = <span class="ruby-identifier">parameters</span>
|
847
|
+
<span class="ruby-keyword">end</span>
|
848
|
+
|
849
|
+
<span class="ruby-identifier">type_directory</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">directory</span>, <span class="ruby-identifier">type</span>.<span class="ruby-identifier">to_s</span>)
|
850
|
+
|
851
|
+
<span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">type_directory</span>)
|
852
|
+
<span class="ruby-constant">Dir</span>.<span class="ruby-identifier">glob</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">type_directory</span>, <span class="ruby-string">'*.pp'</span>)).<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
|
853
|
+
<span class="ruby-identifier">resource_name</span> = <span class="ruby-identifier">concatenate</span>([ <span class="ruby-identifier">plugin_name</span>, <span class="ruby-identifier">type</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">basename</span>(<span class="ruby-identifier">file</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-string">'.pp'</span>, <span class="ruby-string">''</span>) ])
|
854
|
+
<span class="ruby-identifier">import</span>(<span class="ruby-identifier">file</span>)
|
855
|
+
<span class="ruby-identifier">classes</span>[<span class="ruby-identifier">resource_name</span>] = <span class="ruby-identifier">parameters</span>
|
856
|
+
<span class="ruby-keyword">end</span>
|
857
|
+
<span class="ruby-keyword">end</span>
|
858
|
+
<span class="ruby-identifier">classes</span>
|
859
|
+
<span class="ruby-keyword">end</span>
|
860
|
+
|
861
|
+
<span class="ruby-identifier">@@puppet_lock</span>.<span class="ruby-identifier">synchronize</span> <span class="ruby-keyword">do</span>
|
862
|
+
<span class="ruby-keyword">begin</span>
|
863
|
+
<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span>(<span class="ruby-string">"Starting catalog generation"</span>)
|
864
|
+
|
865
|
+
<span class="ruby-identifier">@@status</span>[<span class="ruby-identifier">id</span>] = <span class="ruby-identifier">code</span>.<span class="ruby-identifier">success</span>
|
866
|
+
|
867
|
+
<span class="ruby-identifier">start_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>
|
868
|
+
<span class="ruby-identifier">node</span> = <span class="ruby-identifier">init_puppet</span>(<span class="ruby-identifier">profiles</span>)
|
869
|
+
|
870
|
+
<span class="ruby-comment"># Include defaults</span>
|
871
|
+
<span class="ruby-identifier">classes</span> = <span class="ruby-identifier">include_location</span>.<span class="ruby-identifier">call</span>(<span class="ruby-value">:default</span>, {}, <span class="ruby-keyword">true</span>)
|
872
|
+
|
873
|
+
<span class="ruby-comment"># Import needed profiles</span>
|
874
|
+
<span class="ruby-identifier">include_location</span>.<span class="ruby-identifier">call</span>(<span class="ruby-value">:profiles</span>, {}, <span class="ruby-keyword">false</span>)
|
875
|
+
|
876
|
+
<span class="ruby-identifier">profiles</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">profile</span><span class="ruby-operator">|</span>
|
877
|
+
<span class="ruby-identifier">classes</span>[<span class="ruby-identifier">profile</span>.<span class="ruby-identifier">to_s</span>] = { <span class="ruby-value">:require</span> =<span class="ruby-operator">></span> <span class="ruby-string">'Anchor[profile_start]'</span> }
|
878
|
+
<span class="ruby-keyword">end</span>
|
879
|
+
|
880
|
+
<span class="ruby-comment"># Compile catalog</span>
|
881
|
+
<span class="ruby-identifier">node</span>.<span class="ruby-identifier">classes</span> = <span class="ruby-identifier">classes</span>
|
882
|
+
<span class="ruby-identifier">compiler</span>.<span class="ruby-identifier">compile</span>
|
883
|
+
|
884
|
+
<span class="ruby-comment"># Start system configuration</span>
|
885
|
+
<span class="ruby-identifier">catalog</span> = <span class="ruby-identifier">compiler</span>.<span class="ruby-identifier">catalog</span>.<span class="ruby-identifier">to_ral</span>
|
886
|
+
<span class="ruby-identifier">catalog</span>.<span class="ruby-identifier">finalize</span>
|
887
|
+
<span class="ruby-identifier">catalog</span>.<span class="ruby-identifier">retrieval_duration</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">start_time</span>
|
888
|
+
|
889
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">get</span>(<span class="ruby-value">:dry_run</span>, <span class="ruby-keyword">false</span>)
|
890
|
+
<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span>(<span class="ruby-string">"\n"</span>, { <span class="ruby-value">:prefix</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">false</span> })
|
891
|
+
<span class="ruby-identifier">ui</span>.<span class="ruby-identifier">info</span>(<span class="ruby-string">"Starting configuration run"</span>)
|
892
|
+
|
893
|
+
<span class="ruby-identifier">configurer</span> = <span class="ruby-constant">Puppet</span><span class="ruby-operator">::</span><span class="ruby-constant">Configurer</span>.<span class="ruby-identifier">new</span>
|
894
|
+
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span> <span class="ruby-identifier">configurer</span>.<span class="ruby-identifier">run</span>(<span class="ruby-value">:catalog</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">catalog</span>, <span class="ruby-value">:pluginsync</span> =<span class="ruby-operator">></span> <span class="ruby-keyword">false</span>)
|
895
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">false</span>
|
896
|
+
<span class="ruby-keyword">end</span>
|
897
|
+
<span class="ruby-keyword">end</span>
|
898
|
+
|
899
|
+
<span class="ruby-keyword">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">error</span>
|
900
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">error</span>
|
901
|
+
<span class="ruby-constant">Puppet</span>.<span class="ruby-identifier">log_exception</span>(<span class="ruby-identifier">error</span>)
|
902
|
+
<span class="ruby-keyword">end</span>
|
903
|
+
<span class="ruby-keyword">end</span>
|
904
|
+
<span class="ruby-identifier">success</span> = <span class="ruby-keyword">false</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">@@status</span>[<span class="ruby-identifier">id</span>] <span class="ruby-operator">!=</span> <span class="ruby-identifier">code</span>.<span class="ruby-identifier">success</span>
|
905
|
+
<span class="ruby-identifier">success</span>
|
906
|
+
<span class="ruby-keyword">end</span>
|
907
|
+
<span class="ruby-keyword">end</span></pre>
|
908
|
+
</div><!-- provision-source -->
|
909
|
+
|
910
|
+
</div>
|
911
|
+
|
912
|
+
|
913
|
+
|
914
|
+
|
915
|
+
</div><!-- provision-method -->
|
916
|
+
|
917
|
+
|
918
|
+
<div id="method-i-register" class="method-detail ">
|
919
|
+
|
920
|
+
<div class="method-heading">
|
921
|
+
<span class="method-name">register</span><span
|
922
|
+
class="method-args">(options = {})</span>
|
923
|
+
<span class="method-click-advice">click to toggle source</span>
|
924
|
+
</div>
|
925
|
+
|
926
|
+
|
927
|
+
<div class="method-description">
|
928
|
+
|
929
|
+
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
<div class="method-source-code" id="register-source">
|
934
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 55</span>
|
935
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">register</span>(<span class="ruby-identifier">options</span> = {})
|
936
|
+
<span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Puppet</span>.<span class="ruby-identifier">register_plugins</span>(<span class="ruby-constant">Config</span>.<span class="ruby-identifier">ensure</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">defaults</span>({ <span class="ruby-value">:puppet_scope</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">scope</span> }))
|
937
|
+
<span class="ruby-keyword">end</span></pre>
|
938
|
+
</div><!-- register-source -->
|
939
|
+
|
940
|
+
</div>
|
941
|
+
|
942
|
+
|
943
|
+
|
944
|
+
|
945
|
+
</div><!-- register-method -->
|
946
|
+
|
947
|
+
|
948
|
+
<div id="method-i-scope" class="method-detail ">
|
949
|
+
|
950
|
+
<div class="method-heading">
|
951
|
+
<span class="method-name">scope</span><span
|
952
|
+
class="method-args">()</span>
|
953
|
+
<span class="method-click-advice">click to toggle source</span>
|
954
|
+
</div>
|
955
|
+
|
956
|
+
|
957
|
+
<div class="method-description">
|
958
|
+
|
959
|
+
|
960
|
+
|
961
|
+
|
962
|
+
|
963
|
+
<div class="method-source-code" id="scope-source">
|
964
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 68</span>
|
965
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">scope</span>
|
966
|
+
<span class="ruby-keyword">return</span> <span class="ruby-identifier">compiler</span>.<span class="ruby-identifier">topscope</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">compiler</span>
|
967
|
+
<span class="ruby-keyword">nil</span>
|
968
|
+
<span class="ruby-keyword">end</span></pre>
|
969
|
+
</div><!-- scope-source -->
|
970
|
+
|
971
|
+
</div>
|
972
|
+
|
973
|
+
|
974
|
+
|
975
|
+
|
976
|
+
</div><!-- scope-method -->
|
977
|
+
|
978
|
+
|
979
|
+
</section><!-- public-instance-method-details -->
|
980
|
+
|
981
|
+
<section id="protected-instance-5Buntitled-5D-method-details" class="method-section section">
|
982
|
+
<h3 class="section-header">Protected Instance Methods</h3>
|
983
|
+
|
984
|
+
|
985
|
+
<div id="method-i-get_node" class="method-detail ">
|
986
|
+
|
987
|
+
<div class="method-heading">
|
988
|
+
<span class="method-name">get_node</span><span
|
989
|
+
class="method-args">()</span>
|
990
|
+
<span class="method-click-advice">click to toggle source</span>
|
991
|
+
</div>
|
992
|
+
|
993
|
+
|
994
|
+
<div class="method-description">
|
995
|
+
|
996
|
+
|
997
|
+
|
998
|
+
|
999
|
+
|
1000
|
+
<div class="method-source-code" id="get_node-source">
|
1001
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 114</span>
|
1002
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">get_node</span>
|
1003
|
+
<span class="ruby-identifier">node_id</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>
|
1004
|
+
<span class="ruby-identifier">node</span> = <span class="ruby-constant">Puppet</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">indirection</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">node_id</span>)
|
1005
|
+
|
1006
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">facts</span> = <span class="ruby-constant">Puppet</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span><span class="ruby-operator">::</span><span class="ruby-constant">Facts</span>.<span class="ruby-identifier">indirection</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">node_id</span>)
|
1007
|
+
<span class="ruby-identifier">facts</span>.<span class="ruby-identifier">name</span> = <span class="ruby-identifier">node_id</span>
|
1008
|
+
<span class="ruby-identifier">node</span>.<span class="ruby-identifier">merge</span>(<span class="ruby-identifier">facts</span>.<span class="ruby-identifier">values</span>)
|
1009
|
+
<span class="ruby-keyword">end</span>
|
1010
|
+
<span class="ruby-identifier">node</span>
|
1011
|
+
<span class="ruby-keyword">end</span></pre>
|
1012
|
+
</div><!-- get_node-source -->
|
1013
|
+
|
1014
|
+
</div>
|
1015
|
+
|
1016
|
+
|
1017
|
+
|
1018
|
+
|
1019
|
+
</div><!-- get_node-method -->
|
1020
|
+
|
1021
|
+
|
1022
|
+
<div id="method-i-init_puppet" class="method-detail ">
|
1023
|
+
|
1024
|
+
<div class="method-heading">
|
1025
|
+
<span class="method-name">init_puppet</span><span
|
1026
|
+
class="method-args">(profiles)</span>
|
1027
|
+
<span class="method-click-advice">click to toggle source</span>
|
1028
|
+
</div>
|
1029
|
+
|
1030
|
+
|
1031
|
+
<div class="method-description">
|
1032
|
+
|
1033
|
+
|
1034
|
+
|
1035
|
+
|
1036
|
+
|
1037
|
+
<div class="method-source-code" id="init_puppet-source">
|
1038
|
+
<pre><span class="ruby-comment"># File lib/CORL/provisioner/puppetnode.rb, line 76</span>
|
1039
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">init_puppet</span>(<span class="ruby-identifier">profiles</span>)
|
1040
|
+
<span class="ruby-identifier">locations</span> = <span class="ruby-identifier">build_locations</span>
|
1041
|
+
|
1042
|
+
<span class="ruby-constant">Puppet</span>.<span class="ruby-identifier">initialize_settings</span>
|
1043
|
+
<span class="ruby-constant">Puppet</span><span class="ruby-operator">::</span><span class="ruby-constant">Util</span><span class="ruby-operator">::</span><span class="ruby-constant">Log</span>.<span class="ruby-identifier">newdestination</span>(<span class="ruby-identifier">id</span>)
|
1044
|
+
|
1045
|
+
<span class="ruby-comment"># TODO: Figure out how to store these damn settings in a specialized</span>
|
1046
|
+
<span class="ruby-comment"># environment without phantom empty environment issues.</span>
|
1047
|
+
|
1048
|
+
<span class="ruby-constant">Puppet</span>[<span class="ruby-value">:data_binding_terminus</span>] = <span class="ruby-string">'corl'</span>
|
1049
|
+
<span class="ruby-constant">Puppet</span>[<span class="ruby-value">:default_file_terminus</span>] = <span class="ruby-value">:file_server</span>
|
1050
|
+
<span class="ruby-constant">Puppet</span>[<span class="ruby-value">:node_name_value</span>] = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>
|
1051
|
+
|
1052
|
+
<span class="ruby-keyword">unless</span> <span class="ruby-identifier">profiles</span>.<span class="ruby-identifier">empty?</span>
|
1053
|
+
<span class="ruby-identifier">modulepath</span> = <span class="ruby-identifier">profiles</span>.<span class="ruby-identifier">collect</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">profile</span><span class="ruby-operator">|</span>
|
1054
|
+
<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">build_directory</span>, <span class="ruby-identifier">locations</span>[<span class="ruby-value">:module</span>][<span class="ruby-identifier">profile</span>.<span class="ruby-identifier">to_sym</span>])
|
1055
|
+
<span class="ruby-keyword">end</span>
|
1056
|
+
<span class="ruby-constant">Puppet</span>[<span class="ruby-value">:modulepath</span>] = <span class="ruby-identifier">array</span>(<span class="ruby-identifier">modulepath</span>).<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>)
|
1057
|
+
<span class="ruby-keyword">end</span>
|
1058
|
+
|
1059
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">manifest</span> = <span class="ruby-identifier">gateway</span>
|
1060
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">manifest</span>.<span class="ruby-identifier">match</span>(<span class="ruby-regexp">/^packages\/.*/</span>)
|
1061
|
+
<span class="ruby-identifier">manifest</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">build_directory</span>, <span class="ruby-identifier">locations</span>[<span class="ruby-value">:build</span>], <span class="ruby-identifier">manifest</span>)
|
1062
|
+
<span class="ruby-keyword">else</span>
|
1063
|
+
<span class="ruby-identifier">manifest</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">network</span>.<span class="ruby-identifier">directory</span>, <span class="ruby-identifier">directory</span>, <span class="ruby-identifier">manifest</span>)
|
1064
|
+
<span class="ruby-keyword">end</span>
|
1065
|
+
<span class="ruby-constant">Puppet</span>[<span class="ruby-value">:manifest</span>] = <span class="ruby-identifier">manifest</span>
|
1066
|
+
<span class="ruby-keyword">end</span>
|
1067
|
+
|
1068
|
+
<span class="ruby-identifier">node</span> = <span class="ruby-identifier">get_node</span>
|
1069
|
+
<span class="ruby-ivar">@compiler</span> = <span class="ruby-constant">Puppet</span><span class="ruby-operator">::</span><span class="ruby-constant">Parser</span><span class="ruby-operator">::</span><span class="ruby-constant">Compiler</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">node</span>)
|
1070
|
+
<span class="ruby-identifier">register</span>
|
1071
|
+
<span class="ruby-identifier">node</span>
|
1072
|
+
<span class="ruby-keyword">end</span></pre>
|
1073
|
+
</div><!-- init_puppet-source -->
|
1074
|
+
|
1075
|
+
</div>
|
1076
|
+
|
1077
|
+
|
1078
|
+
|
1079
|
+
|
1080
|
+
</div><!-- init_puppet-method -->
|
1081
|
+
|
1082
|
+
|
1083
|
+
</section><!-- protected-instance-method-details -->
|
1084
|
+
|
1085
|
+
</section><!-- 5Buntitled-5D -->
|
1086
|
+
|
1087
|
+
</div><!-- documentation -->
|
1088
|
+
|
1089
|
+
|
1090
|
+
<footer id="validator-badges">
|
1091
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
1092
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
|
1093
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
1094
|
+
</footer>
|
1095
|
+
|