mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-28 21:31:26 -07:00
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:
parent
99aafcc8ca
commit
0015d4cef3
10 changed files with 8 additions and 69 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue