Versions - Ubuntu 16.04.2, Angular CLI 1.1.0, Ansible 2.3.0.0, and Python 2.7.12.
I'm trying to run ng build locally to create a build which will ultimately be copied to a remote server. For some reason the ng command is not being recognized when being run inside ansible.
Angular CLI is installed globally and ng works everywhere.
Here is the play:
- name: "Building"
shell: chdir="~/project/dir/" ng build
Here is the exact error from Ansible:
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "ng build", "delta": >"0:00:00.001310", "end": "2017-05-31 22:59:34.397388", "failed": true, "rc": >127, "start": "2017-05-31 22:59:34.396078", "stderr": "/bin/sh: 1: ng: not >found", "stderr_lines": ["/bin/sh: 1: ng: not found"], "stdout": "", >"stdout_lines": []}
Any ideas?