diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 84e62d4f8..7f219c8e8 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -129,6 +129,7 @@ proxy => $_proxy, plugin_dir => $elasticsearch::real_plugindir, plugin_path => $module_dir, + before => Service['elasticsearch'], } -> file { "${elasticsearch::real_plugindir}/${_module_dir}": ensure => $_file_ensure, diff --git a/spec/defines/004_elasticsearch_plugin_spec.rb b/spec/defines/004_elasticsearch_plugin_spec.rb index 48a99af24..f22e3213e 100644 --- a/spec/defines/004_elasticsearch_plugin_spec.rb +++ b/spec/defines/004_elasticsearch_plugin_spec.rb @@ -294,7 +294,13 @@ class { 'elasticsearch': } 'Class[elasticsearch::config]' )} - include_examples('class') + it { should contain_elasticsearch_plugin( + 'head' + ).that_comes_before( + 'Service[elasticsearch]' + )} + + include_examples 'class' end end end