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

Fixed check_mode status to be the same as normal execution #40721

Merged
merged 2 commits into from
May 25, 2018

Conversation

kustodian
Copy link
Contributor

SUMMARY

Now when setting the status to disabled in check_mode it correctly returns the state changed and prints a warning like it does in normal model. Before it always returned changed even if everything was set correctly and a reboot was required.

I also added a bunch of tests for check_mode.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

selinux

ANSIBLE VERSION
ansible 2.6.0dev0

@ansibot
Copy link
Contributor

ansibot commented May 25, 2018

@ansibot ansibot added affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. selinux support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. labels May 25, 2018
* Now when setting the status to `disabled` in check_mode it correctly
returns the state changed and prints a warning like it does in normal
model. Before it always returned changed even if everything was set
correctly and a reboot was required.
@kustodian kustodian force-pushed the selinux-check-mode-status-fixes branch from add59a5 to 559dd75 Compare May 25, 2018 16:24
@kustodian kustodian changed the title Fixed check_mode status to the same as normal execution Fixed check_mode status to be the same as normal execution May 25, 2018
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label May 25, 2018
@samdoran samdoran self-assigned this May 25, 2018
Copy link
Contributor

@samdoran samdoran left a comment

Choose a reason for hiding this comment

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

Excellent polishing of the check mode behavior. Thanks so much for the tests!

@samdoran samdoran merged commit 0781a7f into ansible:devel May 25, 2018
gothicx pushed a commit to gothicx/ansible that referenced this pull request Jun 9, 2018
…0721)

* Fixed check_mode status to be the same as normal execution

* Now when setting the status to `disabled` in check_mode it correctly
returns the state changed and prints a warning like it does in normal
model. Before it always returned changed even if everything was set
correctly and a reboot was required.

* Add changelog entry


Co-authored by: Strahinja Kustudic <kustodian@gmail.com>
jacum pushed a commit to jacum/ansible that referenced this pull request Jun 26, 2018
…0721)

* Fixed check_mode status to be the same as normal execution

* Now when setting the status to `disabled` in check_mode it correctly
returns the state changed and prints a warning like it does in normal
model. Before it always returned changed even if everything was set
correctly and a reboot was required.

* Add changelog entry


Co-authored by: Strahinja Kustudic <kustodian@gmail.com>
@ansible ansible locked and limited conversation to collaborators May 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. selinux support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants