Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always use fnmatch for target wildcard name match
When resolving a large number of targets from a plan the match_wildcard? regex is compiled on the fly possibly hundreds or thousands (for a large inventory) of times per target name resolution. Switching to File.fnmatch provides a significant speed increase and seems to more accurately reflect the functionality stated in the Bolt documentation with regards to target matching. !feature * **Enable basic glob matching of target strings** Previously, only the '*' wildcard character would match when targets were resolved from areas other than the CLI (such as from within a Plan). With this change wildcard matching is switched to use Ruby's fnmatch with basic glob matching enabled. In addition to providing more wildcard matching options, it also provides a significant performance improvement over the prior implementation.
- Loading branch information