Skip to content

Instantly share code, notes, and snippets.

View tbeyer567's full-sized avatar

Tim Beyer tbeyer567

  • Portland, OR
View GitHub Profile
/var/log/vault/audit.log {
rotate 30
daily
# Do not execute rotate if the log file is empty.
notifempty
missingok
compress
# Set compress on next rotate cycl to prevent entry loss when performing compression.
delaycompress
postrotate
- name: Create systemd overrides directory
ansible.builtin.file:
path: /etc/systemd/system/vault.service.d
state: directory
owner: root
group: root
mode: '0755'
- name: Create systemd overrides file
ansible.builtin.copy:
- hosts: all
become: true
remote_user:
roles:
- ansible-role-vault
# Enable userpass auth method
resource "vault_auth_backend" "userpass" {
type = "userpass"
}
resource "vault_generic_endpoint" "admin" {
depends_on = [vault_auth_backend.userpass]
path = "auth/userpass/users/admin"
ignore_absent_fields = true
path "engineering/*" {
capabilities = ["create", "read", "update", "delete", "list"
}
path "support/*" {
capabilities = ["deny"]
}
path "engineering/*" {
capabilities = ["create", "read", "update", "delete", "list"]
}