--- - name: Get password store hosts: localhost vars: uid: "{{ lookup('env','USER') }}" pass_repo: ssh://git@code.smolnet.org:22022/micke/pass.git pass_path: /home/{{ uid }}/.password-store connection: local become: false tasks: - name: Have pass stat: path: '{{ pass_path }}' register: password_store - name: Get password-store ansible.builtin.command: chdir: /tmp cmd: git clone {{ pass_repo }} {{ pass_path }} creates: '{{ pass_path }}' when: not password_store.stat.exists