cookbook 'netgroup', '= 0.1.0'
netgroup (3) Versions 0.1.0 Follow1
Configures /etc/netgroup file
cookbook 'netgroup', '= 0.1.0', :supermarket
knife supermarket install netgroup
knife supermarket download netgroup
netgroup Cookbook
This cookbook provides the netgroup LWRP. It will allow you to manage netgroups in /etc/netgroup file
Requirements
None
Attributes
None
Usage
The netgroup resource has two attributes users and groups. Each attribute is exepcting 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 complaince
: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
You can also adjust these values in recipes that are after the current resource has been loaded.
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 + ['rstuart']
Overwrite the groups in the SYSADMIN negroup resource
netgroup_resource = resources(:netgroup => "SYSADMIN")
netgroup_resource.groups ['NETGROUP1']
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.0
- [your_name] - Initial release of netgroup
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 passed this metric
0.1.0 passed this metric