cookbook 'zonefile', '~> 0.9.2'
zonefile (2) Versions 0.9.2 Follow0
Some Chef LWRP to manage and edit SOA from bind zonefiles
cookbook 'zonefile', '~> 0.9.2', :supermarket
knife supermarket install zonefile
knife supermarket download zonefile
zonefile LWRP cookbook
Description
A cookbook to manage bind zonefile SOA and global records.
All records included in zonefile are not modified at all. Only SOA record, ORIGIN and global TTL are managed by this cookbook.
Requirements
This recipe depends on Chef 0.10.10 features, such as chef_gem
.
Usage
Just add this cookbook in your project metadata file to install zonefile gem dependency and bring LWRP to life :-).
include_recipe 'zonefile'
LWRP
-
zonefile_soa
- configure SOA and global record for a specified zonefile. Can also create zonefile file. It keeps existing records.
Actions
-
:create
(default): create or modify bind zonefile, set SOA and global variables to specified values. No changes on other records are applied. -
:force
: not implemented yet -
:delete
: delete zonefile
Attribute Parameters for :create
File parameters
-
:file
(name attribute): Required zonefile absolute path -
:user
: file owner- root by default
-
:group
: file group- root by default
-
:mode
: file mode- 0644 by default
Global zonefile parameters
-
:origin
: zonefile global $ORIGIN option (Default is usingnameserver
value ornode['fqdn']
if nameserver is not specified) -
:globalttl
: zonefile global $TTL option (Default is 4h)
SOA parameters
-
:nameserver
: Required SOA nameserver option- Default is
node['fqdn']
.
- Default is
-
:contact
: Required SOA mail option- Default is
root.#{node['fqdn']}
- Default is
-
:soattl
: specific TTL option for SOA record- Default is empty
-
:refresh
: SOA refresh option- Default is 2h
-
:retrydelay
: SOA retry option- Default is 30m
-
:expire
: SOA expire option- Default is 1w
-
:neg_cache_ttl
: SOA minimum TTL option- Default is 1d
other
-
:no_serial_udpdate
: block all automatic serial update action- Default to false
Example
zonefile_soa '/tmp/db.zone.demo' do
nameserver 'foo.bar.'
contact 'root.foo.bar.'
soattl '77777' # override default value
refresh '124212' # no change from template
globalttl '1234567890' #override
origin 'foo.bar.'
end
Test recipe
zonefile::test
: this recipe creates a zonefile in /tmp/ and modify it according to the example LWRP, it also creates another zonefile from scratch using default values.
License and Author
Author:: Barth.V ( https://github.com/BarthV )
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.9.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.9.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.9.2 failed this metric
FC064: Ensure issues_url is set in metadata: zonefile/metadata.rb:1
FC065: Ensure source_url is set in metadata: zonefile/metadata.rb:1
FC066: Ensure chef_version is set in metadata: zonefile/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: zonefile/metadata.rb:1
FC069: Ensure standardized license defined in metadata: zonefile/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.9.2 passed this metric
Testing File Metric
0.9.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.9.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.9.2 failed this metric
0.9.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.9.2 failed this metric
FC064: Ensure issues_url is set in metadata: zonefile/metadata.rb:1
FC065: Ensure source_url is set in metadata: zonefile/metadata.rb:1
FC066: Ensure chef_version is set in metadata: zonefile/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: zonefile/metadata.rb:1
FC069: Ensure standardized license defined in metadata: zonefile/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.9.2 passed this metric
Testing File Metric
0.9.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.9.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.9.2 failed this metric
FC065: Ensure source_url is set in metadata: zonefile/metadata.rb:1
FC066: Ensure chef_version is set in metadata: zonefile/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: zonefile/metadata.rb:1
FC069: Ensure standardized license defined in metadata: zonefile/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.9.2 passed this metric
Testing File Metric
0.9.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.9.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.9.2 failed this metric
0.9.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