From a5d6cf68330256f5755bbe41060c2eb8a5546c7b Mon Sep 17 00:00:00 2001 From: Andrian Jardan Date: Mon, 3 Jul 2017 12:25:05 +0200 Subject: [PATCH] Bind to interface only, if specified Usually when someone specifies an interface to bind, it means the service is required to bind to that interface instead of all. Since dnsmasq doesn't bind like that by default, this additional option is required. Fixing Gemfile Fixing rake version in Gemfile Removing dupe line in Rakefile Fixing missing dependency Use newer ruby Adjust rake version Drop old puppet, add newest 3.8 --- .travis.yml | 4 ++-- Gemfile | 7 +++++-- Rakefile | 2 +- templates/dnsmasq.conf.erb | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c2b3fa5..ab38275 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ -rvm: 1.8.7 +rvm: 1.9.3 notifications: email: - me+travis@lex.io env: - - PUPPET_VERSION=2.7.11 - PUPPET_VERSION=3.1.1 - PUPPET_VERSION=3.7.0 + - PUPPET_VERSION=3.8.7 diff --git a/Gemfile b/Gemfile index 8142186..dbfa317 100644 --- a/Gemfile +++ b/Gemfile @@ -4,8 +4,6 @@ source "https://rubygems.org" puppet_version = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : \ '= 3.7.2' # from puppet enterprise 3.7.0 -gem 'rake' -gem 'rspec', '< 3.0.0' gem 'puppet-lint' gem 'rspec-puppet' gem 'puppetlabs_spec_helper' @@ -16,4 +14,9 @@ if RUBY_VERSION >= '1.8.7' and RUBY_VERSION < '1.9' # rake >=11 does not support ruby 1.8.7 gem 'rspec', '~> 2.0' gem 'rake', '~> 10.0' + gem 'json', '= 1.8' +else + gem 'rspec', '< 3.0.0' + gem 'rake', '< 11.0' + gem 'json' end diff --git a/Rakefile b/Rakefile index 7ea6c61..e194712 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,7 @@ require 'rake' +require 'json' require 'rspec/core/rake_task' -require 'puppet-lint/tasks/puppet-lint' require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-lint/tasks/puppet-lint' diff --git a/templates/dnsmasq.conf.erb b/templates/dnsmasq.conf.erb index e823a09..7ee9fa0 100644 --- a/templates/dnsmasq.conf.erb +++ b/templates/dnsmasq.conf.erb @@ -66,6 +66,7 @@ listen-address=<%= addr %> <% end -%> <% end -%> <% if @interface -%> +bind-interfaces <% Array(@interface).compact.each do |iface| -%> interface=<%= iface %> <% end -%>