2.8 Core Deprecation Removal (#45232)

* Remove deprecated ansible.vars.unsafe_proxy. Fixes #45040

* Remove deprecated validate_md5 alias from fetch module. Fixes #45039

* Remove deprecated private arg from import/include_role. Fixes #45038

* All include deprecations bumped to 2.12. Fixes #45037

* Add changelog for deprecated removals
This commit is contained in:
Matt Martz 2018-09-10 15:05:52 -05:00 committed by GitHub
parent 99aafcc8ca
commit 0015d4cef3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 8 additions and 69 deletions

View file

@ -46,7 +46,7 @@ class IncludeRole(TaskInclude):
BASE = ('name', 'role') # directly assigned
FROM_ARGS = ('tasks_from', 'vars_from', 'defaults_from') # used to populate from dict in role
OTHER_ARGS = ('apply', 'private', 'public', 'allow_duplicates') # assigned to matching property
OTHER_ARGS = ('apply', 'public', 'allow_duplicates') # assigned to matching property
VALID_ARGS = tuple(frozenset(BASE + FROM_ARGS + OTHER_ARGS)) # all valid args
# =================================================================================
@ -54,7 +54,6 @@ class IncludeRole(TaskInclude):
# private as this is a 'module options' vs a task property
_allow_duplicates = FieldAttribute(isa='bool', default=True, private=True)
_private = FieldAttribute(isa='bool', default=None, private=True)
_public = FieldAttribute(isa='bool', default=False, private=True)
def __init__(self, block=None, role=None, task_include=None):
@ -127,13 +126,7 @@ class IncludeRole(TaskInclude):
raise AnsibleParserError("'name' is a required field for %s." % ir.action, obj=data)
if 'public' in ir.args and ir.action != 'include_role':
raise AnsibleParserError('Invalid options for %s: private' % ir.action, obj=data)
if 'private' in ir.args:
display.deprecated(
msg='Supplying "private" for "%s" is a no op, and is deprecated' % ir.action,
version='2.8'
)
raise AnsibleParserError('Invalid options for %s: public' % ir.action, obj=data)
# validate bad args, otherwise we silently ignore
bad_opts = my_arg_names.difference(IncludeRole.VALID_ARGS)