Code Monkey home page Code Monkey logo

ansible-role-ldap's Introduction

ansible-role-ldap

License: MIT Build Status Ansible Ansible Ansible

Configures LDAP authentication for a linux server using pam-ldapd and nscd.

Requirements

  • Ansible
    • Tested Versions:
      • 2.5
      • 2.6
      • 2.7

Install

Install from GitHub

ansible-galaxy install git+https://github.com/joshuacherry/ansible-role-ldap.git

Features

  • Authentication against Active Directory or LDAP
Operating System
Ubuntu 16.04
Ubuntu 18.04
Centos 7

Versioning

For the versions available, see the tags on this repository.

Additionaly you can see what change in each version in the CHANGELOG.md file.

Role variables

Look to the defaults properties file to see the possible configuration properties.

Testing

This role includes a Vagrantfile used with a Docker-based test harness. Using Vagrant allows all contributors to test on the same platform and avoid false test failures due to untested or incompatible docker versions.

  1. Install Vagrant and VirtualBox.
  2. Run vagrant up from the same directory as the Vagrantfile in this repository.
  3. SSH into the VM with: vagrant ssh
  4. Run tests with molecule.

Testing with Docker and tox

Tox will test against the configured dependencies in tox.ini. This allows you to test the role against multiple version of ansible, molecule, python, and more. Once the dependencies are set, tox will run the same molecule command to test code.

Due to how Virtualbox mounts shared folders, it is recommended to copy the role into a local directory within the virtual machine before running tox, otherwise the python environments will perform significantly slower. Run the below commands each time you make a change to the source code and need to test against all scenarios defined in tox.ini

rsync -ua /ansible-role-ldap/ ~/ansible-role-ldap/ --delete
cd ~/ansible-role-ldap
tox

Testing with Docker and molecule

cd /ansible-role-ldap
molecule test

See molecule for more information including a full list of available commands.

interactive debugging

You can use log into a docker image created by molecule for interactive testing with the below commands. As defined in molecule.yml, the default instance is set to ubuntu1604. If you wish to test other operating systems, you must define the environment variables MOLECULE_DISTRO and MOLECULE_DOCKER_COMMAND. A table of supported options are below.

cd /ansible-role-ldap
export MOLECULE_DISTRO=centos7
export MOLECULE_DOCKER_COMMAND=/usr/lib/systemd/systemd
molecule converge
docker exec -it instance /bin/bash
OS MOLECULE_DISTRO MOLECULE_DOCKER_COMMAND
Ubuntu 16.04 ubuntu1604 /lib/systemd/systemd
ubuntu 18.04 ubuntu1804 /lib/systemd/systemd
Centos 7 centos7 /usr/lib/systemd/systemd

Example Playbook

---
- hosts: all
  tasks:
  - include_role:
      name: ldap
    vars:
      ldap_uri: ldap://domain.fqdn
      ldap_base: DC=domain,DC=fqdn

ansible-role-ldap's People

Contributors

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