toansible: Add pass installation
This commit is contained in:
parent
1b45803cbe
commit
2724e4b6d2
4 changed files with 59 additions and 20 deletions
20
configs.yml
20
configs.yml
|
@ -36,26 +36,6 @@ repos:
|
|||
- include:
|
||||
- repos.yml
|
||||
|
||||
pass:
|
||||
- install:
|
||||
- pass
|
||||
- gnupg
|
||||
- clone:
|
||||
url: git@tunuifranken.info:flyingscorpio/.password-store.git
|
||||
dest: ~/.password-store
|
||||
branch: main
|
||||
- symlink:
|
||||
- dotfiles/gpg/gpg-agent.conf
|
||||
- ~/.gnupg/gpg-agent.conf
|
||||
- run:
|
||||
command: sudo cp /usr/share/doc/pass/examples/dmenu/passmenu /usr/bin
|
||||
condition: debian
|
||||
- run:
|
||||
- sudo cp /usr/bin/passmenu /usr/bin/passmenu-url &&
|
||||
sudo sed -i "s/pass show -c/pass show -c2/g" /usr/bin/passmenu-url;
|
||||
sudo cp /usr/bin/passmenu /usr/bin/passmenu-user &&
|
||||
sudo sed -i "s/pass show -c/pass show -c3/g" /usr/bin/passmenu-user
|
||||
|
||||
protonvpn:
|
||||
- install:
|
||||
- openvpn
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
tags: i3
|
||||
- role: kitty
|
||||
tags: kitty
|
||||
- role: pass
|
||||
tags: pass
|
||||
- role: keepass
|
||||
tags: keepass
|
||||
- role: terminator
|
||||
|
|
57
roles/pass/tasks/main.yml
Normal file
57
roles/pass/tasks/main.yml
Normal file
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
|
||||
- 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
|
||||
|
||||
- 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
|
Loading…
Add table
Reference in a new issue