docs(teams): Add Documenation for teams playbook

https://github.com/nofusscomputing/ansible_collection_centurion/pull/17 #14
This commit is contained in:
2024-08-19 12:27:18 +09:30
committed by Jon
parent ae180f0a2f
commit e6b8a0906c
3 changed files with 78 additions and 0 deletions

View File

@ -0,0 +1,11 @@
---
title: Playbooks
description: No Fuss Computings Companion Ansible Collection Centurion Playbooks.
date: 2024-08-18
template: project.html
about: https://github.com/nofusscomputing/ansible_collection_centurion
---
Available playbooks include:
- [Teams](./teams.md)

View File

@ -0,0 +1,61 @@
---
title: Teams
description: No Fuss Computings Companion Ansible Collection Centurion teams Playbook.
date: 2024-08-18
template: project.html
about: https://github.com/nofusscomputing/ansible_collection_centurion
---
The teams playbook has been created for the purpose of creating Centurion ERP teams. It allows teams to be defined as configuration as code which allows standardisation of teams and permissions within an organisation. With this playbook it is possible to create every team within an organisation and define the permissions and notes that are to be applied to that team.
The teams playbook includes the [AWX Feature](../../../playbooks/awx.md) to import the playbook as a job template in AWX / Ansible Automation Platform.
The following job template will be created:
* **Centurion/Access/Teams** Creation and patching of teams and permissions
On import to AWX / Ansible Automation Platform a credential type will also be created, `Playbook/teams/centurion` that can be used to supply the required secrets and Centurion host.
!!! info
The playbook is able to work with centurion ERP directly or using the inventory pluggin that is included in this collection.
## Play workflow
The teams playbook gathers information regarding centurion organisations from the ansible inventory. Using this information the play is designed to create new teams, patch permissions and patch notes. The workflow for the playbook is as follows
- Fetch all organisations from centurion
- Fetch all existing teams within each organisation from centurion
- Fetch any teams to be created from inventory
- Create new teams
- Patch all teams with required permissions
- Patch all teams with required notes
## Configuration
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"
```
!!! 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:
team_name: &team-name "team_name"
team_permissions: &team-name-permissions []
team_name_notes: &team-name-notes "team_notes"
```

View File

@ -29,6 +29,12 @@ nav:
- projects/ansible/collection/centurion/index.md
- Playbooks:
- projects/ansible/collection/centurion/playbooks/index.md
- projects/ansible/collection/centurion/playbooks/teams.md
- Plugins:
- projects/ansible/collection/centurion/plugins/index.md