noc 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/noc +9 -0
- data/lib/noc/version.rb +1 -1
- metadata +1 -1
data/bin/noc
CHANGED
@@ -179,6 +179,15 @@ command :upload do |c|
|
|
179
179
|
when args[0] == "user"
|
180
180
|
system("knife data bag from file users #{args[1]}.json")
|
181
181
|
|
182
|
+
when args[0] == "bags"
|
183
|
+
if args[1].nil? then
|
184
|
+
raise "Set bag"
|
185
|
+
end
|
186
|
+
system("knife data bag create #{args[1]}")
|
187
|
+
Dir.glob("data_bags/#{args[1]}/*.json").each do |f|
|
188
|
+
system("knife data bag from file #{args[1]} #{File.basename(f)}")
|
189
|
+
end
|
190
|
+
|
182
191
|
end # upload
|
183
192
|
puts "upload command ran"
|
184
193
|
end
|
data/lib/noc/version.rb
CHANGED