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

Select Status

RSS

windows_network (5) Versions 0.1.0

Configures windows network interfaces

Policyfile
Berkshelf
Knife
cookbook 'windows_network', '= 0.1.0', :supermarket
cookbook 'windows_network', '= 0.1.0'
knife supermarket install windows_network
knife supermarket download windows_network
README
Dependencies
Changelog
Quality 0%

windows_network Cookbook

This cookbook will configure the network interfaces on Windows

Requirements

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

data bag servers <hostname>

{
"id": "mycomputername",
"interfaces": [
{
"name": "Local network",
"mac": "00:AC:21:BC:F0:E0",
"address": "10.1.0.123",
"netmask": "255.255.255.0",
"gateway": "10.1.0.1",
"dns-nameservers": "10.1.0.231,10.111.0.231",
"dns-search": "mydomain.local"
}
]
}

or

{
"id": "mycomputername",
"interfaces": [
{
"name": "Local network",
"address": "dhcp"
}
]
}

Environment

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

Usage

  1. Include cookbook in recipe: recipe/default.rb include_recipe "windows_network"
  2. Include version in metadata: metadata.rb depends 'windows_network', '>= 0.1.0'
  3. Add data bag servers <hostname> as under the requirements section
  4. (optional) Add Environment variables under win_domain

Notes

  • 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.

Todo

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

Contributing

  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

Authors: Christoffer Järnåker, Proxmea BV

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

http://www.apache.org/licenses/LICENSE-2.0

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.

0.1.0:

  • 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.1.0 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:13
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:26
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:27
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:31
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:36
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:37
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:205
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:208
FC019: Access node attributes in a consistent manner: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:15
FC019: Access node attributes in a consistent manner: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:207
FC048: Prefer Mixlib::ShellOut: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:99
FC048: Prefer Mixlib::ShellOut: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:105
FC048: Prefer Mixlib::ShellOut: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:140
FC048: Prefer Mixlib::ShellOut: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:142
FC048: Prefer Mixlib::ShellOut: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:175
FC048: Prefer Mixlib::ShellOut: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:178
FC048: Prefer Mixlib::ShellOut: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:211
FC048: Prefer Mixlib::ShellOut: /tmp/cook/3e7a7992cb4c832f8e963028/windows_network/recipes/default.rb:220