added versions to dep notices (#24019)

* added versions to dep notices

* pep7

* string
pull/23929/head
Brian Coca 8 years ago committed by GitHub
parent 6845234d72
commit 31045d58c6

@ -356,7 +356,7 @@ class GalaxyCLI(CLI):
msg = "Unable to load data from the include requirements file: %s %s"
raise AnsibleError(msg % (role_file, e))
else:
display.deprecated("going forward only the yaml format will be supported")
display.deprecated("going forward only the yaml format will be supported", version="2.6")
# roles listed in a file, one per line
for rline in f.readlines():
if rline.startswith("#") or rline.strip() == '':

@ -467,7 +467,8 @@ class TaskExecutor:
if '_variable_params' in self._task.args:
variable_params = self._task.args.pop('_variable_params')
if isinstance(variable_params, dict):
display.deprecated("Using variables for task params is unsafe, especially if the variables come from an external source like facts")
display.deprecated("Using variables for task params is unsafe, especially if the variables come from an external source like facts",
version="2.6")
variable_params.update(self._task.args)
self._task.args = variable_params
@ -751,7 +752,7 @@ class TaskExecutor:
if self._play_context.accelerate:
# accelerate is deprecated as of 2.1...
display.deprecated('Accelerated mode is deprecated. Consider using SSH with ControlPersist and pipelining enabled instead')
display.deprecated('Accelerated mode is deprecated. Consider using SSH with ControlPersist and pipelining enabled instead', version='2.6')
# launch the accelerated daemon here
ssh_connection = connection
handler = self._shared_loader_obj.action_loader.get(

@ -214,7 +214,7 @@ def load_list_of_tasks(ds, play, block=None, role=None, task_include=None, use_h
"later. In the future, this will be an error unless 'static: no' is used " \
"on the include task. If you do not want missing includes to be considered " \
"dynamic, use 'static: yes' on the include or set the global ansible.cfg " \
"options to make all inclues static for tasks and/or handlers" % include_file,
"options to make all inclues static for tasks and/or handlers" % include_file, version="2.7"
)
task_list.append(t)
continue
@ -247,7 +247,8 @@ def load_list_of_tasks(ds, play, block=None, role=None, task_include=None, use_h
obj=task_ds,
suppress_extended_error=True,
)
display.deprecated("You should not specify tags in the include parameters. All tags should be specified using the task-level option")
display.deprecated("You should not specify tags in the include parameters. All tags should be specified using the task-level option",
version="2.7")
else:
tags = ti_copy.tags[:]

@ -204,7 +204,7 @@ class Play(Base, Taggable, Become):
vars_prompts = []
for prompt_data in new_ds:
if 'name' not in prompt_data:
display.deprecated("Using the 'short form' for vars_prompt has been deprecated")
display.deprecated("Using the 'short form' for vars_prompt has been deprecated", version="2.7")
for vname, prompt in prompt_data.items():
vars_prompts.append(dict(
name = vname,

@ -207,7 +207,7 @@ class RoleDefinition(Base, Become, Conditional, Taggable):
if key in ('connection', 'port', 'remote_user'):
display.deprecated("Using '%s' as a role param has been deprecated. " % key + \
"In the future, these values should be entered in the `vars:` " + \
"section for roles, but for now we'll store it as both a param and an attribute.")
"section for roles, but for now we'll store it as both a param and an attribute.", version="2.7")
role_def[key] = value
# this key does not match a field attribute, so it must be a role param
role_params[key] = value

@ -83,7 +83,8 @@ class RoleRequirement(RoleDefinition):
# 'version': 'v1.0',
# 'name': 'repo'
# }
display.deprecated("The comma separated role spec format, use the yaml/explicit format instead. Line that trigger this: %s" % role_spec)
display.deprecated("The comma separated role spec format, use the yaml/explicit format instead. Line that trigger this: %s" % role_spec,
version="2.7")
default_role_versions = dict(git='master', hg='tip')

@ -218,7 +218,7 @@ class Task(Base, Conditional, Taggable, Become):
if action == 'include' and k not in self._valid_attrs and k not in self.DEPRECATED_ATTRIBUTES:
display.deprecated("Specifying include variables at the top-level of the task is deprecated."
" Please see:\nhttp://docs.ansible.com/ansible/playbooks_roles.html#task-include-files-and-encouraging-reuse\n\n"
" for currently supported syntax regarding included files and variables")
" for currently supported syntax regarding included files and variables", version="2.7")
new_ds['vars'][k] = v
else:
new_ds[k] = v

@ -553,7 +553,7 @@ class Templar:
if bare_deprecated:
display.deprecated("Using bare variables is deprecated."
" Update your playbooks so that the environment value uses the full variable syntax ('%s%s%s')" %
(self.environment.variable_start_string, variable, self.environment.variable_end_string))
(self.environment.variable_start_string, variable, self.environment.variable_end_string), version='2.7')
return "%s%s%s" % (self.environment.variable_start_string, variable, self.environment.variable_end_string)
# the variable didn't meet the conditions to be converted,

Loading…
Cancel
Save