Sha256: 5a0b7965b3329d1dd3886911e5ea6aff165acbb744fe43547a40d335013ab780

Contents?: true

Size: 673 Bytes

Versions: 5

Compression:

Stored size: 673 Bytes

Contents

# 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

  file '/tmp/sfile' do
    mode '7765'
    owner 'root'
    group gid
    content 'hello suid/sgid/sticky'
  end

  directory '/tmp/folder' do
    mode '0567'
    owner 'root'
    group gid
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
inspec-0.29.0 test/cookbooks/os_prepare/recipes/file.rb
inspec-0.28.1 test/cookbooks/os_prepare/recipes/file.rb
inspec-0.28.0 test/cookbooks/os_prepare/recipes/file.rb
inspec-0.27.1 test/cookbooks/os_prepare/recipes/file.rb
inspec-0.27.0 test/cookbooks/os_prepare/recipes/file.rb