mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Add a warning about include + with_items so nobody uses it.
This commit is contained in:
@@ -24,6 +24,7 @@ from ansible.playbook.task import Task
|
|||||||
import pipes
|
import pipes
|
||||||
import shlex
|
import shlex
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
class Play(object):
|
class Play(object):
|
||||||
|
|
||||||
@@ -426,6 +427,7 @@ class Play(object):
|
|||||||
include_vars = {}
|
include_vars = {}
|
||||||
for k in x:
|
for k in x:
|
||||||
if k.startswith("with_"):
|
if k.startswith("with_"):
|
||||||
|
sys.stderr.write("DEPRECATION: include + with_items is unsupported/undocumented and will be removed in Ansible 1.5, it will likely not do what you think it does.\n")
|
||||||
plugin_name = k[5:]
|
plugin_name = k[5:]
|
||||||
if plugin_name not in utils.plugins.lookup_loader:
|
if plugin_name not in utils.plugins.lookup_loader:
|
||||||
raise errors.AnsibleError("cannot find lookup plugin named %s for usage in with_%s" % (plugin_name, plugin_name))
|
raise errors.AnsibleError("cannot find lookup plugin named %s for usage in with_%s" % (plugin_name, plugin_name))
|
||||||
|
|||||||
Reference in New Issue
Block a user