1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_gopass.git synced 2024-09-14 20:06:42 +02:00

Adding gopass apt sources

This commit is contained in:
L3D 2023-09-21 16:47:27 +02:00
parent 283037c8b2
commit 7aaa5b93fc
29 changed files with 78 additions and 383 deletions

View file

@ -1,18 +0,0 @@
---
name: Ansible check alpine:latest
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with alpine:latest
uses: roles-ansible/check-ansible-alpine-latest-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check archlinux:latest
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with archlinux:latest
uses: roles-ansible/check-ansible-archlinux-latest-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check centos:centos7
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:centos7
uses: roles-ansible/check-ansible-centos-centos7-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check centos:centos8
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:centos8
uses: roles-ansible/check-ansible-centos-centos8-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check centos:latest
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:latest
uses: roles-ansible/check-ansible-centos-latest-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check debian:bullseye
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:bullseye
uses: roles-ansible/check-ansible-debian-bullseye-action@main
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check debian:buster
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:buster
uses: roles-ansible/check-ansible-debian-buster-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check debian:latest
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:latest
uses: roles-ansible/check-ansible-debian-latest-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check debian:sid
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:sid
uses: roles-ansible/check-ansible-debian-sid-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check debian:stable
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:stable
uses: roles-ansible/check-ansible-debian-stable-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check debian:stretch
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with debian:stretch
uses: roles-ansible/check-ansible-debian-stretch-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check fedora:31
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with fedora:31
uses: roles-ansible/check-ansible-fedora-31-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check fedora:32
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with fedora:32
uses: roles-ansible/check-ansible-fedora-32-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check fedora:33
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with fedora:33
uses: roles-ansible/check-ansible-fedora-33-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check fedora:latest
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with fedora:latest
uses: roles-ansible/check-ansible-fedora-latest-action@master
with:
targets: "./"

View file

@ -1,22 +0,0 @@
---
name: Ansible Lint check
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Lint Ansible Playbook
uses: ansible/ansible-lint-action@master
with:
targets: "."
# [required]
# Paths to ansible files (i.e., playbooks, tasks, handlers etc..)
args: ""
# [optional]

View file

@ -1,18 +0,0 @@
---
name: Ansible check ubuntu:bionic
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:bionic
uses: roles-ansible/check-ansible-ubuntu-bionic-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check ubuntu:latest
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:latest
uses: roles-ansible/check-ansible-ubuntu-latest-action@master
with:
targets: "./"

View file

@ -1,18 +0,0 @@
---
name: Ansible check ubuntu:trusty
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: ansible check with ubuntu:trusty
uses: roles-ansible/check-ansible-ubuntu-trusty-action@master
with:
targets: "./"

View file

@ -1,22 +0,0 @@
---
name: 'Yamllint GitHub Actions'
# yamllint disable-line rule:truthy
on: [push, pull_request]
jobs:
yamllint:
name: 'Yamllint'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master
- name: 'Yamllint'
uses: karancode/yamllint-github-action@master
with:
yamllint_file_or_dir: '.'
yamllint_config_filepath: './.yamllint'
yamllint_strict: false
yamllint_comment: true
# env:
# GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }

View file

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2021 L3D <l3d@c3woc.de> Copyright (c) 2023 L3D <l3d@c3woc.de>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View file

@ -1,2 +1,3 @@
# ansible_role_template # Gopass Ansible Rolle
Template for Ansible roles
Ansile role to install the Password Manager [gopass](https://www.gopass.pw/). Gopass is a simple but powerful password manager for your terminal. And it is 100% API Compatible to the standard unix password manager [pass](https://passwordstore.org).

View file

@ -1,3 +1,4 @@
--- ---
gopass__add_apt_repo: true
# should we do a version check? (recomended) # should we do a version check? (recomended)
submodules_versioncheck: false submodules_versioncheck: false

5
handlers/main.yml Normal file
View file

@ -0,0 +1,5 @@
---
- name: Trigger apt update
become: true
ansible.builtin.apt:
update_cache: true

View file

@ -0,0 +1,39 @@
---
- name: Update apt cache
become: true
ansible.builtin.apt:
cache_valid_time: 3600
- name: Adding Gopass Package Repository
when: gopass__add_apt_repo | bool
block:
- name: Add Gopass archive keyring
ansible.builtin.get_url:
url: https://packages.gopass.pw/repos/gopass/gopass-archive-keyring.gpg
dest: "{{ gopass__keyring }}"
owner: root
group: root
mode: 0644
become: true
- name: Add Gopass repository source
become: true
ansible.builtin.template:
src: "templates/apt.gopass.sources.j2"
dest: '/etc/apt/sources.list.d/gopass.sources'
mode: 0644
group: root
owner: root
notify: Trigger apt update
- name: Trigger Handlers
ansible.builtin.meta: flush_handlers
- name: Install Gopass and Gopass archive keyring
ansible.builtin.apt:
name: "{{ item }}"
state: present
become: true
with_items:
- gopass-archive-keyring
- gopass

View file

@ -1,4 +1,14 @@
--- ---
- name: run optional versionscheck - name: Run optional versionscheck
ansible.builtin.include_tasks: versioncheck.yml ansible.builtin.include_tasks: versioncheck.yml
when: submodules_versioncheck | bool when: submodules_versioncheck | bool
- name: Install GoPass Packages
ansible.builtin.include_tasks: "{{ lookup('ansible.builtin.first_found', gopass_install) }}"
vars:
gopass_install:
files:
- "install-on-{{ ansible_os_family | lower }}.yml"
- 'install-gopass-default.yml'
paths:
- 'tasks/gopass-install'

View file

@ -10,7 +10,7 @@
mode: 0755 mode: 0755
when: submodules_versioncheck | bool when: submodules_versioncheck | bool
- name: check playbook version - name: Check playbook version
become: true become: true
ansible.builtin.slurp: ansible.builtin.slurp:
src: "/etc/.ansible-version/{{ playbook_version_path }}" src: "/etc/.ansible-version/{{ playbook_version_path }}"
@ -35,7 +35,7 @@
when: when:
- playbook_version.content | default("Mgo=") | b64decode | int - 1 >= playbook_version_number | int and submodules_versioncheck | bool - playbook_version.content | default("Mgo=") | b64decode | int - 1 >= playbook_version_number | int and submodules_versioncheck | bool
- name: write new version to remote disk - name: Write new version to remote disk
become: true become: true
ansible.builtin.copy: ansible.builtin.copy:
content: "{{ playbook_version_number }}" content: "{{ playbook_version_number }}"

View file

@ -0,0 +1,6 @@
Types: deb
URIs: https://packages.gopass.pw/repos/gopass
Suites: stable
Architectures: amd64 arm64 armhf
Components: main
Signed-By: {{ gopass__keyring }}

View file

@ -1,4 +1,5 @@
--- ---
gopass__keyring: /usr/share/keyrings/gopass-archive-keyring.gpg
# versionscheck # versionscheck
playbook_version_number: 02 # should be a integer playbook_version_number: 02 # should be a integer
playbook_version_path: 'role-<some_unique_string>.version' playbook_version_path: 'l3d.gopass.version'