Deploy a full-featured AWXai instance on a lightweight k3s Kubernetes cluster with this automated Ansible playbook. AWXai is an AI-maintained fork of AWX with enhanced features for modern automation workflows.
This role is based on the great work of @kurokobo and his awx-on-k3s repository, modified to deploy AWXai instead of standard AWX.
Note: This role is optimized for AWXai 25.1.1 and awx-operator 2.19.1.
- Automated Deployment: Sets up a single-node k3s cluster and deploys AWXai with a single command.
- AI-Maintained AWX: Deploys the enhanced AWXai fork with additional features and improvements.
- Lightweight & Efficient: Uses k3s for a minimal Kubernetes footprint.
- SSL Ready: Includes a playbook for deploying with a valid Let's Encrypt certificate using cert-manager and Cloudflare.
- Backup & Restore: Comes with playbooks to easily back up and restore your AWXai instance.
- Flexible Configuration: Easily customize your deployment with a comprehensive set of Ansible variables.
- Ansible Navigator Support: Includes a configuration for a seamless experience with
ansible-navigator.
Before you begin, ensure your control node and target host meet the following requirements:
- Operating System:
- Ubuntu 20.04 - 24.04 (Recommended)
- CentOS 8 Stream
- Hardware:
- 4 GB RAM (minimum)
- 2 CPU cores (minimum)
- On your Ansible Control Node:
- The
kubernetes.coreAnsible collection must be installed:ansible-galaxy collection install kubernetes.core
- The
-
Clone the repository:
git clone https://github.com/antuelle78/awx-install-on-k3s.git cd awx-install-on-k3s -
Create your inventory file (e.g.,
inventory.yml):all: hosts: awxai-node: ansible_host: 192.168.122.46 ansible_user: your_user
-
Run the deployment playbook:
ansible-playbook -i inventory.yml deploy.yml
You will be prompted to enter values for the deployment. To accept the defaults, simply press Enter.
-
Access AWXai: Once the playbook is complete, open your browser and navigate to the hostname you configured (default:
http://awxai.antuelle78.com).
You can customize the deployment by modifying the role variables. The most common variables are prompted during the execution of deploy.yml.
| Variable | Description | Default Value |
|---|---|---|
k3s_version |
The k3s release to deploy. | v1.34.2+k3s1 |
operator_version |
The awx-operator release to use. | 2.19.1 |
awx_version |
The AWXai version to deploy. | 25.1.1 |
awx_admin_password |
The password for the AWXai web interface admin user. |
LhTAKSFgTgLynAljakvkdLueVgNUXsQG |
postgres_password |
The password for the PostgreSQL database. | mydbpasswd |
awx_hostname |
The hostname or FQDN for the AWXai web interface. | awxai.antuelle78.com |
namespace_k3s |
The Kubernetes namespace for the deployment. | awxai |
cloudflare_api_key |
Your Cloudflare API key (for SSL deployment). Define in roles/awx_k3s_with_valid_ssl/defaults/main.yml. |
"" |
email_for_letsencrypt |
A valid email for Let's Encrypt registration. Define in roles/awx_k3s_with_valid_ssl/defaults/main.yml. |
"" |
This repository is pre-configured for use with ansible-navigator. The included ansible-navigator.yml uses the antuelle78/awx-ee:latest execution environment.
ansible-navigator run deploy.yml -i inventory.yml -m stdoutTo speed up subsequent playbook runs, you can skip the k3s installation:
ansible-playbook -i inventory.yml deploy.yml --skip-tags=k3s_install-
Edit the defaults file: Open
roles/awx_k3s_with_valid_ssl/defaults/main.ymland set yourcloudflare_api_keyandemail_for_letsencrypt. -
Run the SSL deployment playbook:
ansible-playbook -i inventory.yml deploy_nintr_cloudflare.yml
This repository includes playbooks to back up your AWX instance.
This playbook will prompt you for the backup name and retention period.
ansible-playbook -i inventory.yml backup_awx_intr.ymlThis playbook uses default values (30-day retention) and will automatically delete backups older than the retention period.
ansible-playbook -i inventory.yml backup_awx.ymlContributions are welcome! Please feel free to open an issue or submit a pull request.
This project is licensed under the GPLv3. See the LICENSE file for details.
Michael Nelson