-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# IT/Add LDAP User | ||
|
||
This is a runbook that describes how to set up a user in our LDAP | ||
|
||
## 1. Generate LDIF file | ||
|
||
1. [] gather info | ||
|
||
E-Mail-Address of user: into email | ||
|
||
First Name of user: into first_name | ||
|
||
Last Name of user: into last_name | ||
|
||
Last UID/GID in LDAP: into last_gid | ||
|
||
2. [] generate password | ||
|
||
within: /home/felix/projects/self/glueckskeks/ | ||
|
||
capture: `bundle exec exe/glueckskeks` into passphrase | ||
|
||
run: | ||
```ruby | ||
Unable to retrieve source code | ||
``` | ||
|
||
3. [] output ldif file | ||
|
||
run: | ||
```ruby | ||
Unable to retrieve source code | ||
``` | ||
|
||
4. [] save as ldif file | ||
|
||
run: | ||
```ruby | ||
Unable to retrieve source code | ||
``` | ||
|
||
5. [] import ldif file in ldap | ||
|
||
6. [] print or write down password (with phrase) for user | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'runbook' | ||
|
||
books = ["it/add_ldap_user.rb"] | ||
|
||
# Runbooks register themselves to Runbook.books when they are defined | ||
# (Or alternatively `runbook = eval(File.read("my_runbook.rb"))`) | ||
books.each do |book| | ||
filename = File.join("doc", book.sub('.rb', '.md')) | ||
|
||
md = Runbook::Viewer.new(eval(File.read book)).generate(view: :markdown) | ||
|
||
FileUtils.mkdir_p(File.dirname filename) | ||
File.write(filename, md) | ||
end |