Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Variables Ansible:如何摆脱teal“问题;包括:;运行任务时的语句?_Variables_Include_Ansible_Hide - Fatal编程技术网

Variables Ansible:如何摆脱teal“问题;包括:;运行任务时的语句?

Variables Ansible:如何摆脱teal“问题;包括:;运行任务时的语句?,variables,include,ansible,hide,Variables,Include,Ansible,Hide,我试图从Ansible playbook运行中隐藏此tealinclude:语句。似乎每次有一个包含变量的模式脚本,就会出现这个teal语句。任何能够隐藏这一点的帮助都将不胜感激。非常感谢你 这些行由回调插件的v2\u playbook\u on\u include方法打印 以下是默认标准输出插件的外观: def v2_playbook_on_include(self, included_file): msg = 'included: %s for %s' % (included_fil

我试图从Ansible playbook运行中隐藏此teal
include:
语句。似乎每次有一个包含变量的
模式脚本
,就会出现这个teal语句。任何能够隐藏这一点的帮助都将不胜感激。非常感谢你


这些行由回调插件的
v2\u playbook\u on\u include
方法打印

以下是默认标准输出插件的外观:

def v2_playbook_on_include(self, included_file):
    msg = 'included: %s for %s' % (included_file._filename, ", ".join([h.name for h in included_file._hosts]))
    self._display.display(msg, color=C.COLOR_SKIP)
如果您需要省略此项,请使用不太“健谈”的标准输出回调插件(例如,
actionable
),或者编写自己的标准输出插件,其中包含所需的函数

测试其他回调的简单方法:

$ ANSIBLE_STDOUT_CALLBACK=actionable ansible-playbook myplaybook.yml

这些行由回调插件的
v2\u playbook\u on\u include
方法打印

以下是默认标准输出插件的外观:

def v2_playbook_on_include(self, included_file):
    msg = 'included: %s for %s' % (included_file._filename, ", ".join([h.name for h in included_file._hosts]))
    self._display.display(msg, color=C.COLOR_SKIP)
如果您需要省略此项,请使用不太“健谈”的标准输出回调插件(例如,
actionable
),或者编写自己的标准输出插件,其中包含所需的函数

测试其他回调的简单方法:

$ ANSIBLE_STDOUT_CALLBACK=actionable ansible-playbook myplaybook.yml

我选择了一个非常简单的解决方案,但它是有效的:

ansible-playbook main.yml | grep -v --line-buffered '^included:'

由于我使用gitlab ci来运行playbook,我可以轻松地在每次运行中包含
grep
部分。

我选择了一个非常简单的解决方案,但它可以工作:

ansible-playbook main.yml | grep -v --line-buffered '^included:'

由于我使用gitlab ci运行playbook,因此我可以轻松地在每次运行中包含
grep
部分。

感谢您的帮助!这就成功了。不要再画蓝线了!谢谢你的帮助!这就成功了。不要再画蓝线了!