openssl_csr: Update example (#41677)
Update example of Subject Alternative Name with dynamic list. Fixes: #33676 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
b5c18ea2bd
commit
671babd9aa
1 changed files with 10 additions and 0 deletions
|
@ -208,6 +208,16 @@ EXAMPLES = '''
|
|||
privatekey_path: /etc/ssl/private/ansible.com.pem
|
||||
subject_alt_name: 'DNS:www.ansible.com,DNS:m.ansible.com'
|
||||
|
||||
# Generate an OpenSSL CSR with subjectAltName extension with dynamic list
|
||||
- openssl_csr:
|
||||
path: /etc/ssl/csr/www.ansible.com.csr
|
||||
privatekey_path: /etc/ssl/private/ansible.com.pem
|
||||
subject_alt_name: "{{ item.value | map('regex_replace', '^', 'DNS:') | list }}"
|
||||
with_dict:
|
||||
dns_server:
|
||||
- www.ansible.com
|
||||
- m.ansible.com
|
||||
|
||||
# Force re-generate an OpenSSL Certificate Signing Request
|
||||
- openssl_csr:
|
||||
path: /etc/ssl/csr/www.ansible.com.csr
|
||||
|
|
Loading…
Reference in a new issue