diff options
Diffstat (limited to 'roles/ands_kaas/tasks/keys.yml')
-rw-r--r-- | roles/ands_kaas/tasks/keys.yml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/roles/ands_kaas/tasks/keys.yml b/roles/ands_kaas/tasks/keys.yml new file mode 100644 index 0000000..2096c75 --- /dev/null +++ b/roles/ands_kaas/tasks/keys.yml @@ -0,0 +1,37 @@ +--- +- name: Try to locate pubkey file + set_fact: "kaas_{{ pod.key }}_pubkey={{ lookup('file', item) }}" + with_first_found: + - paths: + - "{{ kaas_project_path }}/keys/" + files: + - "{{ pod.key }}.crt" + - "{{ pod.key }}.pub" + - "{{ pod.value.service.host | default('default') }}.crt" + - "{{ pod.value.service.host | default('default') }}.pub" + skip: true + +- name: Try to locate privkey file + set_fact: "kaas_{{ pod.key }}_privkey={{ lookup('file', item) }}" + with_first_found: + - paths: + - "{{ kaas_project_path }}/keys/" + files: + - "{{ pod.key }}.key" + - "{{ pod.key }}.pem" + - "{{ pod.value.service.host | default('default') }}.key" + - "{{ pod.value.service.host | default('default') }}.pem" + skip: true + +- name: Try to locate CA file + set_fact: "kaas_{{ pod.key }}_ca={{ lookup('file', item) }}" + with_first_found: + - paths: + - "{{ kaas_project_path }}/keys/" + files: + - "{{ pod.key }}.ca" + - "{{ pod.value.service.host | default('default') }}.ca" + - ca-bundle.pem + - ca.pem + - ca.crt + skip: true |