From ae32fd6a9630390ca0b5f190d307884ce3ae9c83 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 31 Dec 2024 15:31:01 +0930 Subject: [PATCH 1/5] fix(playbook): use API v2 path for uploading inventory ref: #37 #42 --- playbooks/inventory.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/inventory.yaml b/playbooks/inventory.yaml index 0b90735..e69773b 100644 --- a/playbooks/inventory.yaml +++ b/playbooks/inventory.yaml @@ -105,7 +105,7 @@ - name: Upload inventory - {{ ansible_hostname }} ansible.builtin.uri: url: |- - {{ lookup('env', 'ITSM_API') }}/api/device/inventory + {{ lookup('env', 'ITSM_API') }}/api/v2/itam/inventory method: POST body_format: json From 3906cdeb693b4d83f5805b82926fc7c5758d7276 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 31 Dec 2024 15:46:05 +0930 Subject: [PATCH 2/5] fix(playbook): use API v2 path for Teams ref: #37 --- playbooks/teams.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/playbooks/teams.yaml b/playbooks/teams.yaml index 494268e..e0ba9ca 100644 --- a/playbooks/teams.yaml +++ b/playbooks/teams.yaml @@ -33,7 +33,7 @@ - name: Collect organizations from centurion ERP ansible.builtin.uri: url: |- - {{ lookup('env', 'CENTURION_API') }}/api/organization/ + {{ lookup('env', 'CENTURION_API') }}/api/v2/access/organization/ method: GET body_format: json headers: @@ -135,7 +135,7 @@ - name: Create new teams in centurion_ERP ansible.builtin.uri: 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 body_format: json body: |- @@ -265,4 +265,3 @@ - permissions - teams use_fact_cache: true - From fe1d96f620e657505790710a2c7267c57d752a9d Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 31 Dec 2024 15:52:26 +0930 Subject: [PATCH 3/5] fix(playbook): Use API v2 path for Teams ref: #37 #42 --- .../ansible/collection/centurion/playbooks/inventory.md | 6 ++---- .../ansible/collection/centurion/playbooks/teams.md | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/projects/ansible/collection/centurion/playbooks/inventory.md b/docs/projects/ansible/collection/centurion/playbooks/inventory.md index 2571560..7a5515b 100644 --- a/docs/projects/ansible/collection/centurion/playbooks/inventory.md +++ b/docs/projects/ansible/collection/centurion/playbooks/inventory.md @@ -12,14 +12,13 @@ The inventory playbook includes the [AWX Feature](../../../playbooks/awx.md) to 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. !!! 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 - [github issue 19](https://github.com/nofusscomputing/ansible_collection_centurion/issues/19) + 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) ## Play workflow @@ -33,4 +32,3 @@ The inventory playbook conducts the follwoing tasks: - Uploads the inventory report to Centurion ERP - Cleans any leftover files used to create the reports - diff --git a/docs/projects/ansible/collection/centurion/playbooks/teams.md b/docs/projects/ansible/collection/centurion/playbooks/teams.md index 8bd0df1..8306c54 100644 --- a/docs/projects/ansible/collection/centurion/playbooks/teams.md +++ b/docs/projects/ansible/collection/centurion/playbooks/teams.md @@ -12,10 +12,10 @@ The teams playbook includes the [AWX Feature](../../../playbooks/awx.md) to impo 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. From dcb39d7e6284b9d9b4e53e80c40581082e04b722 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 31 Dec 2024 16:15:00 +0930 Subject: [PATCH 4/5] ci: dont run on pull ref: #42 --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 702249a..d0323e3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,9 +4,9 @@ name: 'CI' on: - pull_request: - types: - - synchronize + # pull_request: + # types: + # - synchronize push: branches: - '**' From fa10637240d0e8fa62624b3463d1b0a60f825bc8 Mon Sep 17 00:00:00 2001 From: Jon Date: Tue, 31 Dec 2024 16:15:32 +0930 Subject: [PATCH 5/5] chore: correct liniting error ref: #42 --- .../projects/ansible/collection/centurion/playbooks/teams.md | 5 +++-- playbooks/inventory.yaml | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/projects/ansible/collection/centurion/playbooks/teams.md b/docs/projects/ansible/collection/centurion/playbooks/teams.md index 8306c54..1335bcc 100644 --- a/docs/projects/ansible/collection/centurion/playbooks/teams.md +++ b/docs/projects/ansible/collection/centurion/playbooks/teams.md @@ -56,7 +56,8 @@ centurion_erp: !!! 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. - + + ```yaml centurion_erp: common_teams: @@ -72,4 +73,4 @@ centurion_erp: notes: *team-name-notes ``` - + diff --git a/playbooks/inventory.yaml b/playbooks/inventory.yaml index e69773b..c5e0916 100644 --- a/playbooks/inventory.yaml +++ b/playbooks/inventory.yaml @@ -173,4 +173,3 @@ CENTURION_API: '{{ centurion_url }}' CENTURION_TOKEN: '{{ centurion_token }}' CENTURION_VALIDATE_CERTS: '{{ centurion_validate_certs | default(true) }}' -