我在尝试用什么时候模块来执行游戏手册
when: rxbar.stdout | join ('') | search("foo: ") and ansible_distribution_major_version|int >= 7我收到一个错误:.
模板字符串时
模板错误:没有名为“搜索”的过滤器。字符串rxbar.stdout
发布于 2021-03-25 06:56:37
你的错误是不言而喻的。
Template error while templating string: no filter named 'search'. String rxbar.stdout搜索不是您在这里使用的筛选器。
中搜索的示例
- debug:
msg: "matched pattern 2"
when: url is search("/users/.*/resources/.*")如果在字符串中的任何位置找到模式,搜索就会成功。
https://stackoverflow.com/questions/66787529
复制相似问题