You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
563 B

---
- 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