mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
win_chocolatey: always return the rc return value (#41883)
This commit is contained in:
parent
f30e0b833d
commit
2e46688bca
4 changed files with 8 additions and 1 deletions
2
changelogs/fragments/win_chocolatey-return-rc-always.yml
Normal file
2
changelogs/fragments/win_chocolatey-return-rc-always.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- win_chocolatey - set the rc return value to always be returned, default to 0 https://github.com/ansible/ansible/issues/41758
|
|
@ -36,6 +36,7 @@ $proxy_password = Get-AnsibleParam -obj $params -name "proxy_password" -type "st
|
||||||
|
|
||||||
$result = @{
|
$result = @{
|
||||||
changed = $false
|
changed = $false
|
||||||
|
rc = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
Function Chocolatey-Install-Upgrade
|
Function Chocolatey-Install-Upgrade
|
||||||
|
|
|
@ -211,7 +211,7 @@ command:
|
||||||
sample: choco.exe install -r --no-progress -y sysinternals --timeout 2700 --failonunfound
|
sample: choco.exe install -r --no-progress -y sysinternals --timeout 2700 --failonunfound
|
||||||
rc:
|
rc:
|
||||||
description: The return code from the chocolatey task.
|
description: The return code from the chocolatey task.
|
||||||
returned: changed
|
returned: always
|
||||||
type: int
|
type: int
|
||||||
sample: 0
|
sample: 0
|
||||||
stdout:
|
stdout:
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- 'install.changed == true'
|
- 'install.changed == true'
|
||||||
|
- install.rc == 0
|
||||||
|
|
||||||
- name: install chocolatey-core.extension again
|
- name: install chocolatey-core.extension again
|
||||||
win_chocolatey:
|
win_chocolatey:
|
||||||
|
@ -37,6 +38,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- 'install_again.changed == false'
|
- 'install_again.changed == false'
|
||||||
|
- install.rc == 0
|
||||||
|
|
||||||
- name: remove chocolatey-core.extension
|
- name: remove chocolatey-core.extension
|
||||||
win_chocolatey:
|
win_chocolatey:
|
||||||
|
@ -48,6 +50,7 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- 'remove.changed == true'
|
- 'remove.changed == true'
|
||||||
|
- install.rc == 0
|
||||||
|
|
||||||
- name: remove chocolatey-core.extension again
|
- name: remove chocolatey-core.extension again
|
||||||
win_chocolatey:
|
win_chocolatey:
|
||||||
|
@ -59,3 +62,4 @@
|
||||||
assert:
|
assert:
|
||||||
that:
|
that:
|
||||||
- 'remove_again.changed == false'
|
- 'remove_again.changed == false'
|
||||||
|
- install.rc == 0
|
||||||
|
|
Loading…
Reference in a new issue