Skip to content

Commit f17850f

Browse files
committed
fix: remove create secret helper
1 parent c35838e commit f17850f

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

examples/science/af3-slurm/adm/slurm-rest-token.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,14 @@
4949
- name: Decode SLURM token value
5050
ansible.builtin.set_fact:
5151
slurm_token: "{{ slurm_token_encoded.content | b64decode | trim }}"
52+
no_log: true
5253

5354
- name: Check if GCP secret exists
5455
ansible.builtin.shell: |
5556
gcloud secrets describe "{{ slurm_rest_token_secret_name }}" --project="{{ project_id }}"
5657
register: gcp_secret_check
57-
failed_when: false
5858
changed_when: false
59-
60-
- name: Create GCP secret if not exists
61-
ansible.builtin.shell: |
62-
gcloud secrets create "{{ slurm_rest_token_secret_name }}" --replication-policy="automatic" --project="{{ project_id }}"
63-
when: gcp_secret_check.rc != 0
59+
failed_when: gcp_secret_check.rc != 0
6460

6561
- name: Save SLURM token to GCP Secret Manager
6662
ansible.builtin.shell: |
@@ -69,6 +65,6 @@
6965
rescue:
7066
- name: Debug failure
7167
debug:
72-
msg: "Something went wrong during SLURM token generation or secret upload."
68+
msg: "Error: {{ gcp_secret_check.stderr if gcp_secret_check is defined else 'Something went wrong during SLURM token generation or secret upload' }}"
7369

7470
when: activate and slurm_rest_token_secret_name | length > 0

examples/science/af3-slurm/examples/simple_ipynb_launcher/Setup-pre-cluster-deployment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ slurm_rest_server_activate: true
4040
4141
### Configuring the SLURM REST API Token Secret Manager
4242
43-
Set `slurm_rest_token_secret_name` value in the `af3-slurm-deployment.yaml` with the name of an existing secret in Secret Manager. Alternatively, you can specify a name for a secret that does not yet exist. If the specified secret name is new, this blueprint will automatically create it for you.
43+
Set `slurm_rest_token_secret_name` value in the `af3-slurm-deployment.yaml` with the name of an existing secret in Secret Manager. Please follow the guideline [here](https://cloud.google.com/secret-manager/docs/create-secret-quickstart) to create a Secret Manager.
4444

4545
> This setting allows you to specify the name of a Google Cloud Secret Manager secret that holds your SLURM authentication token. Using Secret Manager is a secure way to manage sensitive credentials.
4646

0 commit comments

Comments
 (0)