- hosts: all tasks: - name: Checkout submodules shell: "if [ -d {{ item }} ] ; then git submodule update --init {{ item }} ; fi" args: chdir: /home/zuul/src/gerrit.googlesource.com/gerrit loop: - modules/jgit - polymer-bridges