Index: src/puppetcode/environments/test/modules/gnuboat_gpsd/manifests/init.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_gpsd/manifests/init.pp	(revision 8c27e83d4438788ee8afc3018007bff660c0152e)
+++ src/puppetcode/environments/test/modules/gnuboat_gpsd/manifests/init.pp	(revision 8c27e83d4438788ee8afc3018007bff660c0152e)
@@ -0,0 +1,11 @@
+class gnuboat_gpsd
+(
+	String $version = 'latest',
+)
+{
+	contain gnuboat_gpsd::install
+	contain gnuboat_gpsd::service
+
+	Class['gnuboat_gpsd::install'] ->
+	Class['gnuboat_gpsd::service']
+}
Index: src/puppetcode/environments/test/modules/gnuboat_gpsd/manifests/install.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_gpsd/manifests/install.pp	(revision 8c27e83d4438788ee8afc3018007bff660c0152e)
+++ src/puppetcode/environments/test/modules/gnuboat_gpsd/manifests/install.pp	(revision 8c27e83d4438788ee8afc3018007bff660c0152e)
@@ -0,0 +1,7 @@
+class gnuboat_gpsd::install() inherits gnuboat_gpsd
+{
+	package{'gpsd':
+		ensure => $version,
+		notify => Service['gpsd'],
+	}
+}
Index: src/puppetcode/environments/test/modules/gnuboat_gpsd/manifests/service.pp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_gpsd/manifests/service.pp	(revision 8c27e83d4438788ee8afc3018007bff660c0152e)
+++ src/puppetcode/environments/test/modules/gnuboat_gpsd/manifests/service.pp	(revision 8c27e83d4438788ee8afc3018007bff660c0152e)
@@ -0,0 +1,29 @@
+class gnuboat_gpsd::service
+(
+	Enum['running', 'stopped'] $status = 'running',
+	Boolean $enabled = true,
+	Boolean $usb_auto = true,
+	String $devices = '/dev/ttyAMA0',
+)
+inherits gnuboat_gpsd
+{
+	service{'gpsd':
+		ensure => $status,
+		enable => $enabled,
+		subscribe => Package['gpsd'],
+	}
+
+	file{'/etc/default/gpsd':
+		ensure => present,
+		owner => 'root',
+		group => 'root',
+		mode => '0600',
+		notify => Service['gpsd'],
+		content => epp('gnuboat_gpsd/gpsd.epp',
+		{
+			'enabled' => $enabled,
+			'usb_auto' => $usb_auto,
+			'devices' => $devices,
+		}),
+	}
+}
Index: src/puppetcode/environments/test/modules/gnuboat_gpsd/templates/gpsd.epp
===================================================================
--- src/puppetcode/environments/test/modules/gnuboat_gpsd/templates/gpsd.epp	(revision 8c27e83d4438788ee8afc3018007bff660c0152e)
+++ src/puppetcode/environments/test/modules/gnuboat_gpsd/templates/gpsd.epp	(revision 8c27e83d4438788ee8afc3018007bff660c0152e)
@@ -0,0 +1,24 @@
+# Default settings for the gpsd init script and the hotplug wrapper.
+
+# Start the gpsd daemon automatically at boot time
+<% if $enabled { -%>
+START_DAEMON="true"
+<% } -%>
+<% else { -%>
+START_DAEMON="false"
+<% } -%>
+
+# Use USB hotplugging to add new USB devices automatically to the daemon
+<% if $usb_auto { -%>
+USB_AUTO="true"
+<% } -%>
+<% else { -%>
+USB_AUTO="false"
+<% } -%>
+
+# Devices gpsd should collect to at boot time.
+# They need to be read/writeable, either by user gpsd or the group dialout.
+DEVICES="<%= $devices %>"
+
+# Other options you want to pass to gpsd
+GPSD_OPTIONS=""
