Don't hardcode privilege escalation prompts if they're all of the same format.

Just create them all from supported privilege escalation types.
This commit is contained in:
Bill Nottingham
2017-07-25 12:06:40 -04:00
parent a6f5686ef4
commit 864d803273
3 changed files with 18 additions and 38 deletions

View File

@@ -1,5 +1,14 @@
# Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
from django.utils.translation import ugettext_lazy as _
CLOUD_PROVIDERS = ('azure', 'azure_rm', 'ec2', 'gce', 'rax', 'vmware', 'openstack', 'satellite6', 'cloudforms')
SCHEDULEABLE_PROVIDERS = CLOUD_PROVIDERS + ('custom', 'scm',)
PRIVILEGE_ESCALATION_METHODS = [
('sudo', _('Sudo')),
('su', _('Su')),
('pbrun', _('Pbrun')),
('pfexec', _('Pfexec')),
('dzdo', _('DZDO')),
('pmrun', _('Pmrun'))]