File
The file resource is used to describe a file that should be present on all of the instances.Usage
1 has_file(:name => '...') do 2 # More options. 3 # This block is optional 4 end
Options
- name
- Describe the location of the file with the name
- mode
- Describe the mode of the file (default: 644)
- owner
- The owner of the file (default: poolparty user)
- content
- The contents of the file
- source
- Used to describe a file that is hosted on the master instance.
To write a file to the template directory, use:
1 copy_template_to_storage_directory(filepath)
Example
1 has_file(:name => '/etc/motd', :content => 'Hey and welcome to your node today!')
