Update Containers/Kubernetes/Rancher RKE2/AWX Operator/Connect AWX to Gitea.md

This commit is contained in:
Nicole Rappe
2024-01-22 21:43:08 -07:00
parent fdd833bbf5
commit 445c4ae1a4

View File

@ -23,14 +23,38 @@ In order to link AWX to Gitea, you have to connect the two of them together with
| Project Name | `Bunny-Lab` | | Project Name | `Bunny-Lab` |
| Description | `Homelab Environment` | | Description | `Homelab Environment` |
| Organization | `Default` | | Organization | `Default` |
| Execution Environment | `<Leave Blank>` | | Execution Environment | `AWX EE (latest)` *(Click the Magnifying Lens)* |
| Source Control Type | `Git` | | Source Control Type | `Git` |
| Content Signature Validation Credential | `<Leave Blank>` |
**Gitea-specific Variables**: **Gitea-specific Variables**:
| **Field** | **Value** | | **Field** | **Value** |
| :--- | :--- | | :--- | :--- |
| Source Control URL | `https://git.bunny-lab.io/GitOps/awx.bunny-lab.io.git` | | Source Control URL | `https://git.bunny-lab.io/GitOps/awx.bunny-lab.io.git` |
| Source Control Branch/Tag/Commit | `main` | | Source Control Branch/Tag/Commit | `main` |
| Source Control Refspec | `<Leave Blank>` | | Source Control Credential | `git.bunny-lab.io` *(Click the Magnifying Lens)* |
| Source Control Credential | `git.bunny-lab.io` *(Click the Magnifying Lens)* |
## Create an Inventory
You will want to associate an inventory with the Gitea project now. Navigate to **Resources > Inventories > Add**
| **Field** | **Value** |
| :--- | :--- |
| Inventory Name | `Homelab` |
| Description | `Homelab Inventory` |
| Organization | `Default` |
### Add Gitea Inventory Source
Now you will want to connect this inventory to the inventory file(s) hosted in the aforementioned Gitea repository. Navigate to **Resources > Inventories > Homelab > Sources > Add**
| **Field** | **Value** |
| :--- | :--- |
| Source Name | `git.bunny-lab.io` |
| Description | `Gitea` |
| Execution Environment | `AWX EE (latest)` *(Click the Magnifying Lens)* |
| Source | `Sourced from a Project` |
| Project | `Bunny-Lab` |
| Inventory File | `/inventories/homelab.yaml` |
Check the box at the bottom named "**Update on Launch**". This will pull the latest inventory each time a job is run. It may slightly slow down jobs, but it ensures that everything is updated every time a job is ran.
## Webhooks
Optionally, set up webhooks in Gitea to trigger inventory updates in AWX upon changes in the repository. This section is not documented yet, but will eventually be documented.