Make namespace configurable

This commit is contained in:
phil 2023-11-02 08:53:10 +01:00
parent ceb6b3fe36
commit 87b8af3233
6 changed files with 11 additions and 8 deletions

View File

@ -16,8 +16,8 @@ Voraussetzung ist weiterhin eine Inventory-Gruppe namens `storage_boxes`, die al
## Variablen
| Variable Name | Function | Default value | File |
| ------------- | -------- | ------------- | ---- |
| Variable | Beschreibung | Default | File |
| -------- | ------------ | ------- | ---- |
| `cmdb` | Dictionary for dokuwiki server variables _(required)_ | -- | `group_vars/all/cmdb.yml` |
| `cmdb.wiki_server` | dokuwiki server _(required)_ | -- | `group_vars/all/cmdb.yml` |
| `cmdb.wiki_conf_file_path` | Pfad zur `local.php` des Wikis _(required)_, Bspw: `/etc/dokuwiki/farm/mywiki/local.php` | -- | `group_vars/al/cmdb` |
@ -26,6 +26,7 @@ Voraussetzung ist weiterhin eine Inventory-Gruppe namens `storage_boxes`, die al
| `cmdb.wiki_meta_path` | path for metadata on dokuwiki server _(required)_ | -- | `group_vars/all/cmdb.yml` |
| `cmdb.wiki_user` | File system user of wiki files and directories _(required)_ | -- | `group_vars/all/cmdb.yml`|
| `cmdb.wiki_group` | File system group of wiki files and directories _(required)_ | -- | `group_vars/all/cmdb.yml`|
| `cmdb_namespace` | Namespace für alle CMDB-Seiten _(required)_ | `cmdb` | `group_vars/all/cmdb` |
| `cmdb_documentation_path` | Wiki-Pfad zur Dokumentation den Hosts _(required)_ | --| `group_vars/all/cmdb` oder `host_vars/..` |
| `cmdb_customer` | Name der Kundin/ Besitzerin des Hosts | -- | `host_vars/..` |
| `cmdb_customer_service_agreement` | Link zum Servicevertrag im Wiki | -- | `host_vars/..` |

2
defaults/main.yml Normal file
View File

@ -0,0 +1,2 @@
---
cmdb_namespace: cmdb

View File

@ -1,5 +1,5 @@
====== Alle Server ======
{% for host in groups['all'] | sort %}
* [[cmdb:servers:all:{{ host }}]]
* [[{{ cmdb_namespace }}:servers:all:{{ host }}]]
{% endfor %}

View File

@ -1,5 +1,5 @@
====== Hypervisor ======
{% for host in groups['virt_kvm_host'] | sort %}
* [[cmdb:servers:all:{{ host }}]]
* [[{{ cmdb_namespace }}:servers:all:{{ host }}]]
{% endfor %}

View File

@ -1,5 +1,5 @@
===== Server =====
* [[cmdb:servers:all|Alle Server]]
* [[cmdb:servers:hypervisor|Hypervisor]]
* [[cmdb:servers:storage_boxes|Storage Boxes]]
* [[{{ cmdb_namespace }}:servers:all|Alle Server]]
* [[{{ cmdb_namespace }}:servers:hypervisor|Hypervisor]]
* [[{{ cmdb_namespace }}:servers:storage_boxes|Storage Boxes]]

View File

@ -1,5 +1,5 @@
====== Storage Boxes ======
{% for host in groups['storage_boxes'] | sort %}
* [[cmdb:servers:all:{{ host }}]]
* [[{{ cmdb_namespace }}:servers:all:{{ host }}]]
{% endfor %}