diff --git a/lib/ansible/modules/files/file.py b/lib/ansible/modules/files/file.py index 1d7d38cfa9..d73f2247ec 100644 --- a/lib/ansible/modules/files/file.py +++ b/lib/ansible/modules/files/file.py @@ -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'''