-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate_certs.yml
65 lines (65 loc) · 2.68 KB
/
create_certs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Author Remo Mattei
# Email: rm@rm.ht
---
- hosts: localhost
gather_facts: false
connection: local
tasks:
- name: Generate Private key.
openssl_privatekey:
path: "{{ cert_path }}/{{ cert_key }}"
- name: Generate an OpenSSL Certificate Signing Request with Subject information
openssl_csr:
path: "{{ cert_path }}/{{ cert_csr }}"
privatekey_path: "{{ cert_path }}/{{ cert_key }}"
country_name: "{{ country }}"
organization_name: "{{ organization }}"
email_address: "{{ email }}"
common_name: "{{ common_name }}"
tags:
- create_csr
- name: Generate a Self Signed OpenSSL certificate.
openssl_certificate:
path: "{{ cert_path }}/{{ cert_fullchain }}"
privatekey_path: "{{ cert_path }}/{{ cert_key }}"
csr_path: "{{ cert_path }}/{{ cert_csr }}"
provider: selfsigned
- name: Configure SE Group
no_log: false
import_role:
name: avinetworks.aviconfig
vars:
avi_config:
sslprofile:
- name: "{{ ssl_profile_name }}"
tenant: "{{ username }}"
cipher_enums: [
"TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA",
"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA",
"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",
"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",
"TLS_RSA_WITH_AES_128_GCM_SHA256",
"TLS_RSA_WITH_AES_256_GCM_SHA384",
"TLS_RSA_WITH_AES_128_CBC_SHA256",
"TLS_RSA_WITH_AES_256_CBC_SHA256",
"TLS_RSA_WITH_AES_256_CBC_SHA",
"TLS_RSA_WITH_3DES_EDE_CBC_SHA"
]
accepted_versions:
- type: SSL_VERSION_TLS1
- type: SSL_VERSION_TLS1_1
- type: SSL_VERSION_TLS1_2
sslkeyandcertificate:
- name: "{{ sslkeycert }}"
tenant: "{{ username }}"
certificate:
self_signed: true
certificate: "{{ lookup('file', '{{ cert_path }}/{{ cert_fullchain }}' )}}"
key: "{{ lookup('file', '{{ cert_path }}/{{ cert_key }}' )}}"