Coder Social home page Coder Social logo

ansible-ad-inventory's Introduction

ansible-ad-inventory

Active Directory dynamic inventory plugins for Ansible

Installation

To install locally,

mkdir -p ~/.ansible/plugins/inventory
cd ~/.ansible/plugins/inventory
git clone https://github.com/mdhowle/ansible-ad-inventory ad

See Ansible Documentation on installing plugins.

Requirement is ldap3

Optionally,

  • gssapi for Kerberos authentication
  • dnspython for LDAP server auto-detection

Usage

See ansible-doc -t inventory ad for more details.

Create a file named ad.yml with the contents:

plugin: ad
server: dc.example.com
port: 636
base: DC=example,DC=com
username: EXAMPLE\ExampleUser  # or distinguishedname
password: hunter2
filter: "(operatingSystem=Debian GNU/Linux)"
ansible group: Debian

Run ansible-playbook -i ad.yml playbook.yml

Configuration

Attribute Type Required Choices/Default Description
plugin str Yes choices: ['ad']; default: ad Marks this as an instance of the 'ad' plugin
server str Yes, unless dnspython is installed. null Active Directory server name
port int No 389 LDAP Server Port; using port 636 enables SSL
base str No null Starting port of the search. If null, the default naming context will be used.
filter str No '' LDAP query filter. objectClass=computer is automatically appended.
scope str No choices: ['base', 'level', subtree']; default: subtree Scope of the search
username str No null Username to bind as. It can the distinguished name of the user, or "SHORTDOMAIN\user". If null, Kerberos + GSSAPI authentication will be used.
password str No null Username's password. Must be defined if username is also defined.
ansible group str No N/A Ansible group name to assign hosts to
var attribute str No null LDAP attribute to load as YAML for host-specific Ansible variables.

ansible-ad-inventory's People

Contributors

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