From 6347da969621a12f590e07b3f7e0939a03847ae0 Mon Sep 17 00:00:00 2001 From: Miro Prasil Date: Fri, 11 Aug 2023 20:04:23 +0200 Subject: [PATCH] Document return values of template module (#75980) * Document return values of template module Add documentation for some return values of template module. I have not tested this extensively, so it's possible that under special circumstances this might not be entirely accurate, but briefly looking at the code as far as I can tell they are correct. Co-authored-by: mprasil --- lib/ansible/modules/template.py | 53 +++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/lib/ansible/modules/template.py b/lib/ansible/modules/template.py index 53db1851c9d..8f8ad0bd713 100644 --- a/lib/ansible/modules/template.py +++ b/lib/ansible/modules/template.py @@ -110,3 +110,56 @@ EXAMPLES = r''' validate: /usr/sbin/sshd -t -f %s backup: yes ''' + +RETURN = r''' +dest: + description: Destination file/path, equal to the value passed to I(dest). + returned: success + type: str + sample: /path/to/file.txt +checksum: + description: SHA1 checksum of the rendered file + returned: always + type: str + sample: 373296322247ab85d26d5d1257772757e7afd172 +uid: + description: Numeric id representing the file owner + returned: success + type: int + sample: 1003 +gid: + description: Numeric id representing the group of the owner + returned: success + type: int + sample: 1003 +owner: + description: User name of owner + returned: success + type: str + sample: httpd +group: + description: Group name of owner + returned: success + type: str + sample: www-data +md5sum: + description: MD5 checksum of the rendered file + returned: changed + type: str + sample: d41d8cd98f00b204e9800998ecf8427e +mode: + description: Unix permissions of the file in octal representation as a string + returned: success + type: str + sample: 1755 +size: + description: Size of the rendered file in bytes + returned: success + type: int + sample: 42 +src: + description: Source file used for the copy on the target machine. + returned: changed + type: str + sample: /home/httpd/.ansible/tmp/ansible-tmp-1423796390.97-147729857856000/source +'''