bellboy 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/bellboy/uploader.rb +9 -9
- metadata +1 -1
data/lib/bellboy/uploader.rb
CHANGED
@@ -48,18 +48,18 @@ module Bellboy
|
|
48
48
|
|
49
49
|
# Process every sub-directory (but not current & parent, natch)
|
50
50
|
unless dir == '.' || dir == '..'
|
51
|
-
begin
|
52
|
-
bag = conn.data_bag.create(name: dir) unless conn.data_bag.find(dir)
|
53
|
-
if bag.nil?
|
54
|
-
Bellboy.logger.verbose "Skipped creation of data bag #{dir}"
|
55
|
-
else
|
56
|
-
Bellboy.logger.verbose "Created new data bag #{dir}"
|
57
|
-
end
|
58
|
-
manifest = upload_databag_items(conn, File.join(path, dir), dir)
|
59
51
|
|
52
|
+
begin
|
53
|
+
conn.data_bag.create(name: dir)
|
54
|
+
rescue Ridley::Errors::HTTPConflict
|
55
|
+
Bellboy.logger.verbose "Skipped creation of data bag #{dir}"
|
60
56
|
rescue Ridley::Errors::RidleyError => ex
|
61
57
|
raise ChefConnectionError, ex
|
62
|
-
|
58
|
+
else
|
59
|
+
Bellboy.logger.verbose "Created new data bag #{dir}"
|
60
|
+
end
|
61
|
+
|
62
|
+
manifest = upload_databag_items(conn, File.join(path, dir), dir)
|
63
63
|
|
64
64
|
create_manifest_file(cookbook.path, dir, manifest)
|
65
65
|
end
|