mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 22:18:01 -03:30
Purge an unneeded ansible 2.4 version check
This commit is contained in:
parent
906eb98d8e
commit
8e60cb1270
@ -1578,12 +1578,6 @@ class InventorySource(UnifiedJobTemplate, InventorySourceOptions, RelatedJobsMix
|
||||
"Instead, configure the corresponding source project to update on launch."))
|
||||
return self.update_on_launch
|
||||
|
||||
def clean_overwrite_vars(self): # TODO: remove when Ansible 2.4 becomes unsupported, obviously
|
||||
if self.source == 'scm' and not self.overwrite_vars:
|
||||
if get_ansible_version() < LooseVersion('2.5'):
|
||||
raise ValidationError(_("SCM type sources must set `overwrite_vars` to `true` until Ansible 2.5."))
|
||||
return self.overwrite_vars
|
||||
|
||||
def clean_source_path(self):
|
||||
if self.source != 'scm' and self.source_path:
|
||||
raise ValidationError(_("Cannot set source_path if not SCM type."))
|
||||
|
||||
@ -78,12 +78,6 @@ class TestControlledBySCM():
|
||||
'ec2',
|
||||
'manual',
|
||||
])
|
||||
def test_clean_overwrite_vars_valid(self, source):
|
||||
inv_src = InventorySource(overwrite_vars=True,
|
||||
source=source)
|
||||
|
||||
inv_src.clean_overwrite_vars()
|
||||
|
||||
def test_clean_source_path_valid(self):
|
||||
inv_src = InventorySource(source_path='/not_real/',
|
||||
source='scm')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user