diff --git a/manifests/init.pp b/manifests/init.pp index 71518ec..e9acfa0 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -22,6 +22,9 @@ class graphite( } ], $vhost_name = $::fqdn, + # Have statsd listen on '::' which, thanks to dual-stack, + # gets ipv4 and ipv6 connections. + $statsd_ipv6_listen = true, ) { $packages = [ 'python-django', 'python-django-tagging', diff --git a/spec/acceptance/basic_spec.rb b/spec/acceptance/basic_spec.rb index 2a84139..8dbd680 100644 --- a/spec/acceptance/basic_spec.rb +++ b/spec/acceptance/basic_spec.rb @@ -80,6 +80,8 @@ describe 'puppet-graphite module', :if => ['debian', 'ubuntu'].include?(os[:fami it { should be_owned_by 'statsd' } it { should be_grouped_into 'statsd' } its(:content) { should include 'graphitePort: 2003' } + its(:content) { should include "address: '::'" } + end describe file('/etc/graphite/carbon.conf') do diff --git a/templates/config.js.erb b/templates/config.js.erb index c98692b..777bd75 100644 --- a/templates/config.js.erb +++ b/templates/config.js.erb @@ -56,4 +56,8 @@ Optional Variables: , port: 8125 , deleteTimers: true , deleteCounters: true +<% if @statsd_ipv6_listen %> +, address: '::', +, address_ipv6: true +<% end %> }