以下任务有效:
- name: capture bundle file name
become: no
local_action: "command ls {{playbook_dir}}/build/"
register: BUNDLE_FILE_NAME
./ build中的文件列表已分配给BUNDLE_FILE_NAME
首先,以下操作无效:
- name: capture bundle file name
become: no
local_action: "command ls {{playbook_dir}}/build/*.js"
register: BUNDLE_FILE_NAME
我得到了错误:
ls: cannot access 'build/*.js': No such file or directory
与以下事实矛盾:第一个命令成功运行,目录可访问,并且文件确实捕获* .js ...
怎么了?
答案 0 :(得分:2)
您可能需要使用{
"modules": {
"out": "src/background.ts"
},
"compilerFlags": {
"language_out": "ECMASCRIPT_2019"
},
"external": {
"chrome_extensions": "chrome"
},
"prefix": "dist/"
}
而不是shell
。
command
模块不执行通配符。