# == Class: <%= metadata.name %>
#
# Full description of class <%= metadata.name %> here.
#
# === Parameters
#
# [*sample_parameter*]
#   Explanation of what this parameter affects and what it defaults to.
#
class <%= metadata.name %> (
) inherits <%= metadata.name %>::params {

  # validate parameters here

  class { '<%= metadata.name %>::install': } ->
  class { '<%= metadata.name %>::config': } ~>
  class { '<%= metadata.name %>::service': } ->
  Class['<%= metadata.name %>']
}

# == Class: <%= metadata.name %>
#
# Full description of class <%= metadata.name %> here.
#
# === Parameters
#
# [*sample_parameter*]
#   Explanation of what this parameter affects and what it defaults to.
#
class <%= metadata.name %> (
) inherits <%= metadata.name %>::params {

  # validate parameters here

  class { '<%= metadata.name %>::install': } ->
  class { '<%= metadata.name %>::config': }
  class { '<%= metadata.name %>::service': } ->
  Class['<%= metadata.name %>']

  Class['<%= metadata.name %>::install'] ~> Class['<%= metadata.name %>::service']
  Class['<%= metadata.name %>::config'] ~> Class['<%= metadata.name %>::service']
}

Make ::install sub-class notify ::service
Make ::install sub-class notify ::service

This ensures that package upgrades restart the service correctly. Even when
there are no configuration changes.

The other ::config ~> ::service chain has been split out for consistency.

I'm happy with using chains instead of notify/subscribe. Particularly
because it (with the addition of lint) ensures that relationships are only
defined in one direction, which has been an issue for us in the past.

To be determined whether we really need to apply the anchor pattern or not.
