Fortinet black logo

User Guide

Onboarding or deleting an application

Copy Link
Copy Doc ID 2ffc9903-bcb4-11e9-8977-00505692583a:235114
Download PDF

Onboarding or deleting an application

Example: onboard an application

---
 
- name: Execute cloud api

hosts: fortiwebcloud01

gather_facts: no

collections:

- fortinet.fortiwebcloud

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 False.

ansible_httpapi_use_ssl

Whether to use SSL protocol for the connections between your Ansible host and FortiWeb Cloud's API gateway.

Specify true.

ansible_httpapi_port

The port number used for the SSL connection.

Specify 443.

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

False: Disable CDN.

True: Enable CDN.

For more information, see CDN.

block

False: Disable Block mode.

True: Enable Block mode.

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: fortiwebcloud01

gather_facts: no

collections:

- fortinet.fortiwebcloud

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}}"

Onboarding or deleting an application

Example: onboard an application

---
 
- name: Execute cloud api

hosts: fortiwebcloud01

gather_facts: no

collections:

- fortinet.fortiwebcloud

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 False.

ansible_httpapi_use_ssl

Whether to use SSL protocol for the connections between your Ansible host and FortiWeb Cloud's API gateway.

Specify true.

ansible_httpapi_port

The port number used for the SSL connection.

Specify 443.

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

False: Disable CDN.

True: Enable CDN.

For more information, see CDN.

block

False: Disable Block mode.

True: Enable Block mode.

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: fortiwebcloud01

gather_facts: no

collections:

- fortinet.fortiwebcloud

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}}"