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

Make second group match of ufw status output optional #56678

Merged
merged 3 commits into from May 28, 2019

Conversation

tyleha
Copy link
Contributor

@tyleha tyleha commented May 20, 2019

Fixes #56674

SUMMARY

Second group match does not always exist. In cases where it is missing, like when logging is set to off, allow regex to still succeed to return first group match such that current_on_off_value will be defined.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ufw

@ansibot
Copy link
Contributor

ansibot commented May 20, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. new_contributor This PR is the first contribution by a new community member. small_patch support:community This issue/PR relates to code supported by the Ansible community. system System category needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed community_review In order to be merged, this PR must follow the community review workflow. labels May 20, 2019
Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks!

The tests are failling; I want to investigate this a bit, something looks fishy.

You need to add a changelog fragment: https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#changelogs-how-to (see here for examples).

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label May 21, 2019
@felixfontein
Copy link
Contributor

Found the problem; the comparison logic was kind of broken, I've pushed a fix for that into your branch. That should fix the tests. Do you want to add the changelog, or do you want me to do that?

@ansibot ansibot added community_review In order to be merged, this PR must follow the community review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels May 21, 2019
@tyleha
Copy link
Contributor Author

tyleha commented May 21, 2019 via email

Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

LGTM

@felixfontein
Copy link
Contributor

@ovcharenko @jbarotin anyone wants to take a look at this?

@jbarotin
Copy link
Contributor

LGTM

@jbarotin
Copy link
Contributor

shipit

@felixfontein felixfontein merged commit 1d22909 into ansible:devel May 28, 2019
@felixfontein
Copy link
Contributor

@tyleha thanks a lot for fixing this!
@jbarotin thanks for reviewing!

I'll create a backport for stable-2.8.

felixfontein pushed a commit to felixfontein/ansible that referenced this pull request May 28, 2019
* Make second group match of ufw status output optional

Fixes ansible#56674

* Fix comparison logic.

* Add changelog fragment

(cherry picked from commit 1d22909)
abadger pushed a commit that referenced this pull request May 28, 2019
* Make second group match of ufw status output optional

Fixes #56674

* Fix comparison logic.

* Add changelog fragment

(cherry picked from commit 1d22909)
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. community_review In order to be merged, this PR must follow the community review workflow. module This issue/PR relates to a module. new_contributor This PR is the first contribution by a new community member. support:community This issue/PR relates to code supported by the Ansible community. system System category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ufw module does not parse logging state correctly in Ubuntu 16.04
4 participants