community.general.cs_traffic_type (0.1.1) — module

Manages traffic types on CloudStack Physical Networks

Authors: Patryk Cichy (@PatTheSilent)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Add, remove, update Traffic Types associated with CloudStack Physical Networks.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: add a traffic type
  cs_traffic_type:
    physical_network: public-network
    traffic_type: Guest
    zone: test-zone
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: update traffic type
  cs_traffic_type:
    physical_network: public-network
    traffic_type: Guest
    kvm_networklabel: cloudbr0
    zone: test-zone
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: remove traffic type
  cs_traffic_type:
    physical_network: public-network
    traffic_type: Public
    state: absent
    zone: test-zone
  delegate_to: localhost

Inputs

    
vlan:
    description:
    - The VLAN id to be used for Management traffic by VMware host.
    type: str

zone:
    description:
    - Name of the zone with the physical network.
    - Default zone will be used if this is empty.
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the traffic type
    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

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

poll_async:
    default: true
    description:
    - Poll async jobs until job has finished.
    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

traffic_type:
    choices:
    - Management
    - Guest
    - Public
    - Storage
    description:
    - the trafficType to be added to the physical network.
    required: true
    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

isolation_method:
    choices:
    - vlan
    - vxlan
    description:
    - Use if the physical network has multiple isolation types and traffic type is public.
    type: str

kvm_networklabel:
    description:
    - The network name label of the physical device dedicated to this traffic on a KVM
      host.
    type: str

physical_network:
    description:
    - the name of the Physical Network
    required: true
    type: str

xen_networklabel:
    description:
    - The network name label of the physical device dedicated to this traffic on a XenServer
      host.
    type: str

ovm3_networklabel:
    description:
    - The network name of the physical device dedicated to this traffic on an OVM3 host.
    type: str

hyperv_networklabel:
    description:
    - The network name label of the physical device dedicated to this traffic on a HyperV
      host.
    type: str

vmware_networklabel:
    description:
    - The network name label of the physical device dedicated to this traffic on a VMware
      host.
    type: str

Outputs

hyperv_networklabel:
  description: The network name label of the physical device dedicated to this traffic
    on a HyperV host
  returned: success
  sample: HyperV Internal Switch
  type: str
id:
  description: ID of the network provider
  returned: success
  sample: 659c1840-9374-440d-a412-55ca360c9d3c
  type: str
kvm_networklabel:
  description: The network name label of the physical device dedicated to this traffic
    on a KVM host
  returned: success
  sample: cloudbr0
  type: str
ovm3_networklabel:
  description: The network name of the physical device dedicated to this traffic on
    an OVM3 host
  returned: success
  sample: cloudbr0
  type: str
physical_network:
  description: the physical network this belongs to
  returned: success
  sample: 28ed70b7-9a1f-41bf-94c3-53a9f22da8b6
  type: str
traffic_type:
  description: the trafficType that was added to the physical network
  returned: success
  sample: Public
  type: str
vmware_networklabel:
  description: The network name label of the physical device dedicated to this traffic
    on a VMware host
  returned: success
  sample: Management Network
  type: str
xen_networklabel:
  description: The network name label of the physical device dedicated to this traffic
    on a XenServer host
  returned: success
  sample: xenbr0
  type: str
zone:
  description: Name of zone the physical network is in.
  returned: success
  sample: ch-gva-2
  type: str