inspec/test/cookbooks/os_prepare/recipes/mount.rb
Miah Johnson a4f4fe5231 chefstyle -a; https://github.com/chef/chefstyle/pull/74
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-07-08 17:22:50 -07:00

30 lines
591 B
Ruby

#
# file mount tests
case node["platform"]
when "ubuntu", "rhel", "centos", "fedora"
# copy iso file for mount tests
# NB created using `mkdir empty; mkisofs -o empty.iso empty/`
cookbook_file "/tmp/empty.iso" do
owner "root"
group "root"
mode "0755"
action :create
end
# create mount directory
directory "/mnt/iso-disk" do
owner "root"
group "root"
mode "0755"
action :create
end
# mount -o loop /root/empty.iso /mnt/iso-disk
mount "/mnt/iso-disk" do
device "/tmp/empty.iso"
options "loop"
action %i{mount enable}
end
end