diff --git a/manifests/init.pp b/manifests/init.pp index ed3bd8c8..6ea0b2ff 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -178,8 +178,9 @@ } service { 'firewalld': - ensure => $service_ensure, - enable => $service_enable, + ensure => $service_ensure, + enable => $service_enable, + require => Package[$package], } #...ipsets diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 72af323c..af7dc41e 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -33,7 +33,8 @@ it { is_expected.to contain_service('firewalld'). with_ensure('running'). - with_enable(true) + with_enable(true). + with_require('Package[firewalld]') } it { is_expected.not_to contain_augeas('firewalld::firewallbackend') }