diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index 9b7cb546d0..b27cbdf307 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -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.")) diff --git a/awx/main/tests/unit/models/test_inventory.py b/awx/main/tests/unit/models/test_inventory.py index 7c58fa9972..c8a701acd2 100644 --- a/awx/main/tests/unit/models/test_inventory.py +++ b/awx/main/tests/unit/models/test_inventory.py @@ -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')