Added README and LICENSE.
This commit is contained in:
parent
56d637f984
commit
8f4d744171
23
LICENSE
Normal file
23
LICENSE
Normal file
|
@ -0,0 +1,23 @@
|
|||
Copyright (c) 2014, Peter Sagerson
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
61
README.md
Normal file
61
README.md
Normal file
|
@ -0,0 +1,61 @@
|
|||
# Ansible LDAP Modules
|
||||
|
||||
For whatever reasons, Ansible doesn't include modules to manipulate an
|
||||
LDAP server in its [core](http://docs.ansible.com/ansible/modules_by_category.html).
|
||||
|
||||
Peter Sagerson implemented a pair of modules and has
|
||||
[attempted to get them into Ansible](http://grokbase.com/t/gg/ansible-devel/148892tek3/ldap-modules),
|
||||
but no luck yet. He's instead hosted his code on
|
||||
[Bitbucket](https://bitbucket.org/psagers/ansible-ldap).
|
||||
|
||||
This repository is a fork of his original work (with some cosmetic
|
||||
improvements) hosted on GitHub.
|
||||
|
||||
# Installation
|
||||
|
||||
You'll need to clone this repository somewhere into your Ansible (use
|
||||
a git submodule).
|
||||
|
||||
```
|
||||
$ git clone https://github.com/unchained-capital/ansible-ldap-modules
|
||||
```
|
||||
|
||||
The `python-ldap` library is required on the Ansible controller node
|
||||
for these modules to load. Install it with
|
||||
|
||||
```
|
||||
$ cd ansible-ldap-modules
|
||||
$ sudo pip -r requirements.txt
|
||||
```
|
||||
|
||||
You may need to install some system dependencies first:
|
||||
|
||||
```
|
||||
$ sudo apt-get install python-dev libsasl2-dev libldap2-dev libssl-dev
|
||||
```
|
||||
|
||||
Once you have `python-ldap` installed, you'll need to link the
|
||||
executable files in this repository into Ansible's library path. The
|
||||
simplest way to do this is to create a `library` folder at the
|
||||
top-level of your Ansible repository and create symlinks within it to
|
||||
the module files in this repository:
|
||||
|
||||
```
|
||||
$ mkdir -p library
|
||||
$ ln -s ansible-ldap-modules/ldap_entry library/ldap_entry
|
||||
$ ln -s ansible-ldap-modules/ldap_attr library/ldap_attr
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
(copied from psager's [original README](https://bitbucket.org/psagers/ansible-ldap/src/ca4c0025358cdeba33e9ef0369af3430bf4812ad/README.md))
|
||||
|
||||
This project contains a pair of Ansible modules for manipulating an
|
||||
LDAP directory. `ldap_entry` can be used to ensure that an entire
|
||||
entry exists and `ldap_attr` can be used to ensure the values of an
|
||||
entry's attributes.
|
||||
|
||||
Regrettably, Ansible does not have any sensible mechanism for
|
||||
packaging and distributing third-party modules with rendered
|
||||
documentation and runnable unit tests. The LDAP modules do have
|
||||
complete documentation strings embedded.
|
Loading…
Reference in a new issue