Skip to content

Commit

Permalink
fix security policy installation for oracle jre (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelpikta authored and tgadiev committed Nov 21, 2019
1 parent fbecfb0 commit 8b0d4ea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/Linux/security_policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- name: Unzip patch file
unarchive:
src: '{{ security_policy_java_artifact }}'
dest: '{{ java_path }}/{{ java_folder }}/jre/lib/security'
dest: '{{ security_patch_path }}'
remote_src: true
owner: root
group: root
Expand All @@ -26,7 +26,7 @@
copy:
src: "{{ java_path }}/{{ java_folder }}/jre/lib/security/\
{{ security_patch_folders[java_major_version|int] }}/{{ policy_item }}"
dest: '{{ java_path }}/{{ java_folder }}/jre/lib/security/'
dest: '{{ security_patch_path }}/'
remote_src: true
directory_mode: true
owner: root
Expand All @@ -43,7 +43,7 @@

- name: Apply setting
replace:
path: '{{ java_path }}/{{ java_folder }}/jre/lib/security/java.security'
path: '{{ security_patch_path }}/java.security'
regexp: '#crypto.policy=unlimited'
replace: 'crypto.policy=unlimited'
when: java_major_version | int < 9
Expand Down
7 changes: 7 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ security_patch_folders:
7: UnlimitedJCEPolicy
8: UnlimitedJCEPolicyJDK8

# security policy path
security_patch_path: >-
{{ (java_package|string == 'jdk')
| ternary(java_path + '/' + java_folder + '/jre/lib/security',
java_path + '/' + java_folder + '/lib/security')
}}
java_folder_ext_transport: '{{ java_def_folder_ext_transport }}'

java_def_folder_ext_transport: >-
Expand Down

0 comments on commit 8b0d4ea

Please sign in to comment.