cookbook 'netgroup', '~> 0.1.2'
netgroup (3) Versions 0.1.2 Follow1
Configures /etc/netgroup file
cookbook 'netgroup', '~> 0.1.2', :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 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 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
- Author:: Stephen M. Wright II (swright@cars.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.
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.2
- [smw] - More Readme Changes
0.1.1
- [smw] - Updating README for chef supermarket
0.1.0
- [smw] - Initial release of netgroup
Collaborator Number Metric
0.1.2 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.2 failed this metric
FC064: Ensure issues_url is set in metadata: netgroup/metadata.rb:1
FC065: Ensure source_url is set in metadata: netgroup/metadata.rb:1
FC066: Ensure chef_version is set in metadata: netgroup/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: netgroup/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.2 passed this metric
Testing File Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.2 failed this metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.2 failed this metric
FC064: Ensure issues_url is set in metadata: netgroup/metadata.rb:1
FC065: Ensure source_url is set in metadata: netgroup/metadata.rb:1
FC066: Ensure chef_version is set in metadata: netgroup/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: netgroup/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.2 passed this metric
Testing File Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.2 failed this metric
FC065: Ensure source_url is set in metadata: netgroup/metadata.rb:1
FC066: Ensure chef_version is set in metadata: netgroup/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: netgroup/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.2 passed this metric
Testing File Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.2 failed this metric
0.1.2 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number