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

RSS

netgroup (3) Versions 0.1.1

Configures /etc/netgroup file

Berkshelf/Librarian
Policyfile
Knife
cookbook 'netgroup', '= 0.1.1'
cookbook 'netgroup', '= 0.1.1', :supermarket
knife cookbook site install netgroup
knife cookbook site download netgroup
README
Dependencies
Changelog
Quality 100%

netgroup Cookbook

This cookbook provides the netgroup LWRP. It will allow you to manage netgroups in the /etc/netgroup file

Requirements

  • Chef 0.10.10+

The following platforms are known to work:

  • Red Hat family (Redhat, CentOS, Oracle etc)
  • This cookbook SHOULD work with any POSIX platform that is chef compliant. Although testing was only performed on Redhat 5.5 and Redhat 6.X platforms.

Attributes

None

Usage

The netgroup resource has two attributes users and groups. Each attribute is expecting an array of either users or groups. The default value is an empty list so neither attribute is required.

The three actions that can be invoked are

:manage   : allows chef to manage the resource so it can be referenced in other recipes.  
:create   : create the netgroup if it does not exist. If it does it exist bring it into compliance
:remove   : remove the netgroup.  

Example usage

include_recipe 'netgroup'

netgroup 'SYSADMIN' do
  users ['user1','user2']
  action :create
end

netgroup 'SUDOROOT' do
  users ['user3']
  groups ['SYSADMIN']
  action :create
end

Adding Additional Users and Groups

You can also adjust netgroup resources in other recipes.

For example. Say the SYSADMIN netgroup resource was loaded in recipe 'A'. You can add users to this netgroup in recipe 'B' by including the following code.

include_recipe 'A'

# Append the users netgroup
netgroup_resource = resources(:netgroup => "SYSADMIN")
netgroup_resource.users netgroup_resource.users + ['user3']

# Overwrite the groups in the SYSADMIN negroup resource
netgroup_resource = resources(:netgroup => "SYSADMIN")
netgroup_resource.groups ['NETGROUP1']

License & Authors

Copyright:: 2014-2015, Cars.com, Inc.

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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

netgroup CHANGELOG

This file is used to list changes made in each version of the netgroup cookbook.

0.1.1

  • [smw] - Updating README for chef supermarket

0.1.0

  • [smw] - Initial release of netgroup

Foodcritic Metric
            

0.1.1 passed this metric