mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
Restore previous choices, clean up some minor things
This commit is contained in:
parent
8fa98d0d54
commit
d6ac9b6e3d
@ -14,7 +14,7 @@ __all__ = [
|
||||
CLOUD_PROVIDERS = ('azure_rm', 'ec2', 'gce', 'vmware', 'openstack', 'rhv', 'satellite6', 'cloudforms', 'tower')
|
||||
SCHEDULEABLE_PROVIDERS = CLOUD_PROVIDERS + ('custom', 'scm',)
|
||||
PRIVILEGE_ESCALATION_METHODS = [
|
||||
('', _('None')), ('enable', _('Enable')), ('doas', _('Doas')),
|
||||
('enable', _('Enable')), ('doas', _('Doas')),
|
||||
('sudo', _('Sudo')), ('su', _('Su')), ('pbrun', _('Pbrun')), ('pfexec', _('Pfexec')),
|
||||
('dzdo', _('DZDO')), ('pmrun', _('Pmrun')), ('runas', _('Runas'))]
|
||||
ANSI_SGR_PATTERN = re.compile(r'\x1b\[[0-9;]*m')
|
||||
|
@ -714,7 +714,7 @@ class CredentialTypeInputField(JSONSchemaField):
|
||||
if field['type'] == 'become_method':
|
||||
if not model_instance.managed_by_tower:
|
||||
raise django_exceptions.ValidationError(
|
||||
_('{0} is a reserved type name'.format(field['type'])),
|
||||
_('become_method is a reserved type name'),
|
||||
code='invalid',
|
||||
params={'value': value},
|
||||
)
|
||||
|
@ -200,6 +200,6 @@ def add_azure_cloud_environment_field(apps, schema_editor):
|
||||
|
||||
|
||||
def remove_become_methods(apps, schema_editor):
|
||||
become_credtype = CredentialType.objects.get(kind='ssh')
|
||||
become_credtype = CredentialType.objects.get(kind='ssh').first()
|
||||
become_credtype.inputs = CredentialType.defaults.get('ssh')().inputs
|
||||
become_credtype.save()
|
||||
|
@ -165,7 +165,7 @@ class V1Credential(object):
|
||||
max_length=32,
|
||||
blank=True,
|
||||
default='',
|
||||
choices=PRIVILEGE_ESCALATION_METHODS,
|
||||
choices=[('', _('None'))] + PRIVILEGE_ESCALATION_METHODS,
|
||||
help_text=_('Privilege escalation method.')
|
||||
),
|
||||
'become_username': models.CharField(
|
||||
|
Loading…
Reference in New Issue
Block a user