Reputation: 3889
When executing the following scripts where 'bappo-migrate' is a global npm package:
- name: Install migration-cli globally
npm:
name: '@bappo/migration-cli'
global: yes
- name: Run new migration scripts
command: bappo-migrate upgrade chdir={{homeDir}}/bappo/bappo-api/mongo_migrations
environment:
PATH: '{{homeDir}}/.npm-global/bin:$PATH'
Ansible throws error:
{
"changed":false,
"cmd":"bappo-migrate upgrade",
"msg":"[Errno 2] No such file or directory",
"rc":2
}
Cannot understand the error message - can confirm the directory exists and have tried manually executing the above commands, everything works fine.
Upvotes: 1
Views: 652