mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 03:17:39 -02:30
create the Galaxy credential for new installs in the preload script
doing this in the migration *before* any Organizations actually exist is stirring up RBAC dragons that I don't have time to fight this commit meanst that *new* installs will pre-create the default Galaxy (public) credential in create_preload_data, while *upgraded/migrations* installs will do so via the migration
This commit is contained in:
@@ -42,6 +42,16 @@ class Command(BaseCommand):
|
||||
},
|
||||
created_by=superuser)
|
||||
c.admin_role.members.add(superuser)
|
||||
public_galaxy_credential = Credential(
|
||||
name='Ansible Galaxy',
|
||||
managed_by_tower=True,
|
||||
credential_type=CredentialType.objects.get(kind='galaxy'),
|
||||
inputs = {
|
||||
'url': 'https://galaxy.ansible.com/'
|
||||
}
|
||||
)
|
||||
public_galaxy_credential.save()
|
||||
o.galaxy_credentials.add(public_galaxy_credential)
|
||||
i = Inventory.objects.create(name='Demo Inventory',
|
||||
organization=o,
|
||||
created_by=superuser)
|
||||
|
||||
Reference in New Issue
Block a user