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

Do not consider "skipped" targets as failed for "ansible.playbooks" states #60983

Merged

Conversation

meaksh
Copy link
Contributor

@meaksh meaksh commented Oct 1, 2021

What does this PR do?

This PR fixes a misbehavior of ansible.playbooks states when some of the targets of the playbook are being "skipped".

Currently, when there are "skipped" targets, then ansible.playbooks state execution will return failed. This seems wrong here since the "ansible-playbook" command called under the hood is actually not considering the execution as failed but succeeding and returning retcode 0.

This PR simply fixed this misbehavior and make "ansible.playbooks" state to succeed even if there are "skipped" targets as Ansible does.

Merge requirements satisfied?

[NOTICE] Bug fixes or features added to Salt require tests.

Commits signed with GPG?

Yes

Please review Salt's Contributing Guide for best practices.

See GitHub's page on GPG signing for more information about signing commits with GPG.

@meaksh meaksh requested a review from a team as a code owner October 1, 2021 09:53
@meaksh meaksh requested review from garethgreenaway and removed request for a team October 1, 2021 09:53
@garethgreenaway garethgreenaway added the Phosphorus v3005.0 Release code name and version label Apr 20, 2022
@Ch3LL Ch3LL requested a review from s0undt3ch May 20, 2022 18:31
@Ch3LL Ch3LL merged commit 4e1f94d into saltstack:master May 24, 2022
@meaksh meaksh deleted the master-fix-ansible.playbooks-skipped-return branch May 24, 2022 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Phosphorus v3005.0 Release code name and version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants