raw now returns changed: true (#17112)

for consistency w/ shell/command/script "non-idempotent" modules.

Updated tests, changelog.
This commit is contained in:
Matt Davis 2016-08-16 20:39:23 -07:00 committed by GitHub
commit e0bdb502e3
5 changed files with 16 additions and 7 deletions

View file

@ -27,7 +27,7 @@
- "getmac_result.stdout"
- "not getmac_result.stderr"
- "not getmac_result|failed"
- "not getmac_result|changed"
- "getmac_result|changed"
- name: run ipconfig with /all argument
raw: ipconfig /all
@ -41,7 +41,7 @@
- "'Physical Address' in ipconfig_result.stdout"
- "not ipconfig_result.stderr"
- "not ipconfig_result|failed"
- "not ipconfig_result|changed"
- "ipconfig_result|changed"
- name: run ipconfig with invalid argument
raw: ipconfig /badswitch
@ -55,7 +55,7 @@
- "ipconfig_invalid_result.stdout" # ipconfig displays errors on stdout.
- "not ipconfig_invalid_result.stderr"
- "ipconfig_invalid_result|failed"
- "not ipconfig_invalid_result|changed"
- "ipconfig_invalid_result|changed"
- name: run an unknown command
raw: uname -a
@ -69,7 +69,7 @@
- "not unknown_result.stdout"
- "unknown_result.stderr" # An unknown command displays error on stderr.
- "unknown_result|failed"
- "not unknown_result|changed"
- "unknown_result|changed"
- name: run a command that takes longer than 60 seconds
raw: Start-Sleep -s 75
@ -82,7 +82,7 @@
- "not sleep_command.stdout"
- "not sleep_command.stderr"
- "not sleep_command|failed"
- "not sleep_command|changed"
- "sleep_command|changed"
- name: run a raw command with key=value arguments
raw: echo wwe=raw

View file

@ -9,7 +9,10 @@
raw: echo 汉语
register: command
- name: check output of raw with unicode arg and output
assert: { that: "'汉语' in command.stdout" }
assert:
that:
- "'汉语' in command.stdout"
- command | changed # as of 2.2, raw should default to changed: true for consistency w/ shell/command/script modules
### copy local file with unicode filename and content

View file

@ -9,7 +9,10 @@
raw: echo 汉语
register: command
- name: check output of raw with unicode arg and output
assert: { that: "'汉语' in command.stdout" }
assert:
that:
- "'汉语' in command.stdout"
- command | changed # as of 2.2, raw should default to changed: true for consistency w/ shell/command/script modules
### copy local file with unicode filename and content