GithubHelp home page GithubHelp logo

puppet-accounts's Introduction

Accounts

Puppet Forge Version Puppet Forge Downloads Build Status Gemnasium By Camptocamp

Usage

First, you have to declare your ssh_keys, users and usergroups hashes:

class { 'accounts':
  ssh_keys   => hiera_hash('accounts::ssh_keys', {}),
  users      => hiera_hash('accounts::users', {}),
  usergroups => hiera_hash('accounts::usergroups', {}),
}

Example hiera YAML file:

---
accounts::ssh_keys:
  foo:
    comment: [email protected]
    type: ssh-rsa
    public: FOO-S-RSA-PUBLIC-KEY
  bar:
    comment: [email protected]
    type: ssh-rsa
    public: BAR-S-RSA-PUBLIC-KEY

accounts::users:
  foo:
    uid: 1000
    comment: Foo
  bar:
    uid: 1001
    comment: Bar
  baz:
    # Remove user baz from every node (unless overridden)
    ensure: absent
  qux:
    uid: 1003
    comment: Qux

accounts::usergroups:
  foo:
    - foo
    - bar
  bar:
    - baz
    - qux

Then you can create accounts on your node with the accounts::account defined type.

accounts::account { 'foo': }

Creates a foo user if it exists in $::accounts::users and at allow its public key if it exists in $::accounts::ssh_keys.

accounts::account { 'bar':
  authorized_keys => ['@foo', 'baz'],
}

Creates a bar user if it exists in $::accounts::users and at allow its public key, everyone's in thefoo usergroup's public key and baz's one if it exists in $::accounts::ssh_keys.

accounts::account { '@foo': }

Create a user for every user in foo usergroup and allow its public key.

puppet-accounts's People

Contributors

mcanevet avatar raphink avatar saimonn avatar ckaenzig avatar

Watchers

 avatar 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.