Skip to content

dcharleston/puppet-homes

 
 

Repository files navigation

####Table of Contents

  1. Overview
  2. Module Description - What is the homes module?
  3. Setup - The basics of getting started with homes
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

##Overview

The homes module allows you to create local system users and optionally manage their ssh keys

Build Status

##Module Description

This module provides a simplified way of managing local and system users, their home directory and optionally the distribution of their public and private ssh keys.

##Setup

###What homes affects

  • Create users
  • Populates authorized_keys file for the given user.

###Beginning with homes

To create a new local user:

   $myuser = { 
     'testuser' => { 'groups' => ['testgroup1', 'testgroup2'] }
   }
      
   homes { 'testuser':
     user => $myuser
   }

To create a new local user and manage their public ssh_key:

   homes { 'testuser'
    ssh_key => 'AAAAB3NzaC1yc2EAAAADAQABAAAAgQC4U/G9Idqy1VvYEDCKg3noVChCbIrJAi0D/qMFoG=='
   }

##Usage

###Classes and Defined Types

####Defined Type: homes The homes module primary type, homes, guides the basic setup of local users on your system.

Parameters within homes: #####user A hash giving details of the user that will be managed.

#####ssh_key The ssh_key is the one-line contents of the users public key. This will be used to populate the authorized_keys file in the .ssh directory of the users home directory.

####Defined Type: homes::ssh::private The type for managing the distribution of private keys from an existing key store.

Parameters within homes::ssh::private: #####username The name of the user that is being managed by this module.

#####key_name The name of the private key as found in the existing key store.

#####key_store The full path directory to the keystore where all the public keys and other secrets are located.

####Defined Type: homes::ssh::config The type for managing the ssh config options for the user.

Parameters within homes::ssh::private: #####username The name of the user that is being managed by this module.

#####ssh_config_entries A hash giving configuration details that will be set in the ~/.ssh/config file

##Reference

###Defined Types ####Public Types

####Private Types

##Limitations

This module is tested on the following platforms:

  • CentOS 5
  • CentOS 6
  • Ubuntu 12.04.2
  • Ubuntu 13.10

It is tested with the OSS version of Puppet only.

##Development

###Contributing

Please read CONTRIBUTING.md for full details on contributing to this project.

###Running tests

This project contains tests for both rspec-puppet and beaker to verify functionality. For in-depth information please see their respective documentation.

Quickstart:

gem install bundler
bundle install
bundle exec rake spec
BEAKER_DEBUG=yes bundle exec rspec spec/acceptance

About

Puppet module to manage home directory and ssh keys

Resources

License

Stars

Watchers

Forks

Packages

No packages published