This commit is contained in:
2026-05-23 19:31:56 +02:00
parent fc58ed2dc6
commit 9fbade1ed4
2 changed files with 42 additions and 17 deletions
+21 -2
View File
@@ -152,9 +152,12 @@
}
auto_auth {
method "token_file" {
method "approle" {
mount_path = "auth/approle"
config = {
token_file_path = "/etc/vault-agent/token"
role_id_file_path = "/etc/vault-agent/role_id"
secret_id_file_path = "/etc/vault-agent/secret_id"
}
}
@@ -186,6 +189,22 @@
group: root
mode: '0600'
- name: Create file with role_id for vault agent
copy:
dest: /etc/vault-agent/role_id
content: "{{ vault_ssh-client_role_id }}"
owner: root
group: root
mode: '0600'
- name: Create file with secret_id for vault agent
copy:
dest: /etc/vault-agent/secret_id
content: "{{ vault_ssh-client_secret_id }}"
owner: root
group: root
mode: '0600'
- name: Create service for vault agent
copy:
dest: /etc/systemd/system/vault-agent.service