refactored gopass install

main
Ricard Illa 2022-09-18 18:06:15 +02:00
parent c72a63f665
commit a1ab38f0ad
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
3 changed files with 32 additions and 31 deletions

View File

@ -1,20 +0,0 @@
---
- 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
- gopass-archive-keyring
state: present

View File

@ -0,0 +1,31 @@
---
- name: install gopass (Alpine)
apk:
name: gopass
when: ansible_distribution == "Alpine"
- name: install gopass (Debian)
block:
- 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.list
update_cache: true
state: present
- name: install gopass
apt:
name:
- gopass
- gopass-archive-keyring
state: present
when: ansible_distribution in ["Debian", "Ubuntu"]
- name: install gopass (OpenBSD)
openbsd_pkg:
name: gopass
when: ansible_distribution == "OpenBSD"

View File

@ -1,14 +1,4 @@
---
- 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"
include_tasks: install.yml