Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

k8s_exec: Return rc for the command executed #158

Merged
merged 1 commit into from
Jul 23, 2020

Conversation

Akasurde
Copy link
Member

SUMMARY

k8s_exec now returns command return code in output.

Fixes: #122

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

changelogs/fragments/122_k8s_exec_rc.yml
molecule/default/tasks/exec.yml
plugins/modules/k8s_exec.py

@codecov
Copy link

codecov bot commented Jul 10, 2020

Codecov Report

Merging #158 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #158   +/-   ##
=======================================
  Coverage   42.41%   42.41%           
=======================================
  Files           3        3           
  Lines         547      547           
  Branches      111      111           
=======================================
  Hits          232      232           
  Misses        271      271           
  Partials       44       44           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e86b56...b4401b5. Read the comment docs.

@Akasurde
Copy link
Member Author

Akasurde commented Jul 10, 2020

@geerlingguy @fabianvf @tima This is changing the behavior of the module. The module used to return True always. With this change, depending on the command return code it will report changed. Do you think we should add a toggle for enabling this feature?

@Akasurde Akasurde closed this Jul 10, 2020
@Akasurde Akasurde reopened this Jul 10, 2020
k8s_exec now returns command return code in output.

Fixes: ansible-collections#122

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@geerlingguy geerlingguy changed the base branch from master to main July 17, 2020 13:57
Copy link
Collaborator

@fabianvf fabianvf left a comment

Choose a reason for hiding this comment

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

lgtm

@Akasurde Akasurde merged commit 3aaf182 into ansible-collections:main Jul 23, 2020
@Akasurde Akasurde deleted the i122 branch July 23, 2020 05:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

k8s_exec should error if the process exit code isn't 0
2 participants