如何解决盐文件递归过滤器include_pat:不起作用
我正在尝试使用file.recurse
复制几个扩展名为的文件,但是当我放置include_pat: *.sh
时,它会抛出错误:
Data failed to compile:
----------
Rendering SLS 'base:test_copy_sqlautomation' failed: did not find expected alphabetic or numeric character
ERROR: Minions returned with non-zero exit code
解决方法
这似乎是YAML的一个简单问题,无法将*
识别为glob字符。 Salt期望字母或数字字符与include_pat
相匹配。如果将其用引号引起来,它将起作用。
示例:
copy_shell_scripts:
file.recurse:
- name: /tmp/scripts
- source: salt://scripts
- include_pat: "*.sh"
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。