Onboarding or deleting an application
Example: onboard an application
---
- name: Execute cloud api
hosts:
gather_facts: no
collections:
-
connection: httpapi
vars:
ansible_httpapi_validate_certs: False
ansible_httpapi_use_ssl: true
ansible_httpapi_port: 443
application_name: "YOUR_APP_NAME"
tasks:
- name: Create an application.
cloudwaf_app_create:
app_name: "{{application_name}}"
domain_name: "www.example.com"
extra_domains:
- a.example.com
- b.example.com
app_service:
http: 80
https: 443
origin_server_ip: "166.111.4.100"
origin_server_service: "HTTPS"
origin_server_port: "443"
cdn: False
block: False
template: "your-template-name-or-empty"
ansible_httpapi_validate_certs |
Whether to validate certificates for the connections between your Ansible host and FortiWeb Cloud's API gateway. Specify |
ansible_httpapi_use_ssl |
Whether to use SSL protocol for the connections between your Ansible host and FortiWeb Cloud's API gateway. Specify |
ansible_httpapi_port |
The port number used for the SSL connection. Specify
|
domain_name | Specify the domain name of your application. See Domain name for more information. |
extra_domains | up to 9 extra domains can be added. See Domain name for more information. |
app_service | The traffic types allowed to arrive at the domains of your application. See Traffic Type for more information. |
origin_server_ip | The IP address of your origin server. |
origin_server_service | Specify HTTP or HTTPS . |
origin_server_port |
Specify the port number used for the HTTP or HTTPS connection between FortiWeb Cloud and your origin server. |
cdn |
For more information, see CDN. |
block |
For more information, see Understanding block mode and action. |
template |
Specify the template name. The configurations in the template will be applied to this application. You can also leave it empty. |
Example: delete an application
---
- name: Execute cloud api
hosts:
gather_facts: no
collections:
-
connection: httpapi
vars:
ansible_httpapi_validate_certs: False
ansible_httpapi_use_ssl: true
ansible_httpapi_port: 443
application_name: "YOUR_APP_NAME"
tasks:
- name: Delete the application.
cloudwaf_app_delete:
app_name: "{{application_name}}"