--- /dev/null
+name 'stahnma-avahi'
+version '0.0.1'
+source 'UNKNOWN'
+author 'stahnma'
+license 'Apache License, Version 2.0'
+summary 'UNKNOWN'
+description 'UNKNOWN'
+project_page 'UNKNOWN'
+
+## Add dependencies, if any:
+dependency 'cprice404-inifile', '>= 1.2.0'
--- /dev/null
+avahi
+
+This is the avahi module.
+
+License
+-------
+Apache Software License 2.0
+
+
+Contact
+-------
+stahnma@fedoraproject.org
+
+
+Support
+-------
+none
--- /dev/null
+# == Class: avahi
+#
+# This module sets up avahi on EL based systems.
+#
+#
+# Requirements:
+# cprice404-inifile >= 0.0.3
+#
+# === Parameters
+#
+# === Examples
+#
+# class { avahi: }
+#
+# === Authors
+#
+# Michael Stahnke <stahnma@fedoraproject.org>
+#
+# === Copyright
+#
+# Copyright 2012 Michael Stahnke
+
+
+class avahi {
+
+ $avahi_pkgs = [ 'avahi', 'avahi-tools', 'nss-mdns' ]
+
+ package { $avahi_pkgs:
+ ensure => installed,
+ }
+
+ service { 'avahi-daemon':
+ ensure => running,
+ enable => true,
+ hasstatus => true,
+ require => Service['messagebus'],
+ }
+
+ service { 'messagebus':
+ ensure => running,
+ enable => true,
+ require => Package[$avahi_pkgs],
+ }
+
+ ini_setting { "avahi-${::hostname}":
+ ensure => present,
+ path => '/etc/avahi/avahi-daemon.conf',
+ section => 'server',
+ setting => 'host-name',
+ key_val_separator => '=',
+ value => $::hostname,
+ notify => Service['avahi-daemon'],
+ }
+
+}
--- /dev/null
+dir = File.expand_path(File.dirname(__FILE__))
+$LOAD_PATH.unshift File.join(dir, 'lib')
+
+require 'mocha'
+require 'puppet'
+require 'rspec'
+require 'spec/autorun'
+
+Spec::Runner.configure do |config|
+ config.mock_with :mocha
+end
+
+# We need this because the RAL uses 'should' as a method. This
+# allows us the same behaviour but with a different method name.
+class Object
+ alias :must :should
+end
--- /dev/null
+# The baseline for module testing used by Puppet Labs is that each manifest
+# should have a corresponding test manifest that declares that class or defined
+# type.
+#
+# Tests are then run by using puppet apply --noop (to check for compilation errors
+# and view a log of events) or by fully applying the test in a virtual environment
+# (to compare the resulting system state to the desired state).
+#
+# Learn more about module testing here: http://docs.puppetlabs.com/guides/tests_smoke.html
+#
+include avahi