mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
c76e598d61
* Remove superfluous test.
* Use remote_temp_dir instead of output_dir on remote.
* Read certificate from correct place.
* Adjust more places.
* Fix boolean.
* Improve cryptography setup.
* Fix java_keystore changes.
* Need to copy binary from remote.
* Use correct Python for serve script.
* Sleep before downloading.
* Use correct Python interpreter.
* Avoid failing shebang test.
* Fix permission error with macOS 11.1.
* Avoid shebang trouble.
(cherry picked from commit 7c43cc3faa
)
Co-authored-by: Felix Fontein <felix@fontein.de>
33 lines
1.4 KiB
YAML
33 lines
1.4 KiB
YAML
---
|
|
- name: Create test directory
|
|
ansible.builtin.file:
|
|
path: "{{ remote_tmp_dir }}"
|
|
state: directory
|
|
|
|
- name: Create private keys
|
|
community.crypto.openssl_privatekey:
|
|
path: "{{ remote_tmp_dir ~ '/' ~ (item.keyname | default(item.name)) ~ '.key' }}"
|
|
size: 2048 # this should work everywhere
|
|
# The following is more efficient, but might not work everywhere:
|
|
# type: ECC
|
|
# curve: secp384r1
|
|
cipher: "{{ 'auto' if item.passphrase is defined else omit }}"
|
|
passphrase: "{{ item.passphrase | default(omit) }}"
|
|
loop: "{{ java_keystore_certs }}"
|
|
|
|
- name: Create CSRs
|
|
community.crypto.openssl_csr:
|
|
path: "{{ remote_tmp_dir ~ '/' ~ item.name ~ '.csr' }}"
|
|
privatekey_path: "{{ remote_tmp_dir ~ '/' ~ (item.keyname | default(item.name)) ~ '.key' }}"
|
|
privatekey_passphrase: "{{ item.passphrase | default(omit) }}"
|
|
commonName: "{{ item.commonName }}"
|
|
loop: "{{ java_keystore_certs + java_keystore_new_certs }}"
|
|
|
|
- name: Create certificates
|
|
community.crypto.x509_certificate:
|
|
path: "{{ remote_tmp_dir ~ '/' ~ item.name ~ '.pem' }}"
|
|
csr_path: "{{ remote_tmp_dir ~ '/' ~ item.name ~ '.csr' }}"
|
|
privatekey_path: "{{ remote_tmp_dir ~ '/' ~ (item.keyname | default(item.name)) ~ '.key' }}"
|
|
privatekey_passphrase: "{{ item.passphrase | default(omit) }}"
|
|
provider: selfsigned
|
|
loop: "{{ java_keystore_certs + java_keystore_new_certs }}"
|