gcore / gcore.cloud / 1.0.1 / module / reserved_fixed_ip Manages reserved fixed ip Authors: GCore (@GCore)gcore.cloud.reserved_fixed_ip (1.0.1) — module
Install with ansible-galaxy collection install gcore.cloud:==1.0.1
collections: - name: gcore.cloud version: 1.0.1
Created/update or delete reserved fixed ip
- name: Create new external reserved fixed ip gcore.cloud.reserved_fixed_ip: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: create type: external
- name: Create new subnet reserved fixed ip gcore.cloud.reserved_fixed_ip: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: create type: subnet subnet_id: "{{ subnet_id }}"
- name: Create new any subnet reserved fixed ip gcore.cloud.reserved_fixed_ip: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: create type: any_subnet network_id: "{{ network_id }}"
- name: Create new ip_address subnet reserved fixed ip gcore.cloud.reserved_fixed_ip: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: create type: ip_address network_id: "{{ network_id }}" ip_address: "{{ ip_address }}"
- name: Update reserved fixed ip gcore.cloud.reserved_fixed_ip: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: update port_id: "{{ port_id }}" is_vip: true
- name: Delete reserved fixed ip gcore.cloud.reserved_fixed_ip: api_key: "{{ api_key }}" region_id: "{{ region_id }}" project_id: "{{ project_id }}" command: delete port_id: "{{ port_id }}"
type: choices: - external - subnet - any_subnet - ip_address description: - Type if reserved fixed ip - Required if I(command) is created required: false type: str is_vip: description: - Reserved fixed IP is a VIP - Used if I(command) is created or update required: false type: bool api_key: description: - GCore API auth key - Can be passed as I(CLOUD_API_KEY) environment variable. type: str command: choices: - create - update - delete description: - Operation to perform. required: true type: str port_id: description: - Reserved fixed ip ID (port) - Required if I(command) is update or delete required: false 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 subnet_id: description: - Reserved fixed IP will be allocated in this subnet - Required if I(command) is created and I(type) is subnet required: false type: str ip_address: description: - Reserved fixed IP will be allocated the given IP address - Required if I(command) is created and I(type) is ip_address required: false type: str network_id: description: - Reserved fixed IP will be allocated in a subnet of this network - Required if I(command) is created and I(type) is any_subnet or ip_address required: false type: str 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 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
reserved_fixed_ip: contains: allowed_address_pairs: description: Group of subnet masks and/or IP addresses that share the current IP as VIP elements: dict returned: always sample: - ip_address: 192.168.123.20 mac_address: 00:16:3e:f2:87:16 type: list created_at: description: Datetime when the reserved fixed ip was created returned: always sample: 2020-09-14T14:45:30+0000 type: str creator_task_id: description: Task that created this entity returned: always sample: f00624ab-41bc-4d54-a723-1673ce32d997 type: str fixed_ip_address: description: IP address of the reserved fixed IP returned: always sample: 10.100.179.44 type: str is_external: description: Reserved fixed IP belongs to a public network returned: always sample: false type: bool is_vip: description: Reserved fixed IP is a VIP returned: always sample: false type: bool name: description: Reserved fixed IP name returned: always sample: Reserved fixed ip 10.100.179.44 type: str network: description: Network details returned: always sample: created_at: 2019-06-18T11:56:16+0000 default: true external: true id: eed97610-708d-43a5-a9a5-caebd2b7b4ee mtu: 1500 name: public project_id: 1 region_id: 3 subnets: - 747db04a-2aac-4fda-9492-d9b85a798c09 task_id: d1e1500b-e2be-40aa-9a4b-cc493fa1af30 updated_at: 2019-06-18T11:57:00+0000 type: dict network_id: description: ID of the network the port is attached to returned: always sample: eed97610-708d-43a5-a9a5-caebd2b7b4ee type: str port_id: description: ID of the port_id underlying the reserved fixed IP returned: always sample: 817c8a3d-bb67-4b88-a0d1-aec980318ff1 type: str project_id: description: Project ID returned: always sample: 1 type: int region: description: Region name returned: always sample: Luxembourg 1 type: str region_id: description: Region ID returned: always sample: 1 type: int reservation: description: Reserved fixed IP status with resource type and ID it is attached to returned: always sample: resource_id: None resource_type: None status: available type: dict status: description: Underlying port status returned: always sample: DOWN type: str subnet_id: description: ID of the subnet that owns the IP address returned: always sample: 747db04a-2aac-4fda-9492-d9b85a798c09 type: str task_id: description: Active task. If None, action has been performed immediately in the request itself returned: always sample: fd50fdd1-0482-4c9b-b847-fc9924665af6 type: str updated_at: description: Datetime when the reserved fixed ip was last updated returned: always sample: 2020-09-14T14:45:30+0000 type: str description: - Response depends of I(command). - If I(command) is one of create or update then response will be resource dictionary. - If I(command) is delete then response will be dictionary with resource id. returned: always type: complex