salt-stack - Salt file.recurse 过滤器 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"
推荐阅读
- python - Teradataml (Teradata Python):Teradata Python 包是否提供任何示例数据集?
- android - 带有模拟和协程的 Android 测试存储库返回 NullPointerException
- python - Python 3.7.4:'re.error:位置 0 处的转义错误 \s'
- devexpress - 在一个 xtrareport 中创建多个图表
- dataframe - 将 pyspark Dataframe 写入具有相同列数和一个额外的 autoIncrement 列的雪花表中
- multithreading - 重置代码
- reactjs - 如何为 React 应用程序配置 Rollup?
- sql - Oracle case 缺少关键字
- python - TypeError:blit 的目标位置无效
- amazon-web-services - 哪个 AWS 托管策略包含创建 EKS 集群的权限?