fix(user/secrets/hcv): add tags and missing privilege escalation

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2023-09-06 13:10:48 +02:00
parent 5d8334c7f5
commit 0e6dd1af63
Signed by: mfocko
GPG key ID: 7C47D46246790496
4 changed files with 6 additions and 0 deletions

View file

@ -4,3 +4,4 @@
url: https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
dest: /etc/yum.repos.d/hashicorp.repo
mode: 0640
become: true

View file

@ -4,8 +4,10 @@
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

View file

@ -4,3 +4,4 @@
url: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
dest: /etc/yum.repos.d/hashicorp.repo
mode: 0640
become: true

View file

@ -1,6 +1,7 @@
---
- name: Install HC Vault via package manager
when: ansible_distribution in [ "AlmaLinux", "CentOS", "Fedora", "Ubuntu"]
tags: install
block:
- name: Enable repository
ansible.builtin.include_tasks: "install_{{ ansible_distribution }}.yml"
@ -14,6 +15,7 @@
- name: Install HC Vault to userspace
ansible.builtin.include_tasks: install_user.yml
when: ansible_distribution not in [ "AlmaLinux", "CentOS", "Fedora", "Ubuntu"]
tags: install
- name: Install vssh script
ansible.builtin.copy: