mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 09:27:36 -02:30
Merge pull request #7127 from AlanCoding/cannot
Change 'can not' to cannot (by request)
This commit is contained in:
@@ -1639,7 +1639,7 @@ class InventorySourceSerializer(UnifiedJobTemplateSerializer, InventorySourceOpt
|
|||||||
|
|
||||||
def validate_source_project(self, value):
|
def validate_source_project(self, value):
|
||||||
if value and value.scm_type == '':
|
if value and value.scm_type == '':
|
||||||
raise serializers.ValidationError(_("Can not use manual project for SCM-based inventory."))
|
raise serializers.ValidationError(_("Cannot use manual project for SCM-based inventory."))
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def validate_source(self, value):
|
def validate_source(self, value):
|
||||||
@@ -3420,7 +3420,7 @@ class ScheduleSerializer(BaseSerializer):
|
|||||||
if type(value) == InventorySource and value.source not in SCHEDULEABLE_PROVIDERS:
|
if type(value) == InventorySource and value.source not in SCHEDULEABLE_PROVIDERS:
|
||||||
raise serializers.ValidationError(_('Inventory Source must be a cloud resource.'))
|
raise serializers.ValidationError(_('Inventory Source must be a cloud resource.'))
|
||||||
elif type(value) == Project and value.scm_type == '':
|
elif type(value) == Project and value.scm_type == '':
|
||||||
raise serializers.ValidationError(_('Manual Project can not have a schedule set.'))
|
raise serializers.ValidationError(_('Manual Project cannot have a schedule set.'))
|
||||||
elif type(value) == InventorySource and value.source == 'scm' and value.update_on_project_update:
|
elif type(value) == InventorySource and value.source == 'scm' and value.update_on_project_update:
|
||||||
raise serializers.ValidationError(_(
|
raise serializers.ValidationError(_(
|
||||||
'Inventory sources with `update_on_project_update` cannot be scheduled. '
|
'Inventory sources with `update_on_project_update` cannot be scheduled. '
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ class AnsibleInventoryLoader(object):
|
|||||||
self.method = 'ansible-inventory backport'
|
self.method = 'ansible-inventory backport'
|
||||||
|
|
||||||
if not os.path.exists(abs_module_path):
|
if not os.path.exists(abs_module_path):
|
||||||
raise ImproperlyConfigured('Can not find inventory module')
|
raise ImproperlyConfigured('Cannot find inventory module')
|
||||||
logger.debug('Using backported ansible-inventory module: {}'.format(abs_module_path))
|
logger.debug('Using backported ansible-inventory module: {}'.format(abs_module_path))
|
||||||
return [abs_module_path, '-i', self.source]
|
return [abs_module_path, '-i', self.source]
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ class AnsibleInventoryLoader(object):
|
|||||||
kwargs['proot_temp_dir'] = self.source_dir
|
kwargs['proot_temp_dir'] = self.source_dir
|
||||||
cwd = self.source_dir
|
cwd = self.source_dir
|
||||||
else:
|
else:
|
||||||
# we can not safely store tmp data in source dir or trust script contents
|
# we cannot safely store tmp data in source dir or trust script contents
|
||||||
if env['AWX_PRIVATE_DATA_DIR']:
|
if env['AWX_PRIVATE_DATA_DIR']:
|
||||||
# If this is non-blank, file credentials are being used and we need access
|
# If this is non-blank, file credentials are being used and we need access
|
||||||
private_data_dir = functioning_dir(env['AWX_PRIVATE_DATA_DIR'])
|
private_data_dir = functioning_dir(env['AWX_PRIVATE_DATA_DIR'])
|
||||||
|
|||||||
@@ -1772,7 +1772,7 @@ class RunInventoryUpdate(BaseTask):
|
|||||||
if str(env_k) not in env and str(env_k) not in settings.INV_ENV_VARIABLE_BLACKLIST:
|
if str(env_k) not in env and str(env_k) not in settings.INV_ENV_VARIABLE_BLACKLIST:
|
||||||
env[str(env_k)] = unicode(inventory_update.source_vars_dict[env_k])
|
env[str(env_k)] = unicode(inventory_update.source_vars_dict[env_k])
|
||||||
elif inventory_update.source == 'file':
|
elif inventory_update.source == 'file':
|
||||||
raise NotImplementedError('Can not update file sources through the task system.')
|
raise NotImplementedError('Cannot update file sources through the task system.')
|
||||||
# add private_data_files
|
# add private_data_files
|
||||||
env['AWX_PRIVATE_DATA_DIR'] = kwargs.get('private_data_dir', '')
|
env['AWX_PRIVATE_DATA_DIR'] = kwargs.get('private_data_dir', '')
|
||||||
return env
|
return env
|
||||||
|
|||||||
Reference in New Issue
Block a user