fix(secrets_hcv): fix DEB package install
* Install HC Vault on both Debian and Ubuntu in the same way * Fix the branching for userspace install vs package manager install Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
parent
61617ad70e
commit
c4e3bcde62
4 changed files with 16 additions and 15 deletions
1
roles/secrets_hcv/tasks/install_Debian.yml
Symbolic link
1
roles/secrets_hcv/tasks/install_Debian.yml
Symbolic link
|
@ -0,0 +1 @@
|
|||
install_deb.yml
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
- name: Add HashiCorp GPG Key
|
||||
ansible.builtin.get_url:
|
||||
url: https://apt.releases.hashicorp.com/gpg
|
||||
dest: /etc/apt/keyrings/hashicorp.asc
|
||||
mode: 0640
|
||||
become: true
|
||||
|
||||
- name: Add HashiCorp repository
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb [signed-by=/etc/apt/keyrings/hashicorp.gpg] https://apt.releases.hashicorp.com {{ ansible_distribution_release }} main"
|
||||
state: present
|
||||
become: true
|
1
roles/secrets_hcv/tasks/install_Ubuntu.yml
Symbolic link
1
roles/secrets_hcv/tasks/install_Ubuntu.yml
Symbolic link
|
@ -0,0 +1 @@
|
|||
install_deb.yml
|
12
roles/secrets_hcv/tasks/install_deb.yml
Normal file
12
roles/secrets_hcv/tasks/install_deb.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
- name: Add HashiCorp repository
|
||||
ansible.builtin.deb822_repository:
|
||||
name: hashicorp
|
||||
types: deb
|
||||
uris: https://apt.releases.hashicorp.com
|
||||
suites: "{{ ansible_distribution_release }}"
|
||||
components:
|
||||
- main
|
||||
signed_by: https://apt.releases.hashicorp.com/gpg
|
||||
state: present
|
||||
become: true
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: Install HC Vault via package manager
|
||||
when: ansible_distribution in [ "AlmaLinux", "CentOS", "Fedora", "Rocky", "Ubuntu"]
|
||||
when: ansible_distribution in [ "AlmaLinux", "CentOS", "Debian", "Fedora", "Rocky", "Ubuntu" ]
|
||||
tags: install
|
||||
block:
|
||||
- name: Enable repository
|
||||
|
@ -14,7 +14,7 @@
|
|||
|
||||
- name: Install HC Vault to userspace
|
||||
ansible.builtin.include_tasks: install_user.yml
|
||||
when: ansible_distribution not in [ "AlmaLinux", "CentOS", "Fedora", "Ubuntu"]
|
||||
when: ansible_distribution not in [ "AlmaLinux", "CentOS", "Debian", "Fedora", "Rocky", "Ubuntu" ]
|
||||
tags: install
|
||||
|
||||
- name: Install ‹vssh› script
|
||||
|
|
Loading…
Reference in a new issue