且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Ansible:查找文件并遍历路径

更新时间:2023-11-11 20:20:10

debug 模块的 var 参数的正确语法(具有您的用例值)是:

The correct syntax for var argument of debug module (with the value for your use case) is:

  • 以Ansible表示法:

  • In Ansible notation:

debug: var=item.path

  • 以YAML表示法:

  • In YAML notation:

    debug:
      var: item.path
    

  • Ansible模块的用法已得到很好的记录,示例涵盖了大多数用户的需求.对于 debug 模块也是如此,因此请参阅检查示例的基本语法.

    Ansible modules' usage is fairy well documented and examples cover most users' needs. This is also true for the debug module, so refer to the examples to check the basic syntax.