summaryrefslogtreecommitdiff
path: root/docs/Outputs.md
diff options
context:
space:
mode:
authorWild Kat <wk@futureinquestion.net>2018-03-12 00:19:20 +0100
committerWild Kat <wk@futureinquestion.net>2018-03-12 09:03:07 +0100
commit87600b1f5f12711afe29c408e02dbbd927e3f25d (patch)
tree454ef170f1e1be1761587ea26a4ba1d21bc0dfcb /docs/Outputs.md
parent34cdbeb75f3c74d803fb60c509fc06e4f6365f0c (diff)
Lint and standardize markdown documentation
Diffstat (limited to 'docs/Outputs.md')
-rw-r--r--docs/Outputs.md42
1 files changed, 20 insertions, 22 deletions
diff --git a/docs/Outputs.md b/docs/Outputs.md
index e3bd42d..92c672c 100644
--- a/docs/Outputs.md
+++ b/docs/Outputs.md
@@ -1,23 +1,22 @@
+# Outputs
-## Output
-
-### Output: File
+## Output: File
Parent directory needs to be created manually, one file per device, with most recent running config.
-```
+```yaml
output:
file:
directory: /var/lib/oxidized/configs
```
-### Output: Git
+## Output: Git
This uses the rugged/libgit2 interface. So you should remember that normal Git hooks will not be executed.
For a single repositories for all devices:
-``` yaml
+```yaml
output:
default: git
git:
@@ -28,7 +27,7 @@ output:
And for groups repositories:
-``` yaml
+```yaml
output:
default: git
git:
@@ -40,14 +39,14 @@ output:
Oxidized will create a repository for each group in the same directory as the `default.git`. For
example:
-``` csv
+```csv
host1:ios:first
host2:nxos:second
```
This will generate the following repositories:
-``` bash
+```bash
$ ls /var/lib/oxidized/git-repos
default.git first.git second.git
@@ -55,7 +54,7 @@ default.git first.git second.git
If you would like to use groups and a single repository, you can force this with the `single_repo` config.
-``` yaml
+```yaml
output:
default: git
git:
@@ -64,15 +63,14 @@ output:
```
-### Output: Git-Crypt
+## Output: Git-Crypt
This uses the gem git and system git-crypt interfaces. Have a look at [GIT-Crypt](https://www.agwa.name/projects/git-crypt/) documentation to know how to install it.
Additionally to user and email informations, you have to provide the users ID that can be a key ID, a full fingerprint, an email address, or anything else that uniquely identifies a public key to GPG (see "HOW TO SPECIFY A USER ID" in the gpg man page).
-
For a single repositories for all devices:
-``` yaml
+```yaml
output:
default: gitcrypt
gitcrypt:
@@ -86,7 +84,7 @@ output:
And for groups repositories:
-``` yaml
+```yaml
output:
default: gitcrypt
gitcrypt:
@@ -101,14 +99,14 @@ output:
Oxidized will create a repository for each group in the same directory as the `default`. For
example:
-``` csv
+```csv
host1:ios:first
host2:nxos:second
```
This will generate the following repositories:
-``` bash
+```bash
$ ls /var/lib/oxidized/git-repos
default.git first.git second.git
@@ -116,7 +114,7 @@ default.git first.git second.git
If you would like to use groups and a single repository, you can force this with the `single_repo` config.
-``` yaml
+```yaml
output:
default: gitcrypt
gitcrypt:
@@ -130,11 +128,11 @@ output:
Please note that user list is only updated once at creation.
-### Output: Http
+## Output: Http
POST a config to the specified URL
-```
+```yaml
output:
default: http
http:
@@ -143,13 +141,13 @@ output:
url: "http://192.168.162.50:8080/db/coll"
```
-### Output types
+## Output types
If you prefer to have different outputs in different files and/or directories, you can easily do this by modifying the corresponding model. To change the behaviour for IOS, you would edit `lib/oxidized/model/ios.rb` (run `gem contents oxidized` to find out the full file path).
For example, let's say you want to split out `show version` and `show inventory` into separate files in a directory called `nodiff` which your tools will not send automated diffstats for. You can apply a patch along the lines of
-```
+```text
- cmd 'show version' do |cfg|
- comment cfg.lines.first
+ cmd 'show version' do |state|
@@ -183,7 +181,7 @@ For example, let's say you want to split out `show version` and `show inventory`
which will result in the following layout
-```
+```text
diff/$FQDN--show_running_config
nodiff/$FQDN--show_version
nodiff/$FQDN--show_inventory