Open ubellavance opened 7 years ago
It looks like some code is there to try to implement the deletion of an fcontext (ensure => absent), but I think it's not complete:
ensure => absent
if $ensure == 'present' { $semanage = '--add' $grep = 'egrep' } else { $semanage = '--delete' $grep = '! egrep -q' }
https://github.com/camptocamp/puppet-selinux/blob/master/manifests/fcontext.pp#L45-L51
However, since $semanage is not used anywhere in the exec block, it will add the fcontext even if you use ensure => absent. I'll try to submit a PR soon.
tbh, this should be recoded as a type and provider to be cleaner.
It does look like it was half implemented indeed.
It looks like some code is there to try to implement the deletion of an fcontext (
ensure => absent
), but I think it's not complete:https://github.com/camptocamp/puppet-selinux/blob/master/manifests/fcontext.pp#L45-L51
However, since $semanage is not used anywhere in the exec block, it will add the fcontext even if you use
ensure => absent
. I'll try to submit a PR soon.