community / community.general / 0.1.1 / module / cs_network_offering Manages network offerings on Apache CloudStack based clouds. Authors: David Passante (@dpassante) preview | supported by communitycommunity.general.cs_network_offering (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Create, update, enable, disable and remove network offerings.
- name: Create a network offering and enable it 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' } delegate_to: localhost
- name: Remove a network offering cs_network_offering: name: my_network_offering state: absent delegate_to: localhost
name: description: - The name of the network offering. required: true type: str state: choices: - enabled - present - disabled - absent default: present description: - State of the network offering. type: str api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. type: str api_url: description: - URL of the CloudStack API e.g. https://cloud.example.com/client/api. - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. type: str details: description: - Network offering details in key/value pairs. - with service provider as a value type: list for_vpc: description: - Whether the offering is meant to be used for VPC or not. type: bool api_region: default: cloudstack description: - Name of the ini section in the C(cloustack.ini) file. - If not given, the C(CLOUDSTACK_REGION) env variable is considered. type: str api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. type: str persistent: description: - True if network offering supports persistent networks - defaulted to false if not specified type: bool api_timeout: description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. - Fallback value is 10 seconds if not specified. type: int availability: description: - The availability of network offering. Default value is Optional type: str display_text: description: - Display text of the network offerings. type: str network_rate: description: - Data transfer rate in megabits per second allowed. type: int specify_vlan: description: - Whether the network offering supports vlans or not. type: bool traffic_type: default: Guest description: - The traffic type for the network offering. type: str conserve_mode: description: - Whether the network offering has IP conserve mode enabled. type: bool guest_ip_type: choices: - Shared - Isolated description: - Guest type of the network offering. type: str api_http_method: choices: - get - post description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. - Fallback value is C(get) if not specified. type: str max_connections: description: - Maximum number of concurrent connections supported by the network offering. type: int service_offering: description: - The service offering name or ID used by virtual router provider. type: str keepalive_enabled: description: - 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. type: bool service_providers: aliases: - service_provider description: - Provider to service mapping. - If not specified, the provider for the service will be mapped to the default provider on the physical network. type: list specify_ip_ranges: description: - Whether the network offering supports specifying IP ranges. - Defaulted to C(no) by the API if not specified. type: bool supported_services: aliases: - supported_service choices: - Dns - PortForwarding - Dhcp - SourceNat - UserData - Firewall - StaticNat - Vpn - Lb description: - Services supported by the network offering. - A list of one or more items from the choice list. type: list service_capabilities: aliases: - service_capability description: - Desired service capabilities as part of network offering. type: list egress_default_policy: choices: - allow - deny description: - Whether the default egress policy is allow or to deny. type: str
availability: description: The availability of network offering. returned: success sample: Optional type: str display_text: description: The display text of the network offering. returned: success sample: My network offering type: str egress_default_policy: description: Default egress policy. returned: success sample: allow type: str for_vpc: description: Whether the offering is meant to be used for VPC or not. returned: success sample: false type: bool version_added: '2.8' version_added_collection: community.general guest_ip_type: description: Guest type of the network offering. returned: success sample: Isolated type: str id: description: UUID of the network offering. returned: success sample: a6f7a5fc-43f8-11e5-a151-feff819cdc9f type: str is_default: description: Whether network offering is the default offering or not. returned: success sample: false type: bool is_persistent: description: Whether persistent networks are supported or not. returned: success sample: false type: bool max_connections: description: The maximum number of concurrent connections to be handled by LB. returned: success sample: 300 type: int name: description: The name of the network offering. returned: success sample: MyCustomNetworkOffering type: str network_rate: description: The network traffic transfer ate in Mbit/s. returned: success sample: 200 type: int service_offering_id: description: The service offering ID. returned: success sample: c5f7a5fc-43f8-11e5-a151-feff819cdc9f type: str state: description: The state of the network offering. returned: success sample: Enabled type: str traffic_type: description: The traffic type. returned: success sample: Guest type: str