Skip to content

Commit

Permalink
SET-742 Zeus: don't import specific service certificates into truststore
Browse files Browse the repository at this point in the history
  • Loading branch information
RanabirChakraborty committed Apr 3, 2024
1 parent 85784bb commit e2bc722
Showing 1 changed file with 2 additions and 29 deletions.
31 changes: 2 additions & 29 deletions roles/java_certs/tasks/java_certs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
- ansible.builtin.assert:
that:
- certificate_list is defined
- certificate_list is iterable
- root_ca_certs is defined
- root_ca_certs is iterable

# reset cacerts_file fact between iterations
- ansible.builtin.set_fact:
Expand Down Expand Up @@ -46,20 +46,6 @@
loop_control:
loop_var: cert

- name: Remove SSL certificates in {{ jdk.name }}
when: rebuild_keystore|default(false)
community.general.java_cert:
cert_url: "{{ removessl.cert_url }}"
keystore_path: "{{ cacerts_file }}"
cert_alias: "{{ removessl.alias }}"
executable: "{{ jdk.home }}/{{ jdk.name }}/bin/keytool"
keystore_pass: changeit
keystore_create: no
state: absent
with_items: "{{ certificate_list }}"
loop_control:
loop_var: removessl

- name: Import Root CA in {{ jdk.name }} {{ cacerts_file }}
community.general.java_cert:
cert_path: "{{ jdk_home }}/{{ cert.url | basename }}"
Expand All @@ -72,16 +58,3 @@
with_items: "{{ root_ca_certs }}"
loop_control:
loop_var: cert

- name: Import SSL certificates in {{ jdk.name }}
community.general.java_cert:
cert_url: "{{ importssl.cert_url }}"
keystore_path: "{{ cacerts_file }}"
cert_alias: "{{ importssl.alias }}"
executable: "{{ jdk.home }}/{{ jdk.name }}/bin/keytool"
keystore_pass: changeit
keystore_create: no
state: present
with_items: "{{ certificate_list }}"
loop_control:
loop_var: importssl

0 comments on commit e2bc722

Please sign in to comment.