inspec/test/integration/cookbooks/os_prepare/recipes/file.rb

33 lines
508 B
Ruby
Raw Normal View History

2015-10-24 09:11:36 +00:00
# encoding: utf-8
# author: Christoph Hartmann
# author: Dominik Richter
#
# prepares a sample file for verification
if node['platform_family'] != 'windows'
2015-10-24 09:11:36 +00:00
gid = case node['platform_family']
when 'aix'
'system'
when 'freebsd'
'wheel'
else
'root'
end
file '/tmp/file' do
mode '0765'
owner 'root'
group gid
content 'hello world'
end
directory '/tmp/folder' do
mode '0567'
owner 'root'
group gid
end
end