Ansible cannot find my playbook yml file

I have the following lines in my circle.yml file:

deployment:
  staging:
    branch: develop
    commands:
      - ansible-playbook update_staging.yml

I have checked and the update_staging.yml is committed to that branch, in the project root.

However when the tests run, I get the following error message:

$ ansible-playbook update_staging.yml

ERROR! the playbook: update_staging.yml could not be found

ansible-playbook update_staging.yml returned exit code 1

Action failed: ansible-playbook update_staging.yml

I’m guessing Ansible doesn’t know where to look for my update_staging.yml playbook, but I’m not sure how to point it to my project root.

What you have above, should work.

Can you try ssh’ing into a running build and then running ansible-playbook update_staging.yml from the project root and check that the file is where you expect on the build container.