Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

escape comments to avoid repeated puppet runs #95

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

raybellis
Copy link

@raybellis raybellis commented Sep 7, 2023

Pull Request (PR) description

This PR replaces #66 and is rebased to the latest master branch

This Pull Request (PR) fixes the following issues

Regex meta-characters in an sshd_config_match name parameter cause repeated file updates at every Puppet run

@bastelfreak
Copy link
Member

thanks for the PR, can you add an example that would fail without this code or add a test for it?

@raybellis
Copy link
Author

raybellis commented Sep 7, 2023

@bastelfreak With the stock code this configuration:

sshd_config_match { 'Host 2001:xxx:*::8':
   comment => 'IPv6 match'
}

results in this "change" during every Puppet run:

Notice: /Stage[main]/XXX/Sshd_config_match[Host 2001:xxx:*::8]/comment: comment changed 'Host 2001:xxx:*::8: IPv6 match' to 'IPv6 match' (corrective)

Applying an RE escape to the resource's name before the regex match resolves this issue.

@traylenator traylenator added the bug Something isn't working label Aug 6, 2024
@traylenator traylenator changed the title escape comments escape comments to avoid repeated runs Aug 6, 2024
@traylenator traylenator changed the title escape comments to avoid repeated runs escape comments to avoid repeated puppet runs Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants