diff --git a/.gitignore b/.gitignore index b5de949..f8a4da4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ __pycache__ build pages -inventory/* diff --git a/docs/projects/ansible/collection/centurion/index.md b/docs/projects/ansible/collection/centurion/index.md index eeccab3..bd814b5 100644 --- a/docs/projects/ansible/collection/centurion/index.md +++ b/docs/projects/ansible/collection/centurion/index.md @@ -27,3 +27,94 @@ This Ansible Collection is intended to compliement [Centurion ERP](../../../cent ## Features - [Inventory plugin](./plugins/inventory.md) + + +## Ansible Automation Platform / AWX + +This collection can be directly added to AAP/AWX. To do so conduct the following: + +1. Add the collection as a Project + + `Projects -> Add` + + - name: _Collection/No Fuss Computing/Centurion_ + + - Source Control Type: _Git_ + + - Source Control URL: _https://gitlab.com/nofusscomputing/projects/ansible/collections/centurion_erp_collection.git_ + + - Source Control Branch/Tag/Commit: _set to a branch, tag or commit_ + + - `Save` + +1. Add a Credential type for the invneotries use + + `Credential Types -> Add` + + - name: _Collection/No Fuss Computing/Centurion_ + + - Input configuration: + + ``` yaml + + fields: + - id: CENTURION_API + type: string + label: Centurion Host URL + - id: CENTURION_TOKEN + type: string + label: Centurion API Token + secret: true + - id: VALIDATE_CENTURION_CERTS + type: boolean + label: Validate Centurion SSL Certificate + required: + - CENTURION_API + - CENTURION_TOKEN + + ``` + + - Injector configuration: + + ``` yaml + + env: + CENTURION_API: '{{ CENTURION_API }}' + CENTURION_TOKEN: '{{ CENTURION_TOKEN }}' + VALIDATE_CENTURION_CERTS: '{{ VALIDATE_CENTURION_CERTS | default(true) }}' + + ``` + +1. Create a Credential + + `Credentials -> Add` + + - name: _Centurion_ + + - Credential Type: _Collection/No Fuss Computing/Centurion_ + +1. Add an inventory + + `Inventoryies -> Add` and complete the fields + + - name: _Centurion_ + + - `Save` + +1. Add a source to the inventory + + `Inventoryies -> -> Sources -> Add` + + - name: _Centurion ERP_ + + - Source: _Sourced from Project_ + + - Credential: _Centurion_ + + - Project: _Collection/No Fuss Computing/Centurion_ + + - Inventory File: _inventory/inventory.yaml_ + + - `Save` + +1. a diff --git a/inventory/inventory.yaml b/inventory/inventory.yaml new file mode 100644 index 0000000..55c5c4f --- /dev/null +++ b/inventory/inventory.yaml @@ -0,0 +1,4 @@ +--- + +plugin: nofusscomputing.centurion.centurion + diff --git a/plugins/inventory/centurion.py b/plugins/inventory/centurion.py index 4bd1433..5e6f191 100644 --- a/plugins/inventory/centurion.py +++ b/plugins/inventory/centurion.py @@ -62,6 +62,7 @@ fields: label: Centurion API Token secret: true - id: VALIDATE_CENTURION_CERTS + label: Validate Centurion SSL Certificate type: boolean required: - CENTURION_API