GithubHelp home page GithubHelp logo

wolfspyre / puppet-users Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mthibaut/puppet-users

0.0 1.0 0.0 85 KB

The users module allows puppet management of user accounts through hiera or a hash of directly specified users.

Home Page: http://forge.puppetlabs.com/mthibaut/users

puppet-users's Introduction

users

Build Status

Overview

The users module allows management of user accounts through hiera or a hash of directly specified users.

Module Description

Normally each user needs to be specified inside a puppet manifest. This module allows you to specify the users outside of puppet, so that the user setup can become variable.

Setup

Configure your users in hiera

    common.yaml:

    ---
    users_sysadmins:
        john:
            ensure: present
            uid: 1000
            gid: staff
            groups: - wheel
            comment: John Doe
            managehome: true
            ssh_authorized_keys:
                    mykey:
                           	type: 'ssh-rsa'
                           	key:  'mykeydata=='

All parameters to the standard types 'user' and 'ssh_authorized_key' can be used.

Include users in your manifest

    site.pp:

    node /default/ {
        users { sysadmins: }
    }

Usage

The name given to the users type will be used to lookup 'users_$name' inside hiera. Alternatively you can specify the hash directly without hiera, see below.

The defined type users can be called with two arguments:

###match

Defaults to 'all'. Can be 'all', 'any' (sysonym for 'all'), or 'first'.

If 'first' is used, then only the first match in your hiera hierarchy will be used. If you specify 'all' then all matching hashes will be be used. This corresponds directly to the respective 'hiera' and 'hiera_hash' function calls.

###hash

Defaults to undef. Uses the given hash rather than the result of the hiera lookup.

Troubleshooting

Before blaming me, check if your hiera configuration is working correctly. For instance, you can use this to check if puppet is seeing your hiera data correctly:

    node /mynode/ {
            $mytest = hiera("users_sysadmins", "not found")
            notify { "$mytest": }
    }

Dependencies

  • In puppet 3.0.0, hiera became a standard function call so it is included by default in your puppet installation. Before 3.0.0, you must install the hiera-puppet module.

  • stdlib

puppet-users's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.