Skip to main content
1 of 3
In your script you should enter complete PATH:
   #!/bin/bash
   p="/dir/file/create"
   cd "$p" 

don't use sh in front of COMMAND module:
   - name: changing dir now..
     command: /dir/file/create/vars.sh