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_network (5) Versions 0.2.0

Configures windows network interfaces

cookbook 'windows_network', '= 0.2.0'
cookbook 'windows_network', '= 0.2.0', :supermarket
knife supermarket install windows_network
knife supermarket download windows_network
Quality 100%

windows_network chef Cookbook

This cookbook will configure the network interfaces on Windows

It looks into a databag for IP information and sets it if it's not set as specified. It supports two different formats to store the IP configuration, to support logical and the 'udev' (a proprietary) format.


This cookbook needs a data bag called 'servers' with an item named as your hostname. It also uses win_domain for fallback information.

Datatype 1 (default)

data bag [servers][hostname]
  "id": "mycomputername",
  "interfaces": [
      "name":     "Local network",
      "mac":      "00:AC:21:BC:F0:E0", 
      "address":  "",
      "netmask":  "",
      "gateway":  "",
      "dns-nameservers": ",",
      "dns-search": "mydomain.local"

or for more than one interface: { "id": "mycomputername", "interfaces": [ { "name": "Local network", "mac": "00:AC:21:BC:F0:E1", "address": "dhcp" }, { "name": "Local network", "mac": "00:AC:21:BC:F0:E0", "address": "", "netmask": "", "gateway": "", "dns-nameservers": ",", "dns-search": "mydomain.local" } ] }

Datatype 2 (aka udev)

data bag [servers][hostname]

Note that MAC addresses need to be in lowercase { "id": "mycomputername", "def_gw": "", "net": { "eth4": "00:20:56:9a:63:a1", "eth0": "00:20:56:9a:13:ee", "eth2": "00:20:56:9a:3b:b9", "eth1": "00:20:56:9a:40:08" }, "ip": { "eth4": "", "eth0": "", "eth2": "", "eth1": "" }, "netmasks": { "eth4": "nil", "eth0": "", "eth2": "", "eth1": "" }, "broadcasts": { "eth4": "nil", "eth0": "", "eth2": "", "eth1": "" }, "networks": { "eth4": "nil", "eth0": "", "eth2": "", "eth1": "" }, "naming": { "build": "00:20:56:9a:63:a1", "admin": "00:20:56:9a:13:ee", "back": "00:20:56:9a:3b:b9", "front": "00:20:56:9a:40:08" }, "dns": { "dns1": "", "dns2": "" } }

Environment (optional)

  "name": "office",
  "override_attributes": {
    "win_domain": {
      "DNS1": "",
      "DNS2": "",
      "DomainDNSName": "mydomain.local"


1 Include cookbook in recipe: recipe/default.rb include_recipe "windows_network" Optionally override attributes node.override['windows_network']['databag_name'] = "udev" node.override['windows_network']['datatype'] = 2 2 Include version in metadata: metadata.rb depends 'windows_network', '>= 0.1.0' 3 Add data bag servers <hostname> as described above section

4 (optional) Add Environment variables under win_domain


  • If there is only one NIC and only one config in the data bag, then this config will be used.
  • If there is only one NIC and only one config in the data bag, then the mac entry can be omitted.
  • You can specify "dhcp" as address and the NIC will be configure for DHCP.


  • Handle multiple IP addresses per interface
  • Handle routes per interface


  1. Fork the repository on Github
  2. Create a named feature branch (i.e. add-new-recipe)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request

License and Authors


Christoffer Järnåker, Proxmea BV

Christoffer Järnåker, Schuberg Philis, 2014

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

CHANGELOG for windows_network

This file is used to list changes made in each version of sbp_win_ip.


  • jrnker - Handles multiple (2) datatype formats for the interfaces - Cleaned up code to satisfy foodcritic - Broke out code into several libraries - Fixed spelling error of the 'databag_name' attribute


  • jrnker - Implemented handling of IP storage in custom data bag name. Implemented handling of NIC storage in different format


  • Initial release of windows_network

Check the Markdown Syntax Guide for help with Markdown.

The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.

Foodcritic Metric

0.2.0 passed this metric