feat(inventory): add inventory file for centurion

requires env vars to be set

!5
This commit is contained in:
2024-07-31 16:22:02 +09:30
parent 5ab2f1c2df
commit b40f77c5fc
4 changed files with 96 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,4 +1,3 @@
__pycache__
build
pages
inventory/*

View File

@ -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 -> <Centurion Inventory> -> 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

4
inventory/inventory.yaml Normal file
View File

@ -0,0 +1,4 @@
---
plugin: nofusscomputing.centurion.centurion

View File

@ -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