win_stat: Rewrite using AnsibleModule (#49653)

* win_stat: Rewrite using AnsibleModule

Simple rewrite using AnsibleModule.

* Remove custom deprecate block

Since we already have the `removed_in_version` option set, this is not
really needed. However the error message was a bit more specific.

* Fix typo

* Fixes after review

* Fixes to get tests working
This commit is contained in:
Dag Wieers
2019-01-30 21:02:23 +01:00
committed by Jordan Borean
parent 4ac0c23db6
commit 3cfe08b191
2 changed files with 44 additions and 25 deletions

View File

@@ -462,7 +462,7 @@
- name: test win_stat module without path argument
win_stat:
register: win_stat_no_args
failed_when: "win_stat_no_args.msg != 'Get-AnsibleParam: Missing required argument: path'"
failed_when: "win_stat_no_args.msg != 'missing required arguments: path'"
# https://github.com/ansible/ansible/issues/30258
- name: get path of pagefile