diff --git a/.ansible-lint-ignore b/.ansible-lint-ignore index 28e6563..fb27c95 100644 --- a/.ansible-lint-ignore +++ b/.ansible-lint-ignore @@ -1,5 +1,8 @@ galaxy.yml galaxy[version-incorrect] -# This playbook will only ever be run against the centurion host + +# N/A as the play runs on the ansible controller and should only run once. playbooks/teams.yaml run-once[task] -# This task only saves the report on the local machine and is deleted after uploading -playbooks/inventory.yaml risky-file-permissions \ No newline at end of file + +# N/A as the play runs on the ansible controller using permissions of executing user. +playbooks/inventory.yaml risky-file-permissions + diff --git a/docs/projects/ansible/collection/centurion/playbooks/index.md b/docs/projects/ansible/collection/centurion/playbooks/index.md index b7ee97a..12a94c8 100644 --- a/docs/projects/ansible/collection/centurion/playbooks/index.md +++ b/docs/projects/ansible/collection/centurion/playbooks/index.md @@ -1,6 +1,6 @@ --- title: Playbooks -description: No Fuss Computings Companion Ansible Collection Centurion Playbooks. +description: Playbooks as part of No Fuss Computings Companion Ansible Collection, Centurion date: 2024-08-18 template: project.html about: https://github.com/nofusscomputing/ansible_collection_centurion @@ -10,3 +10,4 @@ Available playbooks include: - [Inventory](./inventory.md) - [Teams](./teams.md) + diff --git a/docs/projects/ansible/collection/centurion/playbooks/inventory.md b/docs/projects/ansible/collection/centurion/playbooks/inventory.md index 658dcf5..434fa88 100644 --- a/docs/projects/ansible/collection/centurion/playbooks/inventory.md +++ b/docs/projects/ansible/collection/centurion/playbooks/inventory.md @@ -1,12 +1,12 @@ --- title: Inventory -description: Inventory host machines and publish to Centurion ERP +description: Inventory devices and publish to Centurion ERP date: 2024-08-19 template: project.html about: https://github.com/nofusscomputing/ansible_collection_centurion --- -The inventory playbook has been created to inventory host machines and to publish the collected inventory to Centurion ERP. The inventory includes details of all software packages installed on the host machine as well as some details regarding the host machine such as UUID and serial number. +The inventory playbook has been created to inventory devices and to publish the collected inventory to Centurion ERP. The inventory includes details of all software packages installed on the host machine as well as some details regarding the host machine such as UUID and serial number. The inventory playbook includes the [AWX Feature](../../../playbooks/awx.md) to import the playbook as a job template in AWX / Ansible Automation Platform. @@ -28,6 +28,6 @@ The inventory playbook conducts the follwoing tasks: - Gathers host information - Gathers sofware information -- POSTS an inventory report to Centurion ERP +- 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 0c25a79..814a1fd 100644 --- a/docs/projects/ansible/collection/centurion/playbooks/teams.md +++ b/docs/projects/ansible/collection/centurion/playbooks/teams.md @@ -1,6 +1,6 @@ --- title: Teams -description: Creation and patching of teams and permissions. +description: Ansible Playbook for Creating and patching of Centurion ERP teams, including permissions. date: 2024-08-18 template: project.html about: https://github.com/nofusscomputing/ansible_collection_centurion @@ -16,7 +16,7 @@ The following job template will be created: !!! info - The playbook is able to work with Centurion ERP directly or using the inventory pluggin that is included in this collection. + The playbook is able to work with the inventory plugin that is included in this collection. ## Play workflow @@ -33,17 +33,17 @@ The teams playbook gathers information regarding centurion organisations from th ## Configuration -The teams playbook uses variables that are gathered from inventory -The expected structure of the inventory file is: +The teams playbook uses variables that are gathered from inventory. The expected structure of the inventory file is: ```yaml + centurion_erp: teams: - name: "organisation name" teams: - - name: "team-name" - permissions: [] - notes: "permissions must be a list" + - name: "team-name" + permissions: [] + notes: "permissions must be a list" ``` @@ -57,7 +57,12 @@ centurion_erp: team_permissions: &team-name-permissions [] team_name_notes: &team-name-notes "team_notes" + teams: + - name: "organisation name" + teams: + - name: *team-name + permissions: *team-name-permissions + notes: *team-name-notes + ``` -!!! info "Upcoming feature" - With the release of Centurion ERP V1.1 an API request to fetch all permissions that can be applied will be available. diff --git a/playbooks/inventory.yaml b/playbooks/inventory.yaml index b72565b..0b90735 100644 --- a/playbooks/inventory.yaml +++ b/playbooks/inventory.yaml @@ -47,7 +47,7 @@ # https://github.com/nofusscomputing/ansible_collection_centurion/issues/19 -# This teask has been commented out due to the above issue +# This task has been commented out due to the above issue # - name: Inventory Software [l] # ansible.builtin.set_fact: @@ -166,10 +166,11 @@ type: boolean label: Validate SSL Certificate required: - - itsm_api - - itsm_token + - centurion_api + - centurion_token injectors: > env: CENTURION_API: '{{ centurion_url }}' CENTURION_TOKEN: '{{ centurion_token }}' CENTURION_VALIDATE_CERTS: '{{ centurion_validate_certs | default(true) }}' + diff --git a/playbooks/teams.yaml b/playbooks/teams.yaml index 5c2c42f..d0a652a 100644 --- a/playbooks/teams.yaml +++ b/playbooks/teams.yaml @@ -258,10 +258,11 @@ job_type: "run" # job_tags: complete labels: - - centurion_erp - - itsm - - itam - access + - centurion_erp + - itam + - itsm - permissions - teams use_fact_cache: true +