Importing/Getting/Deleting SNI certificates
Example: Import an SNI certificate
---
- hosts:fortiwebcloud01
name: Execute cloud api
collections:
-
gather_facts: no
connection: httpapi
vars:
ansible_httpapi_validate_certs: False
ansible_httpapi_use_ssl: True
ansible_httpapi_port: 443
application_name: "YOUR_APP_NAME"
tasks:
- name: Configure SNI certificates.
cloudwaf_sni_cert_method:
app_name: "{{application_name}}"
action: import
certificate: <YOUR-CERTIFICATE>
private_key: <YOUR_PRIVATE_KEY>
passwd: 123456
Example: Get an SNI certificate
---
- hosts:fortiwebcloud01
name: Execute cloud api
collections:
-
gather_facts: no
connection: httpapi
vars:
ansible_httpapi_validate_certs: False
ansible_httpapi_use_ssl: True
ansible_httpapi_port: 443
application_name: "YOUR_APP_NAME"
tasks:
- name: Get SNI certificates.
cloudwaf_sni_cert_method:
app_name: "{{application_name}}"
action: get
Example: Delete an SNI certificate
---
- hosts:fortiwebcloud01
name: Execute cloud api
collections:
-
gather_facts: no
connection: httpapi
vars:
ansible_httpapi_validate_certs: False
ansible_httpapi_use_ssl: True
ansible_httpapi_port: 443
application_name: "YOUR_APP_NAME"
tasks:
- name: Configure SNI certificates.
cloudwaf_sni_cert_method:
app_name: "{{application_name}}"
action: delete
id: 1
For more information about SNI certificates, see Custom Certificate.