main
Ricard Illa 2022-09-17 18:03:17 +02:00
parent ec014c67f5
commit b8dc398497
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
5 changed files with 82 additions and 1 deletions

View File

@ -15,6 +15,7 @@
users:
- rilla
- ansible
- gopass
- woodpecker
- name: quality of life tools
@ -45,10 +46,19 @@
become: true
roles:
- wireguard
tags: wg
- name: lbu commit
hosts: snitch
become: true
roles:
- lbu_commit
- name: setup gopass
become: true
hosts:
- caladan
- fugu
- narwhal
roles:
- gopass
tags: gopass

9
group_vars/all/main.yml Normal file
View File

@ -0,0 +1,9 @@
---
deb_arch_mapping: {
"armv6l": "armhf",
"armv7l": "armhf",
"aarch64": "arm64",
"x86_64": "amd64",
"i386": "i386"
}

View File

@ -0,0 +1,19 @@
---
- name: add gopass apt key
get_url:
url: https://packages.gopass.pw/repos/gopass/gopass-archive-keyring.gpg
dest: /etc/apt/trusted.gpg.d/gopass-archive-keyring.gpg
- name: add gopass repo
apt_repository:
repo: deb https://packages.gopass.pw/repos/gopass stable main
filename: gopass.sources
update_cache: true
state: present
- name: install gopass
apt:
name:
- gopass
state: present

View File

@ -0,0 +1,14 @@
---
- name: install gopass
apk:
name: gopass
when: ansible_distribution == "Alpine"
- name: install gopass
include_tasks: debian.yml
when: ansible_distribution in ["Debian", "Ubuntu"]
- name: install gopass
openbsd_pkg:
name: gopass
when: ansible_distribution == "OpenBSD"

View File

@ -0,0 +1,29 @@
---
- name: create group 'gopass'
group:
name: gopass
gid: 503
- name: create user 'gopass'
user:
name: gopass
uid: 503
group: gopass
home: /var/lib/gopass
password: "!"
- name: make sure gopass owns its home
file:
state: directory
path: /var/lib/gopass
owner: gopass
group: gopass
mode: '2755'
- name: commit gopass's home to lbu
lbu:
include:
- /var/lib/gopass
exclude:
- /var/lib/gopass/.ash_history
when: ansible_distribution == "Alpine" and use_lbu