datta/playbooks/pass.yaml

21 lines
563 B
YAML
Raw Normal View History

2023-11-12 15:37:15 +00:00
---
- 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