【发布时间】:2020-06-21 17:19:15
【问题描述】:
我有一个通过 Jenkins 运行的 ansible 文件
shell: 'unzip -o p.zip'
args:
chdir: '/home/ec2-user/'
- pause: seconds=10
- name: install eslint
shell: 'npm install -g eslint --unsafe-perm=true --allow-root'
args:
chdir: '/home/ec2-user/'
- name: remove node-sass
shell: 'npm uninstall --save-dev node-sass'
args:
chdir: '/home/ec2-user/'
- name: install node-sass
shell: 'npm install --save-dev node-sass'
args:
chdir: '/home/ec2-user/'
failed_when: false
- pause: seconds=10
- name: start ng serve
shell: 'ng serve --port 4401 --host 0.0.0.0 --verbose &'
args:
chdir: '/home/ec2-user/'
但是应用程序被杀死了。
当我手动运行最后一个命令时,它会启动服务:--ng serve --port 4401 --host 0.0.0.0 --verbose &
同样的命令通过 ansible 失败
【问题讨论】:
-
有错误吗?剧本的哪一步失败了?
-
运行成功没有错误
标签: node.js angular jenkins ansible