mirror of
https://github.com/ansible/awx.git
synced 2026-05-16 13:57:39 -02:30
Purge an unneeded ansible 2.4 version check
This commit is contained in:
@@ -1578,12 +1578,6 @@ class InventorySource(UnifiedJobTemplate, InventorySourceOptions, RelatedJobsMix
|
|||||||
"Instead, configure the corresponding source project to update on launch."))
|
"Instead, configure the corresponding source project to update on launch."))
|
||||||
return self.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):
|
def clean_source_path(self):
|
||||||
if self.source != 'scm' and self.source_path:
|
if self.source != 'scm' and self.source_path:
|
||||||
raise ValidationError(_("Cannot set source_path if not SCM type."))
|
raise ValidationError(_("Cannot set source_path if not SCM type."))
|
||||||
|
|||||||
@@ -78,12 +78,6 @@ class TestControlledBySCM():
|
|||||||
'ec2',
|
'ec2',
|
||||||
'manual',
|
'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):
|
def test_clean_source_path_valid(self):
|
||||||
inv_src = InventorySource(source_path='/not_real/',
|
inv_src = InventorySource(source_path='/not_real/',
|
||||||
source='scm')
|
source='scm')
|
||||||
|
|||||||
Reference in New Issue
Block a user