AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,400 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.

Popular Topics

About Luca Berton

Luca Berton is an Ansible automation expert, author of 8 Ansible books published by Apress and Leanpub including "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example", and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.

Create Ansible AWX Superuser in Docker: Admin Account Setup (Guide) — Video Tutorial

How to create an AWX superuser admin account in Docker containers. Reset passwords, manage users, and troubleshoot AWX authentication with step-by-step.

Watch Video

Watch "Create Ansible AWX Superuser in Docker: Admin Account Setup (Guide)" on YouTube

What You'll Learn

Full Tutorial Content

How to Create an Ansible AWX superuser in Docker containers? Ansible AWX superuser has the power to configure all the settings and has unlimited power inside the modern web-UI and API interface. I'm going to show you how to create your first superuser and how to use it. I'm Luca Berton and welcome to today's episode of Ansible Pilot. Links - [Ansible AWX create an admin user](https://github.com/ansible/awx/blob/devel/tools/docker-compose/README.md#create-an-admin-user) Playbook How to Create Ansible AWX superuser in Docker containers. I'm going to show you how to create the "sysadmin" superuser in Ansible AWX via Docker containers and how to use it in AWX web-UI and API. Ansible AWX admin user enables you to access the Ansible AWX Web-UI and the Ansible AWX API endpoints that require authentication. The user creation is performed using the docker exec command using the awx-manage utility: ```bash $ docker exec -ti tools_awx_1 awx-manage createsuperuser ``` A successful execution to create the `example` user as follows: ```bash [lberton@ansible awx]$ docker exec -ti tools_awx_1 awx-manage createsuperuser Username: example Email address: example@example.com Password: Password (again): Superuser created successfully. [lberton@ansible awx]$ ``` Once a **superuser** is successfully created you can access the Ansible AWX Web-UI and Ansible API autenticated endopoints. Ansible AWX UI Login ![Login in the Ansible AWX Web UI](/articles/ansible_awx_docker_ui_login.jpg) Ansible AWX UI Dashboard ![The Ansible AWX Web UI Dashboard](/articles/ansible_awx_docker_ui_dashboard.jpg) Ansible AWX API Login The direct API endpoint is https://localhost:8043/api/login/. ![Login in the Ansible AWX API](/articles/ansible_awx_docker_api_login.jpg) Ansible AWX API Authenticated The current authenticated user is shown in the top **Logged in as example**. ![The Ansible AWX API Authenticated](/articles/ansible_awx_docker_api_auth.jpg) Conclusion Now you know how to create an Ansible AWX superuser in Docker containers. Creating a Superuser in AWX Docker Find the AWX web container ```bash docker ps | grep awx ``` Create superuser ```bash docker exec -it awx_web awx-manage createsuperuser ``` Non-interactive creation ```bash docker exec -it awx_web bash -c "DJANGO_SUPERUSER_USERNAME=admin \ DJANGO_SUPERUSER_EMAIL=admin@example.com \ DJANGO_SUPERUSER_PASSWORD=SecurePass123 \ awx-manage createsuperuser --noinput" ``` Reset Existing Admin Password ```bash docker exec -it awx_web awx-manage changepassword admin ``` AWX on Kubernetes (AWX Operator) ```bash Find the AWX web pod kubectl get pods -n awx | grep awx-web Create superuser kubectl exec -it awx-web-xxxxx -n awx -- awx-manage createsuperuser Get default admin password (AWX Operator) kubectl get secret awx-admin-password -n awx -o jsonpath='{.data.password}' | base64 -d ``` Automate with Ansible ```yaml - name: Create AWX superuser via Docker hosts: awx_host tasks: - name

About This Tutorial

Read the full written article: Create Ansible AWX Superuser in Docker: Admin Account Setup (Guide)

Topics Covered

Related Video Tutorials