Merge pull request #42 from nofusscomputing/37-api-v2
This commit is contained in:
6
.github/workflows/ci.yaml
vendored
6
.github/workflows/ci.yaml
vendored
@ -4,9 +4,9 @@ name: 'CI'
|
|||||||
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
# pull_request:
|
||||||
types:
|
# types:
|
||||||
- synchronize
|
# - synchronize
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '**'
|
- '**'
|
||||||
|
@ -12,14 +12,13 @@ The inventory playbook includes the [AWX Feature](../../../playbooks/awx.md) to
|
|||||||
|
|
||||||
The following job template will be created:
|
The following job template will be created:
|
||||||
|
|
||||||
* **Centurion/ITAM/Inventory** Inventory host machines and publish to Centurion ERP
|
- **Centurion/ITAM/Inventory** Inventory host machines and publish to Centurion ERP
|
||||||
|
|
||||||
On import to AWX / Ansible Automation Platform a credential type will also be created, 'Collection/No Fuss Computing/Centurion/API' that can be used to supply the required secrets and Centurion host.
|
On import to AWX / Ansible Automation Platform a credential type will also be created, 'Collection/No Fuss Computing/Centurion/API' that can be used to supply the required secrets and Centurion host.
|
||||||
|
|
||||||
|
|
||||||
!!! warning
|
!!! warning
|
||||||
The inventory playbook currently has an issue relating to gathering software starting with L. This issue has been reported and is being worked on
|
The inventory playbook currently has an issue relating to gathering software starting with L. This issue has been reported and is being worked on [github issue 19](https://github.com/nofusscomputing/ansible_collection_centurion/issues/19)
|
||||||
[github issue 19](https://github.com/nofusscomputing/ansible_collection_centurion/issues/19)
|
|
||||||
|
|
||||||
|
|
||||||
## Play workflow
|
## Play workflow
|
||||||
@ -33,4 +32,3 @@ The inventory playbook conducts the follwoing tasks:
|
|||||||
- Uploads the inventory report to Centurion ERP
|
- Uploads the inventory report to Centurion ERP
|
||||||
|
|
||||||
- Cleans any leftover files used to create the reports
|
- Cleans any leftover files used to create the reports
|
||||||
|
|
||||||
|
@ -12,10 +12,10 @@ The teams playbook includes the [AWX Feature](../../../playbooks/awx.md) to impo
|
|||||||
|
|
||||||
The following job template will be created:
|
The following job template will be created:
|
||||||
|
|
||||||
* **Centurion/Access/Teams** Creation and patching of teams and permissions
|
- **Centurion/Access/Teams** Creation and patching of teams and permissions
|
||||||
|
|
||||||
|
|
||||||
!!! info
|
!!! info
|
||||||
The playbook is able to work with the [inventory plugin](../plugins/index.md) that is included in this collection.
|
The playbook is able to work with the [inventory plugin](../plugins/index.md) that is included in this collection.
|
||||||
|
|
||||||
|
|
||||||
@ -56,7 +56,8 @@ centurion_erp:
|
|||||||
|
|
||||||
!!! tip "common teams"
|
!!! tip "common teams"
|
||||||
Common teams can be created by using yaml anchors. This is useful when multiple organisations require a common team and permissions to be set.
|
Common teams can be created by using yaml anchors. This is useful when multiple organisations require a common team and permissions to be set.
|
||||||
|
<!-- markdownlint-disable -->
|
||||||
|
<!-- markdownlint-disable-next-line code-block-style -->
|
||||||
```yaml
|
```yaml
|
||||||
centurion_erp:
|
centurion_erp:
|
||||||
common_teams:
|
common_teams:
|
||||||
@ -72,4 +73,4 @@ centurion_erp:
|
|||||||
notes: *team-name-notes
|
notes: *team-name-notes
|
||||||
|
|
||||||
```
|
```
|
||||||
|
<!-- markdownlint-restore -->
|
||||||
|
@ -105,7 +105,7 @@
|
|||||||
- name: Upload inventory - {{ ansible_hostname }}
|
- name: Upload inventory - {{ ansible_hostname }}
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
url: |-
|
url: |-
|
||||||
{{ lookup('env', 'ITSM_API') }}/api/device/inventory
|
{{ lookup('env', 'ITSM_API') }}/api/v2/itam/inventory
|
||||||
|
|
||||||
method: POST
|
method: POST
|
||||||
body_format: json
|
body_format: json
|
||||||
@ -173,4 +173,3 @@
|
|||||||
CENTURION_API: '{{ centurion_url }}'
|
CENTURION_API: '{{ centurion_url }}'
|
||||||
CENTURION_TOKEN: '{{ centurion_token }}'
|
CENTURION_TOKEN: '{{ centurion_token }}'
|
||||||
CENTURION_VALIDATE_CERTS: '{{ centurion_validate_certs | default(true) }}'
|
CENTURION_VALIDATE_CERTS: '{{ centurion_validate_certs | default(true) }}'
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
- name: Collect organizations from centurion ERP
|
- name: Collect organizations from centurion ERP
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
url: |-
|
url: |-
|
||||||
{{ lookup('env', 'CENTURION_API') }}/api/organization/
|
{{ lookup('env', 'CENTURION_API') }}/api/v2/access/organization/
|
||||||
method: GET
|
method: GET
|
||||||
body_format: json
|
body_format: json
|
||||||
headers:
|
headers:
|
||||||
@ -135,7 +135,7 @@
|
|||||||
- name: Create new teams in centurion_ERP
|
- name: Create new teams in centurion_ERP
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
url: |-
|
url: |-
|
||||||
{{ lookup('env', 'CENTURION_API') }}/api/organization/{{ item.organization_id }}/team
|
{{ lookup('env', 'CENTURION_API') }}/api/v2/access/organization/{{ item.organization_id }}/team
|
||||||
method: POST
|
method: POST
|
||||||
body_format: json
|
body_format: json
|
||||||
body: |-
|
body: |-
|
||||||
@ -265,4 +265,3 @@
|
|||||||
- permissions
|
- permissions
|
||||||
- teams
|
- teams
|
||||||
use_fact_cache: true
|
use_fact_cache: true
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user