From 571030e2e1097e753650e9b49b8c358932c5b3fd Mon Sep 17 00:00:00 2001 From: L3D Date: Fri, 29 Sep 2023 21:28:20 +0200 Subject: [PATCH] Prepare gopass installation + adding labels + cleanup + adding meta info + adding general installation --- .github/dependabot.yml | 9 + .github/galaxy.svg | 59 ----- .github/license.svg | 217 ------------------ .github/workflows/ansible-linting-check.yml | 23 ++ .github/{.galaxy.yml => workflows/galaxy.yml} | 10 +- .github/workflows/yamllint.yaml | 23 ++ README.md | 13 +- meta/main.yml | 22 ++ .../gopass-install/install-gopass-default.yml | 38 +++ tasks/gopass-install/install-on-debian.yml | 4 +- 10 files changed, 135 insertions(+), 283 deletions(-) create mode 100644 .github/dependabot.yml delete mode 100644 .github/galaxy.svg delete mode 100644 .github/license.svg create mode 100644 .github/workflows/ansible-linting-check.yml rename .github/{.galaxy.yml => workflows/galaxy.yml} (58%) create mode 100644 .github/workflows/yamllint.yaml create mode 100644 meta/main.yml create mode 100644 tasks/gopass-install/install-gopass-default.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..dde6f4a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +--- +# See https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" diff --git a/.github/galaxy.svg b/.github/galaxy.svg deleted file mode 100644 index 7f868c1..0000000 --- a/.github/galaxy.svg +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - do1jlr.role_name - do1jlr.role_name - - diff --git a/.github/license.svg b/.github/license.svg deleted file mode 100644 index 4ab6d9a..0000000 --- a/.github/license.svg +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - image/svg+xml - - - - - - 3D <l3d@c3woc.de> - - - - - MIT License - - - - - - - - - - - - - - - - - - - - - - - - - - - MIT - MIT - - - license - license - - diff --git a/.github/workflows/ansible-linting-check.yml b/.github/workflows/ansible-linting-check.yml new file mode 100644 index 0000000..0b1268c --- /dev/null +++ b/.github/workflows/ansible-linting-check.yml @@ -0,0 +1,23 @@ +--- +name: Ansible Lint check + +# yamllint disable-line rule:truthy +on: [push, pull_request] + +jobs: + build: + name: Ansible Lint + runs-on: ubuntu-latest + + steps: + - name: 'checkout git repo' + uses: actions/checkout@v4 + with: + lfs: true + submodules: false + fetch-depth: 0 + + - name: 'Lint Ansible Playbook' + uses: ansible/ansible-lint-action@v6 + with: + path: "." diff --git a/.github/.galaxy.yml b/.github/workflows/galaxy.yml similarity index 58% rename from .github/.galaxy.yml rename to .github/workflows/galaxy.yml index b5dc0ec..4426496 100644 --- a/.github/.galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -12,9 +12,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v2 - - name: galaxy - uses: robertdebock/galaxy-action@1.1.0 + - name: 'checkout git repo' + uses: actions/checkout@v4 + + - name: 'release on galaxy' + uses: robertdebock/galaxy-action@1.2.1 with: galaxy_api_key: ${{ secrets.galaxy_api_key }} + git_branch: 'main' diff --git a/.github/workflows/yamllint.yaml b/.github/workflows/yamllint.yaml new file mode 100644 index 0000000..99bb4c4 --- /dev/null +++ b/.github/workflows/yamllint.yaml @@ -0,0 +1,23 @@ +--- +name: 'Yamllint GitHub Actions' + +# yamllint disable-line rule:truthy +on: + push: + branches: '*' + pull_request: + branches: '*' + +jobs: + yamllint: + name: 'Yamllint' + runs-on: ubuntu-latest + steps: + - name: 'checkout git repo' + uses: actions/checkout@v4 + + - name: 'Yamllint' + uses: karancode/yamllint-github-action@v2.1.1 + with: + yamllint_file_or_dir: '.' + yamllint_config_filepath: './.yamllint' diff --git a/README.md b/README.md index bf350d7..14b88c1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ +[![Ansible Galaxy](https://ansible.l3d.space/svg/l3d.gopass.svg)](https://galaxy.ansible.com/l3d/gopass) +[![MIT License](https://ansible.l3d.space/svg/l3d.gopass_license.svg)](LICENSE) +[![Maintainance](https://ansible.l3d.space/svg/l3d.gopass_maintainance.svg)](https://ansible.l3d.space/#l3d.gopass) # Gopass Ansible Rolle 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). -# WIP -This role is still work in progress. Sorry. +This role will only install the gopass passwordmanager. You have to configure and edit it by yourself 😉 + +## Variables +| Name | Value | Function | +| ---- | ----- | -------- | +| ``gopass__add_apt_repo`` | ``true`` | Install Gopass keyring and apt list on debian based Systems | +| ``gopass__install_jsonapi`` | ``true`` | Install gopass-jsonapi integration for browser integration | +| ``gopass__install_haveibeenpwnd`` | ``true`` | Install haveibeenpwnd.com integration | diff --git a/meta/main.yml b/meta/main.yml new file mode 100644 index 0000000..6a74963 --- /dev/null +++ b/meta/main.yml @@ -0,0 +1,22 @@ +--- +galaxy_info: + role_name: gopass + author: l3d + description: Ansile role to install the Password Manager gopass. + license: "MIT" + min_ansible_version: '2.15' + github_branch: main + platforms: + - name: ArchLinux + versions: ['all'] + - name: Debian + versions: ['all'] + - name: Ubuntu + versions: ['all'] + galaxy_tags: + - gopass + - pass + - gnupg + - passwordstore + - linux +dependencies: [] diff --git a/tasks/gopass-install/install-gopass-default.yml b/tasks/gopass-install/install-gopass-default.yml new file mode 100644 index 0000000..4e7d30c --- /dev/null +++ b/tasks/gopass-install/install-gopass-default.yml @@ -0,0 +1,38 @@ +--- +- name: Install requirements for gopass + become: true + ansible.builtin.package: + name: "{{ item }}" + state: present + with_items: + - git + - gnupg2 + - rng-tools + - xsel + - xclip + +- name: Install Gopass + ansible.builtin.apt: + name: "{{ item }}" + state: present + become: true + with_items: + - gopass + +- name: Install gopass-jsonapi for browser integration + ansible.builtin.apt: + name: "{{ item }}" + state: present + become: true + with_items: + - gopass-jsonapi + when: gopass__install_jsonapi | bool + +- name: Install gopass-hibp for haveibeenpwnd.com integration + ansible.builtin.apt: + name: "{{ item }}" + state: present + become: true + with_items: + - gopass-hibp + when: gopass__install_haveibeenpwnd | bool diff --git a/tasks/gopass-install/install-on-debian.yml b/tasks/gopass-install/install-on-debian.yml index bfe56a0..54046f3 100644 --- a/tasks/gopass-install/install-on-debian.yml +++ b/tasks/gopass-install/install-on-debian.yml @@ -4,7 +4,7 @@ ansible.builtin.apt: cache_valid_time: 3600 -- name: Add reuirements for gopass +- name: Install requirements for gopass become: true ansible.builtin.apt: name: "{{ item }}" @@ -13,6 +13,8 @@ - git - gnupg2 - rng-tools + - xsel + - xclip - name: Adding Gopass Package Repository when: gopass__add_apt_repo | bool