Bug #29681
closedpuppet facts exclude filter star wildcard not working as expected
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1759111
Description of problem:
When we set an exclude filter in Administer > Settings > Provisioning > 'Exclude pattern for facts stored in satellite' and use the star wildcard, the filter is not working as expected. For example filter set as:
docker*
will also exclude facts like:
blah_docker_blah
i.e. facts where the string is included in the middle of the fact and not only on the beginning. I would expect that the filter to exclude docker in the middle of the string should be written like:
docker
How reproducible:
Always
Steps to Reproduce:
1. On a system create custom Puppet Fact called blah_docker_blah
2. Run 'puppet agent -t' on the client to propagate the fact to Satellite
3. Navigate to Hosts > All Hosts, choose the host and click the Facts button
4. Filter the facts for docker - no result will be shown
5. Check the exclude filter in Administer > Settings > Provisioning > 'Exclude pattern for facts stored in satellite'
6. The exclude filter docker* is present there by default
Actual results:
Facts with the docker string included in the middle are filtered out.
Expected results:
Facts with the docker string included in the middle will remain reported.