From 54e821ca9412b0836c4836b132068318fb3bd0d8 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 22 Oct 2015 08:10:51 -0400 Subject: [PATCH] added deprecation warning to comma separated role spec --- lib/ansible/playbook/role/requirement.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/ansible/playbook/role/requirement.py b/lib/ansible/playbook/role/requirement.py index 86942a9b29..435cacf50c 100644 --- a/lib/ansible/playbook/role/requirement.py +++ b/lib/ansible/playbook/role/requirement.py @@ -40,6 +40,13 @@ VALID_SPEC_KEYS = [ 'version', ] +try: + from __main__ import display + display = display +except ImportError: + from ansible.utils.display import Display + display = Display() + class RoleRequirement(RoleDefinition): """ @@ -77,6 +84,8 @@ class RoleRequirement(RoleDefinition): # 'name': 'repo' # } + display.deprecated("The comma separated role spec format, use the yaml/explicit format instead.") + default_role_versions = dict(git='master', hg='tip') role_spec = role_spec.strip()