kuzushi 0.0.12 → 0.0.13
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/VERSION +1 -1
- data/lib/kuzushi.rb +5 -10
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.13
|
data/lib/kuzushi.rb
CHANGED
@@ -91,7 +91,8 @@ class Kuzushi
|
|
91
91
|
def process_packages
|
92
92
|
@packages = get_array("packages")
|
93
93
|
task "install packages" do
|
94
|
-
shell "apt-get update && apt-get upgrade -y
|
94
|
+
shell "apt-get update && apt-get upgrade -y"
|
95
|
+
shell "apt-get install -y #{@packages.join(" ")}" if @packages.empty?
|
95
96
|
end
|
96
97
|
end
|
97
98
|
|
@@ -110,6 +111,7 @@ class Kuzushi
|
|
110
111
|
end
|
111
112
|
|
112
113
|
def process_volumes(v)
|
114
|
+
handle_tmpfs v if v.media == "tmpfs"
|
113
115
|
handle_ebs v if v.media == "ebs"
|
114
116
|
handle_raid v if v.media == "raid"
|
115
117
|
set_readahead v if v.readahead
|
@@ -147,25 +149,18 @@ class Kuzushi
|
|
147
149
|
o
|
148
150
|
end
|
149
151
|
|
150
|
-
def
|
152
|
+
def handle_tmpfs(m)
|
151
153
|
task "mount #{m.mount}" do
|
152
154
|
shell "mkdir -p #{m.mount} && mount -o #{mount_options(m)} -t tmpfs tmpfs #{m.mount}" unless mounted?(m.mount)
|
153
155
|
end
|
154
156
|
end
|
155
157
|
|
156
|
-
def
|
158
|
+
def handle_mount(m)
|
157
159
|
task "mount #{m.mount}" do
|
158
160
|
shell "mkdir -p #{m.mount} && mount -o #{mount_options(m)} #{m.device} #{m.mount}" unless mounted?(m.mount)
|
159
161
|
end
|
160
162
|
end
|
161
163
|
|
162
|
-
def handle_mount(m)
|
163
|
-
case m.media
|
164
|
-
when "tmpfs" then handle_mount_tmpfs(m)
|
165
|
-
else handle_mount_device(m)
|
166
|
-
end
|
167
|
-
end
|
168
|
-
|
169
164
|
def system_arch
|
170
165
|
system.kernel["machine"]
|
171
166
|
end
|