mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-16 07:48:38 -05:00
Implement Azure RM creds and inventory
* Vendor ansible's azure_rm inventory script * Add new inventory type * Add new credential type * Expand host instance_id column from varchar 100 to 1024 to accept the long instance ids returned by Azure * Make the inventory_import azure match rename more explicit.
This commit is contained in:
@@ -41,7 +41,8 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
|
||||
('foreman', _('Satellite 6')),
|
||||
('cloudforms', _('CloudForms')),
|
||||
('gce', _('Google Compute Engine')),
|
||||
('azure', _('Microsoft Azure')),
|
||||
('azure', _('Microsoft Azure Classic (deprecated)')),
|
||||
('azure_rm', _('Microsoft Azure Resource Manager')),
|
||||
('openstack', _('OpenStack')),
|
||||
]
|
||||
|
||||
@@ -55,7 +56,7 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
|
||||
]
|
||||
|
||||
PASSWORD_FIELDS = ('password', 'security_token', 'ssh_key_data', 'ssh_key_unlock',
|
||||
'become_password', 'vault_password')
|
||||
'become_password', 'vault_password', 'secret')
|
||||
|
||||
class Meta:
|
||||
app_label = 'main'
|
||||
@@ -168,6 +169,30 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
|
||||
default='',
|
||||
help_text=_('Vault password (or "ASK" to prompt the user).'),
|
||||
)
|
||||
client = models.CharField(
|
||||
max_length=128,
|
||||
blank=True,
|
||||
default='',
|
||||
help_text=_('Client Id or Application Id for the credential'),
|
||||
)
|
||||
secret = models.CharField(
|
||||
max_length=1024,
|
||||
blank=True,
|
||||
default='',
|
||||
help_text=_('Secret Token for this credential'),
|
||||
)
|
||||
subscription = models.CharField(
|
||||
max_length=1024,
|
||||
blank=True,
|
||||
default='',
|
||||
help_text=_('Subscription identifier for this credential'),
|
||||
)
|
||||
tenant = models.CharField(
|
||||
max_length=1024,
|
||||
blank=True,
|
||||
default='',
|
||||
help_text=_('Tenant identifier for this credential'),
|
||||
)
|
||||
owner_role = ImplicitRoleField(
|
||||
role_name='Credential Owner',
|
||||
role_description='Owner of the credential',
|
||||
|
||||
Reference in New Issue
Block a user