cookbook 'netgroup', '= 0.1.1', :supermarket
netgroup (3) Versions 0.1.1 Follow1
Configures /etc/netgroup file
cookbook 'netgroup', '= 0.1.1'
knife supermarket install netgroup
knife supermarket download netgroup
This cookbook provides the netgroup LWRP. It will allow you to manage netgroups in the /etc/netgroup file
- 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.
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.
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
- Author:: Stephen M. Wright II (email@example.com)
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.
This cookbook has no specified dependencies.
There are no cookbooks that are contingent upon this one.
This file is used to list changes made in each version of the netgroup cookbook.
- [smw] - Updating README for chef supermarket
- [smw] - Initial release of netgroup
0.1.1 passed this metric
0.1.1 passed this metric