diff --git a/docs/projects/nfc_glpi/config_from_code.md b/docs/projects/nfc_glpi/config_from_code.md index 9092675..7bb0803 100644 --- a/docs/projects/nfc_glpi/config_from_code.md +++ b/docs/projects/nfc_glpi/config_from_code.md @@ -16,17 +16,21 @@ Each tab provides an example of the JSON file layout, including any additional v === "AuthLDAP" - ``` json title="example.json" linenums="1 + ``` json title="example.json" linenums="1" + { "api_path": "AuthLDAP", "body": { // JSON from API Query } } + ``` + === "Entity" - ``` json title="example.json" linenums="1 + ``` json title="example.json" linenums="1" + { "api_path": "Entity", "entities_id": "", @@ -34,11 +38,13 @@ Each tab provides an example of the JSON file layout, including any additional v // JSON from API Query } } + ``` === "ITILCategory" - ``` json title="example.json" linenums="1 + ``` json title="example.json" linenums="1" + { "api_path": "ITILCategory", "users_id": "", @@ -49,24 +55,29 @@ Each tab provides an example of the JSON file layout, including any additional v // JSON from API Query } } + ``` === "Profile" - ``` json title="example.json" linenums="1 + ``` json title="example.json" linenums="1" + { "api_path": "Profile", "body": { // JSON from API Query } } + ``` + With the config files structured as per the examples, within your playbook(s), load the json files in a list of json objects using variable `glpi_config_as_code_json` example -``` yaml title="my_vars.yaml" linenums="1 +``` yaml title="my_vars.yaml" linenums="1" + glpi_config_as_code_json: - "{{ lookup('file', '/workdir/files/glpi/ITILCategory-new-ldap-user.json') | from_json }}" - "{{ lookup('file', '/workdir/files/glpi/LDAPAuth-local_ldap.json') | from_json }}" diff --git a/docs/projects/nfc_glpi/index.md b/docs/projects/nfc_glpi/index.md index 53f0682..fed6c82 100644 --- a/docs/projects/nfc_glpi/index.md +++ b/docs/projects/nfc_glpi/index.md @@ -15,11 +15,10 @@ This Ansible role is designed to manage GLPI specifically installation and confi - [Configure using Config from Code](config_from_code.md) + ## Default Variables -Here's an example playbook that demonstrates how to use the `docker_management` role: - -```yaml title="defaults/main.yaml" linenums="1 +``` yaml title="defaults/main.yaml" linenums="1" --8<-- "defaults/main.yaml" diff --git a/mkdocs.yml b/mkdocs.yml index 7bfdd1c..984fab6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -2,7 +2,7 @@ INHERIT: website-template/mkdocs.yml docs_dir: 'docs' -repo_name: Docker Management +repo_name: nfc_glpi repo_url: https://gitlab.com/nofusscomputing/projects/ansible/nfc_glpi edit_uri: '/-/ide/project/nofusscomputing/projects/ansible/nfc_glpi/edit/development/-/docs/'