ngine_io / ngine_io.cloudstack / 2.3.0 / module / cs_router Manages routers on Apache CloudStack based clouds. | "added in version" 0.1.0 of ngine_io.cloudstack" Authors: René Moser (@resmo)ngine_io.cloudstack.cs_router (2.3.0) — module
Install with ansible-galaxy collection install ngine_io.cloudstack:==2.3.0
collections: - name: ngine_io.cloudstack version: 2.3.0
Start, restart, stop and destroy routers.
I(state=present) is not able to create routers, use M(ngine_io.cloudstack.cs_network) instead.
# Ensure the router has the desired service offering, no matter if # the router is running or not. - name: Present router ngine_io.cloudstack.cs_router: name: r-40-VM service_offering: System Offering for Software Router
- name: Ensure started ngine_io.cloudstack.cs_router: name: r-40-VM state: started
# Ensure started with desired service offering. # If the service offerings changes, router will be rebooted. - name: Ensure started with desired service offering ngine_io.cloudstack.cs_router: name: r-40-VM service_offering: System Offering for Software Router state: started
- name: Ensure stopped ngine_io.cloudstack.cs_router: name: r-40-VM state: stopped
- name: Remove a router ngine_io.cloudstack.cs_router: name: r-40-VM state: absent
name: description: - Name of the router. required: true type: str zone: description: - Name of the zone the router is deployed in. - If not set, all zones are used. type: str state: choices: - present - absent - started - stopped - restarted default: present description: - State of the router. type: str domain: description: - Domain the router is related to. type: str account: description: - Account the router is related to. type: str api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. required: true 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. required: true type: str project: description: - Name of the project the router is related to. type: str api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. required: true type: str poll_async: default: true description: - Poll async jobs until job has finished. type: bool api_timeout: default: 10 description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. type: int api_http_method: choices: - get - post default: get description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. type: str service_offering: description: - Name or id of the service offering of the router. type: str api_verify_ssl_cert: description: - Verify CA authority cert file. - If not given, the C(CLOUDSTACK_VERIFY) env variable is considered. type: str
account: description: Account the router is related to. returned: success sample: admin type: str created: description: Date of the router was created. returned: success sample: 2014-12-01T14:57:57+0100 type: str domain: description: Domain the router is related to. returned: success sample: ROOT type: str id: description: UUID of the router. returned: success sample: 04589590-ac63-4ffc-93f5-b698b8ac38b6 type: str name: description: Name of the router. returned: success sample: r-40-VM type: str redundant_state: description: Redundant state of the router. returned: success sample: UNKNOWN type: str requires_upgrade: description: Whether the router needs to be upgraded to the new template. returned: success sample: false type: bool role: description: Role of the router. returned: success sample: VIRTUAL_ROUTER type: str service_offering: description: Name of the service offering the router has. returned: success sample: System Offering For Software Router type: str state: description: State of the router. returned: success sample: Active type: str template_version: description: Version of the system VM template. returned: success sample: 4.5.1 type: str zone: description: Name of zone the router is in. returned: success sample: ch-gva-2 type: str