<commit_before>Description [![Build Status](https://travis-ci.org/hipsnip-cookbooks/admin-user.png)](https://travis-ci.org/hipsnip-cookbooks/admin-user)
===========
This cookbook is used to set up a single shared admin user on a host, and then set
up a list of SSH keys to log in to it.

> NOTE This cookbook does not use search, it simply looks at the contents of a specific data bag


Compatibility
=============
Tested on:

* Ubuntu 10.04
* Ubuntu 12.04
* CentOS 6.3
* CentOS 5.8

with Chef versions `10.18` and `11.04`.
Assumed to work with other Debian and RedHat based distros as well.


Attributes
==========

    ['admin-user']['user'] = The admin user to create (defaults to "admin")
    ['admin-user']['group'] = The primary group for the admin user (defaults to "admin")
    ['admin-user']['data_bag'] = The data bag to load the SSH keys from (defaults to "users")
    ['admin-user']['authorized_keys'] = List of key names that will be enabled on the host (defaults to all)


Usage
=====
With the default settings, this cookbook assumes that you have a data bag called "users",
with a data bag item called "admin" - the name of the data bag item we look for is the
same at the user defined in `['admin-user']['user']`. The data bag item should look
something like this:

    {
        "id" : "admin",
        "authorized_keys" : {
            "jack" : "ssh key for jack goes here",
            "jill" : "ssh key for jill goes here"
        }
    }

By default, the keys listed under "authorized_keys" will all be added for the "admin" user.

### Restricting keys
If you only want to allow a subset of users to have access, you can change `['admin-user']['authorized_keys']` to
an array with a list of key names. For the example above, you could set it to `["jack"]` to only copy the SSH
key for "jack", and not "jill".


Development
============
Please refer to our wiki page [here](https://github.com/hipsnip/cookbook-development/wiki/Developing-and-Testing)


License and Author<commit_msg>Update development Readme link<commit_after>Description [![Build Status](https://travis-ci.org/hipsnip-cookbooks/admin-user.png)](https://travis-ci.org/hipsnip-cookbooks/admin-user)
===========
This cookbook is used to set up a single shared admin user on a host, and then set
up a list of SSH keys to log in to it.

> NOTE This cookbook does not use search, it simply looks at the contents of a specific data bag


Compatibility
=============
Tested on:

* Ubuntu 10.04
* Ubuntu 12.04
* CentOS 6.3
* CentOS 5.8

with Chef versions `10.18` and `11.04`.
Assumed to work with other Debian and RedHat based distros as well.


Attributes
==========

    ['admin-user']['user'] = The admin user to create (defaults to "admin")
    ['admin-user']['group'] = The primary group for the admin user (defaults to "admin")
    ['admin-user']['data_bag'] = The data bag to load the SSH keys from (defaults to "users")
    ['admin-user']['authorized_keys'] = List of key names that will be enabled on the host (defaults to all)


Usage
=====
With the default settings, this cookbook assumes that you have a data bag called "users",
with a data bag item called "admin" - the name of the data bag item we look for is the
same at the user defined in `['admin-user']['user']`. The data bag item should look
something like this:

    {
        "id" : "admin",
        "authorized_keys" : {
            "jack" : "ssh key for jack goes here",
            "jill" : "ssh key for jill goes here"
        }
    }

By default, the keys listed under "authorized_keys" will all be added for the "admin" user.

### Restricting keys
If you only want to allow a subset of users to have access, you can change `['admin-user']['authorized_keys']` to
an array with a list of key names. For the example above, you could set it to `["jack"]` to only copy the SSH
key for "jack", and not "jill".


Development
============
Please refer to the Readme [here](https://github.com/hipsnip-cookbooks/cookbook-development/blob/master/README.md)


License and Author
{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.009940357852882704, 'mean_word_length': 3.658564814814815, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '694251', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1151, 'n_words': 543}