mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-27 12:51:25 -07:00
Deprecate private for include_role (#39821)
This commit is contained in:
parent
f08332acb4
commit
384a0d8b01
2 changed files with 8 additions and 2 deletions
|
@ -49,8 +49,8 @@ options:
|
||||||
default: 'yes'
|
default: 'yes'
|
||||||
private:
|
private:
|
||||||
description:
|
description:
|
||||||
- If C(yes) the variables from C(defaults/) and C(vars/) in a role will not be made available to the rest of the
|
- This option is a no op, and the functionality described in previous versions was not implemented. This
|
||||||
play.
|
option will be removed in Ansible v2.8.
|
||||||
type: bool
|
type: bool
|
||||||
default: 'no'
|
default: 'no'
|
||||||
notes:
|
notes:
|
||||||
|
|
|
@ -118,6 +118,12 @@ class IncludeRole(TaskInclude):
|
||||||
if ir._role_name is None:
|
if ir._role_name is None:
|
||||||
raise AnsibleParserError("'name' is a required field for %s." % ir.action, obj=data)
|
raise AnsibleParserError("'name' is a required field for %s." % ir.action, obj=data)
|
||||||
|
|
||||||
|
if ir.private is not None:
|
||||||
|
display.deprecated(
|
||||||
|
msg='Supplying "private" for "include_role" is a no op, and is deprecated',
|
||||||
|
version='2.8'
|
||||||
|
)
|
||||||
|
|
||||||
# validate bad args, otherwise we silently ignore
|
# validate bad args, otherwise we silently ignore
|
||||||
bad_opts = my_arg_names.difference(IncludeRole.VALID_ARGS)
|
bad_opts = my_arg_names.difference(IncludeRole.VALID_ARGS)
|
||||||
if bad_opts:
|
if bad_opts:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue