cookbook 'dnsimple', '= 4.3.0'
dnsimple
(33) Versions
4.3.0
-
Follow19
Provides Chef Resource for automating DNS configuration with DNSimple
cookbook 'dnsimple', '= 4.3.0', :supermarket
knife supermarket install dnsimple
knife supermarket download dnsimple
Description
A chef resource for automated DNS configuration via the dnsimple API.
DEPRECATION WARNING
If you used the dnsimple_certificate resource, you'll want to do the following to migrate:
- The resource property
expires_on
has changed to beexpires_at
to match the dnsimple gem
Requirements
- A dnsimple account
- An account access token from said dnsimple account
- Chef Client 17 or newer
Attributes
- None
Resources/Providers
dnsimple_record
Manage a DNS record through the dnsimple API. This resource uses the
dnsimple Ruby library to connect and use
the dnsimple API. This resource also exposes a ChefSpec matcher for you to do
unit testing as well.
Record Actions
Action | Description | Default |
---|---|---|
create | Create the record. | Yes |
update | Update the record. | |
destroy | Destroy the record. |
Record Resource Properties
Property | Description | Required | Default |
---|---|---|---|
domain | Domain to manage | true | |
record_name | Name of the record | '' | |
type | Type of DNS record (see note) | true | |
content | String/Array content of records | true | |
ttl | Time to live | 3600 | |
priority | Priorty of record | ||
regions | Specific regions for this record | ||
access_token | DNSimple API token | true | |
base_url | DNSimple API url | https://api.dnsimple.com |
Record Types: The type of record can be one of the following: A, AAAA,
CAA, CNAME, MX, NS, TXT, SPF, SRV, NAPTR, HINFO, SSHFP, ALIAS, URL or POOL.
Some of these record types such as POOL require special account access which
you can contact support for access and
assistance.
Note: If you do not provide the record_name parameter, it will be blank
and thus will be assumed to be the domain apex. The apex is the domain name
without a subdomain. For example bar.com
is the apex of foo.bar.com
.
Regional Records: Only certain plan types have regional records so it is
blank by default. If you do not have this feature available it will return
an error.
Record Examples
Note that these examples assume you have obtained an account level access token
which is documented above (see Requirements). We're also assuming you're securely
storing your API keys in Chef Vault but
it is not a requirement.
dnsimple_record 'foo.com main server' do domain 'foo.com' type 'A' content '1.2.3.4' ttl 3600 access_token chef_vault_item('secrets', 'dnsimple_token') action :create end dnsimple_record 'create a CNAME record for a Google Apps site calendar at calendar.example.com' do record_name 'calendar' content 'ghs.google.com' type 'CNAME' domain 'example.com' access_token chef_vault_item('secrets', 'dnsimple_token') action :create end dnsimple_record 'create an A record with multiple content values at servers.example.com' do record_name 'servers' content ['1.1.1.1', '2.2.2.2'] type 'A' domain 'example.com' access_token chef_vault_item('secrets', 'dnsimple_token') action :create end # Note: This only works with certain accounts, see the note above for # regional records! The Chef run will fail otherwise. dnsimple_record "create an A record in Tokyo only" do record_name 'myserverinjapan' content '2.2.2.2' type 'A' domain 'example.com' regions ['tko'] access_token chef_vault_item('secrets', 'dnsimple_token') action :create end
dnsimple_certificate
Download and install a certificate. Currently this only supports basic matched
.crt & .key files. We would like to expand this to support all formats
including java keystores. PRs are welcome!
This resource uses the dnsimple Ruby
library to connect and use the dnsimple
API. This resource also exposes a ChefSpec matcher for you to do unit testing
as well.
Certificate Actions
Action | Description | Default |
---|---|---|
install | Install the crt & key | Yes |
Certificate Resource Properties
Property | Description | Required | Default |
---|---|---|---|
install_path | where the crt & key are installed | yes | |
common_name | certificate common name | yes | name of the resource |
domain | the main domain name on the crt | yes | |
expires_at | when the certificate expires | yes | |
private_key_pem | provide your own private key | no | |
mode | files mode | no | 0600 |
owner | files owner | no | root |
group | files group | no | root |
access_token | DNSimple API token | true | |
base_url | DNSimple API url | https://api.dnsimple.com |
Certificate Examples
dnsimple_certificate 'dnsimple.xyz certificate' do install_path '/etc/apache2/ssl' common_name 'www.dnsimple.xyz' domain 'dnsimple.xyz' expires_at '2019-09-08 17:21:29 UTC' mode '0755' owner 'web_admin' group 'web_admin' access_token chef_vault_item('secrets', 'dnsimple_token') end
Usage
Add the dnsimple cookbook to your cookbook's metadata and it will automatically
install the dnsimple gem and make the dnsimple_record resource available.
Note: If you want to avoid any issues with a maintenance window or service outage causing a Chef run failure, be sure to set the ignore_failure
property to true as documented in the common properties which will only print warnings if records could not be updated during the Chef run.
Testing
See TESTING.md
Contributing
See CONTRIBUTING.md
License
Copyright 2024, DNSimple Corp.
Licensed under the Apache License, Version 2.0.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
Changelog
v4.3.0 (2024-04-04)
v4.2.0 (2024-04-04)
Implemented enhancements:
v4.1.0 (2023-12-21)
Closed issues:
- Upgrade dnsimple gem from 7 to 8 #81
Merged pull requests:
- fix missing changelog entries #87 (AGS4NO)
- Bump actions/checkout from 3 to 4 #86 (dependabot[bot])
- Patch/dependencies update #85 (AGS4NO)
- Bump nosborn/github-action-markdown-cli from 3.2.0 to 3.3.0 #84 (dependabot[bot])
- update workflow jobs, add dependabot for GH actions #83 (AGS4NO)
- kitchen chef-client v18 #82 (AGS4NO)
- Deprecates Chef Delivery CLI usage #79 (san983)
v4.0.0 (2021-10-29)
Implemented enhancements:
- Update dnsimple ruby gem version #75
Merged pull requests:
- Use time to get new precisions #78 (onlyhavecans)
- Update DNSimple gem (rename certificate expires_on to expires_at) #77 (onlyhavecans)
- CentOS 6 EOL, add CentOS 8 to actions CI #76 (AGS4NO)
- Adds CI to GitHub Actions #74 (san983)
- Fix Travis build #73 (san983)
v3.4.0 (2021-05-14)
Merged pull requests:
v3.3.0 (2021-01-21)
Merged pull requests:
- Updates chef-infra client to v16 #71 (AGS4NO)
- Updates Travis tests to Bionic distribution. #69 (AGS4NO)
v3.2.0 (2020-02-11)
Implemented enhancements:
- Filter the record lookup #67 (onlyhavecans)
Closed issues:
- Depfu Error: No dependency files found #68
v3.1.0 (2019-12-04)
Merged pull requests:
- Lint to latest codestyle #66 (onlyhavecans)
- Move fully to Dokken & a single kitchen configuration #65 (onlyhavecans)
- Trial CircleCI for builds #63 (martinisoft)
- Test chef14 #62 (onlyhavecans)
- Test 18.04 #61 (onlyhavecans)
v3.0.1 (2018-10-19)
Merged pull requests:
- Update our provider to match dnsimple-ruby 4.5.0 #60 (martinisoft)
v3.0.0 (2018-08-08)
Fixed bugs:
- Rename 'name' property #56
Merged pull requests:
- Upgrade to Chef 13.9+ #57 (martinisoft)
v2.2.0 (2018-08-07)
Merged pull requests:
- Deprecate the 2.x series with log warnings #59 (martinisoft)
- Update copyrights #58 (onlyhavecans)
v2.1.1 (2018-03-21)
Fixed bugs:
- Running integration tests with custom domain fails #52
Merged pull requests:
- Bugfix: Correctly validate the test domain in Inspec #55 (martinisoft)
- Bugfix: AAAA record validation in dnsimple_record resource #54 (martinisoft)
- Add all_certificates endpoint and fix certificates spec #53 (martinisoft)
- Use latest versions of images for testing #51 (martinisoft)
- Testing to chef 13 #50 (onlyhavecans)
v2.1.0 (2017-06-26)
Merged pull requests:
- Add Docs for dnsimple_certificate #49 (onlyhavecans)
- Feature/install certificate #48 (aeden)
v2.0.1 (2017-05-18)
Fixed bugs:
- Re-release 2.0.0 with updated Stove #47
v2.0.0 (2017-04-24)
Fixed bugs:
- Force apt in the run list for ubuntu platforms #41 (martinisoft)
Closed issues:
- Chef 11 needs compat resources #45
Merged pull requests:
- Replace fog with dnsimple and rewrite to Chef 12.5+ resource #46 (martinisoft)
- It seems that Chef 11 and Compat resources no go #44 (jjasghar)
- Update README.md #43 (jjasghar)
v1.3.4 (2016-09-30)
Merged pull requests:
- Swap fog gem for fog-dnsimple #42 (martinisoft)
v1.3.3 (2016-06-27)
Fixed bugs:
Merged pull requests:
- Update Travis-CI builds to use Integration #40 (martinisoft)
- Fix test suite names for kitchen #39 (onlyhavecans)
- Remove 16.04 due to bento issues. Update Documents #38 (onlyhavecans)
v1.3.2 (2016-06-24)
Merged pull requests:
- Move to cookstyle over chefstyle #36 (onlyhavecans)
v1.3.1 (2016-06-10)
Merged pull requests:
- Update documentation with a correction for the token usage #35 (martinisoft)
v1.3.0 (2016-06-10)
Fixed bugs:
- DNSimple API authentication #24
Merged pull requests:
- Support api tokens #33 (martinisoft)
v1.2.0 (2016-06-10)
Fixed bugs:
- Fix ChefSpec Deprecation Warning #25
- centos-65 requires patch utility due to nokogiri, only build-essential ~> 2.0.4 installs patch #21
- Fix converging in modern chef 11 and chef 12 #32 (onlyhavecans)
- Cleanup testing #31 (martinisoft)
Closed issues:
- Use Fog DNSimple API Auth #27
- Ubuntu 14.04 package requirement #23
- Should have option to gracefully handle existing A record for CNAME create #18
- Release a new version to Chef Community site #11
- Add Test Kitchen #10
- Cookbook removes undesired records #9
- Should depend on 'build-essential' #7
- LWRP should use load_current_resource #2
Merged pull requests:
- Update build status and metadata #30 (martinisoft)
- Unpin build-essential, blocks many popular cookbooks from use #22 (martinb3)
- Support creating record with multiple content values #20 (josacar)
- Use load_current_resource in lwrp #15 (josacar)
- Integrate Test Kitchen #14 (dje)
- Configure attributes for ohai to workaround empty node.platform_family #13 (josacar)
- Avoid removing records with different type on create #12 (josacar)
- Build Essential Dependancy #8 (ichilton)
- add platform support for rhel platforms and expand coverage for more debian platforms #6 (mattkasa)
- Fix missing pkg dependencies, update to chef_gem; add name to metadata. #5 (mdxp)
- Improvements to LWRP and Documentation #1 (jtimberman)
* This Changelog was automatically generated by github_changelog_generator
Collaborator Number Metric
4.3.0 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
4.3.0 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
Cookstyle Metric
4.3.0 passed this metric
No Binaries Metric
4.3.0 passed this metric
Testing File Metric
4.3.0 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
4.3.0 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
4.3.0 failed this metric
4.3.0 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
Cookstyle Metric
4.3.0 passed this metric
No Binaries Metric
4.3.0 passed this metric
Testing File Metric
4.3.0 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
4.3.0 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
4.3.0 passed this metric
4.3.0 passed this metric
Testing File Metric
4.3.0 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
4.3.0 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
4.3.0 failed this metric
4.3.0 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