Skip to content

Selinux port ensure => absent do not work with port_range #323

@myMarck

Description

@myMarck

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.x
  • Ruby:
  • Distribution: CentOS
  • Module version: 3.2.0

How to reproduce (e.g Puppet code you use)

This example is based on mongo

semanage port -l | grep mongo
mongod_port_t tcp 27017-27019, 28017-28019

selinux::port { 'mongo_port [27017,27019]':
ensure => 'absent',
seltype => 'mongod_port_t',
protocol => 'tcp',
port_range => [27017,27019],
}

What are you seeing

Nothing happens

What behaviour did you expect instead

semanage port -l | grep mongo
mongod_port_t tcp 28017-28019

Output log

This is from debug log
Debug: /Stage[main]/Selinux::Config/before: before to Selinux::Port[mongo_port [27017,27019]]
Debug: /Stage[main]/My_mongodb::Install/Selinux::Port[mongo_port [27017,27019]]/before: before to Anchor[selinux::module pre]

Any additional information you'd like to impart

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions