Skip to content

Commit

Permalink
Notify service on config changes
Browse files Browse the repository at this point in the history
The config package did not have a notify-relationship to the service
package. This patch fixes this, causing postfix to get reloaded and
picking up the new config upon changes.

Patch provided by Martijn Heemels (see #8).

Fixes #7.
  • Loading branch information
oxc committed Oct 28, 2018
1 parent dc6d745 commit 09abca5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Notify service on config changes, causing it to reload postfix to pick up the
changes ([#7])

## Release [1.0.1] - 2018-09-27
This release fixes support for systems where postfix is not installed, and
Expand Down Expand Up @@ -72,6 +75,7 @@ First release as oxc-postfix, now requires Puppet 4.9
[0.2.0]: https://github.com/oxc/puppet-postfix/compare/v0.1.0...v0.2.0
[0.1.0]: https://github.com/oxc/puppet-postfix/compare/v0.0.1...v0.1.0
[0.0.1]: https://github.com/oxc/puppet-postfix/compare/f7d8b52...v0.0.1
[#7]: https://github.com/oxc/puppet-postfix/issues/7
[#6]: https://github.com/oxc/puppet-postfix/pull/6
[#5]: https://github.com/oxc/puppet-postfix/issues/5
[#4]: https://github.com/oxc/puppet-postfix/issues/4
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@
) {
Class { '::postfix::package': }
-> Class { '::postfix::config': }
-> Class { '::postfix::service': }
~> Class { '::postfix::service': }
}
6 changes: 5 additions & 1 deletion spec/classes/postfix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

it { is_expected.to contain_class('postfix::package') }

it { is_expected.to contain_class('postfix::service').that_requires('Class[postfix::package]') }
it { is_expected.to contain_class('postfix::config').that_requires('Class[postfix::package]') }

it { is_expected.to contain_class('postfix::config').that_notifies('Class[postfix::service]') }

it { is_expected.to contain_class('postfix::service').that_requires('Class[postfix::config]') }
end
end

0 comments on commit 09abca5

Please sign in to comment.