Purge an unneeded ansible 2.4 version check

This commit is contained in:
Matthew Jones 2018-10-16 10:48:09 -04:00
parent 906eb98d8e
commit 8e60cb1270
No known key found for this signature in database
GPG Key ID: EED42EEB8B369E1E
2 changed files with 0 additions and 12 deletions

View File

@ -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."))

View File

@ -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')