mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-10 18:15:39 +00:00
consolidate if branches
This commit is contained in:
parent
3b37d55146
commit
61303d9326
1 changed files with 3 additions and 4 deletions
|
|
@ -508,10 +508,9 @@ def main():
|
|||
result["status"]["error"] = err
|
||||
|
||||
# restarted and reloaded always perform commands unconditionally, so they always change state
|
||||
if action in ("restarted", "reloaded"):
|
||||
result["changed"] = True
|
||||
elif (
|
||||
result["status"]["current_state"] != result["status"]["previous_state"]
|
||||
if (
|
||||
action in ("restarted", "reloaded")
|
||||
or result["status"]["current_state"] != result["status"]["previous_state"]
|
||||
or result["status"]["current_pid"] != result["status"]["previous_pid"]
|
||||
):
|
||||
result["changed"] = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue