-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add server certificate to CA certs on dev
So that MSL-API can connect to CKAN on local development environment, without having to disable TLS validation.
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
# copyright Utrecht University | ||
|
||
- name: Check whether local certificate has already been added to the CA certificates | ||
ansible.builtin.stat: | ||
path: /etc/ssl/certs/ca-certificates_updated.txt | ||
register: msl_api_certs_updated | ||
|
||
|
||
- name: Add local certificate to CA certificates | ||
ansible.builtin.shell: | ||
cmd: "tee -a /etc/ssl/certs/ca-certificates.crt < /etc/ssl/certs/localhost_and_chain.crt" | ||
when: not msl_api_certs_updated.stat.exists | ||
|
||
|
||
- name: Add file to record CA certificates have been updated | ||
ansible.builtin.file: | ||
path: /etc/ssl/certs/ca-certificates_updated.txt | ||
state: touch | ||
mode: "0644" | ||
when: not msl_api_certs_updated.stat.exists |