Skip to content

Add create_superuser option to skip admin user creation#2109

Open
TheRealHaoLiu wants to merge 1 commit intoansible:develfrom
TheRealHaoLiu:aap-68980/no-create-admin-user
Open

Add create_superuser option to skip admin user creation#2109
TheRealHaoLiu wants to merge 1 commit intoansible:develfrom
TheRealHaoLiu:aap-68980/no-create-admin-user

Conversation

@TheRealHaoLiu
Copy link
Copy Markdown
Member

Summary

When deploying AWX as part of AAP where all authentication goes through the AAP Gateway, the component-level admin user is not needed. This PR adds a boolean create_superuser field (default: true) that allows operators to opt out of creating the admin superuser during installation.

Changes

  • roles/installer/defaults/main.yml — add create_superuser: true default
  • roles/installer/tasks/install.yml — skip admin_password_configuration when create_superuser=false
  • roles/installer/tasks/initialize_django.yml — wrap createsuperuser + update_password in a block gated by create_superuser | bool

Behavior

When create_superuser: false:

  • The <name>-admin-password K8s Secret is not created
  • awx-manage createsuperuser is not run
  • awx-manage update_password is not run

When create_superuser: true (default): no change to existing behavior.

Context

In AAP 2.7, direct API access to platform components (Controller, Hub, EDA) is being removed. All authentication is centralized through the AAP Gateway. The component-level admin user was previously needed for installer post-install tasks (license upload, postinstall config), but those have since been updated to use gateway credentials. There is no remaining post-creation caller for the controller admin user in the installer or operator.

Relates-to: AAP-68980

🤖 Generated with Claude Code

When deploying AWX as part of AAP where all authentication is
centralized through the AAP Gateway, the component-level admin
user is not needed. Add a boolean `create_superuser` field
(default: true) to allow operators to opt out of admin user
creation.

When create_superuser=false:
- admin_password_configuration is skipped (no K8s Secret created)
- createsuperuser and update_password management commands are skipped

Relates-to: AAP-68980

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@TheRealHaoLiu TheRealHaoLiu force-pushed the aap-68980/no-create-admin-user branch from 1e3f877 to 7d32e8f Compare March 18, 2026 18:04
Copy link
Copy Markdown
Member

@AlanCoding AlanCoding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be failing on a line length violation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants