|
|
|
@ -12,7 +12,7 @@ DOCUMENTATION = r"""
|
|
|
|
module: file
|
|
|
|
module: file
|
|
|
|
version_added: historical
|
|
|
|
version_added: historical
|
|
|
|
short_description: Manage files and file properties
|
|
|
|
short_description: Manage files and file properties
|
|
|
|
extends_documentation_fragment: [files, action_common_attributes]
|
|
|
|
extends_documentation_fragment: [action_common_attributes]
|
|
|
|
description:
|
|
|
|
description:
|
|
|
|
- Set attributes of files, directories, or symlinks and their targets.
|
|
|
|
- Set attributes of files, directories, or symlinks and their targets.
|
|
|
|
- Alternatively, remove files, symlinks or directories.
|
|
|
|
- Alternatively, remove files, symlinks or directories.
|
|
|
|
@ -236,7 +236,7 @@ import time
|
|
|
|
from pwd import getpwnam, getpwuid
|
|
|
|
from pwd import getpwnam, getpwuid
|
|
|
|
from grp import getgrnam, getgrgid
|
|
|
|
from grp import getgrnam, getgrgid
|
|
|
|
|
|
|
|
|
|
|
|
from ansible.module_utils.basic import AnsibleModule
|
|
|
|
from ansible.module_utils.basic import AnsibleModule, FILE_COMMON_ARGUMENTS
|
|
|
|
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
|
|
|
from ansible.module_utils.common.text.converters import to_bytes, to_native
|
|
|
|
from ansible.module_utils.common.sentinel import Sentinel
|
|
|
|
from ansible.module_utils.common.sentinel import Sentinel
|
|
|
|
|
|
|
|
|
|
|
|
@ -963,16 +963,16 @@ def main():
|
|
|
|
path=dict(type='path', required=True, aliases=['dest', 'name']),
|
|
|
|
path=dict(type='path', required=True, aliases=['dest', 'name']),
|
|
|
|
_original_basename=dict(type='str'), # Internal use only, for recursive ops
|
|
|
|
_original_basename=dict(type='str'), # Internal use only, for recursive ops
|
|
|
|
recurse=dict(type='bool', default=False),
|
|
|
|
recurse=dict(type='bool', default=False),
|
|
|
|
force=dict(type='bool', default=False), # Note: Should not be in file_common_args in future
|
|
|
|
force=dict(type='bool', default=False),
|
|
|
|
follow=dict(type='bool', default=True), # Note: Different default than file_common_args
|
|
|
|
follow=dict(type='bool', default=True),
|
|
|
|
_diff_peek=dict(type='bool'), # Internal use only, for internal checks in the action plugins
|
|
|
|
_diff_peek=dict(type='bool'), # Internal use only, for internal checks in the action plugins
|
|
|
|
src=dict(type='path'), # Note: Should not be in file_common_args in future
|
|
|
|
src=dict(type='path'),
|
|
|
|
modification_time=dict(type='str'),
|
|
|
|
modification_time=dict(type='str'),
|
|
|
|
modification_time_format=dict(type='str', default='%Y%m%d%H%M.%S'),
|
|
|
|
modification_time_format=dict(type='str', default='%Y%m%d%H%M.%S'),
|
|
|
|
access_time=dict(type='str'),
|
|
|
|
access_time=dict(type='str'),
|
|
|
|
access_time_format=dict(type='str', default='%Y%m%d%H%M.%S'),
|
|
|
|
access_time_format=dict(type='str', default='%Y%m%d%H%M.%S'),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
add_file_common_args=True,
|
|
|
|
extends_common_args=(FILE_COMMON_ARGUMENTS,),
|
|
|
|
supports_check_mode=True,
|
|
|
|
supports_check_mode=True,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|