diff --git a/manifests/init.pp b/manifests/init.pp index c6f72c2f..9446e6b2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -48,6 +48,7 @@ Optional[String] $default_zone = undef, Optional[Enum['off','all','unicast','broadcast','multicast']] $log_denied = undef, Optional[Enum['yes', 'no']] $cleanup_on_exit = undef, + Optional[Enum['yes', 'no']] $zone_drifting = undef, Optional[Integer] $minimal_mark = undef, Optional[Enum['yes', 'no']] $lockdown = undef, Optional[Enum['yes', 'no']] $ipv6_rpfilter = undef, @@ -199,6 +200,15 @@ } } + if $zone_drifting { + augeas { + 'firewalld::zone_drifting': + changes => [ + "set AllowZoneDrifting \"${zone_drifting}\"", + ]; + } + } + if $minimal_mark { augeas { 'firewalld::minimal_mark': diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index d93b03ea..36417d88 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -276,6 +276,20 @@ end end + context 'with parameter zone_drifting' do + let(:params) do + { + zone_drifting: 'yes' + } + end + + it do + is_expected.to contain_augeas('firewalld::zone_drifting').with( + changes: ['set AllowZoneDrifting "yes"'] + ) + end + end + context 'with parameter minimal_mark' do let(:params) do {