feat(generate_credentials): generate new accesor ids and vault token credentials
All checks were successful
development / Check commit compliance (push) Successful in 6s
pull-requests-open / Check commit compliance (pull_request) Successful in 7s

This commit is contained in:
Bertrand Lanson 2024-05-08 02:25:13 +02:00
parent 83f9c9748e
commit 340f2137d4
2 changed files with 12 additions and 1 deletions

View File

@ -14,8 +14,14 @@
- name: "Generate consul agents credentials"
ansible.builtin.set_fact:
_cosul_agents_accessor: "{{ lookup('password', '/dev/null chars=ascii_letters,digits') | to_uuid }}"
_consul_agents_token: "{{ lookup('password', '/dev/null chars=ascii_letters,digits') | to_uuid }}"
- name: "Generate consul vault credentials"
ansible.builtin.set_fact:
_cosul_vault_accessor: "{{ lookup('password', '/dev/null chars=ascii_letters,digits') | to_uuid }}"
_consul_vault_token: "{{ lookup('password', '/dev/null chars=ascii_letters,digits') | to_uuid }}"
- name: "Generate nomad credentials"
block:
- name: "Generate nomad root credentials"

View File

@ -3,6 +3,11 @@ consul:
root_token:
secret_id: "{{ _consul_root_token }}"
tokens:
agent: "{{ _consul_agents_token }}"
agent:
accessor_id: "{{ _consul_agents_accesor }}"
secret_id: "{{ _consul_agents_token }}"
vault:
accessor_id: "{{ _consul_vault_accessor }}"
secret_id: "{{ _consul_vault_token }}"
nomad:
root_token: "{{ _nomad_root_token }}"