Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win_stat: Add missing return info for older versions #27736

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Ansible Changes By Release
* Fix check mode in archive module
* Fix UnboundLocalError in check mode in cs_role module
* Fix to always use lowercase hostnames for host keys in known_hosts module
* Added missing return results for win_stat

<a id="2.3.2"></a>

Expand Down
16 changes: 13 additions & 3 deletions lib/ansible/modules/windows/win_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
stat:
description: dictionary containing all the stat data
returned: success
type: dictionary
type: complex
contains:
attributes:
description: attributes of the file at path in raw form
Expand All @@ -130,11 +130,21 @@
returned: success, path exists
type: float
sample: 1477984205.15
exists:
description: if the path exists or not
returned: success
type: boolean
sample: True
extension:
description: the extension of the file at path
returned: success, path exists, path is a file
type: string
sample: ".ps1"
filename:
description: the name of the file (without path)
returned: success, path exists, path is a file
type: string
sammple: foo.ini
isarchive:
description: if the path is ready for archiving or not
returned: success, path exists
Expand Down Expand Up @@ -192,9 +202,9 @@
sample: BUILTIN\Administrators
path:
description: the full absolute path to the file
returned: success, path exists
returned: success, path exists, file exists
type: string
sample: BUILTIN\Administrators
sample: C:\foo.ini
sharename:
description: the name of share if folder is shared
returned: success, path exists, file is a directory and isshared == True
Expand Down