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

Use correct backtick for regex escape #56

Merged
merged 1 commit into from
May 11, 2023

Conversation

drscream
Copy link
Contributor

Overall Review of Changes:
Depends on the ansible version regex escape (via slash) require correct backticks to work. Otherwise it would result in a syntax error.

Issue Fixes:

ERROR! We were unable to read either as JSON nor YAML, these are the errors we got from each:
JSON: Expecting value: line 1 column 1 (char 0)
Syntax Error while loading YAML.
  found unknown escape character
The error appears to be in '/runner/project/tasks/section_4/cis_4.2.2.x.yml': line 188, column 25, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
            path: "{{ systemd_conf_file | default('/usr/lib/tmpfiles.d/systemd.conf') }}"
            regexp: "^z \/var\/log\/journal\/%m\/system.journal (!?06(0|4)0) root"
                        ^ here

How has this been tested?:
The issue was detected with the latest Ansible Tower / Ansible Automation Platform version. After adding the change in the merge request the playbook worked.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown!
Please join in the conversation happening on the Discord Server as well.

Copy link
Member

@uk-bolly uk-bolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good find thank you

@uk-bolly
Copy link
Member

uk-bolly commented May 4, 2023

hi @drscream

Thank you for taking the time in raising this PR. The content looks good, we do however required both GPG signing and signed-off-by added to each commit in order to merge.
If you could added the required signing happy to merge this.

Many thanks

uk-bolly

Depends on the ansible version regex escape (via slash) require correct
backticks to work. Otherwise it would result in a syntax error.

Signed-off-by: Thomas Merkel <[email protected]>
@drscream drscream force-pushed the fix/regex-escape branch from 1b80584 to 2380cd4 Compare May 4, 2023 17:41
@drscream
Copy link
Contributor Author

drscream commented May 4, 2023

Hello @uk-bolly

thanks for your reply, I've signed the commit :-)

All the best,
Thomas

@uk-bolly uk-bolly merged commit 623d2fc into ansible-lockdown:devel May 11, 2023
@uk-bolly uk-bolly mentioned this pull request Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants