resources: file: Implement file attributes
Add owner which must be username or uid of the file owner, group which is the group name or gid of the file, and mode which is the octal unix file permissions. Add separate implementation for Go 1.6 and lower.
This commit is contained in:
committed by
James Shubin
parent
b9976cf693
commit
8c2c552164
@@ -247,6 +247,15 @@ The exec resource can execute commands on your system.
|
||||
The file resource manages files and directories. In `mgmt`, directories are
|
||||
identified by a trailing slash in their path name. File have no such slash.
|
||||
|
||||
It has the following properties:
|
||||
|
||||
- `path`: file path (directories have a trailing slash here)
|
||||
- `content`: raw file content
|
||||
- `state`: either `exists` (the default value) or `absent`
|
||||
- `mode`: octal unix file permissions
|
||||
- `owner`: username or uid for the file owner
|
||||
- `group`: group name or gid for the file group
|
||||
|
||||
#### Path
|
||||
|
||||
The path property specifies the file or directory that we are managing.
|
||||
|
||||
Reference in New Issue
Block a user