--- - name: is /etc clean? command: git status --porcelain args: chdir: /etc changed_when: False register: git_status tags: - git - name: /etc modifications are committed shell: "git add -A . && git commit -m \"Ansible run\"" args: chdir: /etc register: etc_commit_end_evolinux when: git_status.stdout != "" tags: - git