gpt4 book ai didi

node.js - 解析 block 映射时未找到预期的键

转载 作者:行者123 更新时间:2023-12-04 17:39:59 25 4
gpt4 key购买 nike

我正在运行 ansible play-book 但出现以下错误 - 使用 ansible 2.7.6、ubuntu 16.04。
在剧本中提到

(<unknown>): did not find expected key while parsing a block mapping at line 6 column 3
我试过没有成为-yes,ubuntu,sudo 也遇到同样的问题和 ansible 说:
The offending line appears to be:


- name: build npm
^ here
 - hosts: all
vars:
app_dir: /home/ubuntu/app/backend-app-name
tasks:
- name: build npm
command: "chdir={{ app_dir }} {{ item }}"
with_items:
- /usr/bin/npm run build
become: yes
become_user: ubuntu
become_method: sudo

最佳答案

缩进是错误的。正确的语法是

   tasks:
- name: build npm
command: ...
with_items:
- /usr/bin/npm run build
become: yes
become_user: ubuntu
become_method: sudo

关于node.js - 解析 block 映射时未找到预期的键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54965199/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com