当使用Molecular工具测试ansible角色并使用testinfra(pytest)验证结果时,我无法打印或调试某些输出或ansible变量。
============================= test session starts ==============================
platform linux2 -- Python 2.7.5, pytest-4.6.6, py-1.8.0, pluggy-0.13.0 -- /root/test1/myenv/bin/python2
using: pytest-4.6.6 pylib-1.8.0
setuptools registered plugins:
testinfra-3.2.1 at /root/test1/myenv/lib/python2.7/site-packages/testinfra/plugin.py
rootdir: /root/test1/server_manager/molecule/default
plugins: testinfra-3.2.1
collected 1 item
tests/test_default.py::test_Ansible_variable[ansible://instance] PASSED [100%]
=========================== 1 passed in 3.29 seconds ===========================
有办法吗?
答案 0 :(得分:1)
在std::vector<double> temp;
文件中的testinfra验证程序组件下,启用's'选项。例如:
molecule.yml