add debian compatibility

This commit is contained in:
vincent 2022-11-01 20:37:56 +01:00
parent e42a418fa4
commit d5677c4891
3 changed files with 26 additions and 0 deletions

View File

@ -14,6 +14,20 @@
mode: 0644
when: ansible_os_family == "RedHat"
- name: Add Vault/Hashicorp apt key
apt_key:
url: "{{ vault_debian_repository_key_url }}"
state: present
become: true
when: ansible_pkg_mgr == 'apt'
- name: Add Vault/Hashicorp apt repo
apt_repository:
repo: "deb {{ vault_debian_repository_url }} {{ ansible_distribution_release }} main"
state: present
become: true
when: ansible_pkg_mgr == 'apt'
- name: install package
package:
name: "{{ vault_os_package }}"

View File

@ -9,3 +9,6 @@ address = "{{ vault_listener_address}}:8200"
tls_disable = 1
}
ui= true
{% if ansible_virtualization_type == 'lxc' %}
disable_mlock = true
{%endif%}

9
vars/Debian.yml Normal file
View File

@ -0,0 +1,9 @@
---
vault_os_package:
- vault
vault_os_service: vault
vault_config_path: "/etc/vault.d/vault.hcl"
vault_debian_repository_url: "https://apt.releases.hashicorp.com"
vault_debian_repository_key_url: "{{ vault_debian_repository_url }}/gpg"