Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rubygems/rubygems-chef
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: fe2451885713
Choose a base ref
...
head repository: rubygems/rubygems-chef
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c765b3fc2c3e
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Jun 18, 2014

  1. add DNSimple integration

    dwradcliffe committed Jun 18, 2014
    Copy the full SHA
    8b6cff8 View commit details
  2. Copy the full SHA
    c765b3f View commit details
Showing with 34 additions and 2 deletions.
  1. +1 −0 Berksfile
  2. +8 −1 Berksfile.lock
  3. +3 −1 cookbooks/rubygems-hostname/metadata.rb
  4. +2 −0 cookbooks/rubygems-hostname/recipes/default.rb
  5. +20 −0 cookbooks/rubygems-hostname/recipes/dns.rb
1 change: 1 addition & 0 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -30,5 +30,6 @@ cookbook 'rubygems-utility', path: 'cookbooks/rubygems-utility'
cookbook 'aptly', git: 'git@github.com:skottler/aptly.git', ref: 'fix_seed'
cookbook 'collectd', git: 'git@github.com:librato/collectd-cookbook.git'
cookbook 'collectd-librato', git: 'git@github.com:librato/collectd-librato-cookbook.git'
cookbook 'dwradcliffe-dnsimple', git: 'git@github.com:dwradcliffe/chef-dnsimple.git', branch: 'rubygems'
cookbook 'duo-security', git: 'git@github.com:skottler/chef-duo-security'
cookbook 'irc_handler', git: 'git@github.com:bflad/chef-irc_handler.git'
9 changes: 8 additions & 1 deletion Berksfile.lock
Original file line number Diff line number Diff line change
@@ -12,6 +12,10 @@ DEPENDENCIES
duo-security
git: git@github.com:skottler/chef-duo-security
revision: 1ddec64f0798d91cf0ab1a8dd8831fb0f6694556
dwradcliffe-dnsimple
git: git@github.com:dwradcliffe/chef-dnsimple.git
revision: 7eda69eb9999e03c45a7772068d23e4275b7d946
branch: rubygems
irc_handler
git: git@github.com:bflad/chef-irc_handler.git
revision: c2b7e3616daf3d47818b12034dc9ad8b51aaafc2
@@ -78,6 +82,7 @@ GRAPH
duo-security (0.1.1)
build-essential (>= 0.0.0)
openssh (>= 0.0.0)
dwradcliffe-dnsimple (0.5.2)
erlang (1.5.4)
apt (>= 1.7.0)
build-essential (>= 0.0.0)
@@ -160,7 +165,9 @@ GRAPH
rubygems (>= 0.0.0)
rubygems-chef (0.0.2)
line (>= 0.0.0)
rubygems-hostname (0.0.1)
rubygems-hostname (0.1.4)
chef-vault (>= 0.0.0)
dwradcliffe-dnsimple (>= 0.0.0)
hostname (>= 0.0.0)
rubygems-hosts (0.0.6)
rubygems-metrics (0.0.3)
4 changes: 3 additions & 1 deletion cookbooks/rubygems-hostname/metadata.rb
Original file line number Diff line number Diff line change
@@ -2,8 +2,10 @@
maintainer 'RubyGems.org Ops Team'
license 'MIT'
description 'Set the hostname of RubyGems.org machines using node.name'
version '0.0.1'
version '0.1.4'

depends 'chef-vault'
depends 'dwradcliffe-dnsimple'
depends 'hostname'

supports 'ubuntu'
2 changes: 2 additions & 0 deletions cookbooks/rubygems-hostname/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -6,3 +6,5 @@
node.default['set_fqdn'] = node['name']

include_recipe 'hostname'

include_recipe 'rubygems-hostname::dns'
20 changes: 20 additions & 0 deletions cookbooks/rubygems-hostname/recipes/dns.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Cookbook Name:: rubygems-hostname
# Recipe:: dns
#

include_recipe 'chef-vault'

dnsimple_credentials = chef_vault_item('dnsimple', 'credentials')

include_recipe 'dwradcliffe-dnsimple'

dwradcliffe_dnsimple_record "create a CNAME record for #{node.name}" do
name node.name.sub('.rubygems.org', '')
content node['cloud_v2']['public_hostname']
type 'CNAME'
domain 'rubygems.org'
username dnsimple_credentials['username']
password dnsimple_credentials['password']
action :create
end