2015-12-31 00:10:39 +00:00
|
|
|
#
|
|
|
|
# file mount tests
|
|
|
|
|
2019-06-11 22:24:35 +00:00
|
|
|
case node["platform"]
|
|
|
|
when "ubuntu", "rhel", "centos", "fedora"
|
2015-12-31 00:10:39 +00:00
|
|
|
|
2016-01-28 13:51:54 +00:00
|
|
|
# copy iso file for mount tests
|
|
|
|
# NB created using `mkdir empty; mkisofs -o empty.iso empty/`
|
2019-06-11 22:24:35 +00:00
|
|
|
cookbook_file "/tmp/empty.iso" do
|
|
|
|
owner "root"
|
|
|
|
group "root"
|
|
|
|
mode "0755"
|
2016-01-28 13:51:54 +00:00
|
|
|
action :create
|
|
|
|
end
|
|
|
|
|
|
|
|
# create mount directory
|
2019-06-11 22:24:35 +00:00
|
|
|
directory "/mnt/iso-disk" do
|
|
|
|
owner "root"
|
|
|
|
group "root"
|
|
|
|
mode "0755"
|
2016-01-28 13:51:54 +00:00
|
|
|
action :create
|
|
|
|
end
|
2015-12-31 00:10:39 +00:00
|
|
|
|
2016-01-28 13:51:54 +00:00
|
|
|
# mount -o loop /root/empty.iso /mnt/iso-disk
|
2019-06-11 22:24:35 +00:00
|
|
|
mount "/mnt/iso-disk" do
|
|
|
|
device "/tmp/empty.iso"
|
|
|
|
options "loop"
|
2019-07-09 00:20:30 +00:00
|
|
|
action %i{mount enable}
|
2016-01-28 13:51:54 +00:00
|
|
|
end
|
2015-12-31 00:10:39 +00:00
|
|
|
end
|