Ansible inside script command not found

后端 未结 1 1632
感动是毒
感动是毒 2021-01-29 13:37

Ansible:

-   name: Node package manager
    npm:
        name: pm2
        global: yes
    notify:
        - restart nginx

-   name: start the app
    script: .         


        
相关标签:
1条回答
  • 2021-01-29 13:47

    You're overwriting the PATH environment variable in your script. This is used to determine where executables are located (see https://en.wikipedia.org/wiki/PATH_(variable)).

    Short answer is to use a different name for PATH in your script and use absolute paths for commands in your script.

    0 讨论(0)
提交回复
热议问题