Skip to content

Commit

Permalink
Added zfs arc management, fixed unzip call for tflint
Browse files Browse the repository at this point in the history
  • Loading branch information
moritzheiber committed Nov 15, 2024
1 parent 611924c commit f45d68c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions mitamae/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,16 @@
service 'geoclue' do
action :nothing
end

# This is only relevant for systems with ZFS
# You would probably want to set this dynamically using node[]
# but I cannot be bothered right now
size_in_gb = 4
size_of_arc_cache = size_in_gb * 1024 * 1024 * 1024

template '/etc/modprobe.d/zfs.conf' do
mode '0644'
content <<CONTENT
options zfs zfs_arc_max=#{size_of_arc_cache}
CONTENT
end
2 changes: 1 addition & 1 deletion mitamae/definitions/tflint_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def self.package_installed?(binary, version)
end

execute 'Unzip tflint' do
command "unzip -fo #{tmp_file} tflint -d #{install_dest}/"
command "unzip -uo #{tmp_file} tflint -d #{install_dest}/"
not_if { installed }
end

Expand Down

0 comments on commit f45d68c

Please sign in to comment.