mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 16:23:10 +00:00
130 lines
4.0 KiB
JSON
130 lines
4.0 KiB
JSON
{
|
|
"requirements": [],
|
|
"description": [
|
|
"Sets attributes of files, symlinks, and directories, or removes files/symlinks/directories. Many other modules support the same options as the file module - including M(copy), M(template), and M(assmeble)."
|
|
],
|
|
"author": "Michael DeHaan",
|
|
"notes": [
|
|
"See also M(copy), M(template), M(assemble)"
|
|
],
|
|
"module": "file",
|
|
"filename": "library/file",
|
|
"examples": [
|
|
{
|
|
"code": "file path=/etc/foo.conf owner=foo group=foo mode=0644",
|
|
"description": "Example from Ansible Playbooks"
|
|
},
|
|
{
|
|
"code": "file src=/file/to/link/to dest=/path/to/symlink owner=foo group=foo state=link"
|
|
}
|
|
],
|
|
"docuri": "file",
|
|
"short_description": "Sets attributes of files",
|
|
"now_date": "2012-10-09",
|
|
"options": {
|
|
"src": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"path of the file to link to (applies only to C(state=link))."
|
|
],
|
|
"choices": []
|
|
},
|
|
"group": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"name of the group that should own the file/directory, as would be fed to I(chown)"
|
|
],
|
|
"choices": []
|
|
},
|
|
"dest": {
|
|
"default": [],
|
|
"required": true,
|
|
"description": [
|
|
"defines the file being managed, unless when used with I(state=link), and then sets the destination to create a symbolic link to using I(src)"
|
|
],
|
|
"aliases": []
|
|
},
|
|
"selevel": {
|
|
"default": "s0",
|
|
"required": false,
|
|
"description": [
|
|
"level part of the SELinux file context. This is the MLS/MCS attribute, sometimes known as the C(range). C(_default) feature works as for I(seuser)."
|
|
],
|
|
"choices": []
|
|
},
|
|
"seuser": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"user part of SELinux file context. Will default to system policy, if applicable. If set to C(_default), it will use the C(user) portion of the the policy if available"
|
|
],
|
|
"choices": []
|
|
},
|
|
"state": {
|
|
"default": "file",
|
|
"required": false,
|
|
"description": [
|
|
"If C(directory), all immediate subdirectories will be created if they do not exist. If C(file), the file will NOT be created if it does not exist, see the M(copy) or M(template) module if you want that behavior. If C(link), the symbolic link will be created or changed. If C(absent), directories will be recursively deleted, and files or symlinks will be unlinked."
|
|
],
|
|
"choices": [
|
|
"file",
|
|
"link",
|
|
"directory",
|
|
"absent"
|
|
]
|
|
},
|
|
"serole": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"role part of SELinux file context, C(_default) feature works as for I(seuser)."
|
|
],
|
|
"choices": []
|
|
},
|
|
"mode": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"mode the file or directory should be, such as 0644 as would be fed to"
|
|
],
|
|
"choices": []
|
|
},
|
|
"context": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"accepts only C(default) as value. This will restore a file's SELinux context in the policy. Does nothing if no default value is available."
|
|
],
|
|
"choices": [
|
|
"default"
|
|
]
|
|
},
|
|
"owner": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"name of the user that should own the file/directory, as would be fed to I(chown)"
|
|
],
|
|
"choices": []
|
|
},
|
|
"force": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"force is required when changing an existing file to a directory, or a link to a directory, and so on. Use this with caution."
|
|
],
|
|
"choices": []
|
|
},
|
|
"setype": {
|
|
"default": null,
|
|
"required": false,
|
|
"description": [
|
|
"type part of SELinux file context, C(_default) feature works as for I(seuser)."
|
|
],
|
|
"choices": []
|
|
}
|
|
},
|
|
"ansible_version": "0.8"
|
|
} |