Cookbooks
varnish
documentation
Vcl File

Back to resource list

vcl_file

Create vcl file at /etc/varnish/default.vcl using the file at files/default/default.vcl:

Actions

ActionDescription
:configureCreates a vcl file from the cookbook and refreshes varnish
:unconfigureRemoves the vcl file and refreshes varnish

Properties

NameTypeDefaultDescription
vcl_nameStringresource nameThis will be the file name in the varnish vcl directory if not overridden by vcl_path
sourceString::File.basename(vcl_name)"Same behavior as the cookbook_file resource
cookbookStringnilBy default it uses the cookbook the resource is in
ownerString'root'
groupString'root'
modeString, Integer'0644'Follows the same behavior as the cookbook_file resource
varnish_dirString'/etc/varnish'The directory to use for vcl files
vcl_pathString::File.join(varnish_dir, vcl_name)Overrides both the vcl_name and varnish_dir if this is specified

Examples

vcl_file 'default.vcl'