community / community.general / 0.1.1 / module / cs_securitygroup Manages security groups on Apache CloudStack based clouds. Authors: René Moser (@resmo) stableinterface | supported by communitycommunity.general.cs_securitygroup (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Create and remove security groups.
- name: create a security group cs_securitygroup: name: default description: default security group delegate_to: localhost
- name: remove a security group cs_securitygroup: name: default state: absent delegate_to: localhost
name: description: - Name of the security group. required: true type: str state: choices: - present - absent default: present description: - State of the security group. type: str domain: description: - Domain the security group is related to. type: str account: description: - Account the security group 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. - 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 project: description: - Name of the project the security group to be created in. 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 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 description: description: - Description of the security group. 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
account: description: Account the security group is related to. returned: success sample: example account type: str description: description: Description of security group. returned: success sample: application security group type: str domain: description: Domain the security group is related to. returned: success sample: example domain type: str id: description: UUID of the security group. returned: success sample: a6f7a5fc-43f8-11e5-a151-feff819cdc9f type: str name: description: Name of security group. returned: success sample: app type: str project: description: Name of project the security group is related to. returned: success sample: Production type: str tags: description: List of resource tags associated with the security group. returned: success sample: '[ { "key": "foo", "value": "bar" } ]' type: list