gcore / gcore.cloud / 1.0.1 / module / lifecycle_policy_info Gather infos about all GCore lifecycle policies. Authors: GCore (@GCore)gcore.cloud.lifecycle_policy_info (1.0.1) — module
Install with ansible-galaxy collection install gcore.cloud:==1.0.1
collections: - name: gcore.cloud version: 1.0.1
Gather infos about all GCore lifecycle policies.
- name: Gather gcore lifecycle policies infos gcore.cloud.lifecycle_policy_info: api_token: "{{ api_token }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}"
- name: Gather gcore specific lifecycle policy info gcore.cloud.lifecycle_policy_info: api_token: "{{ api_token }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" lifecycle_policy_id: "{{ lifecycle_policy_id }}"
api_key: description: - GCore API auth key - Can be passed as I(CLOUD_API_KEY) environment variable. type: str api_host: default: https://api.gcore.com/cloud description: - GCore API base host - Can be passed as I(CLOUD_API_HOST) environment variable. type: str region_id: description: - GCore API region ID - Required if I(region_name) is not passed - Can be passed as I(CLOUD_REGION_ID) environment variable. type: int project_id: description: - GCore API project ID - Required if I(project_name) is not passed - Can be passed as I(CLOUD_PROJECT_ID) environment variable. type: int api_timeout: default: 30 description: - Timeout in seconds to polling GCore API type: int region_name: description: - GCore API region name - Required if I(region_id) is not passed - Can be passed as I(CLOUD_REGION_NAME) environment variable. type: str need_volumes: description: - Set it if you want to get volume ids. required: false type: bool project_name: description: - GCore API project name - Required if I(project_id) is not passed - Can be passed as I(CLOUD_PROJECT_NAME) environment variable. type: str lifecycle_policy_id: description: - The ID of lifecycle policy you want to get. - The module will fail if the provided ID is invalid. required: false type: str
lifecycle_policy_info: contains: action: description: Policy action returned: always sample: volume_snapshot type: str id: description: Policy ID returned: always sample: 1 type: str name: description: Policy name returned: always sample: schedule_1 type: str project_id: description: Project ID returned: always sample: 1 type: int region_id: description: Region ID returned: always sample: 1 type: int schedules: description: Flavor ID elements: dict returned: always sample: - day: '*' day_of_week: '*' hour: 0, 10, 20 id: 1488e2ce-f906-47fb-ba32-c25a3f63df4f max_quantity: 2 minute: '30' month: '*' owner: lifecycle_policy owner_id: 1 resource_name_template: reserve snap of the volume volume_id timezone: Asia/Tashkent type: cron user_id: 12 week: '*' type: list status: description: Lifecycle policys status returned: always sample: active type: str user_id: description: User created the policy. returned: always sample: 11 type: int volumes: description: Data of volumes which should be reserved. elements: dict returned: if available sample: - id: 3ed9e2ce-f906-47fb-ba32-c25a3f63df4f name: test schedule type: list description: - When I(lifecycle_policy_id) is passed, it is a dict of resource. - Otherwise it is a list of dictionaries. returned: always type: complex