From 384a0d8b01bd61e05e2fbb373a1adeddbbf634b2 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 8 May 2018 10:31:56 -0500 Subject: [PATCH] Deprecate private for include_role (#39821) --- lib/ansible/modules/utilities/logic/include_role.py | 4 ++-- lib/ansible/playbook/role_include.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/utilities/logic/include_role.py b/lib/ansible/modules/utilities/logic/include_role.py index 1518733cd8..9e02c5c1b7 100644 --- a/lib/ansible/modules/utilities/logic/include_role.py +++ b/lib/ansible/modules/utilities/logic/include_role.py @@ -49,8 +49,8 @@ options: default: 'yes' private: 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 - play. + - This option is a no op, and the functionality described in previous versions was not implemented. This + option will be removed in Ansible v2.8. type: bool default: 'no' notes: diff --git a/lib/ansible/playbook/role_include.py b/lib/ansible/playbook/role_include.py index 3786d09b59..f129c9a30b 100644 --- a/lib/ansible/playbook/role_include.py +++ b/lib/ansible/playbook/role_include.py @@ -118,6 +118,12 @@ class IncludeRole(TaskInclude): if ir._role_name is None: 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 bad_opts = my_arg_names.difference(IncludeRole.VALID_ARGS) if bad_opts: