Forge Home

account

A module to manage most typical aspects of UNIX user accounts

134,487 downloads

12,131 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.0.0 (latest)
  • 0.1.0
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Jan 15th 2018
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

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'torrancew-account', '1.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add torrancew-account
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install torrancew-account --version 1.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: user, group, account

Documentation

torrancew/account — version 1.0.0 Jan 15th 2018

Puppet Account Module

master branch status

Table of Contents

  1. Module Description - What the module does and why it is useful
  2. Setup - The basics of getting started with account
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. 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.