Skip to content

Commit

Permalink
Merge branch 'inventory' into 'development'
Browse files Browse the repository at this point in the history
feat: Inventory

See merge request nofusscomputing/projects/ansible/collections/centurion_erp_collection!5
  • Loading branch information
jon-nfc committed Jul 31, 2024
2 parents 5ab2f1c + b40f77c commit 35c3ba1
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
__pycache__
build
pages
inventory/*
91 changes: 91 additions & 0 deletions docs/projects/ansible/collection/centurion/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 4 additions & 0 deletions inventory/inventory.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

plugin: nofusscomputing.centurion.centurion

1 change: 1 addition & 0 deletions plugins/inventory/centurion.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
label: Centurion API Token
secret: true
- id: VALIDATE_CENTURION_CERTS
label: Validate Centurion SSL Certificate
type: boolean
required:
- CENTURION_API
Expand Down

0 comments on commit 35c3ba1

Please sign in to comment.