setup-cockpit/roles/pass/tasks/main.yml

57 lines
1.3 KiB
YAML

---
- name: Install packages (Archlinux)
become: true
pacman:
name:
- pass
- gnupg
when: ansible_distribution == 'Archlinux'
- name: Install packages (Debian)
become: true
apt:
name:
- pass
- gnupg
when: ansible_distribution == 'Debian'
- name: Clone pass repo
git:
repo: git@tunuifranken.info:flyingscorpio/.password-store.git
dest: ~/.password-store
version: main
clone: yes
update: no
- name: Copy gpg-agent.conf
copy:
src: gpg-agent.conf
dest: ~/.gnupg/gpg-agent.conf
backup: true
- name: Get passmenu (Debian)
become: true
copy:
src: /usr/share/doc/pass/examples/dmenu/passmenu
dest: /usr/bin/passmenu
remote_src: yes
when: ansible_distribution == 'Debian'
- name: Get passmenu-url and passmenu-user
become: true
block:
- name: Copy files
copy: src=/usr/bin/passmenu dest={{ item }}
with_items:
- /usr/bin/passmenu-url
- /usr/bin/passmenu-user
- name: Replace passmenu-url command
replace:
path: /usr/bin/passmenu-url
regexp: pass show -c
replace: pass show -c2
- name: Replace passmenu-user command
replace:
path: /usr/bin/passmenu-user
regexp: pass show -c
replace: pass show -c3