corl 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/bootstrap/os/ubuntu/06_puppet.sh +1 -1
- data/corl.gemspec +171 -3
- data/lib/CORL/builder/identity.rb +6 -3
- data/lib/CORL/builder/package.rb +3 -3
- data/lib/CORL/configuration/file.rb +21 -7
- data/lib/CORL/machine/vagrant.rb +3 -3
- data/lib/CORL/node/vagrant.rb +2 -5
- data/lib/CORL/provisioner/puppetnode.rb +8 -8
- data/lib/core/facade.rb +7 -3
- data/lib/core/mixin/action/keypair.rb +3 -3
- data/lib/core/mixin/action/registration.rb +31 -0
- data/lib/core/mixin/lookup.rb +50 -6
- data/lib/core/mixin/machine/ssh.rb +4 -4
- data/lib/core/plugin/cloud_action.rb +8 -1
- data/lib/core/plugin/configuration.rb +6 -7
- data/lib/core/plugin/fog_node.rb +7 -0
- data/lib/core/plugin/network.rb +31 -0
- data/lib/core/plugin/node.rb +182 -117
- data/lib/core/vagrant/provisioner/provisioner.rb +1 -1
- data/lib/nucleon/action/cloud/config.rb +259 -0
- data/lib/nucleon/action/cloud/images.rb +1 -1
- data/lib/nucleon/action/cloud/inspect.rb +11 -2
- data/lib/nucleon/action/cloud/machines.rb +1 -1
- data/lib/nucleon/action/cloud/regions.rb +1 -1
- data/lib/nucleon/action/cloud/settings.rb +185 -0
- data/lib/nucleon/action/node/IP.rb +1 -1
- data/lib/nucleon/action/node/bootstrap.rb +1 -1
- data/lib/nucleon/action/node/cache.rb +133 -0
- data/lib/nucleon/action/node/fact.rb +119 -0
- data/lib/nucleon/action/node/facts.rb +16 -16
- data/lib/nucleon/action/node/group.rb +115 -0
- data/lib/nucleon/action/node/groups.rb +33 -0
- data/lib/nucleon/action/node/identity.rb +75 -0
- data/lib/nucleon/action/node/lookup.rb +20 -7
- data/lib/nucleon/action/node/seed.rb +6 -6
- data/lib/nucleon/action/node/status.rb +76 -0
- data/lib/nucleon/action/plugin/create.rb +169 -0
- data/lib/nucleon/action/plugin/list.rb +69 -0
- data/lib/nucleon/action/plugin/template/nucleon.action.erb +56 -0
- data/lib/nucleon/action/plugins.rb +14 -0
- data/locales/en.yml +3 -0
- data/rdoc/site/0.5.0/CORL/Build.html +757 -0
- data/rdoc/site/0.5.0/CORL/Builder/Identity.html +569 -0
- data/rdoc/site/0.5.0/CORL/Builder/Package.html +576 -0
- data/rdoc/site/0.5.0/CORL/Builder.html +360 -0
- data/rdoc/site/0.5.0/CORL/Configuration/File.html +1148 -0
- data/rdoc/site/0.5.0/CORL/Configuration.html +359 -0
- data/rdoc/site/0.5.0/CORL/Errors.html +359 -0
- data/rdoc/site/0.5.0/CORL/Facade.html +899 -0
- data/rdoc/site/0.5.0/CORL/Machine/AWS.html +753 -0
- data/rdoc/site/0.5.0/CORL/Machine/Fog.html +1289 -0
- data/rdoc/site/0.5.0/CORL/Machine/Physical.html +1059 -0
- data/rdoc/site/0.5.0/CORL/Machine/Rackspace.html +534 -0
- data/rdoc/site/0.5.0/CORL/Machine/Vagrant.html +1320 -0
- data/rdoc/site/0.5.0/CORL/Machine.html +363 -0
- data/rdoc/site/0.5.0/CORL/Mixin/Action/Keypair.html +592 -0
- data/rdoc/site/0.5.0/CORL/Mixin/Action.html +359 -0
- data/rdoc/site/0.5.0/CORL/Mixin/Builder/Global.html +604 -0
- data/rdoc/site/0.5.0/CORL/Mixin/Builder/Instance.html +696 -0
- data/rdoc/site/0.5.0/CORL/Mixin/Builder.html +359 -0
- data/rdoc/site/0.5.0/CORL/Mixin/Lookup.html +1139 -0
- data/rdoc/site/0.5.0/CORL/Mixin/Machine/SSH.html +675 -0
- data/rdoc/site/0.5.0/CORL/Mixin/Machine.html +359 -0
- data/rdoc/site/0.5.0/CORL/Mixin/Macro/NetworkSettings.html +484 -0
- data/rdoc/site/0.5.0/CORL/Mixin/Macro.html +359 -0
- data/rdoc/site/0.5.0/CORL/Mixin.html +363 -0
- data/rdoc/site/0.5.0/CORL/Network/CORL.html +411 -0
- data/rdoc/site/0.5.0/CORL/Network.html +359 -0
- data/rdoc/site/0.5.0/CORL/Node/AWS.html +736 -0
- data/rdoc/site/0.5.0/CORL/Node/Fog.html +1212 -0
- data/rdoc/site/0.5.0/CORL/Node/Local.html +444 -0
- data/rdoc/site/0.5.0/CORL/Node/Rackspace.html +729 -0
- data/rdoc/site/0.5.0/CORL/Node/Vagrant.html +1476 -0
- data/rdoc/site/0.5.0/CORL/Node.html +363 -0
- data/rdoc/site/0.5.0/CORL/Plugin/Builder.html +500 -0
- data/rdoc/site/0.5.0/CORL/Plugin/Configuration.html +1271 -0
- data/rdoc/site/0.5.0/CORL/Plugin/Machine.html +1299 -0
- data/rdoc/site/0.5.0/CORL/Plugin/Network.html +1580 -0
- data/rdoc/site/0.5.0/CORL/Plugin/Node.html +4041 -0
- data/rdoc/site/0.5.0/CORL/Plugin/Provisioner.html +1115 -0
- data/rdoc/site/0.5.0/CORL/Plugin.html +649 -0
- data/rdoc/site/0.5.0/CORL/Provisioner/Puppetnode.html +1177 -0
- data/rdoc/site/0.5.0/CORL/Provisioner.html +359 -0
- data/rdoc/site/0.5.0/CORL/Util/Puppet/Resource.html +1058 -0
- data/rdoc/site/0.5.0/CORL/Util/Puppet/ResourceGroup.html +940 -0
- data/rdoc/site/0.5.0/CORL/Util/Puppet.html +1107 -0
- data/rdoc/site/0.5.0/CORL/Util.html +361 -0
- data/rdoc/site/0.5.0/CORL/Vagrant/Config.html +943 -0
- data/rdoc/site/0.5.0/CORL/Vagrant.html +438 -0
- data/rdoc/site/0.5.0/CORL.html +471 -0
- data/rdoc/site/0.5.0/Fog/Compute/AWS/Server.html +443 -0
- data/rdoc/site/0.5.0/Fog/Compute/AWS.html +365 -0
- data/rdoc/site/0.5.0/Fog/Compute/RackspaceV2/Server.html +428 -0
- data/rdoc/site/0.5.0/Fog/Compute/RackspaceV2.html +365 -0
- data/rdoc/site/0.5.0/Fog/Compute.html +360 -0
- data/rdoc/site/0.5.0/Fog.html +360 -0
- data/rdoc/site/0.5.0/Hiera/Backend.html +442 -0
- data/rdoc/site/0.5.0/Hiera/Corl_logger.html +469 -0
- data/rdoc/site/0.5.0/Hiera.html +366 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Create.html +538 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Hiera.html +566 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Images.html +572 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Inspect.html +524 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Machines.html +567 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Regions.html +567 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud/Vagrantfile.html +515 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Cloud.html +365 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Authorize.html +543 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Bootstrap.html +604 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Build.html +526 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Destroy.html +573 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Exec.html +530 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Facts.html +456 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/IP.html +453 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Image.html +573 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Keypair.html +572 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Lookup.html +532 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Provision.html +553 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Reboot.html +573 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Revoke.html +541 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/SSH.html +583 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Seed.html +602 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Spawn.html +675 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Start.html +573 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node/Stop.html +573 -0
- data/rdoc/site/0.5.0/Nucleon/Action/Node.html +376 -0
- data/rdoc/site/0.5.0/Nucleon/Action.html +383 -0
- data/rdoc/site/0.5.0/Nucleon/Config.html +377 -0
- data/rdoc/site/0.5.0/Nucleon/Event/Puppet.html +693 -0
- data/rdoc/site/0.5.0/Nucleon/Event.html +359 -0
- data/rdoc/site/0.5.0/Nucleon/Plugin/Base.html +365 -0
- data/rdoc/site/0.5.0/Nucleon/Plugin/CloudAction.html +838 -0
- data/rdoc/site/0.5.0/Nucleon/Plugin.html +360 -0
- data/rdoc/site/0.5.0/Nucleon/Template/Environment.html +548 -0
- data/rdoc/site/0.5.0/Nucleon/Template.html +359 -0
- data/rdoc/site/0.5.0/Nucleon.html +387 -0
- data/rdoc/site/0.5.0/Object.html +378 -0
- data/rdoc/site/0.5.0/Puppet/DataBinding/Corl.html +365 -0
- data/rdoc/site/0.5.0/Puppet/DataBinding.html +358 -0
- data/rdoc/site/0.5.0/Puppet/Indirector/Corl.html +477 -0
- data/rdoc/site/0.5.0/Puppet/Indirector.html +358 -0
- data/rdoc/site/0.5.0/Puppet/Parser/Functions.html +500 -0
- data/rdoc/site/0.5.0/Puppet/Parser.html +358 -0
- data/rdoc/site/0.5.0/Puppet.html +358 -0
- data/rdoc/site/0.5.0/README_rdoc.html +360 -0
- data/rdoc/site/0.5.0/Vagrant/Config/Loader.html +419 -0
- data/rdoc/site/0.5.0/Vagrant/Config.html +359 -0
- data/rdoc/site/0.5.0/Vagrant/Vagrantfile.html +412 -0
- data/rdoc/site/0.5.0/Vagrant.html +366 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/DeleteCache.html +422 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/InitKeys.html +428 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action/LinkNetwork.html +426 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Action.html +361 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/BaseAction.html +511 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Command/Launcher.html +553 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Command.html +359 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Config/CORL.html +752 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Config.html +359 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Plugin.html +365 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner/CORL.html +556 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner.html +359 -0
- data/rdoc/site/0.5.0/VagrantPlugins/CORL.html +366 -0
- data/rdoc/site/0.5.0/VagrantPlugins.html +366 -0
- data/rdoc/site/0.5.0/created.rid +103 -0
- data/rdoc/site/0.5.0/images/add.png +0 -0
- data/rdoc/site/0.5.0/images/brick.png +0 -0
- data/rdoc/site/0.5.0/images/brick_link.png +0 -0
- data/rdoc/site/0.5.0/images/bug.png +0 -0
- data/rdoc/site/0.5.0/images/bullet_black.png +0 -0
- data/rdoc/site/0.5.0/images/bullet_toggle_minus.png +0 -0
- data/rdoc/site/0.5.0/images/bullet_toggle_plus.png +0 -0
- data/rdoc/site/0.5.0/images/date.png +0 -0
- data/rdoc/site/0.5.0/images/delete.png +0 -0
- data/rdoc/site/0.5.0/images/find.png +0 -0
- data/rdoc/site/0.5.0/images/loadingAnimation.gif +0 -0
- data/rdoc/site/0.5.0/images/macFFBgHack.png +0 -0
- data/rdoc/site/0.5.0/images/package.png +0 -0
- data/rdoc/site/0.5.0/images/page_green.png +0 -0
- data/rdoc/site/0.5.0/images/page_white_text.png +0 -0
- data/rdoc/site/0.5.0/images/page_white_width.png +0 -0
- data/rdoc/site/0.5.0/images/plugin.png +0 -0
- data/rdoc/site/0.5.0/images/ruby.png +0 -0
- data/rdoc/site/0.5.0/images/tag_blue.png +0 -0
- data/rdoc/site/0.5.0/images/tag_green.png +0 -0
- data/rdoc/site/0.5.0/images/transparent.png +0 -0
- data/rdoc/site/0.5.0/images/wrench.png +0 -0
- data/rdoc/site/0.5.0/images/wrench_orange.png +0 -0
- data/rdoc/site/0.5.0/images/zoom.png +0 -0
- data/rdoc/site/0.5.0/index.html +359 -0
- data/rdoc/site/0.5.0/js/darkfish.js +155 -0
- data/rdoc/site/0.5.0/js/jquery.js +18 -0
- data/rdoc/site/0.5.0/js/navigation.js +142 -0
- data/rdoc/site/0.5.0/js/search.js +94 -0
- data/rdoc/site/0.5.0/js/search_index.js +1 -0
- data/rdoc/site/0.5.0/js/searcher.js +228 -0
- data/rdoc/site/0.5.0/rdoc.css +543 -0
- data/rdoc/site/0.5.0/table_of_contents.html +1797 -0
- metadata +171 -3
- data/lib/nucleon/action/cloud/hiera.rb +0 -61
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1f29a3e15157033eb15220fec258f5dab7c864f
|
4
|
+
data.tar.gz: eedf1f77dd5ceb8a0bec1e3ee8051c36e2d52250
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f81cf183feae8f4b102389f115da4549c50f2fe6da18fa5db9e690a72b498de16689f634d0d5f2dfaec3c584afe188b5e45cfe9c92aa06b505fd66473a7be73
|
7
|
+
data.tar.gz: 3bce3004dc717b56ad801f1f6549aad4254d9a9374d273b81c37145cc04f8bf355ddd28048300dd8d551dac92a8de13698475481c2ca96f094b014810914cf03
|
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
@@ -14,7 +14,7 @@ chmod 0644 /etc/apt/sources.list.d/corl_puppet.list || exit 62
|
|
14
14
|
# Install Puppet
|
15
15
|
apt-get -y update || exit 63
|
16
16
|
|
17
|
-
apt-get -y install puppet-common="$PUPPET_PACKAGE" puppet="$PUPPET_PACKAGE" || exit 64
|
17
|
+
apt-get -y install hiera puppet-common="$PUPPET_PACKAGE" puppet="$PUPPET_PACKAGE" || exit 64
|
18
18
|
|
19
19
|
chown -R root:puppet /var/lib/puppet || exit 65
|
20
20
|
|
data/corl.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "corl"
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Adrian Webb"]
|
12
|
-
s.date = "2014-07-
|
12
|
+
s.date = "2014-07-10"
|
13
13
|
s.description = "Framework that provides a simple foundation for growing organically in the cloud"
|
14
14
|
s.email = "adrian.webb@coralnexus.com"
|
15
15
|
s.executables = ["corl"]
|
@@ -61,6 +61,7 @@ Gem::Specification.new do |s|
|
|
61
61
|
"lib/core/errors.rb",
|
62
62
|
"lib/core/facade.rb",
|
63
63
|
"lib/core/mixin/action/keypair.rb",
|
64
|
+
"lib/core/mixin/action/registration.rb",
|
64
65
|
"lib/core/mixin/builder.rb",
|
65
66
|
"lib/core/mixin/lookup.rb",
|
66
67
|
"lib/core/mixin/machine/ssh.rb",
|
@@ -97,21 +98,27 @@ Gem::Specification.new do |s|
|
|
97
98
|
"lib/facter/custom_facts.rb",
|
98
99
|
"lib/facter/vagrant_exists.rb",
|
99
100
|
"lib/hiera/corl_logger.rb",
|
101
|
+
"lib/nucleon/action/cloud/config.rb",
|
100
102
|
"lib/nucleon/action/cloud/create.rb",
|
101
|
-
"lib/nucleon/action/cloud/hiera.rb",
|
102
103
|
"lib/nucleon/action/cloud/images.rb",
|
103
104
|
"lib/nucleon/action/cloud/inspect.rb",
|
104
105
|
"lib/nucleon/action/cloud/machines.rb",
|
105
106
|
"lib/nucleon/action/cloud/regions.rb",
|
107
|
+
"lib/nucleon/action/cloud/settings.rb",
|
106
108
|
"lib/nucleon/action/cloud/vagrantfile.rb",
|
107
109
|
"lib/nucleon/action/node/IP.rb",
|
108
110
|
"lib/nucleon/action/node/SSH.rb",
|
109
111
|
"lib/nucleon/action/node/authorize.rb",
|
110
112
|
"lib/nucleon/action/node/bootstrap.rb",
|
111
113
|
"lib/nucleon/action/node/build.rb",
|
114
|
+
"lib/nucleon/action/node/cache.rb",
|
112
115
|
"lib/nucleon/action/node/destroy.rb",
|
113
116
|
"lib/nucleon/action/node/exec.rb",
|
117
|
+
"lib/nucleon/action/node/fact.rb",
|
114
118
|
"lib/nucleon/action/node/facts.rb",
|
119
|
+
"lib/nucleon/action/node/group.rb",
|
120
|
+
"lib/nucleon/action/node/groups.rb",
|
121
|
+
"lib/nucleon/action/node/identity.rb",
|
115
122
|
"lib/nucleon/action/node/image.rb",
|
116
123
|
"lib/nucleon/action/node/keypair.rb",
|
117
124
|
"lib/nucleon/action/node/lookup.rb",
|
@@ -121,7 +128,12 @@ Gem::Specification.new do |s|
|
|
121
128
|
"lib/nucleon/action/node/seed.rb",
|
122
129
|
"lib/nucleon/action/node/spawn.rb",
|
123
130
|
"lib/nucleon/action/node/start.rb",
|
131
|
+
"lib/nucleon/action/node/status.rb",
|
124
132
|
"lib/nucleon/action/node/stop.rb",
|
133
|
+
"lib/nucleon/action/plugin/create.rb",
|
134
|
+
"lib/nucleon/action/plugin/list.rb",
|
135
|
+
"lib/nucleon/action/plugin/template/nucleon.action.erb",
|
136
|
+
"lib/nucleon/action/plugins.rb",
|
125
137
|
"lib/nucleon/event/puppet.rb",
|
126
138
|
"lib/nucleon/template/environment.rb",
|
127
139
|
"lib/puppet/indirector/corl.rb",
|
@@ -293,6 +305,162 @@ Gem::Specification.new do |s|
|
|
293
305
|
"rdoc/site/0.4.29/js/searcher.js",
|
294
306
|
"rdoc/site/0.4.29/rdoc.css",
|
295
307
|
"rdoc/site/0.4.29/table_of_contents.html",
|
308
|
+
"rdoc/site/0.5.0/CORL.html",
|
309
|
+
"rdoc/site/0.5.0/CORL/Build.html",
|
310
|
+
"rdoc/site/0.5.0/CORL/Builder.html",
|
311
|
+
"rdoc/site/0.5.0/CORL/Builder/Identity.html",
|
312
|
+
"rdoc/site/0.5.0/CORL/Builder/Package.html",
|
313
|
+
"rdoc/site/0.5.0/CORL/Configuration.html",
|
314
|
+
"rdoc/site/0.5.0/CORL/Configuration/File.html",
|
315
|
+
"rdoc/site/0.5.0/CORL/Errors.html",
|
316
|
+
"rdoc/site/0.5.0/CORL/Facade.html",
|
317
|
+
"rdoc/site/0.5.0/CORL/Machine.html",
|
318
|
+
"rdoc/site/0.5.0/CORL/Machine/AWS.html",
|
319
|
+
"rdoc/site/0.5.0/CORL/Machine/Fog.html",
|
320
|
+
"rdoc/site/0.5.0/CORL/Machine/Physical.html",
|
321
|
+
"rdoc/site/0.5.0/CORL/Machine/Rackspace.html",
|
322
|
+
"rdoc/site/0.5.0/CORL/Machine/Vagrant.html",
|
323
|
+
"rdoc/site/0.5.0/CORL/Mixin.html",
|
324
|
+
"rdoc/site/0.5.0/CORL/Mixin/Action.html",
|
325
|
+
"rdoc/site/0.5.0/CORL/Mixin/Action/Keypair.html",
|
326
|
+
"rdoc/site/0.5.0/CORL/Mixin/Builder.html",
|
327
|
+
"rdoc/site/0.5.0/CORL/Mixin/Builder/Global.html",
|
328
|
+
"rdoc/site/0.5.0/CORL/Mixin/Builder/Instance.html",
|
329
|
+
"rdoc/site/0.5.0/CORL/Mixin/Lookup.html",
|
330
|
+
"rdoc/site/0.5.0/CORL/Mixin/Machine.html",
|
331
|
+
"rdoc/site/0.5.0/CORL/Mixin/Machine/SSH.html",
|
332
|
+
"rdoc/site/0.5.0/CORL/Mixin/Macro.html",
|
333
|
+
"rdoc/site/0.5.0/CORL/Mixin/Macro/NetworkSettings.html",
|
334
|
+
"rdoc/site/0.5.0/CORL/Network.html",
|
335
|
+
"rdoc/site/0.5.0/CORL/Network/CORL.html",
|
336
|
+
"rdoc/site/0.5.0/CORL/Node.html",
|
337
|
+
"rdoc/site/0.5.0/CORL/Node/AWS.html",
|
338
|
+
"rdoc/site/0.5.0/CORL/Node/Fog.html",
|
339
|
+
"rdoc/site/0.5.0/CORL/Node/Local.html",
|
340
|
+
"rdoc/site/0.5.0/CORL/Node/Rackspace.html",
|
341
|
+
"rdoc/site/0.5.0/CORL/Node/Vagrant.html",
|
342
|
+
"rdoc/site/0.5.0/CORL/Plugin.html",
|
343
|
+
"rdoc/site/0.5.0/CORL/Plugin/Builder.html",
|
344
|
+
"rdoc/site/0.5.0/CORL/Plugin/Configuration.html",
|
345
|
+
"rdoc/site/0.5.0/CORL/Plugin/Machine.html",
|
346
|
+
"rdoc/site/0.5.0/CORL/Plugin/Network.html",
|
347
|
+
"rdoc/site/0.5.0/CORL/Plugin/Node.html",
|
348
|
+
"rdoc/site/0.5.0/CORL/Plugin/Provisioner.html",
|
349
|
+
"rdoc/site/0.5.0/CORL/Provisioner.html",
|
350
|
+
"rdoc/site/0.5.0/CORL/Provisioner/Puppetnode.html",
|
351
|
+
"rdoc/site/0.5.0/CORL/Util.html",
|
352
|
+
"rdoc/site/0.5.0/CORL/Util/Puppet.html",
|
353
|
+
"rdoc/site/0.5.0/CORL/Util/Puppet/Resource.html",
|
354
|
+
"rdoc/site/0.5.0/CORL/Util/Puppet/ResourceGroup.html",
|
355
|
+
"rdoc/site/0.5.0/CORL/Vagrant.html",
|
356
|
+
"rdoc/site/0.5.0/CORL/Vagrant/Config.html",
|
357
|
+
"rdoc/site/0.5.0/Fog.html",
|
358
|
+
"rdoc/site/0.5.0/Fog/Compute.html",
|
359
|
+
"rdoc/site/0.5.0/Fog/Compute/AWS.html",
|
360
|
+
"rdoc/site/0.5.0/Fog/Compute/AWS/Server.html",
|
361
|
+
"rdoc/site/0.5.0/Fog/Compute/RackspaceV2.html",
|
362
|
+
"rdoc/site/0.5.0/Fog/Compute/RackspaceV2/Server.html",
|
363
|
+
"rdoc/site/0.5.0/Hiera.html",
|
364
|
+
"rdoc/site/0.5.0/Hiera/Backend.html",
|
365
|
+
"rdoc/site/0.5.0/Hiera/Corl_logger.html",
|
366
|
+
"rdoc/site/0.5.0/Nucleon.html",
|
367
|
+
"rdoc/site/0.5.0/Nucleon/Action.html",
|
368
|
+
"rdoc/site/0.5.0/Nucleon/Action/Cloud.html",
|
369
|
+
"rdoc/site/0.5.0/Nucleon/Action/Cloud/Create.html",
|
370
|
+
"rdoc/site/0.5.0/Nucleon/Action/Cloud/Hiera.html",
|
371
|
+
"rdoc/site/0.5.0/Nucleon/Action/Cloud/Images.html",
|
372
|
+
"rdoc/site/0.5.0/Nucleon/Action/Cloud/Inspect.html",
|
373
|
+
"rdoc/site/0.5.0/Nucleon/Action/Cloud/Machines.html",
|
374
|
+
"rdoc/site/0.5.0/Nucleon/Action/Cloud/Regions.html",
|
375
|
+
"rdoc/site/0.5.0/Nucleon/Action/Cloud/Vagrantfile.html",
|
376
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node.html",
|
377
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Authorize.html",
|
378
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Bootstrap.html",
|
379
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Build.html",
|
380
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Destroy.html",
|
381
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Exec.html",
|
382
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Facts.html",
|
383
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/IP.html",
|
384
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Image.html",
|
385
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Keypair.html",
|
386
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Lookup.html",
|
387
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Provision.html",
|
388
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Reboot.html",
|
389
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Revoke.html",
|
390
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/SSH.html",
|
391
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Seed.html",
|
392
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Spawn.html",
|
393
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Start.html",
|
394
|
+
"rdoc/site/0.5.0/Nucleon/Action/Node/Stop.html",
|
395
|
+
"rdoc/site/0.5.0/Nucleon/Config.html",
|
396
|
+
"rdoc/site/0.5.0/Nucleon/Event.html",
|
397
|
+
"rdoc/site/0.5.0/Nucleon/Event/Puppet.html",
|
398
|
+
"rdoc/site/0.5.0/Nucleon/Plugin.html",
|
399
|
+
"rdoc/site/0.5.0/Nucleon/Plugin/Base.html",
|
400
|
+
"rdoc/site/0.5.0/Nucleon/Plugin/CloudAction.html",
|
401
|
+
"rdoc/site/0.5.0/Nucleon/Template.html",
|
402
|
+
"rdoc/site/0.5.0/Nucleon/Template/Environment.html",
|
403
|
+
"rdoc/site/0.5.0/Object.html",
|
404
|
+
"rdoc/site/0.5.0/Puppet.html",
|
405
|
+
"rdoc/site/0.5.0/Puppet/DataBinding.html",
|
406
|
+
"rdoc/site/0.5.0/Puppet/DataBinding/Corl.html",
|
407
|
+
"rdoc/site/0.5.0/Puppet/Indirector.html",
|
408
|
+
"rdoc/site/0.5.0/Puppet/Indirector/Corl.html",
|
409
|
+
"rdoc/site/0.5.0/Puppet/Parser.html",
|
410
|
+
"rdoc/site/0.5.0/Puppet/Parser/Functions.html",
|
411
|
+
"rdoc/site/0.5.0/README_rdoc.html",
|
412
|
+
"rdoc/site/0.5.0/Vagrant.html",
|
413
|
+
"rdoc/site/0.5.0/Vagrant/Config.html",
|
414
|
+
"rdoc/site/0.5.0/Vagrant/Config/Loader.html",
|
415
|
+
"rdoc/site/0.5.0/Vagrant/Vagrantfile.html",
|
416
|
+
"rdoc/site/0.5.0/VagrantPlugins.html",
|
417
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL.html",
|
418
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/Action.html",
|
419
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/Action/DeleteCache.html",
|
420
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/Action/InitKeys.html",
|
421
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/Action/LinkNetwork.html",
|
422
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/BaseAction.html",
|
423
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/Command.html",
|
424
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/Command/Launcher.html",
|
425
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/Config.html",
|
426
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/Config/CORL.html",
|
427
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/Plugin.html",
|
428
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner.html",
|
429
|
+
"rdoc/site/0.5.0/VagrantPlugins/CORL/Provisioner/CORL.html",
|
430
|
+
"rdoc/site/0.5.0/created.rid",
|
431
|
+
"rdoc/site/0.5.0/images/add.png",
|
432
|
+
"rdoc/site/0.5.0/images/brick.png",
|
433
|
+
"rdoc/site/0.5.0/images/brick_link.png",
|
434
|
+
"rdoc/site/0.5.0/images/bug.png",
|
435
|
+
"rdoc/site/0.5.0/images/bullet_black.png",
|
436
|
+
"rdoc/site/0.5.0/images/bullet_toggle_minus.png",
|
437
|
+
"rdoc/site/0.5.0/images/bullet_toggle_plus.png",
|
438
|
+
"rdoc/site/0.5.0/images/date.png",
|
439
|
+
"rdoc/site/0.5.0/images/delete.png",
|
440
|
+
"rdoc/site/0.5.0/images/find.png",
|
441
|
+
"rdoc/site/0.5.0/images/loadingAnimation.gif",
|
442
|
+
"rdoc/site/0.5.0/images/macFFBgHack.png",
|
443
|
+
"rdoc/site/0.5.0/images/package.png",
|
444
|
+
"rdoc/site/0.5.0/images/page_green.png",
|
445
|
+
"rdoc/site/0.5.0/images/page_white_text.png",
|
446
|
+
"rdoc/site/0.5.0/images/page_white_width.png",
|
447
|
+
"rdoc/site/0.5.0/images/plugin.png",
|
448
|
+
"rdoc/site/0.5.0/images/ruby.png",
|
449
|
+
"rdoc/site/0.5.0/images/tag_blue.png",
|
450
|
+
"rdoc/site/0.5.0/images/tag_green.png",
|
451
|
+
"rdoc/site/0.5.0/images/transparent.png",
|
452
|
+
"rdoc/site/0.5.0/images/wrench.png",
|
453
|
+
"rdoc/site/0.5.0/images/wrench_orange.png",
|
454
|
+
"rdoc/site/0.5.0/images/zoom.png",
|
455
|
+
"rdoc/site/0.5.0/index.html",
|
456
|
+
"rdoc/site/0.5.0/js/darkfish.js",
|
457
|
+
"rdoc/site/0.5.0/js/jquery.js",
|
458
|
+
"rdoc/site/0.5.0/js/navigation.js",
|
459
|
+
"rdoc/site/0.5.0/js/search.js",
|
460
|
+
"rdoc/site/0.5.0/js/search_index.js",
|
461
|
+
"rdoc/site/0.5.0/js/searcher.js",
|
462
|
+
"rdoc/site/0.5.0/rdoc.css",
|
463
|
+
"rdoc/site/0.5.0/table_of_contents.html",
|
296
464
|
"spec/corl_mock_input.rb",
|
297
465
|
"spec/corl_test_kernel.rb",
|
298
466
|
"spec/spec_helper.rb"
|
@@ -37,7 +37,7 @@ class Identity < CORL.plugin_class(:CORL, :builder)
|
|
37
37
|
directory = File.join(internal_path(build_directory), provider_id.to_s)
|
38
38
|
success = true
|
39
39
|
|
40
|
-
|
40
|
+
info("Building identity #{blue(name)} at #{purple(project_reference)} into #{green(directory)}", { :i18n => false })
|
41
41
|
|
42
42
|
full_directory = File.join(network.directory, directory)
|
43
43
|
|
@@ -51,16 +51,19 @@ class Identity < CORL.plugin_class(:CORL, :builder)
|
|
51
51
|
:manage_ignore => false
|
52
52
|
}))
|
53
53
|
unless project
|
54
|
-
|
54
|
+
warn("Identity #{cyan(name)} failed to initialize", { :i18n => false })
|
55
55
|
success = false
|
56
56
|
end
|
57
57
|
|
58
58
|
if success
|
59
|
+
# Make thid project private.
|
60
|
+
FileUtils.chmod_R('go-wrx', full_directory)
|
61
|
+
|
59
62
|
set_identity(provider_id, full_directory)
|
60
63
|
build_config.set_location(plugin_provider, name, directory)
|
61
64
|
end
|
62
65
|
end
|
63
|
-
|
66
|
+
success("Build of identity #{blue(name)} finished", { :i18n => false }) if success
|
64
67
|
success
|
65
68
|
end
|
66
69
|
end
|
data/lib/CORL/builder/package.rb
CHANGED
@@ -37,7 +37,7 @@ class Package < CORL.plugin_class(:CORL, :builder)
|
|
37
37
|
directory = File.join(internal_path(build_directory), provider_id.to_s)
|
38
38
|
success = true
|
39
39
|
|
40
|
-
|
40
|
+
info("Building package #{blue(name)} at #{purple(project_reference)} into #{green(directory)}", { :i18n => false })
|
41
41
|
|
42
42
|
full_directory = File.join(network.directory, directory)
|
43
43
|
|
@@ -49,7 +49,7 @@ class Package < CORL.plugin_class(:CORL, :builder)
|
|
49
49
|
:manage_ignore => false
|
50
50
|
}))
|
51
51
|
unless project
|
52
|
-
|
52
|
+
warn("Package #{cyan(name)} failed to initialize", { :i18n => false })
|
53
53
|
success = false
|
54
54
|
end
|
55
55
|
|
@@ -67,7 +67,7 @@ class Package < CORL.plugin_class(:CORL, :builder)
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
70
|
-
|
70
|
+
success("Build of package #{blue(name)} finished", { :i18n => false }) if success
|
71
71
|
success
|
72
72
|
end
|
73
73
|
end
|
@@ -37,7 +37,10 @@ class File < CORL.plugin_class(:CORL, :configuration)
|
|
37
37
|
# Configuration loading / saving
|
38
38
|
|
39
39
|
def load(options = {})
|
40
|
-
super do |method_config, properties|
|
40
|
+
super do |method_config, properties|
|
41
|
+
success = true
|
42
|
+
|
43
|
+
myself.status = code.success
|
41
44
|
|
42
45
|
generate_routes = lambda do |config_name, file_properties, parents = []|
|
43
46
|
file_properties.each do |name, value|
|
@@ -62,15 +65,26 @@ class File < CORL.plugin_class(:CORL, :configuration)
|
|
62
65
|
raw = Util::Disk.read(file)
|
63
66
|
|
64
67
|
if parser && raw && ! raw.empty?
|
65
|
-
logger.debug("Source configuration file contents: #{raw}")
|
66
|
-
parse_properties = parser.parse(raw)
|
68
|
+
logger.debug("Source configuration file contents: #{raw}")
|
67
69
|
|
68
|
-
|
69
|
-
|
70
|
+
begin
|
71
|
+
parse_properties = parser.parse(raw)
|
72
|
+
|
73
|
+
generate_routes.call(config_name, parse_properties)
|
74
|
+
properties.import(parse_properties)
|
75
|
+
|
76
|
+
rescue => error
|
77
|
+
ui_group(file) do
|
78
|
+
error(error.message.sub(/^[^\:]+\:\s+/, ''), { :i18n => false })
|
79
|
+
end
|
80
|
+
myself.status = 255
|
81
|
+
success = false
|
82
|
+
end
|
70
83
|
end
|
71
84
|
CORL.remove_plugin(parser) if parser
|
72
85
|
end
|
73
86
|
end
|
87
|
+
success
|
74
88
|
end
|
75
89
|
end
|
76
90
|
|
@@ -235,7 +249,7 @@ class File < CORL.plugin_class(:CORL, :configuration)
|
|
235
249
|
FileUtils.mkdir_p(attach_path) unless Dir.exists?(attach_path)
|
236
250
|
|
237
251
|
rescue => error
|
238
|
-
|
252
|
+
warn(error.message, { :i18n => false })
|
239
253
|
success = false
|
240
254
|
end
|
241
255
|
|
@@ -259,7 +273,7 @@ class File < CORL.plugin_class(:CORL, :configuration)
|
|
259
273
|
FileUtils.cp(file, new_file)
|
260
274
|
|
261
275
|
rescue => error
|
262
|
-
|
276
|
+
warn(error.message, { :i18n => false })
|
263
277
|
success = false
|
264
278
|
end
|
265
279
|
end
|
data/lib/CORL/machine/vagrant.rb
CHANGED
@@ -177,7 +177,7 @@ class Vagrant < CORL.plugin_class(:CORL, :machine)
|
|
177
177
|
end
|
178
178
|
|
179
179
|
rescue => error
|
180
|
-
|
180
|
+
error(error.message, { :i18n => false })
|
181
181
|
success = false
|
182
182
|
end
|
183
183
|
|
@@ -306,8 +306,8 @@ class Vagrant < CORL.plugin_class(:CORL, :machine)
|
|
306
306
|
server.send(:action, action.to_sym, params)
|
307
307
|
|
308
308
|
rescue => error
|
309
|
-
|
310
|
-
|
309
|
+
error(error, { :i18n => false })
|
310
|
+
error(Util::Data.to_yaml(error.backtrace), { :i18n => false })
|
311
311
|
success = false
|
312
312
|
end
|
313
313
|
end
|
data/lib/CORL/node/vagrant.rb
CHANGED
@@ -223,15 +223,12 @@ class Vagrant < CORL.plugin_class(:CORL, :node)
|
|
223
223
|
#---
|
224
224
|
|
225
225
|
def filter_output(type, data)
|
226
|
+
data = super
|
227
|
+
|
226
228
|
if type == :error
|
227
229
|
if data.include?('stdin: is not a tty') || data.include?('unable to re-open stdin')
|
228
230
|
data = ''
|
229
231
|
end
|
230
|
-
elsif type == :output
|
231
|
-
# Hide redundant Facter output
|
232
|
-
if data =~ /^Already evaluated [a-z]+ at [^,]+, reevaluating anyways$/
|
233
|
-
data = ''
|
234
|
-
end
|
235
232
|
end
|
236
233
|
data
|
237
234
|
end
|
@@ -142,7 +142,7 @@ class Puppetnode < CORL.plugin_class(:CORL, :provisioner)
|
|
142
142
|
directory = File.join(internal_path(build_directory), package_id.to_s, name.to_s)
|
143
143
|
success = true
|
144
144
|
|
145
|
-
|
145
|
+
info("Building CORL profile #{blue(name)} modules into #{green(directory)}", { :i18n => false })
|
146
146
|
|
147
147
|
if processed_info.has_key?(:modules)
|
148
148
|
status = parallel(:build_module, hash(processed_info[:modules]), directory, name, environment)
|
@@ -150,7 +150,7 @@ class Puppetnode < CORL.plugin_class(:CORL, :provisioner)
|
|
150
150
|
|
151
151
|
build_config.set_location(:puppet_module, profile_id(package, name), directory) if success
|
152
152
|
end
|
153
|
-
|
153
|
+
success("Build of profile #{blue(name)} finished", { :i18n => false }) if success
|
154
154
|
success
|
155
155
|
end
|
156
156
|
end
|
@@ -161,7 +161,7 @@ class Puppetnode < CORL.plugin_class(:CORL, :provisioner)
|
|
161
161
|
module_project = nil
|
162
162
|
success = true
|
163
163
|
|
164
|
-
|
164
|
+
info("Building #{blue(profile)} Puppet module #{blue(name)} at #{purple(project_reference)} into #{green(module_directory)}", { :i18n => false })
|
165
165
|
|
166
166
|
module_project = build_config.manage(:project, extended_config(:puppet_module, {
|
167
167
|
:directory => full_module_directory,
|
@@ -172,10 +172,10 @@ class Puppetnode < CORL.plugin_class(:CORL, :provisioner)
|
|
172
172
|
:manage_ignore => false
|
173
173
|
}))
|
174
174
|
unless module_project
|
175
|
-
|
175
|
+
warn("Puppet module #{cyan(name)} failed to initialize", { :i18n => false })
|
176
176
|
success = false
|
177
177
|
end
|
178
|
-
|
178
|
+
success("Build of #{blue(profile)} #{blue(name)} finished", { :i18n => false }) if success
|
179
179
|
success
|
180
180
|
end
|
181
181
|
|
@@ -256,7 +256,7 @@ class Puppetnode < CORL.plugin_class(:CORL, :provisioner)
|
|
256
256
|
|
257
257
|
@@puppet_lock.synchronize do
|
258
258
|
begin
|
259
|
-
|
259
|
+
info("Starting catalog generation", { :i18n => false })
|
260
260
|
|
261
261
|
@@status[id] = code.success
|
262
262
|
@@network = network
|
@@ -292,8 +292,8 @@ class Puppetnode < CORL.plugin_class(:CORL, :provisioner)
|
|
292
292
|
catalog.retrieval_duration = Time.now - start_time
|
293
293
|
|
294
294
|
unless config.get(:dry_run, false)
|
295
|
-
|
296
|
-
|
295
|
+
info("\n", { :prefix => false, :i18n => false })
|
296
|
+
info("Starting configuration run", { :i18n => false })
|
297
297
|
|
298
298
|
# Configure the machine
|
299
299
|
configurer = Puppet::Configurer.new
|
data/lib/core/facade.rb
CHANGED
@@ -10,8 +10,10 @@ module Facade
|
|
10
10
|
def facts(reset = false)
|
11
11
|
if reset || @@facts.empty?
|
12
12
|
@@facts = {} if reset
|
13
|
-
|
14
|
-
|
13
|
+
silence do
|
14
|
+
Facter.list.each do |name|
|
15
|
+
@@facts[name] = Facter.value(name)
|
16
|
+
end
|
15
17
|
end
|
16
18
|
end
|
17
19
|
@@facts
|
@@ -29,7 +31,9 @@ module Facade
|
|
29
31
|
#---
|
30
32
|
|
31
33
|
def fact(name)
|
32
|
-
|
34
|
+
silence do
|
35
|
+
Facter.value(name)
|
36
|
+
end
|
33
37
|
end
|
34
38
|
|
35
39
|
#-----------------------------------------------------------------------------
|
@@ -85,9 +85,9 @@ module Keypair
|
|
85
85
|
else
|
86
86
|
key_options = {}
|
87
87
|
if settings[:require_password]
|
88
|
-
|
89
|
-
if
|
90
|
-
key_options[:passphrase] =
|
88
|
+
key_password = password('SSH')
|
89
|
+
if key_password
|
90
|
+
key_options[:passphrase] = key_password
|
91
91
|
else
|
92
92
|
warn('corl.core.mixin.action.keypair.errors.no_password')
|
93
93
|
return nil
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
module CORL
|
3
|
+
module Mixin
|
4
|
+
module Action
|
5
|
+
module Registration
|
6
|
+
|
7
|
+
#-----------------------------------------------------------------------------
|
8
|
+
# Options
|
9
|
+
|
10
|
+
def register_node(name, default = nil)
|
11
|
+
name = name.to_sym
|
12
|
+
|
13
|
+
register name, :str, default do |value|
|
14
|
+
validate_plugins(:CORL, :node, name, value)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
#---
|
19
|
+
|
20
|
+
def register_nodes(name, default = nil)
|
21
|
+
name = name.to_sym
|
22
|
+
|
23
|
+
register name, :array, default do |values|
|
24
|
+
validate_plugins(:CORL, :node, name, values)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
data/lib/core/mixin/lookup.rb
CHANGED
@@ -26,9 +26,37 @@ module Lookup
|
|
26
26
|
|
27
27
|
#---
|
28
28
|
|
29
|
-
def
|
29
|
+
def create_facts(data, reset = false)
|
30
30
|
facts(reset, false)
|
31
|
-
|
31
|
+
|
32
|
+
data = hash(data)
|
33
|
+
data.each do |name, value|
|
34
|
+
fact_var[name.to_sym] = value
|
35
|
+
end
|
36
|
+
create_facts_post(fact_var.clone, data.keys)
|
37
|
+
end
|
38
|
+
|
39
|
+
def create_facts_post(data, names)
|
40
|
+
data
|
41
|
+
end
|
42
|
+
|
43
|
+
#---
|
44
|
+
|
45
|
+
def delete_facts(names, reset = false)
|
46
|
+
facts(reset, false)
|
47
|
+
|
48
|
+
names = [ names ] unless names.is_a?(Array)
|
49
|
+
data = {}
|
50
|
+
|
51
|
+
names.each do |name|
|
52
|
+
name = name.to_sym
|
53
|
+
data[name] = fact_var.delete(name)
|
54
|
+
end
|
55
|
+
delete_facts_post(fact_var.clone, data)
|
56
|
+
end
|
57
|
+
|
58
|
+
def delete_facts_post(data, old_data)
|
59
|
+
data
|
32
60
|
end
|
33
61
|
|
34
62
|
#---
|
@@ -75,6 +103,11 @@ module Lookup
|
|
75
103
|
if CORL.admin? && config_file && File.exist?(config_file)
|
76
104
|
config = Hiera::Config.load(config_file)
|
77
105
|
end
|
106
|
+
|
107
|
+
# Need some way to tell if we have installed our own Hiera configuration.
|
108
|
+
# TODO: Figure something else out. This is bad.
|
109
|
+
config = {} if config[:merge_behavior] == :native
|
110
|
+
|
78
111
|
config[:logger] = :corl
|
79
112
|
|
80
113
|
unless config[:merge_behavior]
|
@@ -114,6 +147,11 @@ module Lookup
|
|
114
147
|
unless hiera_config[:hierarchy].include?('common')
|
115
148
|
hiera_config[:hierarchy] << 'common'
|
116
149
|
end
|
150
|
+
|
151
|
+
hiera_config[:hierarchy].each_with_index do |path, index|
|
152
|
+
hiera_config[:hierarchy][index] = path.gsub('//', '/')
|
153
|
+
end
|
154
|
+
|
117
155
|
hiera_config.export
|
118
156
|
end
|
119
157
|
|
@@ -143,7 +181,7 @@ module Lookup
|
|
143
181
|
|
144
182
|
#---
|
145
183
|
|
146
|
-
def
|
184
|
+
def lookup_base(properties, default = nil, options = {})
|
147
185
|
config = Config.new(Config.ensure(options).export)
|
148
186
|
value = nil
|
149
187
|
|
@@ -218,11 +256,17 @@ module Lookup
|
|
218
256
|
CORL.ui.info("\n", { :prefix => false }) if debug
|
219
257
|
value
|
220
258
|
end
|
259
|
+
|
260
|
+
#---
|
261
|
+
|
262
|
+
def lookup(properties, default = nil, options = {})
|
263
|
+
lookup_base(properties, default, options)
|
264
|
+
end
|
221
265
|
|
222
266
|
#---
|
223
267
|
|
224
268
|
def lookup_array(properties, default = [], options = {})
|
225
|
-
config = Config.ensure(options)
|
269
|
+
config = Config.ensure(options).defaults({ :basic => false })
|
226
270
|
value, property = lookup(properties, nil, config.import({ :return_property => true, :context => :array }))
|
227
271
|
|
228
272
|
if Util::Data.undef?(value)
|
@@ -251,7 +295,7 @@ module Lookup
|
|
251
295
|
#---
|
252
296
|
|
253
297
|
def lookup_hash(properties, default = {}, options = {})
|
254
|
-
config = Config.ensure(options)
|
298
|
+
config = Config.ensure(options).defaults({ :basic => false })
|
255
299
|
value, property = lookup(properties, nil, config.import({ :return_property => true, :context => :hash }))
|
256
300
|
|
257
301
|
if Util::Data.undef?(value)
|
@@ -280,7 +324,7 @@ module Lookup
|
|
280
324
|
#---
|
281
325
|
|
282
326
|
def normalize(data, override = nil, options = {})
|
283
|
-
config = Config.ensure(options).import({ :context => :hash })
|
327
|
+
config = Config.ensure(options).import({ :context => :hash }).defaults({ :basic => false })
|
284
328
|
results = {}
|
285
329
|
|
286
330
|
unless Util::Data.undef?(override)
|