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

cmd_runner: added flag check_mode_skip to context #4736

Conversation

russoz
Copy link
Collaborator

@russoz russoz commented May 27, 2022

SUMMARY

Added parameters check_mode_skip and check_mode_return to CmdRunner.context(), so that the command is not executed when check_mode=True.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

plugins/module_utils/cmd_runner.py

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request integration tests/integration module_utils module_utils plugins plugin (any type) tests tests needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels May 27, 2022
@russoz russoz changed the title cmd_runner: added flag skip_if_check_mode to context cmd_runner: added flag check_mode_skip to context May 28, 2022
@russoz russoz force-pushed the cmd-runner-skip-check-mode branch from ab6dfc8 to 9f55ab6 Compare May 28, 2022 23:12
@felixfontein felixfontein added check-before-release PR will be looked at again shortly before release and merged if possible. backport-5 labels May 29, 2022
@felixfontein felixfontein merged commit be69f95 into ansible-collections:main Jun 4, 2022
@patchback
Copy link

patchback bot commented Jun 4, 2022

Backport to stable-5: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-5/be69f95f63cc1758f40e3a9b47d90dcd1af7cd90/pr-4736

Backported as #4772

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@russoz thanks for contributing this!

patchback bot pushed a commit that referenced this pull request Jun 4, 2022
* cmd_runner: added flag skip_if_check_mode to context

* added changelog fragment

* adjusted param name and added new one

(cherry picked from commit be69f95)
@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jun 4, 2022
@russoz russoz deleted the cmd-runner-skip-check-mode branch June 4, 2022 09:56
felixfontein pushed a commit that referenced this pull request Jun 6, 2022
* cmd_runner: added flag skip_if_check_mode to context

* added changelog fragment

* adjusted param name and added new one

(cherry picked from commit be69f95)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This was referenced Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request integration tests/integration module_utils module_utils plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants