aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-01-06 00:32:41 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-01-06 19:36:19 +0300
commit177c2d77cf13b31aaf9ac2e09bece105c379537e (patch)
tree06a17d63fc83a104e0b603533e38e20a14ffb33f /README.md
downloadldapply-177c2d77cf13b31aaf9ac2e09bece105c379537e.tar.gz
Initial version 0.1.00.1.0
Diffstat (limited to 'README.md')
-rw-r--r--README.md77
1 files changed, 77 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..a31f94d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,77 @@
+ldapply
+=======
+
+[LDIF](https://www.ietf.org/rfc/rfc2849.txt) idempotent apply tool.
+This tool is similar to `ldapmodify` with one exception: it's idempotent.
+It was written to help declarative deployments with [NixOS](http://nixos.org/).
+
+
+How it works
+============
+
+1. If change type is not specified, it adds or replaces an entry.
+2. If change type is specified, it acts like normal `ldapmodify`.
+
+
+Requirements
+============
+
+`ldapply` is written in Haskell with [GHC](http://www.haskell.org/ghc/).
+All required Haskell libraries are listed in [ldapply.cabal](ldapply.cabal).
+Use [cabal-install](http://www.haskell.org/haskellwiki/Cabal-Install) to fetch
+and build all pre-requisites automatically.
+
+
+Usage
+=====
+
+Type `ldapply --help` to see usage summary:
+
+ Usage:
+ ldapply [options] LDIF...
+
+ Options:
+ -H <ldapuri> LDAP URL to connect to [default: ldapi:///]
+
+ -h, --help Show this message
+
+
+LDIF example
+============
+
+```LDIF
+dn: dc=nodomain
+objectClass: top
+objectClass: dcObject
+objectClass: organization
+dc: nodomain
+o: Example, Inc.
+
+dn: cn=reader,dc=nodomain
+objectclass: top
+objectclass: organizationalRole
+objectclass: simpleSecurityObject
+cn: reader
+description: Initial description
+userPassword: qwerty123lol
+
+# description will be removed, userPassword changed:
+dn: cn=reader,dc=nodomain
+objectclass: top
+objectclass: simpleSecurityObject
+objectclass: organizationalRole
+cn: reader
+userPassword: foobar12345
+
+# userPassword will be changed:
+dn: cn=reader,dc=nodomain
+changetype: modify
+replace: userPassword
+userPassword: anothersecretstuff
+
+dn: cn=reader,dc=nodomain
+changetype: modify
+replace: description
+description: foo
+```
+