Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow mode for homedir to be undef #126

Merged
merged 3 commits into from Feb 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.markdown
Expand Up @@ -173,7 +173,7 @@ Default:

#### `home_mode`

Manages the user's home directory permission mode. Valid values are in [octal notation](https://docs.puppetlabs.com/references/latest/type.html#file-attribute-mode), specified as a string. Defaults to `0700`, which gives the owner full read, write, and execute permissions, while group and other have no permissions.
Manages the user's home directory permission mode. Valid values are in [octal notation](https://docs.puppetlabs.com/references/latest/type.html#file-attribute-mode), specified as a string. Defaults to `undef`, which will create a home directory with `0700` permissions but will not touch them if the directory already exists. Keeping it `undef` also allows a user to manage their own permissions, if `home_mode` is set, puppet will enfore the permissions on every run.

#### `locked`

Expand Down
2 changes: 1 addition & 1 deletion manifests/home_dir.pp
Expand Up @@ -15,7 +15,7 @@
$bash_profile_source = undef,
$forward_content = undef,
$forward_source = undef,
$mode = '0700',
$mode = undef,
$ensure = 'present',
$sshkeys = [],
) {
Expand Down
2 changes: 2 additions & 0 deletions spec/acceptance/user_spec.rb
Expand Up @@ -14,6 +14,7 @@
password => 'hi',
shell => '/bin/true',
home => '/test/hunner',
home_mode => '0700',
bashrc_content => file('accounts/shell/bashrc'),
bash_profile_content => file('accounts/shell/bash_profile'),
sshkeys => [
Expand Down Expand Up @@ -47,6 +48,7 @@
group => 'staff',
password => '!!',
home => '/test/cuser',
home_mode => '0700',
}
PUPPETCODE

Expand Down