inspec/test/cookbooks/os_prepare/recipes/mount.rb
Tim Smith 4b3095dac2 Further modernize the cookbook and remove legacy setup
Remove container setup that comes for free with the dokken containers now
Use the new openssl resource names
Remove all the encoding statements that even rubocop doesn't recommend anymore
Remove some compatibility with centos-5 and ubuntu 15.10

Signed-off-by: Tim Smith <tsmith@chef.io>
2019-02-13 21:50:33 -08:00

32 lines
647 B
Ruby

# author: Christoph Hartmann
# author: Dominik Richter
#
# 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 [:mount, :enable]
end
end