--- - name: update inception hosts: all tasks: - name: Go to the application directory command: chdir=/root/code/inception git pull origin master register: git_output - name: Run build script command: chdir=/root/code/inception ./build.sh when: git_output.changed