community / community.general / 0.1.1 / module / cs_project Manages projects on Apache CloudStack based clouds. Authors: René Moser (@resmo) stableinterface | supported by communitycommunity.general.cs_project (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, suspend, activate and remove projects.
- name: Create a project cs_project: name: web tags: - { key: admin, value: john } - { key: foo, value: bar } delegate_to: localhost
- name: Rename a project cs_project: name: web display_text: my web project delegate_to: localhost
- name: Suspend an existing project cs_project: name: web state: suspended delegate_to: localhost
- name: Activate an existing project cs_project: name: web state: active delegate_to: localhost
- name: Remove a project cs_project: name: web state: absent delegate_to: localhost
name: description: - Name of the project. required: true type: str tags: aliases: - tag description: - List of tags. Tags are a list of dictionaries having keys I(key) and I(value). - 'If you want to delete all tags, set a empty list e.g. I(tags: []).' type: list state: choices: - present - absent - active - suspended default: present description: - State of the project. type: str domain: description: - Domain the project is related to. type: str account: description: - Account the project 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 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 display_text: description: - Display text of the project. - If not specified, I(name) will be used as I(display_text). 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 project is related to. returned: success sample: example account type: str display_text: description: Display text of the project. returned: success sample: web project type: str domain: description: Domain the project is related to. returned: success sample: example domain type: str id: description: UUID of the project. returned: success sample: 04589590-ac63-4ffc-93f5-b698b8ac38b6 type: str name: description: Name of the project. returned: success sample: web project type: str state: description: State of the project. returned: success sample: Active type: str tags: description: List of resource tags associated with the project. returned: success sample: '[ { "key": "foo", "value": "bar" } ]' type: list