Hi there,
I succesfully installed ansible on windows 10 ubuntu. Everything works...
from ubuntu.However, calling a playbook via windows does not work:
bash -c "~/test.sh"
ERROR! the playbook:x.ymlcould not be foundUbuntu:
#!/bin/bash
cd /mnt/c/ops/
ansible-playbook bla bla commandI guess bash -c uses the windows system where ansible does not run.
As far as I can tell it executes the linux sub-system as called and
will attempt to run the script.
I would try more debugging on your end as I am not sure exactly what
is going on environment wise on your system.
1. How did you install ansible on the system
2. Have the script print out the environment variables that are being
seen and compare them from the two runs.
I noticed a major difference between the environment variables when
running from power shell versus running in the environment. These
sorts of differences are expected because bash may not source certain
files depending on how it is invoked. My guess is that the python
fired inside of a Ubuntu is getting set up with certain paths and the
direct call isn't.