file: add doc on how to convert epoch seconds to datetime (#53357)

This commit is contained in:
Jordan Borean 2019-03-07 12:40:10 +10:00 committed by GitHub
parent 156613f025
commit 6e168776db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -181,6 +181,12 @@ EXAMPLES = r'''
state: file
modification_time: now
access_time: now
- name: Set access time based on seconds from epoch value
file:
path: /etc/another_file
state: file
access_time: '{{ "%Y%m%d%H%M.%S" | strftime(stat_var.stat.atime) }}'
'''
RETURN = r'''