adapt for red hat

This commit is contained in:
vincent 2022-06-06 18:20:08 +02:00
parent b692600eef
commit 16300d3c2a
3 changed files with 17 additions and 1 deletions

View File

@ -5,6 +5,13 @@
- files: - files:
- "{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml" - "{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
- "{{ ansible_os_family }}.yml" - "{{ ansible_os_family }}.yml"
- name: add hashicorp repo
get_url:
url: "https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo"
dest: '/etc/yum.repos.d/hashicorp.repo'
owner: root
group: root
mode: 0644
- name: install package - name: install package
package: package:
@ -16,7 +23,7 @@
- name: server template - name: server template
template: template:
src: config.hcl.j2 src: config.hcl.j2
dest: /etc/vault.hcl dest: "{{vault_config_path}}"
owner: vault owner: vault
group: vault group: vault
mode: 0400 mode: 0400

View File

@ -3,3 +3,5 @@ vault_os_package:
- vault - vault
vault_os_service: vault vault_os_service: vault
vault_config_path: "/etc/vault.hcl"

7
vars/RedHat.yml Normal file
View File

@ -0,0 +1,7 @@
---
vault_os_package:
- vault
vault_os_service: vault
vault_config_path: "/etc/vault.d/vault.hcl"