Giter Club home page Giter Club logo

vagrant-dnsmasq's Introduction

vagrant-dnsmasq Build Status

A Dnsmasq Vagrant plugin that manages the dnsmasq.conf file and /etc/resolver directory on your host system.

Prerequisites

Easily install dnsmasq with brew under Mac OS: brew install dnsmasq

Installation

vagrant plugin install vagrant-dnsmasq

Usage

in your Vagrantfile

# set domain ending (required)
# adding this line enables dnsmasq handling
config.dnsmasq.domain = '.dev'


# optional configuration ...

# this plugin runs 'hostname -I' on the guest machine to obtain
# the guest ip address. you can overwrite this behaviour.
# config.dnsmasq.ip = '192.168.59.100'

# config.dnsmasq.ip = proc do |guest_machine| 
#   guest_machine.communicate.sudo("command to obtain ip somehow") do |type, data| 
#     # return something like '192.168.59.100' or ['192.168.59.100', '192.168.59.103']
#   end
# end

# this will prompt you during 'vagrant up' to choose an IP
# config.dnsmasq.ip = ['192.168.59.100', '192.168.59.103']

# overwrite default location for /etc/resolver directory
# config.dnsmasq.resolver = '/etc/resolver'

# 'vagrant destroy' does not delete /etc/resolver nameserver file, defaults to false
# config.dnsmasq.keep_resolver_on_destroy = true

# overwrite default location for /etc/dnsmasq.conf
brew_prefix = `brew --prefix`.strip
config.dnsmasq.dnsmasqconf = brew_prefix + '/etc/dnsmasq.conf'

# command for reloading dnsmasq after config changes
config.dnsmasq.reload_command = 'sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist; sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist'

# disable dnsmasq handling
# config.dnsmasq.disable = true

Uninstall

vagrant plugin uninstall vagrant-dnsmasq

Verify /etc/resolver and $(brew --prefix)/etc/dnsmasq.conf.

Alternatives

/etc/resolver approach

/etc/hosts approach

vagrant-dnsmasq's People

Contributors

mattes avatar ryan0x44 avatar stephencroberts avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.