ngine_io.cloudstack.cs_network_offering – Manages network offerings on Apache CloudStack based clouds.
Note
This plugin is part of the ngine_io.cloudstack collection (version 2.2.2).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install ngine_io.cloudstack
.
To use it in a playbook, specify: ngine_io.cloudstack.cs_network_offering
.
New in version 0.1.0: of ngine_io.cloudstack
Requirements
The below requirements are needed on the host that executes this module.
python >= 2.6
cs >= 0.9.0
Parameters
Parameter |
Comments |
---|---|
HTTP method used to query the API endpoint. If not given, the Choices:
|
|
API key of the CloudStack API. If not given, the |
|
Secret key of the CloudStack API. If not set, the |
|
HTTP timeout in seconds. If not given, the Default: 10 |
|
URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the |
|
Verify CA authority cert file. If not given, the |
|
The availability of network offering. Default value is Optional |
|
Whether the network offering has IP conserve mode enabled. Choices:
|
|
Network offering details in key/value pairs. with service provider as a value |
|
Display text of the network offerings. |
|
List of domains the network offering is related to. Use |
|
Whether the default egress policy is allow or to deny. Choices:
|
|
Whether the offering is meant to be used for VPC or not. Choices:
|
|
Guest type of the network offering. Choices:
|
|
If true keepalive will be turned on in the loadbalancer. At the time of writing this has only an effect on haproxy. the mode http and httpclose options are unset in the haproxy conf file. Choices:
|
|
Maximum number of concurrent connections supported by the network offering. |
|
The name of the network offering. |
|
Data transfer rate in megabits per second allowed. |
|
True if network offering supports persistent networks defaulted to false if not specified Choices:
|
|
Desired service capabilities as part of network offering. |
|
The service offering name or ID used by virtual router provider. |
|
Provider to service mapping. If not specified, the provider for the service will be mapped to the default provider on the physical network. |
|
Whether the network offering supports specifying IP ranges. Defaulted to Choices:
|
|
Whether the network offering supports vlans or not. Choices:
|
|
State of the network offering. Choices:
|
|
Services supported by the network offering. A list of one or more items from the choice list. Choices:
|
|
List of tags. Tags are a list of strings. To delete all tags, set an empty list e.g. tags: []. |
|
The traffic type for the network offering. Default: “Guest” |
|
List of zones the network offering is related to. Use |
Notes
Note
A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide.
This module supports check mode.
Examples
- name: Create a network offering and enable it
ngine_io.cloudstack.cs_network_offering:
name: my_network_offering
display_text: network offering description
state: enabled
guest_ip_type: Isolated
supported_services: [ Dns, PortForwarding, Dhcp, SourceNat, UserData, Firewall, StaticNat, Vpn, Lb ]
service_providers:
- { service: 'dns', provider: 'virtualrouter' }
- { service: 'dhcp', provider: 'virtualrouter' }
- name: Remove a network offering
ngine_io.cloudstack.cs_network_offering:
name: my_network_offering
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The availability of network offering. Returned: success Sample: “Optional” |
|
The display text of the network offering. Returned: success Sample: “My network offering” |
|
List of domains associated with the network offering. Returned: success Sample: [“public”] |
|
Default egress policy. Returned: success Sample: “allow” |
|
Whether the offering is meant to be used for VPC or not. Returned: success Sample: false |
|
Guest type of the network offering. Returned: success Sample: “Isolated” |
|
UUID of the network offering. Returned: success Sample: “a6f7a5fc-43f8-11e5-a151-feff819cdc9f” |
|
Whether network offering is the default offering or not. Returned: success Sample: false |
|
Whether persistent networks are supported or not. Returned: success Sample: false |
|
The maximum number of concurrent connections to be handled by LB. Returned: success Sample: 300 |
|
The name of the network offering. Returned: success Sample: “MyCustomNetworkOffering” |
|
The network traffic transfer ate in Mbit/s. Returned: success Sample: 200 |
|
The service offering ID. Returned: success Sample: “c5f7a5fc-43f8-11e5-a151-feff819cdc9f” |
|
The state of the network offering. Returned: success Sample: “Enabled” |
|
List of tags associated with the network offering. Returned: success Sample: [“tag1”, “tag2”] |
|
The traffic type. Returned: success Sample: “Guest” |
|
List of zones associated with the network offering. Returned: success Sample: [“all”] |
Authors
David Passante (@dpassante)