|
@@ -32,7 +32,7 @@
|
32
|
32
|
mode=600
|
33
|
33
|
|
34
|
34
|
- name: Generate CA certificate
|
35
|
|
- command: openssl req -nodes -batch -new -x509 -key {{ openvpn_ca }}.key -out {{ openvpn_ca }}.crt -subj "{{ openssl_request_subject }}/CN=ca-certificate"
|
|
35
|
+ command: openssl req -nodes -batch -new -x509 -key {{ openvpn_ca }}.key -out {{ openvpn_ca }}.crt -days {{ openvpn_days_valid }} -subj "{{ openssl_request_subject }}/CN=ca-certificate"
|
36
|
36
|
creates={{ openvpn_ca }}.crt
|
37
|
37
|
|
38
|
38
|
- name: Generate the OpenSSL configuration that will be used for the Server certificate's req and ca commands
|
|
@@ -70,7 +70,7 @@
|
70
|
70
|
with_items: openvpn_clients
|
71
|
71
|
|
72
|
72
|
- name: Generate certificates for the clients
|
73
|
|
- command: openssl x509 -CA {{ openvpn_ca }}.crt -CAkey {{ openvpn_ca }}.key -CAcreateserial -req -in {{ item }}.csr -out {{ item }}.crt
|
|
73
|
+ command: openssl x509 -CA {{ openvpn_ca }}.crt -CAkey {{ openvpn_ca }}.key -CAcreateserial -req -days {{ openvpn_days_valid }} -in {{ item }}.csr -out {{ item }}.crt
|
74
|
74
|
chdir={{ openvpn_path }}
|
75
|
75
|
creates={{ item }}.crt
|
76
|
76
|
with_items: openvpn_clients
|