Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms


windows_logrotate (3) Versions 0.2.1

Installs/Configures LogRotate for Windows

cookbook 'windows_logrotate', '~> 0.2.1'
cookbook 'windows_logrotate', '~> 0.2.1', :supermarket
knife cookbook site install windows_logrotate
knife cookbook site download windows_logrotate
Quality 56%

Windows LogRotate Cookbook

Cookbook Version Build Status

Installs/configures Ken Salter's LogRotate for Windows.

This is a Windows implementation of the logrotate utility found in Linux platforms.

Supported logrotate configuration options:


  • Chef 12.6+
  • .NET Framework v4.5


  • Windows


Use windows_logrotate resource to install and configure logrotate, and create a scheduled task to run it periodically.


windows_logrotate 'logrotate test' do
  username user
  password pass
  run_immediately true
  confidential false
  conf <<-EOF
C:\\test.log {
    rotate 5
        @echo off
        echo This is a test
        echo parameter pass %1
        VER | TIME > TEMP.BAT
        DEL TEMP.BAT
        ECHO It's %TIME% now


  • name - The name of logrotate configuration file to create. Defaults to resource block name.
  • username - The username to create scheduled task as. Default: Administrator.
  • password - Required to create scheduled task.
  • conf - Required logroate configuration.
  • verbose - Turns on verbose mode.
  • force - Tells logrotate to force the rotation, even if it doesn't think this is necessary. Sometimes this is useful after adding new entries to a logrotate config file, or if old log files have been removed by hand, as the new files will be created, and logging will continue correctly.
  • run_immediately - Runs scheduled task immediately after creating or updating logrotate configuration.
  • cookbook - The cookbook that contains the template for logrotate conf. Users can provide their own template by setting this attribute to point at a different cookbook. Default: windows_logrotate.
  • conf_tmpl - Sets the conf template source. Default: logrotate.conf.erb.
  • schtask_tmpl - Sets the schtask template source. Default: schtask.xml.erb.

ChefSpec Matchers

This cookbook includes custom ChefSpec matchers you can use to test your own cookbooks.

Example Matcher Usage

expect(chef_run).to enable_windows_logrotate('resource_name')

Cookbook Matchers

  • enable_windows_logrotate(resource_name)

Getting Help


Please refer to CONTRIBUTING.


MIT - see the accompanying LICENSE file for details.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.


0.2.1 2017-10-25

  • Update version of logrotate installer

0.2.0 2017-06-07

  • Replace sensitive attribute with confidential attribute for Chef 13
  • Flagged password as sensitive for Chef 13

0.1.0 2017-01-20

  • Initial release using logrotateSetup v0.0.0.17

Collaborator Number Metric

0.2.1 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

0.2.1 passed this metric

Foodcritic Metric

0.2.1 passed this metric

License Metric

0.2.1 passed this metric

No Binaries Metric

0.2.1 passed this metric

Publish Metric

0.2.1 failed this metric

windows_logrotate is up for adoption

Supported Platforms Metric

0.2.1 passed this metric

Testing File Metric

0.2.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Version Tag Metric

0.2.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must include a tag that matches this cookbook version number