ansible / ansible.builtin / v2.9.18 / module / cs_router Manages routers on Apache CloudStack based clouds. | "added in version" 2.2 of ansible.builtin" Authors: René Moser (@resmo) stableinterface | supported by communityansible.builtin.cs_router (v2.9.18) — module
pip
Install with pip install ansible==2.9.18
Start, restart, stop and destroy routers.
I(state=present) is not able to create routers, use M(cs_network) instead.
# Ensure the router has the desired service offering, no matter if # the router is running or not. - name: Present router cs_router: name: r-40-VM service_offering: System Offering for Software Router delegate_to: localhost
- name: Ensure started cs_router: name: r-40-VM state: started delegate_to: localhost
# Ensure started with desired service offering. # If the service offerings changes, router will be rebooted. - name: Ensure started with desired service offering cs_router: name: r-40-VM service_offering: System Offering for Software Router state: started delegate_to: localhost
- name: Ensure stopped cs_router: name: r-40-VM state: stopped delegate_to: localhost
- name: Remove a router cs_router: name: r-40-VM state: absent delegate_to: localhost
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 version_added: '2.4' version_added_collection: ansible.builtin 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