ansible.builtin.gce_eip (v2.9.27) — module

Create or Destroy Global or Regional External IP addresses.

| "added in version" 2.3 of ansible.builtin"

Authors: Tom Melendez (@supertom) <tom@supertom.com>

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.27

Description

Create (reserve) or Destroy (release) Regional or Global IP Addresses. See U(https://cloud.google.com/compute/docs/configure-instance-ip-addresses#reserve_new_static) for more on reserving static addresses.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Create a Global external IP address
- gce_eip:
    service_account_email: "{{ service_account_email }}"
    credentials_file: "{{ credentials_file }}"
    project_id: "{{ project_id }}"
    name: my-global-ip
    region: global
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Create a Regional external IP address
- gce_eip:
    service_account_email: "{{ service_account_email }}"
    credentials_file: "{{ credentials_file }}"
    project_id: "{{ project_id }}"
    name: my-global-ip
    region: us-east1
    state: present

Inputs

    
name:
    description:
    - Name of Address.
    required: true

state:
    choices:
    - present
    - absent
    default: present
    description: The state the address should be in. C(present) or C(absent) are the only
      valid options.
    required: false

region:
    description:
    - Region to create the address in. Set to 'global' to create a global address.
    required: true

Outputs

address:
  description: IP address being operated on
  returned: always
  sample: 35.186.222.233
  type: str
name:
  description: name of the address being operated on
  returned: always
  sample: my-address
  type: str
region:
  description: Which region an address belongs.
  returned: always
  sample: global
  type: str