chef 0.7.12 → 0.7.14
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of chef might be problematic. Click here for more details.
- data/lib/chef.rb +1 -1
- data/lib/chef/mixin/find_preferred_file.rb +2 -0
- data/lib/chef/provider/deploy.rb +1 -1
- data/lib/chef/provider/git.rb +5 -1
- data/lib/chef/provider/package/yum-dump.py +4 -2
- data/lib/chef/provider/subversion.rb +3 -0
- data/lib/chef/resource/deploy.rb +2 -12
- data/lib/chef/tasks/chef_repo.rake +2 -0
- metadata +3 -3
data/lib/chef.rb
CHANGED
data/lib/chef/provider/deploy.rb
CHANGED
data/lib/chef/provider/git.rb
CHANGED
@@ -39,11 +39,13 @@ class Chef
|
|
39
39
|
clone
|
40
40
|
checkout
|
41
41
|
enable_submodules
|
42
|
+
@new_resource.updated = true
|
42
43
|
end
|
43
44
|
|
44
45
|
def action_export
|
45
46
|
action_checkout
|
46
47
|
FileUtils.rm_rf(::File.join(@new_resource.destination,".git"))
|
48
|
+
@new_resource.updated = true
|
47
49
|
end
|
48
50
|
|
49
51
|
def action_sync
|
@@ -53,6 +55,8 @@ class Chef
|
|
53
55
|
sync
|
54
56
|
enable_submodules
|
55
57
|
end
|
58
|
+
|
59
|
+
@new_resource.updated = true
|
56
60
|
end
|
57
61
|
|
58
62
|
def find_current_revision
|
@@ -191,4 +195,4 @@ class Chef
|
|
191
195
|
|
192
196
|
end
|
193
197
|
end
|
194
|
-
end
|
198
|
+
end
|
@@ -34,6 +34,8 @@ import yum
|
|
34
34
|
|
35
35
|
from yum import Errors
|
36
36
|
|
37
|
+
PIDFILE='/var/run/yum.pid'
|
38
|
+
|
37
39
|
# Seconds to wait for exclusive access to yum
|
38
40
|
lock_timeout = 10
|
39
41
|
|
@@ -54,7 +56,7 @@ try:
|
|
54
56
|
countdown = lock_timeout
|
55
57
|
while True:
|
56
58
|
try:
|
57
|
-
y.doLock()
|
59
|
+
y.doLock(PIDFILE)
|
58
60
|
except Errors.LockError, e:
|
59
61
|
time.sleep(1)
|
60
62
|
countdown -= 1
|
@@ -80,7 +82,7 @@ try:
|
|
80
82
|
# Ensure we clear the lock.
|
81
83
|
finally:
|
82
84
|
try:
|
83
|
-
y.doUnlock()
|
85
|
+
y.doUnlock(PIDFILE)
|
84
86
|
# Keep Unlock from raising a second exception as it does with a yum.conf
|
85
87
|
# config error.
|
86
88
|
except Errors.YumBaseError:
|
@@ -37,10 +37,12 @@ class Chef
|
|
37
37
|
|
38
38
|
def action_checkout
|
39
39
|
run_command(run_options(:command => checkout_command))
|
40
|
+
@new_resource.updated = true
|
40
41
|
end
|
41
42
|
|
42
43
|
def action_export
|
43
44
|
run_command(run_options(:command => export_command))
|
45
|
+
@new_resource.updated = true
|
44
46
|
end
|
45
47
|
|
46
48
|
def action_sync
|
@@ -49,6 +51,7 @@ class Chef
|
|
49
51
|
else
|
50
52
|
run_command(run_options(:command => sync_command))
|
51
53
|
end
|
54
|
+
@new_resource.updated = true
|
52
55
|
end
|
53
56
|
|
54
57
|
def sync_command
|
data/lib/chef/resource/deploy.rb
CHANGED
@@ -69,10 +69,9 @@ class Chef
|
|
69
69
|
@remote = "origin"
|
70
70
|
@enable_submodules = false
|
71
71
|
@shallow_clone = false
|
72
|
-
@force_deploy = false
|
73
72
|
@scm_provider = Chef::Provider::Git
|
74
73
|
@provider = Chef::Provider::Deploy::Timestamped
|
75
|
-
@allowed_actions.push(:deploy, :rollback)
|
74
|
+
@allowed_actions.push(:force_deploy, :deploy, :rollback)
|
76
75
|
end
|
77
76
|
|
78
77
|
# where the checked out/cloned code goes
|
@@ -244,15 +243,6 @@ class Chef
|
|
244
243
|
)
|
245
244
|
end
|
246
245
|
|
247
|
-
# Shall we run the deploy even if the code has not changed?
|
248
|
-
def force_deploy(arg=nil)
|
249
|
-
set_or_return(
|
250
|
-
:force_deploy,
|
251
|
-
arg,
|
252
|
-
:kind_of => [ TrueClass, FalseClass ]
|
253
|
-
)
|
254
|
-
end
|
255
|
-
|
256
246
|
def scm_provider(arg=nil)
|
257
247
|
set_or_return(
|
258
248
|
:scm_provider,
|
@@ -357,4 +347,4 @@ class Chef
|
|
357
347
|
|
358
348
|
end
|
359
349
|
end
|
360
|
-
end
|
350
|
+
end
|
@@ -185,6 +185,8 @@ def create_cookbook(dir)
|
|
185
185
|
sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "recipes")}"
|
186
186
|
sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "definitions")}"
|
187
187
|
sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "libraries")}"
|
188
|
+
sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "resources")}"
|
189
|
+
sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "providers")}"
|
188
190
|
sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "files", "default")}"
|
189
191
|
sh "mkdir -p #{File.join(dir, ENV["COOKBOOK"], "templates", "default")}"
|
190
192
|
unless File.exists?(File.join(dir, ENV["COOKBOOK"], "recipes", "default.rb"))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10-
|
12
|
+
date: 2009-10-27 00:00:00 +13:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.3.
|
33
|
+
version: 0.3.6
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: mixlib-cli
|