cookbook 'dnsimple', '= 1.3.3', :supermarket
Provides Chef Resource for automating DNS configuration with DNSimple
cookbook 'dnsimple', '= 1.3.3'
knife supermarket install dnsimple
knife supermarket download dnsimple
A Light-weight Resource and Provider (LWRP) supporting automatic DNS configuration via DNSimple's API.
- A DNSimple account at https://dnsimple.com
- Chef 11 or newer
- The 2.x series of this cookbook will drop support for the Fog gem
and username/password authentication along with Chef 11 support. Please
version pin in your metadata or Berksfile to the nearest 1.x minor version
to maintain backward compatibility like so:
cookbook "dnsimple", "~> 1.2.0"
Manage a DNS resource record through the DNSimple API. This LWRP uses the fog Ruby library to connect and use the API.
| Action | Description | Default | |-----------|----------------------|---------| | *create* | Create the record. | Yes | | *destroy* | Destroy the record. | |
The type of record can be one of the following: A, CNAME, ALIAS, MX, SPF, URL, TXT, NS, SRV, NAPTR, PTR, AAA, SSHFP, or HFINO.
| Parameter | Description | Default | | ------------ | --------------------------------- | --------- | | *domain* | Domain to manage | | | *name* | _Name_: Name of the record | | | *type* | Type of DNS record | | | *content* | String/Array content of records | | | *ttl* | Time to live. | 3600 | | *priority* | Priorty of update | | | *username* | DNSimple username | | | *password* | DNSimple password (**DEPRECATED**) | | | *token* | DNSimple API token | | | *test* | Unused at this time | false |
Note: For token based authentication you must provide an api token for the account with access to the domain you are providing in the resource. User access tokens are also not supported at this time. Domain based tokens will be supported in a future release.
dnsimple_record "create an A record using the DEPRECATED username/password authentication" do name "test" content "184.108.40.206" type "A" domain "example.com" username chef_vault_item("secrets", "dnsimple_username") password chef_vault_item("secrets", "dnsimple_password") action :create end dnsimple_record "create an A record" do name "test" content "220.127.116.11" type "A" domain "example.com" username chef_vault_item("secrets", "dnsimple_username") token chef_vault_item("secrets", "dnsimple_token") action :create end dnsimple_record "create a CNAME record for a Google Apps site calendar" do name "calendar" content "ghs.google.com" type "CNAME" domain "example.com" username chef_vault_item("secrets", "dnsimple_username") token chef_vault_item("secrets", "dnsimple_token") action :create end dnsimple_record "create a A record with multiple content values" do name "multiple" content ["18.104.22.168", "22.214.171.124"] type "A" domain "example.com" username chef_vault_item("secrets", "dnsimple_username") token chef_vault_item("secrets", "dnsimple_token") action :create end
Add the the
dnsimple recipe to a node's run list, or with
include_recipe to install the fog
gem, which is used to interact with the DNSimple API. See
examples of the LWRP usage above.
chef exec berks install
chef exec rake all
While this should work on ubuntu-16.04 we removed it from kitchen because of issues with the bento. If you have a resolution for this or would like more OSes added Pull Requests are appreciated.
License and Authors
- Author:: Aaron Kalin
- Author:: David Aronsohn
- Author:: Darrin Eden
- Author:: Joshua Timberman
- Author:: Jose Luis Salas
Copyright:: 2014-2016 Aetrion, LLC
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
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.
1.3.3 / 2016-06-27
- fixed suite names in kitchen
- update testing documentation
- add kitchen into travis
1.3.2 / 2016-06-24
- use cookstyle instead of chefstyle
- change library to use a class instance var instead of a class var
1.3.1 / 2016-06-10
- Clarified the API Token portion of the README because of the upcoming API v2 changes which have created both User and API tokens.
1.3.0 / 2016-06-10
- Add support for API tokens which are the preferred API authentication method per the developer documentation. You must use domain tokens and not account based tokens. Support for both will be in the 2.x series of this cookbook.
- You will get a warning now when using the username/password authentcation method with the LWRP as it will no longer be supported in the future release. If you have two-factor authentication enabled on your account, this method will not work either (which is also why it's going away).
1.2.0 / 2016-06-09
This will be the last non-bugfix version to use the fog gem and the v1 API.
- Nokogiri now bundles libxml2 and libxslt making life somewhat easier for us and simplifying the default recipe, which was broken at the time. We've removed the dependency package installs with exception of zlibg1 for debian family platforms.
- Change chef_gem resource usage to not break in chef 12 or chef 11
- Resolved all foodcritic warnings with the newest foodcritic
- Resolved the chefspec and compile_time warnings
- change to chefstyle
- Clean up and simplify tests with rake
- fix up travis tests
1.1.0 / 2015-03-06
- Changed fog version number to nil, which causes it to install the latest version. This will cause a conflict with Chef 12.1.0 and is currently a known issue. If you are going to set a version, then it is suggested to use at least 1.20.0, which contains the updated api endpoint.
Use latest Fog gem release, not the master git branch.
- Updated and cleaned up test suite to be RSpec 3.0 compatible (truthy and falsy)
- Upgraded to Berkshelf 3.0
- Upgraded to ChefSpec 4.0 which officially makes this cookbook Chef 11.x or higher compatible. Noted in the README.
- Cleaned up and updated copyrights in the licensing notices
1.3.3 passed this metric
1.3.3 passed this metric