vagrant-rubydns 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -24,18 +24,36 @@ Bring up a machine that has a private network IP address and a hostname (see the
24
24
  And you should be able to get your hostname from your host:
25
25
 
26
26
  $ dig -p 10053 @localhost myhost.vagrant.dev
27
+
28
+ If you shut down your guest, the entries associated with it will be removed.
29
+
30
+ You can add static host entries to the DNS server in your Vagrantfile like so:
31
+
32
+ config.rubydns.host 'myhost.example.com', '1.2.3.4'
33
+
34
+ Any DNS queries that do not match will be passed through to an upstream DNS server, so this will be able to serve as the one-stop shop for your guests' DNS needs.
35
+
36
+ ### Visibility on the Guest
27
37
 
28
38
  You can also make this visible to the guest by using the provisioner, which will set `resolv.conf` and `iptables` rules such that DNS points at our server:
29
39
 
30
40
  config.vm.provision :rubydns
31
41
 
32
- If you shut down your guest, the entries associated with it will be removed.
42
+ ### Visibility on the Host
33
43
 
34
- You can add static host entries to the DNS server in your Vagrantfile like so:
44
+ I'm currently developing this on OS X 10.8, and there's a nice trick you can pull to unobtrusibly add a secondary DNS server only for specific domains.
35
45
 
36
- config.rubydns.host 'myhost.example.com', '1.2.3.4'
46
+ All you do is drop a file in `/etc/resolvers/$DOMAIN` with information on how to connect to the DNS server you'd like to use for that domain.
37
47
 
38
- Any DNS queries that do not match will be passed through to an upstream DNS server, so this will be able to serve as the one-stop shop for your guests' DNS needs.
48
+ So what I do is name all of my vagrant servers with the pattern `$host.vagrant.dev` and then drop a file called `/etc/resolvers/vagrant.dev` with these contents:
49
+
50
+ ```
51
+ # Use vagrant-rubydns server for this domain
52
+ nameserver 127.0.0.1
53
+ port 10053
54
+ ```
55
+
56
+ This gives us automatic access to the vagrant-rubydns hosts without having to worry about it getting in the way of our normal DNS config.
39
57
 
40
58
  ## Work in Progress - Lots to do!
41
59
 
@@ -26,5 +26,10 @@ module VagrantRubydns
26
26
  require_relative 'action/teardown'
27
27
  hook.after(Vagrant::Action::Builtin::GracefulHalt, Action::Teardown)
28
28
  end
29
+
30
+ action_hook 'rubydns_teardown', :machine_action_destroy do |hook|
31
+ require_relative 'action/teardown'
32
+ hook.after(Vagrant::Action::Builtin::GracefulHalt, Action::Teardown)
33
+ end
29
34
  end
30
35
  end
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Rubydns
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-rubydns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-21 00:00:00.000000000 Z
12
+ date: 2013-03-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubydns