forked from pdrakeweb/puppet-acl
-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f6bfa01
commit 07cb4d1
Showing
2 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
# Reference | ||
|
||
<!-- DO NOT EDIT: This document was generated by Puppet Strings --> | ||
|
||
## Table of Contents | ||
|
||
### Classes | ||
|
||
* [`posix_acl::requirements`](#posix_acl--requirements): install the acl package | ||
|
||
### Resource types | ||
|
||
* [`posix_acl`](#posix_acl): Ensures that a set of ACL permissions are applied to a given file or directory. Example: posix_acl { '/var/www/html': action | ||
|
||
## Classes | ||
|
||
### <a name="posix_acl--requirements"></a>`posix_acl::requirements` | ||
|
||
install the acl package | ||
|
||
## Resource types | ||
|
||
### <a name="posix_acl"></a>`posix_acl` | ||
|
||
Ensures that a set of ACL permissions are applied to a given file | ||
or directory. | ||
|
||
Example: | ||
|
||
posix_acl { '/var/www/html': | ||
action => exact, | ||
permission => [ | ||
'user::rwx', | ||
'group::r-x', | ||
'mask::rwx', | ||
'other::r--', | ||
'default:user::rwx', | ||
'default:user:www-data:r-x', | ||
'default:group::r-x', | ||
'default:mask::rwx', | ||
'default:other::r--', | ||
], | ||
provider => posixacl, | ||
recursive => true, | ||
} | ||
|
||
In this example, Puppet will ensure that the user and group | ||
permissions are set recursively on /var/www/html as well as add | ||
default permissions that will apply to new directories and files | ||
created under /var/www/html | ||
|
||
Setting an ACL can change a file's mode bits, so if the file is | ||
managed by a File resource, that resource needs to set the mode | ||
bits according to what the calculated mode bits will be, for | ||
example, the File resource for the ACL above should be: | ||
|
||
file { '/var/www/html': | ||
mode => 754, | ||
} | ||
|
||
#### Properties | ||
|
||
The following properties are available in the `posix_acl` type. | ||
|
||
##### `permission` | ||
|
||
ACL permission(s). | ||
|
||
#### Parameters | ||
|
||
The following parameters are available in the `posix_acl` type. | ||
|
||
* [`action`](#-posix_acl--action) | ||
* [`ignore_missing`](#-posix_acl--ignore_missing) | ||
* [`path`](#-posix_acl--path) | ||
* [`provider`](#-posix_acl--provider) | ||
* [`recursemode`](#-posix_acl--recursemode) | ||
* [`recursive`](#-posix_acl--recursive) | ||
|
||
##### <a name="-posix_acl--action"></a>`action` | ||
|
||
Valid values: `set`, `unset`, `exact`, `purge` | ||
|
||
What do we do with this list of ACLs? Options are set, unset, exact, and purge | ||
|
||
Default value: `set` | ||
|
||
##### <a name="-posix_acl--ignore_missing"></a>`ignore_missing` | ||
|
||
Valid values: `false`, `quiet`, `notify` | ||
|
||
What to do if files are missing: | ||
false: fail run, | ||
quiet: quietly do nothing, | ||
notify: do not try to to set ACL, but add notice to run | ||
|
||
Default value: `false` | ||
|
||
##### <a name="-posix_acl--path"></a>`path` | ||
|
||
namevar | ||
|
||
The file or directory to which the ACL applies. | ||
|
||
##### <a name="-posix_acl--provider"></a>`provider` | ||
|
||
The specific backend to use for this `posix_acl` resource. You will seldom need to specify this --- Puppet will usually | ||
discover the appropriate provider for your platform. | ||
|
||
##### <a name="-posix_acl--recursemode"></a>`recursemode` | ||
|
||
Valid values: `lazy`, `deep` | ||
|
||
Should Puppet apply the ACL recursively with the -R option or | ||
apply it to individual files? | ||
|
||
lazy means -R option | ||
deep means apply to every file | ||
|
||
Default value: `lazy` | ||
|
||
##### <a name="-posix_acl--recursive"></a>`recursive` | ||
|
||
Valid values: `true`, `false` | ||
|
||
Apply ACLs recursively. | ||
|
||
Default value: `false` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# | ||
# @summary install the acl package | ||
# | ||
class posix_acl::requirements { | ||
package { 'acl': | ||
ensure => 'present', | ||
|