New in version 1.5.
The below requirements are needed on the host that executes this module.
Parameter |
Choices/Defaults |
Comments |
---|---|---|
credentials_file
(added in 2.1.0) |
|
path to the JSON file associated with the service account email
|
external_ip
|
|
the external static IPv4 (or auto-assigned) address for the LB
|
httphealthcheck_healthy_count
|
Default:
2
|
number of consecutive successful checks before marking a node healthy
|
httphealthcheck_host
|
|
host header to pass through on HTTP check requests
|
httphealthcheck_interval
|
Default:
5
|
the duration in seconds between each health check request
|
httphealthcheck_name
|
|
the name identifier for the HTTP health check
|
httphealthcheck_path
|
Default:
/
|
the url path to use for HTTP health checking
|
httphealthcheck_port
|
Default:
80
|
the TCP port to use for HTTP health checking
|
httphealthcheck_timeout
|
Default:
5
|
the timeout in seconds before a request is considered a failed check
|
httphealthcheck_unhealthy_count
|
Default:
2
|
number of consecutive failed checks before marking a node unhealthy
|
members
|
|
a list of zone/nodename pairs, e.g ['us-central1-a/www-a', ...]
aliases: nodes |
name
|
|
name of the load-balancer resource
|
pem_file
(added in 1.6) |
|
path to the pem file associated with the service account email This option is deprecated. Use 'credentials_file'.
|
port_range
|
|
the port (range) to forward, e.g. 80 or 8000-8888 defaults to all ports
|
project_id
(added in 1.6) |
|
your GCE project ID
|
protocol
|
|
the protocol used for the load-balancer packet forwarding, tcp or udp
|
region
|
|
the GCE region where the load-balancer is defined
|
service_account_email
(added in 1.6) |
|
service account email
|
state
|
|
desired state of the LB
|
# Simple example of creating a new LB, adding members, and a health check
- local_action:
module: gce_lb
name: testlb
region: us-central1
members: ["us-central1-a/www-a", "us-central1-b/www-b"]
httphealthcheck_name: hc
httphealthcheck_port: 80
httphealthcheck_path: "/up"
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Hint
If you notice any issues in this documentation you can edit this document to improve it.