mirror of
https://github.com/inspec/inspec
synced 2024-12-02 17:40:00 +00:00
34 lines
559 B
Ruby
34 lines
559 B
Ruby
# encoding: utf-8
|
|
# author: Christoph Hartmann
|
|
# author: Dominik Richter
|
|
#
|
|
# prepares a sample file for verification
|
|
|
|
if node['platform_family'] != 'windows'
|
|
|
|
gid = case node['platform_family']
|
|
when 'aix'
|
|
'system'
|
|
when 'freebsd'
|
|
'wheel'
|
|
when 'solaris', 'solaris2'
|
|
'sys'
|
|
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
|