account
Version information
This version is compatible with:
- Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 4.0.0 < 6.0.0
- Archlinux , , ,
Start using this module
Add this module to your Puppetfile:
mod 'torrancew-account', '1.0.0'
Learn more about managing modules with a PuppetfileDocumentation
Puppet Account Module
Table of Contents
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with account
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Module Description
The account module eases the creation of UNIX user accounts.
Features:
- Creation/Removal of accounts (via the
ensure
parameter) - Account creation w/UID control
- Setting the login shell
- Dedicated Group creation w/GID control (optional)
- Home directory creation (and optionally management via
/etc/skel
) - Support for system users
- SSH key management (optional)
Setup
This module has no specific dependencies, as it merely wraps several common native Puppet types in some logic.
Usage
Standard usage of this module would probably look something like this:
account { 'sysadmin':
home_dir => '/opt/sysadmin',
groups => [ 'sudo', 'users' ],
comment => 'SysAdmin user',
ssh_keys => {
'some_key_comment' => {
type => 'ssh-rsa',
key => 'AAAAB3NzaC1yc2EAAAABIwAAAQEArfQmMkvtWRnwas3DIti9qAuSFQXKcE0kdp5f42PP8l2kTytJPPWp5T/q8PXDQ2d2X5KplMCMDiUQkchqhmDp840jsqBQ9iZPejAjv3w2kITgScFNymAcErtzX52iw4lnUyjZzomCW8G3YthQMaRm2NkI4wcVcjzq+SKyTfzrBoH21RgZlfcx+/50AFRrarpYqel9W5DuLmmShHxD8clPS532Z/1X+1jCW2KikUhdo98lxYTIgFno05lwFOS9Ry89UyBarn1Ecp1zXpIBE7dMQif3UyLUTU9zCVIoZiJj4iO5lemSSV0v8GL97qclBUVJpaCpc4ebR7bhi0nQ28RcxQ==',
},
},
}
The type can also be virtualized and realized later (see the official documentation for more information on this pattern):
@account { 'sysadmin': groups => [ 'sudo', 'users' ] }
There is no implicit Hiera support in this module. For defining accounts via
Hiera data, it is recommended to use the profile
portion of the
role/profile
pattern.
Reference
For the detailed reference, see the inline docs:
$ bundle exec rake doc
Limitations
- Does not automatically create arbitrary extra groups. Use the native group type for this.
Development
Please use the github issues functionality to report any bugs or requests for new features. Feel free to fork and submit pull requests for potential contributions.
v1.0.0: 2018-01-15 Changes:
- Drop support for Puppet 3.x and lower
- Rewrite to support Puppet 4 Type System
- Add support for multiple SSH keys
- Add acceptance testing via Beaker
v0.1.0: 2016-05-01 Changes:
- Add 'purge' option to forcibly remove user directories - Igor Ajdišek (@igoraj)
- Support for the 'allowdupe' feature of the 'user' type - Aurelien Requiem (@aureq)
- Solaris compatibility - Sauce (@sauce)
- Root user support - Sauce (@sauce)
- Configurable homedir permissions - Justin Lambert (@jlambert121)
- Puppet lint used in testing - Justin Lambert (@jlambert121)
v0.0.5: 2013-07-23 Changes:
- Use 'username' to construct homedir, instead of 'title' - Yuvi Panda (@yuvipanda)
v0.0.4: 2013-07-04 Changes:
- Add a 'gid' parameter for use when create_group => false
- Updates test fixtures
v0.0.3: 2013-05-11 Changes:
- Adds a 'comment' parameter for the created user account - Facundo Guerrero (@guerremdq)
v0.0.2: 2013-03-02 Changes:
- Version bump to fix potential inconsistencies with older dev releases
v0.0.1: 2013-03-02 Changes:
- Initial PuppetForge release
Copyright 2012-2013 Tray Torrance Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.