| Parameter | Choices/Defaults | Comments | 
                
                                                            | access_time 
                    string
                                                                 added in 2.7 |  | This parameter indicates the time the file's access time should be set to. Should be preservewhen no modification is required,YYYYMMDDHHMM.SSwhen using default time format, ornow. Default is Nonemeaning thatpreserveis the default forstate=[file,directory,link,hard]andnowis default forstate=touch. | 
                            
                                                            | access_time_format 
                    string
                                                                 added in 2.7 | Default: 
 "%Y%m%d%H%M.%S" | When used with access_time, indicates the time format that must be used. Based on default Python format (see time.strftime doc). | 
                            
                                                            | attributes 
                    string
                                                                 |  | The attributes the resulting file or directory should have. To get supported flags look at the man page for chattr on the target system. This string should contain the attributes in the same order as the one displayed by lsattr. The =operator is assumed as default, otherwise+or-operators need to be included in the string. aliases: attr
 | 
                            
                                                            | follow 
                    boolean
                                                                 |  | This flag indicates that filesystem links, if they exist, should be followed. Previous to Ansible 2.5, this was noby default. | 
                            
                                                            | force 
                    boolean
                                                                 |  | Force the creation of the symlinks in two cases: the source file does not exist (but will appear later); the destination exists and is a file (so, we need to unlink the pathfile and create symlink to thesrcfile in place of it). | 
                            
                                                            | group 
                    string
                                                                 |  | Name of the group that should own the file/directory, as would be fed to chown. | 
                            
                                                            | mode 
                    string
                                                                 |  | The permissions the resulting file or directory should have. For those used to /usr/bin/chmod remember that modes are actually octal numbers. You must either add a leading zero so that Ansible's YAML parser knows it is an octal number (like 0644or01777) or quote it (like'644'or'1777') so Ansible receives a string and can do its own conversion from string into number. Giving Ansible a number without following one of these rules will end up with a decimal number which will have unexpected results. As of Ansible 1.8, the mode may be specified as a symbolic mode (for example, u+rwxoru=rw,g=r,o=r). As of Ansible 2.6, the mode may also be the special string preserve. When set to preservethe file will be given the same permissions as the source file. | 
                            
                                                            | modification_time 
                    string
                                                                 added in 2.7 |  | This parameter indicates the time the file's modification time should be set to. Should be preservewhen no modification is required,YYYYMMDDHHMM.SSwhen using default time format, ornow. Default is None meaning that preserveis the default forstate=[file,directory,link,hard]andnowis default forstate=touch. | 
                            
                                                            | modification_time_format 
                    string
                                                                 added in 2.7 | Default: 
 "%Y%m%d%H%M.%S" | When used with modification_time, indicates the time format that must be used. Based on default Python format (see time.strftime doc). | 
                            
                                                            | owner 
                    string
                                                                 |  | Name of the user that should own the file/directory, as would be fed to chown. | 
                            
                                                            | path 
                    path
                                             / required                     |  | Path to the file being managed. aliases: dest, name
 | 
                            
                                                            | recurse 
                    boolean
                                                                 |  | Recursively set the specified file attributes on directory contents. This applies only when stateis set todirectory. | 
                            
                                                            | selevel 
                    string
                                                                 | Default: 
 "s0" | The level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the range. When set to _default, it will use thelevelportion of the policy if available. | 
                            
                                                            | serole 
                    string
                                                                 |  | The role part of the SELinux file context. When set to _default, it will use theroleportion of the policy if available. | 
                            
                                                            | setype 
                    string
                                                                 |  | The type part of the SELinux file context. When set to _default, it will use thetypeportion of the policy if available. | 
                            
                                                            | seuser 
                    string
                                                                 |  | The user part of the SELinux file context. By default it uses the systempolicy, where applicable. When set to _default, it will use theuserportion of the policy if available. | 
                            
                                                            | src 
                    path
                                                                 |  | Path of the file to link to. This applies only to state=linkandstate=hard. For state=link, this will also accept a non-existing path. Relative paths are relative to the file being created (path) which is how the Unix commandln -s SRC DESTtreats relative paths. | 
                            
                                                            | state 
                    string
                                                                 | Choices:
                                                                                                                                                            absentdirectoryfile ←hardlinktouch | If absent, directories will be recursively deleted, and files or symlinks will be unlinked. In the case of a directory, ifdiffis declared, you will see the files and folders deleted listed underpath_contents. Note thatabsentwill not causefileto fail if thepathdoes not exist as the state did not change. If directory, all intermediate subdirectories will be created if they do not exist. Since Ansible 1.7 they will be created with the supplied permissions. If file, without any other options this works mostly as a 'stat' and will return the current state ofpath. Even with other options (i.emode), the file will be modified but will NOT be created if it does not exist; see thetouchvalue or the copy or template module if you want that behavior. If hard, the hard link will be created or changed. If link, the symbolic link will be created or changed. If touch(new in 1.4), an empty file will be created if thepathdoes not exist, while an existing file or directory will receive updated file access and modification times (similar to the waytouchworks from the command line). | 
                            
                                                            | unsafe_writes 
                    boolean
                                                                 |  | Influence when to use atomic operation to prevent data corruption or inconsistent reads from the target file. By default this module uses atomic operations to prevent data corruption or inconsistent reads from the target files, but sometimes systems are configured or just broken in ways that prevent this. One example is docker mounted files, which cannot be updated atomically from inside the container and can only be written in an unsafe manner. This option allows Ansible to fall back to unsafe methods of updating files when atomic operations fail (however, it doesn't force Ansible to perform unsafe writes). IMPORTANT! Unsafe writes are subject to race conditions and can lead to data corruption. |