Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audit Logs #301

Open
AlyRagab opened this issue Aug 27, 2022 · 1 comment
Open

Audit Logs #301

AlyRagab opened this issue Aug 27, 2022 · 1 comment

Comments

@AlyRagab
Copy link

Enabling Audit Logs Device to be ready for any logging collector like Datadog, I can not find that in the documentation yet.

Is there any support for such feature using Ansible Role ?

@markafarrell
Copy link
Contributor

@AlyRagab
I don't believe you can do it using the role.

Its pretty easy to do it using the uri module though after the role has run

Something like:

---
- name: Enable audit log
  uri:
    url: https://127.0.0.1:8200/v1/sys/audit/file
    validate_certs: false
    headers:
      X-Vault-Token: "{{ lookup('env', 'VAULT_TOKEN') }}"
    follow_redirects: all
    method: PUT
    status_code:
      - 204
      - 400  # path already in use
    body:
      type: "file"
      options:
        file_path: "{{ vault_audit_log_path }}"
        mode: "0660"
    body_format: json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants