fix: env vars for bec atlas credentials

This commit is contained in:
2025-09-10 14:36:22 +02:00
parent 8e71c1c06c
commit 80dfb85320
2 changed files with 3 additions and 4 deletions
+2 -4
View File
@@ -77,7 +77,7 @@
Authorization: "Bearer {{ atlas_auth_response.content | trim | regex_replace('^\"(.*)\"$', '\\1') }}"
body_format: form-urlencoded
body:
deployment_name: "{{ deployment_name }}.psi.ch"
deployment_name: "{{ inventory_hostname }}"
return_content: yes
status_code: 200
register: atlas_credentials
@@ -91,10 +91,8 @@
ansible.builtin.copy:
content: "{{ atlas_credentials.content }}"
dest: "/etc/bec/secrets/.atlas.env"
owner: "{{ service_user }}"
group: "{{ service_user }}"
mode: "0600"
become: true
become: "{{ service_user }}"
when: bec_atlas_token is defined and atlas_credentials is succeeded
ignore_errors: true
+1
View File
@@ -3,3 +3,4 @@ deployment_path: "{{ deployment_path_prefix }}/{{ deployment_name }}_deployments
timestamped_deployment_path: "{{ deployment_path }}/{{ ansible_date_time['iso8601_basic_short'] }}"
bec_venv_path: "{{ timestamped_deployment_path }}/bec_venv"
user_git_branch_name: "{{ git_username }}_{{ deployment_name }}_{{ ansible_date_time['iso8601_basic_short'] }}"
bec_atlas_token: "{{ lookup('env', 'BEC_ATLAS_TOKEN') }}"