Allow downloading configs

This commit is contained in:
Nikolai Rodionov 2024-03-22 16:24:40 +01:00
parent 0a5d8ebe1a
commit a70dc5015f
Signed by: allanger
GPG Key ID: 0AA46A90E25592AD
2 changed files with 8 additions and 0 deletions

View File

@ -120,4 +120,10 @@
environment: environment:
KUBECONFIG: "{{ k8s_config_path }}" KUBECONFIG: "{{ k8s_config_path }}"
shell: "{{ working_dir }}/bin/kubectl apply -f {{ cert_dir }}/{{ username }}.yaml" shell: "{{ working_dir }}/bin/kubectl apply -f {{ cert_dir }}/{{ username }}.yaml"
- name: Storing config on the local machine
when: download_config
ansible.builtin.fetch:
src: "{{ conf_dir }}/config"
dest: "{{ output_path }}/{{ username }}-{{ cluster }}-config"
flat: true
tags: add_user tags: add_user

View File

@ -87,3 +87,5 @@
user_k8s_cert_path: "{{ item.k8s_cert_path | default(k8s_cert_path) }}" user_k8s_cert_path: "{{ item.k8s_cert_path | default(k8s_cert_path) }}"
user_k8s_cert_crt_file: "{{ item.k8s_cert_crt_file | default(k8s_cert_crt_file) }}" user_k8s_cert_crt_file: "{{ item.k8s_cert_crt_file | default(k8s_cert_crt_file) }}"
user_k8s_cert_key_file: "{{ item.k8s_cert_key_file | default(k8s_cert_key_file) }}" user_k8s_cert_key_file: "{{ item.k8s_cert_key_file | default(k8s_cert_key_file) }}"
download_config: "{{ item.download_config | default(false) }}"
output_path: "{{ item.output_path | default ('/tmp/outputs') }}"