code
stringlengths 2.5k
150k
| kind
stringclasses 1
value |
---|---|
ansible google.cloud.gcp_compute_target_tcp_proxy_info β Gather info for GCP TargetTcpProxy google.cloud.gcp\_compute\_target\_tcp\_proxy\_info β Gather info for GCP TargetTcpProxy
========================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_target_tcp_proxy_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP TargetTcpProxy
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a target TCP proxy
gcp_compute_target_tcp_proxy_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **service** dictionary | success | A reference to the BackendService resource. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_node_group_info β Gather info for GCP NodeGroup google.cloud.gcp\_compute\_node\_group\_info β Gather info for GCP NodeGroup
============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_node_group_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP NodeGroup
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone** string / required | | Zone where this node group is located . |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a node group
gcp_compute_node_group_info:
zone: us-central1-a
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **autoscalingPolicy** complex | success | If you use sole-tenant nodes for your workloads, you can use the node group autoscaler to automatically manage the sizes of your node groups. |
| | | **maxNodes** integer | success | Maximum size of the node group. Set to a value less than or equal to 100 and greater than or equal to min-nodes. |
| | | **minNodes** integer | success | Minimum size of the node group. Must be less than or equal to max-nodes. The default value is 0. |
| | | **mode** string | success | The autoscaling mode. Set to one of the following: - OFF: Disables the autoscaler. - ON: Enables scaling in and scaling out. - ONLY\_SCALE\_OUT: Enables only scaling out. You must use this mode if your node groups are configured to restart their hosted VMs on minimal servers. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional textual description of the resource. |
| | **maintenancePolicy** string | success | Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART\_IN\_PLACE, or MIGRATE\_WITHIN\_NODE\_GROUP. The default value is DEFAULT. |
| | **name** string | success | Name of the resource. |
| | **nodeTemplate** dictionary | success | The URL of the node template to which this node group belongs. |
| | **size** integer | success | The total number of nodes in the node group. |
| | **zone** string | success | Zone where this node group is located . |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_resourcemanager_project β Creates a GCP Project google.cloud.gcp\_resourcemanager\_project β Creates a GCP Project
==================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_resourcemanager_project`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a GCP Project. A project is a container for ACLs, APIs, App Engine Apps, VMs, and other Google Cloud Platform resources.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **id** string / required | | The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. |
| **labels** dictionary | | The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]\*[a-z0-9])?`. Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]\*[a-z0-9])?)?`. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed . |
| **name** string | | The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. |
| **parent** dictionary | | A parent organization. |
| | **id** string | | Id of the organization. |
| | **type** string | | Must be organization. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Examples
--------
```
- name: create a project
google.cloud.gcp_resourcemanager_project:
name: My Sample Project
id: alextest-{{ 10000000000 | random }}
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
parent:
type: organization
id: 636173955921
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **createTime** string | success | Time of creation. |
| **id** string | success | The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. |
| **labels** dictionary | success | The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]\*[a-z0-9])?`. Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]\*[a-z0-9])?)?`. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed . |
| **lifecycleState** string | success | The Project lifecycle state. |
| **name** string | success | The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. |
| **number** integer | success | Number uniquely identifying the project. |
| **parent** complex | success | A parent organization. |
| | **id** string | success | Id of the organization. |
| | **type** string | success | Must be organization. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_appengine_firewall_rule β Creates a GCP FirewallRule google.cloud.gcp\_appengine\_firewall\_rule β Creates a GCP FirewallRule
========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_appengine_firewall_rule`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A single firewall rule that is evaluated against incoming traffic and provides an action to take on matched requests.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string / required | | The action to take if this rule matches. Some valid choices include: "UNSPECIFIED\_ACTION", "ALLOW", "DENY" |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional string description of this rule. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **priority** integer | | A positive integer that defines the order of rule evaluation. Rules with the lowest priority are evaluated first. A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic when no previous rule matches. Only the action of this rule can be modified by the user. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **source\_range** string / required | | IP address or range, defined using CIDR notation, of requests that this rule applies to. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.firewall.ingressRules>
* Official Documentation: <https://cloud.google.com/appengine/docs/standard/python/creating-firewalls#creating_firewall_rules>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a firewall rule
google.cloud.gcp_appengine_firewall_rule:
priority: 1000
source_range: 10.0.0.0
action: ALLOW
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **action** string | success | The action to take if this rule matches. |
| **description** string | success | An optional string description of this rule. |
| **priority** integer | success | A positive integer that defines the order of rule evaluation. Rules with the lowest priority are evaluated first. A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic when no previous rule matches. Only the action of this rule can be modified by the user. |
| **sourceRange** string | success | IP address or range, defined using CIDR notation, of requests that this rule applies to. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_target_instance_info β Gather info for GCP TargetInstance google.cloud.gcp\_compute\_target\_instance\_info β Gather info for GCP TargetInstance
======================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_target_instance_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP TargetInstance
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone** string / required | | URL of the zone where the target instance resides. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a target instance
gcp_compute_target_instance_info:
zone: us-central1-a
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **instance** dictionary | success | A URL to the virtual machine instance that handles traffic for this target instance. Accepts self-links or the partial paths with format `projects/project/zones/zone/instances/instance' or `zones/zone/instances/instance` . |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **natPolicy** string | success | NAT option controlling how IPs are NAT'ed to the instance. Currently only NO\_NAT (default value) is supported. |
| | **zone** string | success | URL of the zone where the target instance resides. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_region_health_check_info β Gather info for GCP RegionHealthCheck google.cloud.gcp\_compute\_region\_health\_check\_info β Gather info for GCP RegionHealthCheck
==============================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_health_check_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP RegionHealthCheck
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string | | The region where the regional health check resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a region health check
gcp_compute_region_health_check_info:
region: us-central1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **checkIntervalSec** integer | success | How often (in seconds) to send a health check. The default value is 5 seconds. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **grpcHealthCheck** complex | success | A nested object resource. |
| | | **grpcServiceName** string | success | The gRPC service name for the health check. The value of grpcServiceName has the following meanings by convention: \* Empty serviceName means the overall status of all services at the backend. \* Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII. |
| | | **port** integer | success | The port number for the health check request. Must be specified if portName and portSpecification are not set or if port\_specification is USE\_FIXED\_PORT. Valid values are 1 through 65535. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified in `port` and `portName` fields. |
| | **healthyThreshold** integer | success | A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. |
| | **http2HealthCheck** complex | success | A nested object resource. |
| | | **host** string | success | The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | | **port** integer | success | The TCP port number for the HTTP2 health check request. The default value is 443. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified in `port` and `portName` fields. |
| | | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | | **requestPath** string | success | The request path of the HTTP2 health check request. The default value is /. |
| | | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| | **httpHealthCheck** complex | success | A nested object resource. |
| | | **host** string | success | The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | | **port** integer | success | The TCP port number for the HTTP health check request. The default value is 80. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified in `port` and `portName` fields. |
| | | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | | **requestPath** string | success | The request path of the HTTP health check request. The default value is /. |
| | | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| | **httpsHealthCheck** complex | success | A nested object resource. |
| | | **host** string | success | The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | | **port** integer | success | The TCP port number for the HTTPS health check request. The default value is 443. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified in `port` and `portName` fields. |
| | | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | | **requestPath** string | success | The request path of the HTTPS health check request. The default value is /. |
| | | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| | **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **region** string | success | The region where the regional health check resides. |
| | **sslHealthCheck** complex | success | A nested object resource. |
| | | **port** integer | success | The TCP port number for the SSL health check request. The default value is 443. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, SSL health check follows behavior specified in `port` and `portName` fields. |
| | | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | | **request** string | success | The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| | **tcpHealthCheck** complex | success | A nested object resource. |
| | | **port** integer | success | The TCP port number for the TCP health check request. The default value is 80. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in `port` and `portName` fields. |
| | | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | | **request** string | success | The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| | **timeoutSec** integer | success | How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. |
| | **type** string | success | Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. |
| | **unhealthyThreshold** integer | success | A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_sql_instance β Creates a GCP Instance google.cloud.gcp\_sql\_instance β Creates a GCP Instance
========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_sql_instance`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a Cloud SQL instance. Cloud SQL instances are SQL databases hosted in Googleβs cloud. The Instances resource provides methods for common configuration and management tasks.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **backend\_type** string | | \* FIRST\_GEN: First Generation instance. MySQL only. \* SECOND\_GEN: Second Generation instance or PostgreSQL instance. \* EXTERNAL: A database server that is not managed by Google. Some valid choices include: "FIRST\_GEN", "SECOND\_GEN", "EXTERNAL" |
| **connection\_name** string | | Connection name of the Cloud SQL instance used in connection strings. |
| **database\_version** string | | The database engine type and version. For First Generation instances, can be MYSQL\_5\_5, or MYSQL\_5\_6. For Second Generation instances, can be MYSQL\_5\_6 or MYSQL\_5\_7. Defaults to MYSQL\_5\_6. PostgreSQL instances: POSTGRES\_9\_6 The databaseVersion property can not be changed after instance creation. Some valid choices include: "MYSQL\_5\_5", "MYSQL\_5\_6", "MYSQL\_5\_7", "POSTGRES\_9\_6" |
| **disk\_encryption\_configuration** dictionary | | Disk encryption settings. |
| | **kms\_key\_name** string | | The KMS key used to encrypt the Cloud SQL instance . |
| **disk\_encryption\_status** dictionary | | Disk encryption status. |
| | **kms\_key\_version\_name** string | | The KMS key version used to encrypt the Cloud SQL instance . |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **failover\_replica** dictionary | | The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| | **name** string | | The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| **instance\_type** string | | The instance type. This can be one of the following. \* CLOUD\_SQL\_INSTANCE: A Cloud SQL instance that is not replicating from a master. \* ON\_PREMISES\_INSTANCE: An instance running on the customer's premises. \* READ\_REPLICA\_INSTANCE: A Cloud SQL instance configured as a read-replica. Some valid choices include: "CLOUD\_SQL\_INSTANCE", "ON\_PREMISES\_INSTANCE", "READ\_REPLICA\_INSTANCE" |
| **ipv6\_address** string | | The IPv6 address assigned to the instance. This property is applicable only to First Generation instances. |
| **master\_instance\_name** string | | The name of the instance which will act as master in the replication setup. |
| **max\_disk\_size** integer | | The maximum disk size of the instance in bytes. |
| **name** string / required | | Name of the Cloud SQL instance. This does not include the project ID. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string | | The geographical region. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation/PostgreSQL). |
| **replica\_configuration** dictionary | | Configuration specific to failover replicas and read replicas. |
| | **failover\_target** boolean | **Choices:*** no
* yes
| Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. In case the master instance fails, the replica instance will be promoted as the new master instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance. |
| | **mysql\_replica\_configuration** dictionary | | MySQL specific configuration when replicating from a MySQL on-premises master. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named master.info in the data directory. |
| | | **ca\_certificate** string | | PEM representation of the trusted CA's x509 certificate. |
| | | **client\_certificate** string | | PEM representation of the replica's x509 certificate . |
| | | **client\_key** string | | PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate. |
| | | **connect\_retry\_interval** integer | | Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| | | **dump\_file\_path** string | | Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps should have the binlog coordinates from which replication should begin. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| | | **master\_heartbeat\_period** integer | | Interval in milliseconds between replication heartbeats. |
| | | **password** string | | The password for the replication connection. |
| | | **ssl\_cipher** string | | A list of permissible ciphers to use for SSL encryption. |
| | | **username** string | | The username for the replication connection. |
| | | **verify\_server\_certificate** boolean | **Choices:*** no
* yes
| Whether or not to check the master's Common Name value in the certificate that it sends during the SSL handshake. |
| | **replica\_names** list / elements=string | | The replicas of the instance. |
| | **service\_account\_email\_address** string | | The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **settings** dictionary | | The user settings. |
| | **availability\_type** string | | The availabilityType define if your postgres instance is run zonal or regional. Some valid choices include: "ZONAL", "REGIONAL" |
| | **backup\_configuration** dictionary | | The daily backup configuration for the instance. |
| | | **binary\_log\_enabled** boolean | **Choices:*** no
* yes
| Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well. MySQL only. |
| | | **enabled** boolean | **Choices:*** no
* yes
| Enable Autobackup for your instance. |
| | | **start\_time** string | | Define the backup start time in UTC (HH:MM) . |
| | **database\_flags** list / elements=dictionary | | The database flags passed to the instance at startup. |
| | | **name** string | | The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags should be specified with underscores, not hyphens. |
| | | **value** string | | The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value. |
| | **ip\_configuration** dictionary | | The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| | | **authorized\_networks** list / elements=dictionary | | The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24). |
| | | | **expiration\_time** string | | The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. |
| | | | **name** string | | An optional label to identify this entry. |
| | | | **value** string | | The whitelisted value for the access control list. For example, to grant access to a client from an external IP (IPv4 or IPv6) address or subnet, use that address or subnet here. |
| | | **ipv4\_enabled** boolean | **Choices:*** no
* yes
| Whether the instance should be assigned an IP address or not. |
| | | **require\_ssl** boolean | **Choices:*** no
* yes
| Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP. |
| | **tier** string | | The tier or machine type for this instance, for example db-n1-standard-1. For MySQL instances, this field determines whether the instance is Second Generation (recommended) or First Generation. |
| | **user\_labels** dictionary | | User-provided labels, represented as a dictionary where each label is a single key value pair. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Examples
--------
```
- name: create a instance
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-2"
settings:
ip_configuration:
authorized_networks:
- name: google dns server
value: 8.8.8.8/32
tier: db-n1-standard-1
region: us-central1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backendType** string | success | \* FIRST\_GEN: First Generation instance. MySQL only. \* SECOND\_GEN: Second Generation instance or PostgreSQL instance. \* EXTERNAL: A database server that is not managed by Google. |
| **connectionName** string | success | Connection name of the Cloud SQL instance used in connection strings. |
| **databaseVersion** string | success | The database engine type and version. For First Generation instances, can be MYSQL\_5\_5, or MYSQL\_5\_6. For Second Generation instances, can be MYSQL\_5\_6 or MYSQL\_5\_7. Defaults to MYSQL\_5\_6. PostgreSQL instances: POSTGRES\_9\_6 The databaseVersion property can not be changed after instance creation. |
| **diskEncryptionConfiguration** complex | success | Disk encryption settings. |
| | **kmsKeyName** string | success | The KMS key used to encrypt the Cloud SQL instance . |
| **diskEncryptionStatus** complex | success | Disk encryption status. |
| | **kmsKeyVersionName** string | success | The KMS key version used to encrypt the Cloud SQL instance . |
| **failoverReplica** complex | success | The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| | **available** boolean | success | The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the failover replica when the status is true. |
| | **name** string | success | The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| **gceZone** string | success | The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| **instanceType** string | success | The instance type. This can be one of the following. \* CLOUD\_SQL\_INSTANCE: A Cloud SQL instance that is not replicating from a master. \* ON\_PREMISES\_INSTANCE: An instance running on the customer's premises. \* READ\_REPLICA\_INSTANCE: A Cloud SQL instance configured as a read-replica. |
| **ipAddresses** complex | success | The assigned IP addresses for the instance. |
| | **ipAddress** string | success | The IP address assigned. |
| | **timeToRetire** string | success | The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired. |
| | **type** string | success | The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported. |
| **ipv6Address** string | success | The IPv6 address assigned to the instance. This property is applicable only to First Generation instances. |
| **masterInstanceName** string | success | The name of the instance which will act as master in the replication setup. |
| **maxDiskSize** integer | success | The maximum disk size of the instance in bytes. |
| **name** string | success | Name of the Cloud SQL instance. This does not include the project ID. |
| **region** string | success | The geographical region. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation/PostgreSQL). |
| **replicaConfiguration** complex | success | Configuration specific to failover replicas and read replicas. |
| | **failoverTarget** boolean | success | Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. In case the master instance fails, the replica instance will be promoted as the new master instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance. |
| | **mysqlReplicaConfiguration** complex | success | MySQL specific configuration when replicating from a MySQL on-premises master. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named master.info in the data directory. |
| | | **caCertificate** string | success | PEM representation of the trusted CA's x509 certificate. |
| | | **clientCertificate** string | success | PEM representation of the replica's x509 certificate . |
| | | **clientKey** string | success | PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate. |
| | | **connectRetryInterval** integer | success | Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| | | **dumpFilePath** string | success | Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps should have the binlog coordinates from which replication should begin. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| | | **masterHeartbeatPeriod** integer | success | Interval in milliseconds between replication heartbeats. |
| | | **password** string | success | The password for the replication connection. |
| | | **sslCipher** string | success | A list of permissible ciphers to use for SSL encryption. |
| | | **username** string | success | The username for the replication connection. |
| | | **verifyServerCertificate** boolean | success | Whether or not to check the master's Common Name value in the certificate that it sends during the SSL handshake. |
| | **replicaNames** list / elements=string | success | The replicas of the instance. |
| | **serviceAccountEmailAddress** string | success | The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| **serverCaCert** complex | success | SSL configuration. |
| | **cert** string | success | PEM representation of the X.509 certificate. |
| | **certSerialNumber** string | success | Serial number, as extracted from the certificate. |
| | **commonName** string | success | User supplied name. Constrained to [a-zA-Z.-\_ ]+. |
| | **createTime** string | success | The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. |
| | **expirationTime** string | success | The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. |
| | **sha1Fingerprint** string | success | SHA-1 fingerprint of the certificate. |
| **settings** complex | success | The user settings. |
| | **availabilityType** string | success | The availabilityType define if your postgres instance is run zonal or regional. |
| | **backupConfiguration** complex | success | The daily backup configuration for the instance. |
| | | **binaryLogEnabled** boolean | success | Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well. MySQL only. |
| | | **enabled** boolean | success | Enable Autobackup for your instance. |
| | | **startTime** string | success | Define the backup start time in UTC (HH:MM) . |
| | **databaseFlags** complex | success | The database flags passed to the instance at startup. |
| | | **name** string | success | The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags should be specified with underscores, not hyphens. |
| | | **value** string | success | The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value. |
| | **ipConfiguration** complex | success | The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| | | **authorizedNetworks** complex | success | The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24). |
| | | | **expirationTime** string | success | The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. |
| | | | **name** string | success | An optional label to identify this entry. |
| | | | **value** string | success | The whitelisted value for the access control list. For example, to grant access to a client from an external IP (IPv4 or IPv6) address or subnet, use that address or subnet here. |
| | | **ipv4Enabled** boolean | success | Whether the instance should be assigned an IP address or not. |
| | | **requireSsl** boolean | success | Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP. |
| | **settingsVersion** integer | success | The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| | **tier** string | success | The tier or machine type for this instance, for example db-n1-standard-1. For MySQL instances, this field determines whether the instance is Second Generation (recommended) or First Generation. |
| | **userLabels** dictionary | success | User-provided labels, represented as a dictionary where each label is a single key value pair. |
| **state** string | success | The current serving state of the database instance. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_snapshot_info β Gather info for GCP Snapshot google.cloud.gcp\_compute\_snapshot\_info β Gather info for GCP Snapshot
========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_snapshot_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Snapshot
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a snapshot
gcp_compute_snapshot_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **diskSizeGb** integer | success | Size of the snapshot, specified in GB. |
| | **id** integer | success | The unique identifier for the resource. |
| | **labelFingerprint** string | success | The fingerprint used for optimistic locking of this resource. Used internally during updates. |
| | **labels** dictionary | success | Labels to apply to this Snapshot. |
| | **licenses** list / elements=string | success | A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image). snapshotEncryptionKey nested object Encrypts the snapshot using a customer-supplied encryption key. |
| | **name** string | success | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **snapshotEncryptionKey** complex | success | The customer-supplied encryption key of the snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. |
| | | **kmsKeyName** string | success | The name of the encryption key that is stored in Google Cloud KMS. |
| | | **kmsKeyServiceAccount** string | success | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | **sourceDisk** dictionary | success | A reference to the disk used to create this snapshot. |
| | **sourceDiskEncryptionKey** complex | success | The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. |
| | | **kmsKeyName** string | success | The name of the encryption key that is stored in Google Cloud KMS. |
| | | **kmsKeyServiceAccount** string | success | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | **storageBytes** integer | success | A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion. |
| | **storageLocations** list / elements=string | success | Cloud Storage bucket storage location of the snapshot (regional or multi-regional). |
| | **zone** string | success | A reference to the zone where the disk is hosted. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_cloudtasks_queue β Creates a GCP Queue google.cloud.gcp\_cloudtasks\_queue β Creates a GCP Queue
=========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_cloudtasks_queue`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A named resource to which messages are sent by publishers.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **app\_engine\_routing\_override** dictionary | | Overrides for task-level appEngineRouting. These settings apply only to App Engine tasks in this queue . |
| | **instance** string | | App instance. By default, the task is sent to an instance which is available when the task is attempted. |
| | **service** string | | App service. By default, the task is sent to the service which is the default service when the task is attempted. |
| | **version** string | | App version. By default, the task is sent to the version which is the default version when the task is attempted. |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **location** string / required | | The location of the queue. |
| **name** string | | The queue name. |
| **project** string | | The Google Cloud Platform project to use. |
| **rate\_limits** dictionary | | Rate limits for task dispatches. The queue's actual dispatch rate is the result of: \* Number of tasks in the queue \* User-specified throttling: rateLimits, retryConfig, and the queue's state. \* System throttling due to 429 (Too Many Requests) or 503 (Service Unavailable) responses from the worker, high error rates, or to smooth sudden large traffic spikes. |
| | **max\_concurrent\_dispatches** integer | | The maximum number of concurrent tasks that Cloud Tasks allows to be dispatched for this queue. After this threshold has been reached, Cloud Tasks stops dispatching tasks until the number of concurrent requests decreases. |
| | **max\_dispatches\_per\_second** string | | The maximum rate at which tasks are dispatched from this queue. If unspecified when the queue is created, Cloud Tasks will pick the default. |
| **retry\_config** dictionary | | Settings that determine the retry behavior. |
| | **max\_attempts** integer | | Number of attempts per task. Cloud Tasks will attempt the task maxAttempts times (that is, if the first attempt fails, then there will be maxAttempts - 1 retries). Must be >= -1. If unspecified when the queue is created, Cloud Tasks will pick the default. -1 indicates unlimited attempts. |
| | **max\_backoff** string | | A task will be scheduled for retry between minBackoff and maxBackoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. |
| | **max\_doublings** integer | | The time between retries will double maxDoublings times. A task's retry interval starts at minBackoff, then doubles maxDoublings times, then increases linearly, and finally retries retries at intervals of maxBackoff up to maxAttempts times. |
| | **max\_retry\_duration** string | | If positive, maxRetryDuration specifies the time limit for retrying a failed task, measured from when the task was first attempted. Once maxRetryDuration time has passed and the task has been attempted maxAttempts times, no further attempts will be made and the task will be deleted. If zero, then the task age is unlimited. |
| | **min\_backoff** string | | A task will be scheduled for retry between minBackoff and maxBackoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **stackdriver\_logging\_config** dictionary | | Configuration options for writing logs to Stackdriver Logging. |
| | **sampling\_ratio** string / required | | Specifies the fraction of operations to write to Stackdriver Logging. This field may contain any value between 0.0 and 1.0, inclusive. 0.0 is the default and means that no operations are logged. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **status** string | | The current state of the queue. Some valid choices include: "RUNNING", "PAUSED", "DISABLED" |
Examples
--------
```
- name: create a queue
google.cloud.gcp_cloudtasks_queue:
name: test_object
location: us-central1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **appEngineRoutingOverride** complex | success | Overrides for task-level appEngineRouting. These settings apply only to App Engine tasks in this queue . |
| | **host** string | success | The host that the task is sent to. |
| | **instance** string | success | App instance. By default, the task is sent to an instance which is available when the task is attempted. |
| | **service** string | success | App service. By default, the task is sent to the service which is the default service when the task is attempted. |
| | **version** string | success | App version. By default, the task is sent to the version which is the default version when the task is attempted. |
| **location** string | success | The location of the queue. |
| **name** string | success | The queue name. |
| **rateLimits** complex | success | Rate limits for task dispatches. The queue's actual dispatch rate is the result of: \* Number of tasks in the queue \* User-specified throttling: rateLimits, retryConfig, and the queue's state. \* System throttling due to 429 (Too Many Requests) or 503 (Service Unavailable) responses from the worker, high error rates, or to smooth sudden large traffic spikes. |
| | **maxBurstSize** integer | success | The max burst size. Max burst size limits how fast tasks in queue are processed when many tasks are in the queue and the rate is high. This field allows the queue to have a high rate so processing starts shortly after a task is enqueued, but still limits resource usage when many tasks are enqueued in a short period of time. |
| | **maxConcurrentDispatches** integer | success | The maximum number of concurrent tasks that Cloud Tasks allows to be dispatched for this queue. After this threshold has been reached, Cloud Tasks stops dispatching tasks until the number of concurrent requests decreases. |
| | **maxDispatchesPerSecond** string | success | The maximum rate at which tasks are dispatched from this queue. If unspecified when the queue is created, Cloud Tasks will pick the default. |
| **retryConfig** complex | success | Settings that determine the retry behavior. |
| | **maxAttempts** integer | success | Number of attempts per task. Cloud Tasks will attempt the task maxAttempts times (that is, if the first attempt fails, then there will be maxAttempts - 1 retries). Must be >= -1. If unspecified when the queue is created, Cloud Tasks will pick the default. -1 indicates unlimited attempts. |
| | **maxBackoff** string | success | A task will be scheduled for retry between minBackoff and maxBackoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. |
| | **maxDoublings** integer | success | The time between retries will double maxDoublings times. A task's retry interval starts at minBackoff, then doubles maxDoublings times, then increases linearly, and finally retries retries at intervals of maxBackoff up to maxAttempts times. |
| | **maxRetryDuration** string | success | If positive, maxRetryDuration specifies the time limit for retrying a failed task, measured from when the task was first attempted. Once maxRetryDuration time has passed and the task has been attempted maxAttempts times, no further attempts will be made and the task will be deleted. If zero, then the task age is unlimited. |
| | **minBackoff** string | success | A task will be scheduled for retry between minBackoff and maxBackoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. |
| | **purgeTime** string | success | The last time this queue was purged. |
| **stackdriverLoggingConfig** complex | success | Configuration options for writing logs to Stackdriver Logging. |
| | **samplingRatio** string | success | Specifies the fraction of operations to write to Stackdriver Logging. This field may contain any value between 0.0 and 1.0, inclusive. 0.0 is the default and means that no operations are logged. |
| **status** string | success | The current state of the queue. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_health_check β Creates a GCP HealthCheck google.cloud.gcp\_compute\_health\_check β Creates a GCP HealthCheck
====================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_health_check`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Health Checks determine whether instances are responsive and able to do work.
* They are an important part of a comprehensive load balancing configuration, as they enable monitoring instances behind load balancers.
* Health Checks poll instances at a specified interval. Instances that do not respond successfully to some number of probes in a row are marked as unhealthy. No new connections are sent to unhealthy instances, though existing connections will continue. The health check will continue to poll unhealthy instances. If an instance later responds successfully to some number of consecutive probes, it is marked healthy again and can receive new connections.
* ~>\*\*NOTE\*\*: Legacy HTTP(S) health checks must be used for target pool-based network load balancers. See the [official guide](<https://cloud.google.com/load-balancing/docs/health-check-concepts#selecting_hc>) for choosing a type of health check.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **check\_interval\_sec** integer | **Default:**"5" | How often (in seconds) to send a health check. The default value is 5 seconds. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **grpc\_health\_check** dictionary | | A nested object resource. |
| | **grpc\_service\_name** string | | The gRPC service name for the health check. The value of grpcServiceName has the following meanings by convention: - Empty serviceName means the overall status of all services at the backend. - Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII. |
| | **port** integer | | The port number for the health check request. Must be specified if portName and portSpecification are not set or if port\_specification is USE\_FIXED\_PORT. Valid values are 1 through 65535. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| **healthy\_threshold** integer | **Default:**"2" | A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. |
| **http2\_health\_check** dictionary | | A nested object resource. |
| | **host** string | | The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | | The TCP port number for the HTTP2 health check request. The default value is 443. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| | **proxy\_header** string | **Default:**"NONE" | Specifies the type of proxy header to append before sending data to the backend. Some valid choices include: "NONE", "PROXY\_V1" |
| | **request\_path** string | **Default:**"/" | The request path of the HTTP2 health check request. The default value is /. |
| | **response** string | | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **http\_health\_check** dictionary | | A nested object resource. |
| | **host** string | | The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | | The TCP port number for the HTTP health check request. The default value is 80. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| | **proxy\_header** string | **Default:**"NONE" | Specifies the type of proxy header to append before sending data to the backend. Some valid choices include: "NONE", "PROXY\_V1" |
| | **request\_path** string | **Default:**"/" | The request path of the HTTP health check request. The default value is /. |
| | **response** string | | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **https\_health\_check** dictionary | | A nested object resource. |
| | **host** string | | The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | | The TCP port number for the HTTPS health check request. The default value is 443. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| | **proxy\_header** string | **Default:**"NONE" | Specifies the type of proxy header to append before sending data to the backend. Some valid choices include: "NONE", "PROXY\_V1" |
| | **request\_path** string | **Default:**"/" | The request path of the HTTPS health check request. The default value is /. |
| | **response** string | | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **ssl\_health\_check** dictionary | | A nested object resource. |
| | **port** integer | | The TCP port number for the SSL health check request. The default value is 443. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, SSL health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| | **proxy\_header** string | **Default:**"NONE" | Specifies the type of proxy header to append before sending data to the backend. Some valid choices include: "NONE", "PROXY\_V1" |
| | **request** string | | The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | **response** string | | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **tcp\_health\_check** dictionary | | A nested object resource. |
| | **port** integer | | The TCP port number for the TCP health check request. The default value is 443. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| | **proxy\_header** string | **Default:**"NONE" | Specifies the type of proxy header to append before sending data to the backend. Some valid choices include: "NONE", "PROXY\_V1" |
| | **request** string | | The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | **response** string | | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **timeout\_sec** integer | **Default:**"5" | How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
aliases: timeout\_seconds |
| **type** string | | Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. Some valid choices include: "TCP", "SSL", "HTTP", "HTTPS", "HTTP2" |
| **unhealthy\_threshold** integer | **Default:**"2" | A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks>
* Official Documentation: <https://cloud.google.com/load-balancing/docs/health-checks>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a health check
google.cloud.gcp_compute_health_check:
name: test_object
type: TCP
tcp_health_check:
port_name: service-health
request: ping
response: pong
healthy_threshold: 10
timeout_sec: 2
unhealthy_threshold: 5
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **checkIntervalSec** integer | success | How often (in seconds) to send a health check. The default value is 5 seconds. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **grpcHealthCheck** complex | success | A nested object resource. |
| | **grpcServiceName** string | success | The gRPC service name for the health check. The value of grpcServiceName has the following meanings by convention: - Empty serviceName means the overall status of all services at the backend. - Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII. |
| | **port** integer | success | The port number for the health check request. Must be specified if portName and portSpecification are not set or if port\_specification is USE\_FIXED\_PORT. Valid values are 1 through 65535. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified in `port` and `portName` fields. |
| **healthyThreshold** integer | success | A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. |
| **http2HealthCheck** complex | success | A nested object resource. |
| | **host** string | success | The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | success | The TCP port number for the HTTP2 health check request. The default value is 443. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified in `port` and `portName` fields. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **requestPath** string | success | The request path of the HTTP2 health check request. The default value is /. |
| | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **httpHealthCheck** complex | success | A nested object resource. |
| | **host** string | success | The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | success | The TCP port number for the HTTP health check request. The default value is 80. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified in `port` and `portName` fields. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **requestPath** string | success | The request path of the HTTP health check request. The default value is /. |
| | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **httpsHealthCheck** complex | success | A nested object resource. |
| | **host** string | success | The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | success | The TCP port number for the HTTPS health check request. The default value is 443. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified in `port` and `portName` fields. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **requestPath** string | success | The request path of the HTTPS health check request. The default value is /. |
| | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **sslHealthCheck** complex | success | A nested object resource. |
| | **port** integer | success | The TCP port number for the SSL health check request. The default value is 443. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, SSL health check follows behavior specified in `port` and `portName` fields. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **request** string | success | The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **tcpHealthCheck** complex | success | A nested object resource. |
| | **port** integer | success | The TCP port number for the TCP health check request. The default value is 443. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in `port` and `portName` fields. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **request** string | success | The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **timeoutSec** integer | success | How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. |
| **type** string | success | Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. |
| **unhealthyThreshold** integer | success | A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_dns_managed_zone β Creates a GCP ManagedZone google.cloud.gcp\_dns\_managed\_zone β Creates a GCP ManagedZone
================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_dns_managed_zone`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A zone is a subtree of the DNS namespace under one administrative responsibility. A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string / required | | A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function. |
| **dns\_name** string / required | | The DNS name of this managed zone, for instance "example.com.". |
| **dnssec\_config** dictionary | | DNSSEC configuration. |
| | **default\_key\_specs** list / elements=dictionary | | Specifies parameters that will be used for generating initial DnsKeys for this ManagedZone. If you provide a spec for keySigning or zoneSigning, you must also provide one for the other. default\_key\_specs can only be updated when the state is `off`. |
| | | **algorithm** string | | String mnemonic specifying the DNSSEC algorithm of this key. Some valid choices include: "ecdsap256sha256", "ecdsap384sha384", "rsasha1", "rsasha256", "rsasha512" |
| | | **key\_length** integer | | Length of the keys in bits. |
| | | **key\_type** string | | Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets. Some valid choices include: "keySigning", "zoneSigning" |
| | | **kind** string | **Default:**"dns#dnsKeySpec" | Identifies what kind of resource this is. |
| | **kind** string | **Default:**"dns#managedZoneDnsSecConfig" | Identifies what kind of resource this is. |
| | **non\_existence** string | | Specifies the mechanism used to provide authenticated denial-of-existence responses. non\_existence can only be updated when the state is `off`. Some valid choices include: "nsec", "nsec3" |
| | **state** string | | Specifies whether DNSSEC is enabled, and what mode it is in. Some valid choices include: "off", "on", "transfer" |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **forwarding\_config** dictionary | | The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. |
| | **target\_name\_servers** list / elements=dictionary / required | | List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given. |
| | | **forwarding\_path** string | | Forwarding path for this TargetNameServer. If unset or `default` Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to `private`, Cloud DNS will always send queries through VPC for this target . Some valid choices include: "default", "private" |
| | | **ipv4\_address** string / required | | IPv4 address of a target name server. |
| **labels** dictionary | | A set of key/value label pairs to assign to this ManagedZone. |
| **name** string / required | | User assigned name for this resource. Must be unique within the project. |
| **name\_server\_set** string | | Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users will leave this field unset. |
| **peering\_config** dictionary | | The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. |
| | **target\_network** dictionary / required | | The network with which to peer. |
| | | **network\_url** string / required | | The fully qualified URL of the VPC network to forward queries to. This should be formatted like `[https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`](#) . |
| **private\_visibility\_config** dictionary | | For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. |
| | **networks** list / elements=dictionary / required | | The list of VPC networks that can see this zone. |
| | | **network\_url** string / required | | The fully qualified URL of the VPC network to bind to. This should be formatted like `[https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`](#) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **visibility** string | **Default:**"public" | The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Some valid choices include: "private", "public" |
Notes
-----
Note
* API Reference: <https://cloud.google.com/dns/api/v1/managedZones>
* Managing Zones: <https://cloud.google.com/dns/zones/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a managed zone
google.cloud.gcp_dns_managed_zone:
name: test_object
dns_name: test.somewild2.example.com.
description: test zone
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTime** string | success | The time that this resource was created on the server. This is in RFC3339 text format. |
| **description** string | success | A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function. |
| **dnsName** string | success | The DNS name of this managed zone, for instance "example.com.". |
| **dnssecConfig** complex | success | DNSSEC configuration. |
| | **defaultKeySpecs** complex | success | Specifies parameters that will be used for generating initial DnsKeys for this ManagedZone. If you provide a spec for keySigning or zoneSigning, you must also provide one for the other. default\_key\_specs can only be updated when the state is `off`. |
| | | **algorithm** string | success | String mnemonic specifying the DNSSEC algorithm of this key. |
| | | **keyLength** integer | success | Length of the keys in bits. |
| | | **keyType** string | success | Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets. |
| | | **kind** string | success | Identifies what kind of resource this is. |
| | **kind** string | success | Identifies what kind of resource this is. |
| | **nonExistence** string | success | Specifies the mechanism used to provide authenticated denial-of-existence responses. non\_existence can only be updated when the state is `off`. |
| | **state** string | success | Specifies whether DNSSEC is enabled, and what mode it is in. |
| **forwardingConfig** complex | success | The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. |
| | **targetNameServers** complex | success | List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given. |
| | | **forwardingPath** string | success | Forwarding path for this TargetNameServer. If unset or `default` Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to `private`, Cloud DNS will always send queries through VPC for this target . |
| | | **ipv4Address** string | success | IPv4 address of a target name server. |
| **id** integer | success | Unique identifier for the resource; defined by the server. |
| **labels** dictionary | success | A set of key/value label pairs to assign to this ManagedZone. |
| **name** string | success | User assigned name for this resource. Must be unique within the project. |
| **nameServers** list / elements=string | success | Delegate your managed\_zone to these virtual name servers; defined by the server . |
| **nameServerSet** string | success | Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users will leave this field unset. |
| **peeringConfig** complex | success | The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. |
| | **targetNetwork** complex | success | The network with which to peer. |
| | | **networkUrl** string | success | The fully qualified URL of the VPC network to forward queries to. This should be formatted like `[https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`](#) . |
| **privateVisibilityConfig** complex | success | For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. |
| | **networks** complex | success | The list of VPC networks that can see this zone. |
| | | **networkUrl** string | success | The fully qualified URL of the VPC network to bind to. This should be formatted like `[https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`](#) . |
| **visibility** string | success | The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_cloudscheduler_job β Creates a GCP Job google.cloud.gcp\_cloudscheduler\_job β Creates a GCP Job
=========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_cloudscheduler_job`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A scheduled job that can publish a pubsub message or a http request every X interval of time, using crontab format string.
* To use Cloud Scheduler your project must contain an App Engine app that is located in one of the supported regions. If your project does not have an App Engine app, you must create one.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **app\_engine\_http\_target** dictionary | | App Engine HTTP target. If the job providers a App Engine HTTP target the cron will send a request to the service instance . |
| | **app\_engine\_routing** dictionary | | App Engine Routing setting for the job. |
| | | **instance** string | | App instance. By default, the job is sent to an instance which is available when the job is attempted. |
| | | **service** string | | App service. By default, the job is sent to the service which is the default service when the job is attempted. |
| | | **version** string | | App version. By default, the job is sent to the version which is the default version when the job is attempted. |
| | **body** string | | HTTP request body. A request body is allowed only if the HTTP method is POST or PUT. It will result in invalid argument error to set a body on a job with an incompatible HttpMethod. A base64-encoded string. |
| | **headers** dictionary | | HTTP request headers. This map contains the header field names and values. Headers can be set when the job is created. |
| | **http\_method** string | | Which HTTP method to use for the request. |
| | **relative\_uri** string / required | | The relative URI. |
| **attempt\_deadline** string | **Default:**"180s" | The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a DEADLINE\_EXCEEDED failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The allowed duration for this deadline is: \* For HTTP targets, between 15 seconds and 30 minutes. \* For App Engine HTTP targets, between 15 seconds and 24 hours. \* \*\*Note\*\*: For PubSub targets, this field is ignored - setting it will introduce an unresolvable diff. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s" . |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | A human-readable description for the job. This string must not contain more than 500 characters. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **http\_target** dictionary | | HTTP target. If the job providers a http\_target the cron will send a request to the targeted url . |
| | **body** string | | HTTP request body. A request body is allowed only if the HTTP method is POST, PUT, or PATCH. It is an error to set body on a job with an incompatible HttpMethod. A base64-encoded string. |
| | **headers** dictionary | | This map contains the header field names and values. Repeated headers are not supported, but a header value can contain commas. |
| | **http\_method** string | | Which HTTP method to use for the request. |
| | **oauth\_token** dictionary | | Contains information needed for generating an OAuth token. This type of authorization should be used when sending requests to a GCP endpoint. |
| | | **scope** string | | OAuth scope to be used for generating OAuth access token. If not specified, "[https://www.googleapis.com/auth/cloud-platform"](#) will be used. |
| | | **service\_account\_email** string / required | | Service account email to be used for generating OAuth token. The service account must be within the same project as the job. |
| | **oidc\_token** dictionary | | Contains information needed for generating an OpenID Connect token. This type of authorization should be used when sending requests to third party endpoints or Cloud Run. |
| | | **audience** string | | Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used. |
| | | **service\_account\_email** string / required | | Service account email to be used for generating OAuth token. The service account must be within the same project as the job. |
| | **uri** string / required | | The full URI path that the request will be sent to. |
| **name** string / required | | The name of the job. |
| **project** string | | The Google Cloud Platform project to use. |
| **pubsub\_target** dictionary | | Pub/Sub target If the job providers a Pub/Sub target the cron will publish a message to the provided topic . |
| | **attributes** dictionary | | Attributes for PubsubMessage. Pubsub message must contain either non-empty data, or at least one attribute. |
| | **data** string | | The message payload for PubsubMessage. Pubsub message must contain either non-empty data, or at least one attribute. A base64-encoded string. |
| | **topic\_name** string / required | | The full resource name for the Cloud Pub/Sub topic to which messages will be published when a job is delivered. ~>\*\*NOTE:\*\* The topic name must be in the same format as required by PubSub's PublishRequest.name, e.g. `projects/my-project/topics/my-topic`. |
| **region** string / required | | Region where the scheduler job resides . |
| **retry\_config** dictionary | | By default, if a job does not complete successfully, meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings . |
| | **max\_backoff\_duration** string | | The maximum amount of time to wait before retrying a job after it fails. A duration in seconds with up to nine fractional digits, terminated by 's'. |
| | **max\_doublings** integer | | The time between retries will double maxDoublings times. A job's retry interval starts at minBackoffDuration, then doubles maxDoublings times, then increases linearly, and finally retries retries at intervals of maxBackoffDuration up to retryCount times. |
| | **max\_retry\_duration** string | | The time limit for retrying a failed job, measured from time when an execution was first attempted. If specified with retryCount, the job will be retried until both limits are reached. A duration in seconds with up to nine fractional digits, terminated by 's'. |
| | **min\_backoff\_duration** string | | The minimum amount of time to wait before retrying a job after it fails. A duration in seconds with up to nine fractional digits, terminated by 's'. |
| | **retry\_count** integer | | The number of attempts that the system will make to run a job using the exponential backoff procedure described by maxDoublings. Values greater than 5 and negative values are not allowed. |
| **schedule** string | | Describes the schedule on which the job will be executed. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **time\_zone** string | **Default:**"Etc/UTC" | Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the tz database. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/scheduler/docs/reference/rest/>
* Official Documentation: <https://cloud.google.com/scheduler/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a job
google.cloud.gcp_cloudscheduler_job:
name: job
region: us-central1
schedule: "*/4 * * * *"
description: test app engine job
time_zone: Europe/London
attempt_deadline: 320s
app_engine_http_target:
http_method: POST
app_engine_routing:
service: web
version: prod
instance: my-instance-001
relative_uri: "/ping"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **appEngineHttpTarget** complex | success | App Engine HTTP target. If the job providers a App Engine HTTP target the cron will send a request to the service instance . |
| | **appEngineRouting** complex | success | App Engine Routing setting for the job. |
| | | **instance** string | success | App instance. By default, the job is sent to an instance which is available when the job is attempted. |
| | | **service** string | success | App service. By default, the job is sent to the service which is the default service when the job is attempted. |
| | | **version** string | success | App version. By default, the job is sent to the version which is the default version when the job is attempted. |
| | **body** string | success | HTTP request body. A request body is allowed only if the HTTP method is POST or PUT. It will result in invalid argument error to set a body on a job with an incompatible HttpMethod. A base64-encoded string. |
| | **headers** dictionary | success | HTTP request headers. This map contains the header field names and values. Headers can be set when the job is created. |
| | **httpMethod** string | success | Which HTTP method to use for the request. |
| | **relativeUri** string | success | The relative URI. |
| **attemptDeadline** string | success | The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a DEADLINE\_EXCEEDED failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The allowed duration for this deadline is: \* For HTTP targets, between 15 seconds and 30 minutes. \* For App Engine HTTP targets, between 15 seconds and 24 hours. \* \*\*Note\*\*: For PubSub targets, this field is ignored - setting it will introduce an unresolvable diff. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s" . |
| **description** string | success | A human-readable description for the job. This string must not contain more than 500 characters. |
| **httpTarget** complex | success | HTTP target. If the job providers a http\_target the cron will send a request to the targeted url . |
| | **body** string | success | HTTP request body. A request body is allowed only if the HTTP method is POST, PUT, or PATCH. It is an error to set body on a job with an incompatible HttpMethod. A base64-encoded string. |
| | **headers** dictionary | success | This map contains the header field names and values. Repeated headers are not supported, but a header value can contain commas. |
| | **httpMethod** string | success | Which HTTP method to use for the request. |
| | **oauthToken** complex | success | Contains information needed for generating an OAuth token. This type of authorization should be used when sending requests to a GCP endpoint. |
| | | **scope** string | success | OAuth scope to be used for generating OAuth access token. If not specified, "[https://www.googleapis.com/auth/cloud-platform"](#) will be used. |
| | | **serviceAccountEmail** string | success | Service account email to be used for generating OAuth token. The service account must be within the same project as the job. |
| | **oidcToken** complex | success | Contains information needed for generating an OpenID Connect token. This type of authorization should be used when sending requests to third party endpoints or Cloud Run. |
| | | **audience** string | success | Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used. |
| | | **serviceAccountEmail** string | success | Service account email to be used for generating OAuth token. The service account must be within the same project as the job. |
| | **uri** string | success | The full URI path that the request will be sent to. |
| **name** string | success | The name of the job. |
| **pubsubTarget** complex | success | Pub/Sub target If the job providers a Pub/Sub target the cron will publish a message to the provided topic . |
| | **attributes** dictionary | success | Attributes for PubsubMessage. Pubsub message must contain either non-empty data, or at least one attribute. |
| | **data** string | success | The message payload for PubsubMessage. Pubsub message must contain either non-empty data, or at least one attribute. A base64-encoded string. |
| | **topicName** string | success | The full resource name for the Cloud Pub/Sub topic to which messages will be published when a job is delivered. ~>\*\*NOTE:\*\* The topic name must be in the same format as required by PubSub's PublishRequest.name, e.g. `projects/my-project/topics/my-topic`. |
| **region** string | success | Region where the scheduler job resides . |
| **retryConfig** complex | success | By default, if a job does not complete successfully, meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings . |
| | **maxBackoffDuration** string | success | The maximum amount of time to wait before retrying a job after it fails. A duration in seconds with up to nine fractional digits, terminated by 's'. |
| | **maxDoublings** integer | success | The time between retries will double maxDoublings times. A job's retry interval starts at minBackoffDuration, then doubles maxDoublings times, then increases linearly, and finally retries retries at intervals of maxBackoffDuration up to retryCount times. |
| | **maxRetryDuration** string | success | The time limit for retrying a failed job, measured from time when an execution was first attempted. If specified with retryCount, the job will be retried until both limits are reached. A duration in seconds with up to nine fractional digits, terminated by 's'. |
| | **minBackoffDuration** string | success | The minimum amount of time to wait before retrying a job after it fails. A duration in seconds with up to nine fractional digits, terminated by 's'. |
| | **retryCount** integer | success | The number of attempts that the system will make to run a job using the exponential backoff procedure described by maxDoublings. Values greater than 5 and negative values are not allowed. |
| **schedule** string | success | Describes the schedule on which the job will be executed. |
| **timeZone** string | success | Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the tz database. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_vpn_tunnel β Creates a GCP VpnTunnel google.cloud.gcp\_compute\_vpn\_tunnel β Creates a GCP VpnTunnel
================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_vpn_tunnel`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* VPN tunnel resource.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **ike\_version** integer | **Default:**"2" | IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2. |
| **local\_traffic\_selector** list / elements=string | | Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example `192.168.0.0/16`. The ranges should be disjoint. Only IPv4 is supported. |
| **name** string / required | | Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **peer\_external\_gateway** dictionary | | URL of the peer side external VPN gateway to which this VPN tunnel is connected. This field represents a link to a ExternalVpnGateway resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_external\_vpn\_gateway task and then set this peer\_external\_gateway field to "{{ name-of-resource }}" |
| **peer\_external\_gateway\_interface** integer | | The interface ID of the external VPN gateway to which this VPN tunnel is connected. |
| **peer\_gcp\_gateway** dictionary | | URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. If provided, the VPN tunnel will automatically use the same vpn\_gateway\_interface ID in the peer GCP VPN gateway. This field represents a link to a VpnGateway resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_vpn\_gateway task and then set this peer\_gcp\_gateway field to "{{ name-of-resource }}" |
| **peer\_ip** string | | IP address of the peer VPN gateway. Only IPv4 is supported. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The region where the tunnel is located. |
| **remote\_traffic\_selector** list / elements=string | | Remote traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example `192.168.0.0/16`. The ranges should be disjoint. Only IPv4 is supported. |
| **router** dictionary | | URL of router resource to be used for dynamic routing. This field represents a link to a Router resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_router task and then set this router field to "{{ name-of-resource }}" |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **shared\_secret** string / required | | Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **target\_vpn\_gateway** dictionary | | URL of the Target VPN gateway with which this VPN tunnel is associated. This field represents a link to a TargetVpnGateway resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_target\_vpn\_gateway task and then set this target\_vpn\_gateway field to "{{ name-of-resource }}" |
| **vpn\_gateway** dictionary | | URL of the VPN gateway with which this VPN tunnel is associated. This must be used if a High Availability VPN gateway resource is created. This field represents a link to a VpnGateway resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_vpn\_gateway task and then set this vpn\_gateway field to "{{ name-of-resource }}" |
| **vpn\_gateway\_interface** integer | | The interface ID of the VPN gateway with which this VPN tunnel is associated. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/vpnTunnels>
* Cloud VPN Overview: <https://cloud.google.com/vpn/docs/concepts/overview>
* Networks and Tunnel Routing: <https://cloud.google.com/vpn/docs/concepts/choosing-networks-routing>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a network
google.cloud.gcp_compute_network:
name: network-vpn-tunnel
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: network
- name: create a router
google.cloud.gcp_compute_router:
name: router-vpn-tunnel
network: "{{ network }}"
bgp:
asn: 64514
advertise_mode: CUSTOM
advertised_groups:
- ALL_SUBNETS
advertised_ip_ranges:
- range: 1.2.3.4
- range: 6.7.0.0/16
region: us-central1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: router
- name: create a target vpn gateway
google.cloud.gcp_compute_target_vpn_gateway:
name: gateway-vpn-tunnel
region: us-west1
network: "{{ network }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: gateway
- name: create a vpn tunnel
google.cloud.gcp_compute_vpn_tunnel:
name: test_object
region: us-west1
target_vpn_gateway: "{{ gateway }}"
router: "{{ router }}"
shared_secret: super secret
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **id** string | success | The unique identifier for the resource. This identifier is defined by the server. |
| **ikeVersion** integer | success | IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2. |
| **localTrafficSelector** list / elements=string | success | Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example `192.168.0.0/16`. The ranges should be disjoint. Only IPv4 is supported. |
| **name** string | success | Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **peerExternalGateway** dictionary | success | URL of the peer side external VPN gateway to which this VPN tunnel is connected. |
| **peerExternalGatewayInterface** integer | success | The interface ID of the external VPN gateway to which this VPN tunnel is connected. |
| **peerGcpGateway** dictionary | success | URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. If provided, the VPN tunnel will automatically use the same vpn\_gateway\_interface ID in the peer GCP VPN gateway. |
| **peerIp** string | success | IP address of the peer VPN gateway. Only IPv4 is supported. |
| **region** string | success | The region where the tunnel is located. |
| **remoteTrafficSelector** list / elements=string | success | Remote traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example `192.168.0.0/16`. The ranges should be disjoint. Only IPv4 is supported. |
| **router** dictionary | success | URL of router resource to be used for dynamic routing. |
| **sharedSecret** string | success | Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway. |
| **sharedSecretHash** string | success | Hash of the shared secret. |
| **targetVpnGateway** dictionary | success | URL of the Target VPN gateway with which this VPN tunnel is associated. |
| **vpnGateway** dictionary | success | URL of the VPN gateway with which this VPN tunnel is associated. This must be used if a High Availability VPN gateway resource is created. |
| **vpnGatewayInterface** integer | success | The interface ID of the VPN gateway with which this VPN tunnel is associated. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_region_backend_service β Creates a GCP RegionBackendService google.cloud.gcp\_compute\_region\_backend\_service β Creates a GCP RegionBackendService
========================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_backend_service`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A Region Backend Service defines a regionally-scoped group of virtual machines that will serve traffic for load balancing.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **affinity\_cookie\_ttl\_sec** integer | | Lifetime of cookies in seconds if session\_affinity is GENERATED\_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used. |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **backends** list / elements=dictionary | | The set of backends that serve this RegionBackendService. |
| | **balancing\_mode** string | **Default:**"CONNECTION" | Specifies the balancing mode for this backend. Some valid choices include: "UTILIZATION", "RATE", "CONNECTION" |
| | **capacity\_scaler** string | | A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). ~>\*\*NOTE\*\*: This field cannot be set for INTERNAL region backend services (default loadBalancingScheme), but is required for non-INTERNAL backend service. The total capacity\_scaler for all backends must be non-zero. A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0]. |
| | **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| | **failover** boolean | **Choices:*** no
* yes
| This field designates whether this is a failover backend. More than one failover backend can be configured for a given RegionBackendService. |
| | **group** string / required | | The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. When the `load\_balancing\_scheme` is INTERNAL, only instance groups are supported. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL. |
| | **max\_connections** integer | | The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. Cannot be set for INTERNAL backend services. For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance or maxConnectionsPerEndpoint, as appropriate for group type, must be set. |
| | **max\_connections\_per\_endpoint** integer | | The max number of simultaneous connections that a single backend network endpoint can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set. |
| | **max\_connections\_per\_instance** integer | | The max number of simultaneous connections that a single backend instance can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. |
| | **max\_rate** integer | | The max requests per second (RPS) of the group. Cannot be set for INTERNAL backend services. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. Either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set. |
| | **max\_rate\_per\_endpoint** string | | The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. Cannot be set for INTERNAL backend services. |
| | **max\_rate\_per\_instance** string | | The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. Cannot be set for INTERNAL backend services. |
| | **max\_utilization** string | | Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. Valid range is [0.0, 1.0]. Cannot be set for INTERNAL backend services. |
| **cdn\_policy** dictionary | | Cloud CDN configuration for this BackendService. |
| | **cache\_key\_policy** dictionary | | The CacheKeyPolicy for this CdnPolicy. |
| | | **include\_host** boolean | **Choices:*** no
* yes
| If true requests to different hosts will be cached separately. |
| | | **include\_protocol** boolean | **Choices:*** no
* yes
| If true, http and https requests will be cached separately. |
| | | **include\_query\_string** boolean | **Choices:*** no
* yes
| If true, include query string parameters in the cache key according to query\_string\_whitelist and query\_string\_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely. |
| | | **query\_string\_blacklist** list / elements=string | | Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | | **query\_string\_whitelist** list / elements=string | | Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | **signed\_url\_cache\_max\_age\_sec** integer | **Default:**"3600" | Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. |
| **circuit\_breakers** dictionary | | Settings controlling the volume of connections to a backend service. This field is applicable only when the `load\_balancing\_scheme` is set to INTERNAL\_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. |
| | **max\_connections** integer | **Default:**"1024" | The maximum number of connections to the backend cluster. Defaults to 1024. |
| | **max\_pending\_requests** integer | **Default:**"1024" | The maximum number of pending requests to the backend cluster. Defaults to 1024. |
| | **max\_requests** integer | **Default:**"1024" | The maximum number of parallel requests to the backend cluster. Defaults to 1024. |
| | **max\_requests\_per\_connection** integer | | Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. |
| | **max\_retries** integer | **Default:**"3" | The maximum number of parallel retries to the backend cluster. Defaults to 3. |
| **connection\_draining** dictionary | | Settings for connection draining . |
| | **draining\_timeout\_sec** integer | **Default:**"300" | Time for which instance will be drained (not accept new connections, but still work to finish started). |
| **consistent\_hash** dictionary | | Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies when all of the following are true - \* `load\_balancing\_scheme` is set to INTERNAL\_MANAGED \* `protocol` is set to HTTP, HTTPS, or HTTP2 \* `locality\_lb\_policy` is set to MAGLEV or RING\_HASH . |
| | **http\_cookie** dictionary | | Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP\_COOKIE. |
| | | **name** string | | Name of the cookie. |
| | | **path** string | | Path to set for the cookie. |
| | | **ttl** dictionary | | Lifetime of the cookie. |
| | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** integer / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **http\_header\_name** string | | The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER\_FIELD. |
| | **minimum\_ring\_size** integer | **Default:**"1024" | The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024. |
| **description** string | | An optional description of this resource. |
| **enable\_cdn** boolean | **Choices:*** no
* yes
| If true, enable Cloud CDN for this RegionBackendService. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **failover\_policy** dictionary | | Policy for failovers. |
| | **disable\_connection\_drain\_on\_failover** boolean | **Choices:*** no
* yes
| On failover or failback, this field indicates whether connection drain will be honored. Setting this to true has the following effect: connections to the old active pool are not drained. Connections to the new active pool use the timeout of 10 min (currently fixed). Setting to false has the following effect: both old and new connections will have a drain timeout of 10 min. This can be set to true only if the protocol is TCP. The default is false. |
| | **drop\_traffic\_if\_unhealthy** boolean | **Choices:*** no
* yes
| This option is used only when no healthy VMs are detected in the primary and backup instance groups. When set to true, traffic is dropped. When set to false, new connections are sent across all VMs in the primary group. The default is false. |
| | **failover\_ratio** string | | The value of the field must be in [0, 1]. If the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend. In case where 'failoverRatio' is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the "force" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy. This field is only used with l4 load balancing. |
| **health\_checks** list / elements=string | | The set of URLs to HealthCheck resources for health checking this RegionBackendService. Currently at most one health check can be specified. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. |
| **load\_balancing\_scheme** string | **Default:**"INTERNAL" | Indicates what kind of load balancing this regional backend service will be used for. A backend service created for one type of load balancing cannot be used with the other(s). Some valid choices include: "EXTERNAL", "INTERNAL", "INTERNAL\_MANAGED" |
| **locality\_lb\_policy** string | | The load balancing algorithm used within the scope of the locality. The possible values are - \* ROUND\_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. \* LEAST\_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. \* RING\_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. \* RANDOM - The load balancer selects a random healthy host. \* ORIGINAL\_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. \* MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the `load\_balancing\_scheme` is set to INTERNAL\_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. Some valid choices include: "ROUND\_ROBIN", "LEAST\_REQUEST", "RING\_HASH", "RANDOM", "ORIGINAL\_DESTINATION", "MAGLEV" |
| **log\_config** dictionary | | This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. |
| | **enable** boolean | **Choices:*** no
* yes
| Whether to enable logging for the load balancer traffic served by this backend service. |
| | **sample\_rate** string | | This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary | | The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL. This field represents a link to a Network resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_network task and then set this network field to "{{ name-of-resource }}" |
| **outlier\_detection** dictionary | | Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the `load\_balancing\_scheme` is set to INTERNAL\_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. |
| | **base\_ejection\_time** dictionary | | The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. |
| | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | **seconds** integer / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **consecutive\_errors** integer | **Default:**"5" | Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5. |
| | **consecutive\_gateway\_failure** integer | **Default:**"5" | The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5. |
| | **enforcing\_consecutive\_errors** integer | **Default:**"100" | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | **enforcing\_consecutive\_gateway\_failure** integer | | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0. |
| | **enforcing\_success\_rate** integer | **Default:**"100" | The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | **interval** dictionary | | Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. |
| | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | **seconds** integer / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **max\_ejection\_percent** integer | **Default:**"10" | Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%. |
| | **success\_rate\_minimum\_hosts** integer | **Default:**"5" | The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5. |
| | **success\_rate\_request\_volume** integer | **Default:**"100" | The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100. |
| | **success\_rate\_stdev\_factor** integer | **Default:**"1900" | This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev \* success\_rate\_stdev\_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900. |
| **port\_name** string | | A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL\_MANAGED, or INTERNAL\_SELF\_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs. API sets a default of "http" if not given. Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing). |
| **project** string | | The Google Cloud Platform project to use. |
| **protocol** string | | The protocol this RegionBackendService uses to communicate with backends. The default is HTTP. \*\*NOTE\*\*: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API. Some valid choices include: "HTTP", "HTTPS", "HTTP2", "SSL", "TCP", "UDP", "GRPC" |
| **region** string / required | | A reference to the region where the regional backend service resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **session\_affinity** string | | Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP. Some valid choices include: "NONE", "CLIENT\_IP", "CLIENT\_IP\_PORT\_PROTO", "CLIENT\_IP\_PROTO", "GENERATED\_COOKIE", "HEADER\_FIELD", "HTTP\_COOKIE" |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **timeout\_sec** integer | | How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400]. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/latest/regionBackendServices>
* Internal TCP/UDP Load Balancing: <https://cloud.google.com/compute/docs/load-balancing/internal/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a health check
google.cloud.gcp_compute_health_check:
name: "{{ resource_name }}"
type: TCP
tcp_health_check:
port: 80
check_interval_sec: 1
timeout_sec: 1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: healthcheck
- name: create a region backend service
google.cloud.gcp_compute_region_backend_service:
name: test_object
region: us-central1
health_checks:
- "{{ healthcheck.selfLink }}"
connection_draining:
draining_timeout_sec: 10
session_affinity: CLIENT_IP
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **affinityCookieTtlSec** integer | success | Lifetime of cookies in seconds if session\_affinity is GENERATED\_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used. |
| **backends** complex | success | The set of backends that serve this RegionBackendService. |
| | **balancingMode** string | success | Specifies the balancing mode for this backend. |
| | **capacityScaler** string | success | A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). ~>\*\*NOTE\*\*: This field cannot be set for INTERNAL region backend services (default loadBalancingScheme), but is required for non-INTERNAL backend service. The total capacity\_scaler for all backends must be non-zero. A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0]. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **failover** boolean | success | This field designates whether this is a failover backend. More than one failover backend can be configured for a given RegionBackendService. |
| | **group** string | success | The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. When the `load\_balancing\_scheme` is INTERNAL, only instance groups are supported. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL. |
| | **maxConnections** integer | success | The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. Cannot be set for INTERNAL backend services. For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance or maxConnectionsPerEndpoint, as appropriate for group type, must be set. |
| | **maxConnectionsPerEndpoint** integer | success | The max number of simultaneous connections that a single backend network endpoint can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set. |
| | **maxConnectionsPerInstance** integer | success | The max number of simultaneous connections that a single backend instance can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. |
| | **maxRate** integer | success | The max requests per second (RPS) of the group. Cannot be set for INTERNAL backend services. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. Either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set. |
| | **maxRatePerEndpoint** string | success | The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. Cannot be set for INTERNAL backend services. |
| | **maxRatePerInstance** string | success | The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. Cannot be set for INTERNAL backend services. |
| | **maxUtilization** string | success | Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. Valid range is [0.0, 1.0]. Cannot be set for INTERNAL backend services. |
| **cdnPolicy** complex | success | Cloud CDN configuration for this BackendService. |
| | **cacheKeyPolicy** complex | success | The CacheKeyPolicy for this CdnPolicy. |
| | | **includeHost** boolean | success | If true requests to different hosts will be cached separately. |
| | | **includeProtocol** boolean | success | If true, http and https requests will be cached separately. |
| | | **includeQueryString** boolean | success | If true, include query string parameters in the cache key according to query\_string\_whitelist and query\_string\_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely. |
| | | **queryStringBlacklist** list / elements=string | success | Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | | **queryStringWhitelist** list / elements=string | success | Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | **signedUrlCacheMaxAgeSec** integer | success | Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. |
| **circuitBreakers** complex | success | Settings controlling the volume of connections to a backend service. This field is applicable only when the `load\_balancing\_scheme` is set to INTERNAL\_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. |
| | **maxConnections** integer | success | The maximum number of connections to the backend cluster. Defaults to 1024. |
| | **maxPendingRequests** integer | success | The maximum number of pending requests to the backend cluster. Defaults to 1024. |
| | **maxRequests** integer | success | The maximum number of parallel requests to the backend cluster. Defaults to 1024. |
| | **maxRequestsPerConnection** integer | success | Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. |
| | **maxRetries** integer | success | The maximum number of parallel retries to the backend cluster. Defaults to 3. |
| **connectionDraining** complex | success | Settings for connection draining . |
| | **drainingTimeoutSec** integer | success | Time for which instance will be drained (not accept new connections, but still work to finish started). |
| **consistentHash** complex | success | Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies when all of the following are true - \* `load\_balancing\_scheme` is set to INTERNAL\_MANAGED \* `protocol` is set to HTTP, HTTPS, or HTTP2 \* `locality\_lb\_policy` is set to MAGLEV or RING\_HASH . |
| | **httpCookie** complex | success | Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP\_COOKIE. |
| | | **name** string | success | Name of the cookie. |
| | | **path** string | success | Path to set for the cookie. |
| | | **ttl** complex | success | Lifetime of the cookie. |
| | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **httpHeaderName** string | success | The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER\_FIELD. |
| | **minimumRingSize** integer | success | The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **enableCDN** boolean | success | If true, enable Cloud CDN for this RegionBackendService. |
| **failoverPolicy** complex | success | Policy for failovers. |
| | **disableConnectionDrainOnFailover** boolean | success | On failover or failback, this field indicates whether connection drain will be honored. Setting this to true has the following effect: connections to the old active pool are not drained. Connections to the new active pool use the timeout of 10 min (currently fixed). Setting to false has the following effect: both old and new connections will have a drain timeout of 10 min. This can be set to true only if the protocol is TCP. The default is false. |
| | **dropTrafficIfUnhealthy** boolean | success | This option is used only when no healthy VMs are detected in the primary and backup instance groups. When set to true, traffic is dropped. When set to false, new connections are sent across all VMs in the primary group. The default is false. |
| | **failoverRatio** string | success | The value of the field must be in [0, 1]. If the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend. In case where 'failoverRatio' is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the "force" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy. This field is only used with l4 load balancing. |
| **fingerprint** string | success | Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. |
| **healthChecks** list / elements=string | success | The set of URLs to HealthCheck resources for health checking this RegionBackendService. Currently at most one health check can be specified. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. |
| **id** integer | success | The unique identifier for the resource. |
| **loadBalancingScheme** string | success | Indicates what kind of load balancing this regional backend service will be used for. A backend service created for one type of load balancing cannot be used with the other(s). |
| **localityLbPolicy** string | success | The load balancing algorithm used within the scope of the locality. The possible values are - \* ROUND\_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. \* LEAST\_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. \* RING\_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. \* RANDOM - The load balancer selects a random healthy host. \* ORIGINAL\_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. \* MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the `load\_balancing\_scheme` is set to INTERNAL\_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. |
| **logConfig** complex | success | This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. |
| | **enable** boolean | success | Whether to enable logging for the load balancer traffic served by this backend service. |
| | **sampleRate** string | success | This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary | success | The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL. |
| **outlierDetection** complex | success | Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the `load\_balancing\_scheme` is set to INTERNAL\_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. |
| | **baseEjectionTime** complex | success | The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. |
| | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **consecutiveErrors** integer | success | Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5. |
| | **consecutiveGatewayFailure** integer | success | The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5. |
| | **enforcingConsecutiveErrors** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | **enforcingConsecutiveGatewayFailure** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0. |
| | **enforcingSuccessRate** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | **interval** complex | success | Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. |
| | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **maxEjectionPercent** integer | success | Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%. |
| | **successRateMinimumHosts** integer | success | The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5. |
| | **successRateRequestVolume** integer | success | The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100. |
| | **successRateStdevFactor** integer | success | This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev \* success\_rate\_stdev\_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900. |
| **portName** string | success | A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL\_MANAGED, or INTERNAL\_SELF\_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs. API sets a default of "http" if not given. Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing). |
| **protocol** string | success | The protocol this RegionBackendService uses to communicate with backends. The default is HTTP. \*\*NOTE\*\*: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API. |
| **region** string | success | A reference to the region where the regional backend service resides. |
| **sessionAffinity** string | success | Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP. |
| **timeoutSec** integer | success | How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400]. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_redis_instance β Creates a GCP Instance google.cloud.gcp\_redis\_instance β Creates a GCP Instance
==========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_redis_instance`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A Google Cloud Redis instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **alternative\_location\_id** string | | Only applicable to STANDARD\_HA tier which protects the instance against zonal failures by provisioning it across two zones. If provided, it must be a different zone from the one provided in [locationId]. |
| **auth\_enabled** boolean | **Choices:*** no
* yes
**Default:**"false" | Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled. |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **authorized\_network** string | | The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. |
| **connect\_mode** string | **Default:**"DIRECT\_PEERING" | The connection mode of the Redis instance. Some valid choices include: "DIRECT\_PEERING", "PRIVATE\_SERVICE\_ACCESS" |
| **display\_name** string | | An arbitrary and optional user-provided name for the instance. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **labels** dictionary | | Resource labels to represent user provided metadata. |
| **location\_id** string | | The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD\_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId]. |
| **memory\_size\_gb** integer / required | | Redis memory size in GiB. |
| **name** string / required | | The ID of the instance or a fully qualified identifier for the instance. |
| **project** string | | The Google Cloud Platform project to use. |
| **redis\_configs** dictionary | | Redis configuration parameters, according to <http://redis.io/topics/config>. Please check Memorystore documentation for the list of supported parameters: <https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs> . |
| **redis\_version** string | | The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: - REDIS\_5\_0 for Redis 5.0 compatibility - REDIS\_4\_0 for Redis 4.0 compatibility - REDIS\_3\_2 for Redis 3.2 compatibility . |
| **region** string / required | | The name of the Redis region of the instance. |
| **reserved\_ip\_range** string | | The CIDR range of internal addresses that are reserved for this instance. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique and non-overlapping with existing subnets in an authorized network. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **tier** string | **Default:**"BASIC" | The service tier of the instance. Must be one of these values: - BASIC: standalone instance - STANDARD\_HA: highly available primary/replica instances . Some valid choices include: "BASIC", "STANDARD\_HA" |
Notes
-----
Note
* API Reference: <https://cloud.google.com/memorystore/docs/redis/reference/rest/>
* Official Documentation: <https://cloud.google.com/memorystore/docs/redis/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a network
google.cloud.gcp_compute_network:
name: network-instance
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: network
- name: create a instance
google.cloud.gcp_redis_instance:
name: instance37
tier: STANDARD_HA
memory_size_gb: 1
region: us-central1
location_id: us-central1-a
redis_version: REDIS_3_2
display_name: Ansible Test Instance
reserved_ip_range: 192.168.0.0/29
labels:
my_key: my_val
other_key: other_val
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **alternativeLocationId** string | success | Only applicable to STANDARD\_HA tier which protects the instance against zonal failures by provisioning it across two zones. If provided, it must be a different zone from the one provided in [locationId]. |
| **authEnabled** boolean | success | Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled. |
| **authorizedNetwork** string | success | The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. |
| **connectMode** string | success | The connection mode of the Redis instance. |
| **createTime** string | success | The time the instance was created in RFC3339 UTC "Zulu" format, accurate to nanoseconds. |
| **currentLocationId** string | success | The current zone where the Redis endpoint is placed. For Basic Tier instances, this will always be the same as the [locationId] provided by the user at creation time. For Standard Tier instances, this can be either [locationId] or [alternativeLocationId] and can change after a failover event. |
| **displayName** string | success | An arbitrary and optional user-provided name for the instance. |
| **host** string | success | Hostname or IP address of the exposed Redis endpoint used by clients to connect to the service. |
| **labels** dictionary | success | Resource labels to represent user provided metadata. |
| **locationId** string | success | The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD\_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId]. |
| **memorySizeGb** integer | success | Redis memory size in GiB. |
| **name** string | success | The ID of the instance or a fully qualified identifier for the instance. |
| **persistenceIamIdentity** string | success | Output only. Cloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is "serviceAccount:". The value may change over time for a given instance so should be checked before each import/export operation. |
| **port** integer | success | The port number of the exposed Redis endpoint. |
| **redisConfigs** dictionary | success | Redis configuration parameters, according to <http://redis.io/topics/config>. Please check Memorystore documentation for the list of supported parameters: <https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs> . |
| **redisVersion** string | success | The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: - REDIS\_5\_0 for Redis 5.0 compatibility - REDIS\_4\_0 for Redis 4.0 compatibility - REDIS\_3\_2 for Redis 3.2 compatibility . |
| **region** string | success | The name of the Redis region of the instance. |
| **reservedIpRange** string | success | The CIDR range of internal addresses that are reserved for this instance. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique and non-overlapping with existing subnets in an authorized network. |
| **tier** string | success | The service tier of the instance. Must be one of these values: - BASIC: standalone instance - STANDARD\_HA: highly available primary/replica instances . |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_url_map_info β Gather info for GCP UrlMap google.cloud.gcp\_compute\_url\_map\_info β Gather info for GCP UrlMap
======================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_url_map_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP UrlMap
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an URL map
gcp_compute_url_map_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **defaultRouteAction** complex | success | defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. |
| | | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see [W3C Recommendation for Cross Origin Resource Sharing](https://www.w3.org/TR/cors/) . |
| | | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. |
| | | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. |
| | | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | **maxAge** integer | success | Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header. |
| | | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. |
| | | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | **backendService** dictionary | success | The full or partial URL to the BackendService resource being mirrored to. |
| | | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. |
| | | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. |
| | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | | **retryConditions** list / elements=string | success | Specfies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, \* connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. |
| | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service. |
| | | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | **backendService** dictionary | success | The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | **headerName** string | success | The name of the header to add. |
| | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | **headerName** string | success | The name of the header to add. |
| | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | **defaultService** dictionary | success | The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| | **defaultUrlRedirect** complex | success | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **fingerprint** string | success | Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. |
| | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here take effect after headerAction specified under pathMatcher. |
| | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | **headerName** string | success | The name of the header. |
| | | | **headerValue** string | success | The value of the header to add. |
| | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | **headerName** string | success | The name of the header. |
| | | | **headerValue** string | success | The value of the header to add. |
| | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | **hostRules** complex | success | The list of HostRules to use against the URL. |
| | | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | | **hosts** list / elements=string | success | The list of host patterns to match. They must be valid hostnames, except \* will match any string of ([a-z0-9-.]\*). In that case, \* must be the first character and must be followed in the pattern by either - or . |
| | | **pathMatcher** string | success | The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **pathMatchers** complex | success | The list of named PathMatchers to use against the URL. |
| | | **defaultRouteAction** complex | success | defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. |
| | | | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see [W3C Recommendation for Cross Origin Resource Sharing](https://www.w3.org/TR/cors/) . |
| | | | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. |
| | | | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. |
| | | | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | **maxAge** integer | success | Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header. |
| | | | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. |
| | | | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | **backendService** dictionary | success | The full or partial URL to the BackendService resource being mirrored to. |
| | | | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. |
| | | | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. |
| | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | | | **retryConditions** list / elements=string | success | Specfies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, \* connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. |
| | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service. |
| | | | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | **backendService** dictionary | success | The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | **headerName** string | success | The name of the header to add. |
| | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | | **headerName** string | success | The name of the header to add. |
| | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | **defaultService** dictionary | success | The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - <https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService> - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource defaultService: - compute.backendBuckets.use - compute.backendServices.use . |
| | | **defaultUrlRedirect** complex | success | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap . |
| | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | **headerName** string | success | The name of the header. |
| | | | | **headerValue** string | success | The value of the header to add. |
| | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | **headerName** string | success | The name of the header. |
| | | | | **headerValue** string | success | The value of the header to add. |
| | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | **name** string | success | The name to which this PathMatcher is referred by the HostRule. |
| | | **pathRules** complex | success | The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/\* will match before /a/b/\* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. |
| | | | **paths** list / elements=string | success | The list of path patterns to match. Each must start with / and the only place a \* is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| | | | **routeAction** complex | success | In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. |
| | | | | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | | **maxAge** integer | success | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | | **backendService** dictionary | success | The BackendService resource being mirrored to. |
| | | | | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | | | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. |
| | | | | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. |
| | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **retryConditions** list / elements=string | success | Specifies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | | **backendService** dictionary | success | The default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | | **service** dictionary | success | The backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
| | | | **urlRedirect** complex | success | When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | | **routeRules** complex | success | The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. |
| | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].r outeAction.weightedBackendService.backendServiceWeightAction[].headerAction . |
| | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | **headerName** string | success | The name of the header. |
| | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | **headerName** string | success | The name of the header. |
| | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | **matchRules** complex | success | The rules for determining a match. |
| | | | | **fullPathMatch** string | success | For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | | **headerMatches** complex | success | Specifies a list of header match criteria, all of which must match corresponding headers in the request. |
| | | | | | **exactMatch** string | success | The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **headerName** string | success | The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". |
| | | | | | **invertMatch** boolean | success | If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false. |
| | | | | | **prefixMatch** string | success | The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **presentMatch** boolean | success | A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value or not. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **rangeMatch** complex | success | The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | | **rangeEnd** integer | success | The end of the range (exclusive). |
| | | | | | | **rangeStart** integer | success | The start of the range (inclusive). |
| | | | | | **regexMatch** string | success | The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **suffixMatch** string | success | The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **ignoreCase** boolean | success | Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false. |
| | | | | **metadataFilters** complex | success | Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH\_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH\_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL\_SELF\_MANAGED. |
| | | | | | **filterLabels** complex | success | The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. |
| | | | | | | **name** string | success | Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long. |
| | | | | | | **value** string | success | The value of the label must match the specified value. value can have a maximum length of 1024 characters. |
| | | | | | **filterMatchCriteria** string | success | Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are: - MATCH\_ANY: At least one of the filterLabels must have a matching label in the provided metadata. - MATCH\_ALL: All filterLabels must have matching labels in the provided metadata. |
| | | | | **prefixMatch** string | success | For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /. The value must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | | **queryParameterMatches** complex | success | Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. |
| | | | | | **exactMatch** string | success | The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | | **name** string | success | The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails. |
| | | | | | **presentMatch** boolean | success | Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | | **regexMatch** string | success | The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | **regexMatch** string | success | For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | **priority** integer | success | For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules. |
| | | | **routeAction** complex | success | In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. which indicates that the CORS policy is in effect. Defaults to false. |
| | | | | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | | **maxAge** integer | success | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | | **backendService** dictionary | success | The BackendService resource being mirrored to. |
| | | | | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | | | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. |
| | | | | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. |
| | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **retryConditions** list / elements=string | success | Specfies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | | **backendService** dictionary | success | The default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | | **service** dictionary | success | The backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
| | | | **urlRedirect** complex | success | When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. Defaults to false. |
| | | | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. Only one of pathRedirect or prefixRedirect must be specified. The value must be between 1 and 1024 characters. |
| | | | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. |
| | | | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. Defaults to false. |
| | **tests** complex | success | The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. |
| | | **description** string | success | Description of this test case. |
| | | **host** string | success | Host portion of the URL. |
| | | **path** string | success | Path portion of the URL. |
| | | **service** dictionary | success | Expected BackendService resource the given URL should be mapped to. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_mlengine_version_info β Gather info for GCP Version google.cloud.gcp\_mlengine\_version\_info β Gather info for GCP Version
=======================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_mlengine_version_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Version
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **model** dictionary / required | | The model that this version belongs to. This field represents a link to a Model resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_mlengine\_model task and then set this model field to "{{ name-of-resource }}" |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a version
gcp_mlengine_version_info:
model: "{{ model }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **autoScaling** complex | success | Automatically scale the number of nodes used to serve the model in response to increases and decreases in traffic. Care should be taken to ramp up traffic according to the model's ability to scale or you will start seeing increases in latency and 429 response codes. |
| | | **minNodes** integer | success | The minimum number of nodes to allocate for this mode. |
| | **createTime** string | success | The time the version was created. |
| | **deploymentUri** string | success | The Cloud Storage location of the trained model used to create the version. |
| | **description** string | success | The description specified for the version when it was created. |
| | **errorMessage** string | success | The details of a failure or cancellation. |
| | **framework** string | success | The machine learning framework AI Platform uses to train this version of the model. |
| | **isDefault** boolean | success | If true, this version will be used to handle prediction requests that do not specify a version. |
| | **labels** dictionary | success | One or more labels that you can add, to organize your model versions. |
| | **lastUseTime** string | success | The time the version was last used for prediction. |
| | **machineType** string | success | The type of machine on which to serve the model. Currently only applies to online prediction service. |
| | **manualScaling** complex | success | Manually select the number of nodes to use for serving the model. You should generally use autoScaling with an appropriate minNodes instead, but this option is available if you want more predictable billing. Beware that latency and error rates will increase if the traffic exceeds that capability of the system to serve it based on the selected number of nodes. |
| | | **nodes** integer | success | The number of nodes to allocate for this model. These nodes are always up, starting from the time the model is deployed. |
| | **model** dictionary | success | The model that this version belongs to. |
| | **name** string | success | The name specified for the version when it was created. The version name must be unique within the model it is created in. |
| | **packageUris** list / elements=string | success | Cloud Storage paths (gs://β¦) of packages for custom prediction routines or scikit-learn pipelines with custom code. |
| | **predictionClass** string | success | The fully qualified name (module\_name.class\_name) of a class that implements the Predictor interface described in this reference field. The module containing this class should be included in a package provided to the packageUris field. |
| | **pythonVersion** string | success | The version of Python used in prediction. If not set, the default version is '2.7'. Python '3.5' is available when runtimeVersion is set to '1.4' and above. Python '2.7' works with all supported runtime versions. |
| | **runtimeVersion** string | success | The AI Platform runtime version to use for this deployment. |
| | **serviceAccount** string | success | Specifies the service account for resource access control. |
| | **state** string | success | The state of a version. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_https_health_check_info β Gather info for GCP HttpsHealthCheck google.cloud.gcp\_compute\_https\_health\_check\_info β Gather info for GCP HttpsHealthCheck
============================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_https_health_check_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP HttpsHealthCheck
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a HTTPS health check
gcp_compute_https_health_check_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **checkIntervalSec** integer | success | How often (in seconds) to send a health check. The default value is 5 seconds. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **healthyThreshold** integer | success | A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. |
| | **host** string | success | The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **port** integer | success | The TCP port number for the HTTPS health check request. The default value is 80. |
| | **requestPath** string | success | The request path of the HTTPS health check request. The default value is /. |
| | **timeoutSec** integer | success | How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. |
| | **unhealthyThreshold** integer | success | A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_runtimeconfig_variable_info β Gather info for GCP Variable google.cloud.gcp\_runtimeconfig\_variable\_info β Gather info for GCP Variable
==============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_runtimeconfig_variable_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Variable
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **config** string / required | | The name of the runtime config that this variable belongs to. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a variable
gcp_runtimeconfig_variable_info:
config: my-config
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **config** string | success | The name of the runtime config that this variable belongs to. |
| | **name** string | success | The name of the variable resource. |
| | **text** string | success | The string value of the variable. Either this or `value` can be set. |
| | **value** string | success | The binary value of the variable. Either this or `text` can be set. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_region_target_https_proxy_info β Gather info for GCP RegionTargetHttpsProxy google.cloud.gcp\_compute\_region\_target\_https\_proxy\_info β Gather info for GCP RegionTargetHttpsProxy
==========================================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_target_https_proxy_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP RegionTargetHttpsProxy
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The region where the regional proxy resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a region target HTTPS proxy
gcp_compute_region_target_https_proxy_info:
region: us-central1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **region** string | success | The region where the regional proxy resides. |
| | **sslCertificates** list / elements=string | success | A list of RegionSslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified. |
| | **urlMap** dictionary | success | A reference to the RegionUrlMap resource that defines the mapping from URL to the RegionBackendService. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_ssl_certificate_info β Gather info for GCP SslCertificate google.cloud.gcp\_compute\_ssl\_certificate\_info β Gather info for GCP SslCertificate
======================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_ssl_certificate_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP SslCertificate
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a SSL certificate
gcp_compute_ssl_certificate_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **certificate** string | success | The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **privateKey** string | success | The write-only private key in PEM format. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_storage_bucket_access_control β Creates a GCP BucketAccessControl google.cloud.gcp\_storage\_bucket\_access\_control β Creates a GCP BucketAccessControl
======================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_storage_bucket_access_control`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* The BucketAccessControls resource represents the Access Control Lists (ACLs) for buckets within Google Cloud Storage. ACLs let you specify who has access to your data and to what extent.
* There are three roles that can be assigned to an entity: READERs can get the bucket, though no acl property will be returned, and list the bucketβs objects. WRITERs are READERs, and they can insert objects into the bucket and delete the bucketβs objects. OWNERs are WRITERs, and they can get the acl property of a bucket, update a bucket, and call all BucketAccessControls methods on the bucket. For more information, see Access Control, with the caveat that this API uses READER, WRITER, and OWNER instead of READ, WRITE, and FULL\_CONTROL.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **bucket** dictionary / required | | The name of the bucket. This field represents a link to a Bucket resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_storage\_bucket task and then set this bucket field to "{{ name-of-resource }}" |
| **entity** string / required | | The entity holding the permission, in one of the following forms: user-userId user-email group-groupId group-email domain-domain project-team-projectId allUsers allAuthenticatedUsers Examples: The user [email protected] would be [email protected]. The group [email protected] would be [email protected]. To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **role** string | | The access permission for the entity. Some valid choices include: "OWNER", "READER", "WRITER" |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/storage/docs/json_api/v1/bucketAccessControls>
* Official Documentation: <https://cloud.google.com/storage/docs/access-control/lists>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a bucket
google.cloud.gcp_storage_bucket:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: bucket
- name: create a bucket access control
google.cloud.gcp_storage_bucket_access_control:
bucket: "{{ bucket }}"
entity: [email protected]
role: WRITER
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **bucket** dictionary | success | The name of the bucket. |
| **domain** string | success | The domain associated with the entity. |
| **email** string | success | The email address associated with the entity. |
| **entity** string | success | The entity holding the permission, in one of the following forms: user-userId user-email group-groupId group-email domain-domain project-team-projectId allUsers allAuthenticatedUsers Examples: The user [email protected] would be [email protected]. The group [email protected] would be [email protected]. To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| **entityId** string | success | The ID for the entity. |
| **id** string | success | The ID of the access-control entry. |
| **projectTeam** complex | success | The project team associated with the entity. |
| | **projectNumber** string | success | The project team associated with the entity. |
| | **team** string | success | The team. |
| **role** string | success | The access permission for the entity. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_redis_instance_info β Gather info for GCP Instance google.cloud.gcp\_redis\_instance\_info β Gather info for GCP Instance
======================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_redis_instance_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Instance
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The name of the Redis region of the instance. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an instance
gcp_redis_instance_info:
region: us-central1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **alternativeLocationId** string | success | Only applicable to STANDARD\_HA tier which protects the instance against zonal failures by provisioning it across two zones. If provided, it must be a different zone from the one provided in [locationId]. |
| | **authEnabled** boolean | success | Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to "true" AUTH is enabled on the instance. Default value is "false" meaning AUTH is disabled. |
| | **authorizedNetwork** string | success | The full name of the Google Compute Engine network to which the instance is connected. If left unspecified, the default network will be used. |
| | **connectMode** string | success | The connection mode of the Redis instance. |
| | **createTime** string | success | The time the instance was created in RFC3339 UTC "Zulu" format, accurate to nanoseconds. |
| | **currentLocationId** string | success | The current zone where the Redis endpoint is placed. For Basic Tier instances, this will always be the same as the [locationId] provided by the user at creation time. For Standard Tier instances, this can be either [locationId] or [alternativeLocationId] and can change after a failover event. |
| | **displayName** string | success | An arbitrary and optional user-provided name for the instance. |
| | **host** string | success | Hostname or IP address of the exposed Redis endpoint used by clients to connect to the service. |
| | **labels** dictionary | success | Resource labels to represent user provided metadata. |
| | **locationId** string | success | The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD\_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId]. |
| | **memorySizeGb** integer | success | Redis memory size in GiB. |
| | **name** string | success | The ID of the instance or a fully qualified identifier for the instance. |
| | **persistenceIamIdentity** string | success | Output only. Cloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is "serviceAccount:". The value may change over time for a given instance so should be checked before each import/export operation. |
| | **port** integer | success | The port number of the exposed Redis endpoint. |
| | **redisConfigs** dictionary | success | Redis configuration parameters, according to <http://redis.io/topics/config>. Please check Memorystore documentation for the list of supported parameters: <https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs> . |
| | **redisVersion** string | success | The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: - REDIS\_5\_0 for Redis 5.0 compatibility - REDIS\_4\_0 for Redis 4.0 compatibility - REDIS\_3\_2 for Redis 3.2 compatibility . |
| | **region** string | success | The name of the Redis region of the instance. |
| | **reservedIpRange** string | success | The CIDR range of internal addresses that are reserved for this instance. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be unique and non-overlapping with existing subnets in an authorized network. |
| | **tier** string | success | The service tier of the instance. Must be one of these values: - BASIC: standalone instance - STANDARD\_HA: highly available primary/replica instances . |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_region_health_check β Creates a GCP RegionHealthCheck google.cloud.gcp\_compute\_region\_health\_check β Creates a GCP RegionHealthCheck
==================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_health_check`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Health Checks determine whether instances are responsive and able to do work.
* They are an important part of a comprehensive load balancing configuration, as they enable monitoring instances behind load balancers.
* Health Checks poll instances at a specified interval. Instances that do not respond successfully to some number of probes in a row are marked as unhealthy. No new connections are sent to unhealthy instances, though existing connections will continue. The health check will continue to poll unhealthy instances. If an instance later responds successfully to some number of consecutive probes, it is marked healthy again and can receive new connections.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **check\_interval\_sec** integer | **Default:**"5" | How often (in seconds) to send a health check. The default value is 5 seconds. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **grpc\_health\_check** dictionary | | A nested object resource. |
| | **grpc\_service\_name** string | | The gRPC service name for the health check. The value of grpcServiceName has the following meanings by convention: \* Empty serviceName means the overall status of all services at the backend. \* Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII. |
| | **port** integer | | The port number for the health check request. Must be specified if portName and portSpecification are not set or if port\_specification is USE\_FIXED\_PORT. Valid values are 1 through 65535. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| **healthy\_threshold** integer | **Default:**"2" | A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. |
| **http2\_health\_check** dictionary | | A nested object resource. |
| | **host** string | | The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | | The TCP port number for the HTTP2 health check request. The default value is 443. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| | **proxy\_header** string | **Default:**"NONE" | Specifies the type of proxy header to append before sending data to the backend. Some valid choices include: "NONE", "PROXY\_V1" |
| | **request\_path** string | **Default:**"/" | The request path of the HTTP2 health check request. The default value is /. |
| | **response** string | | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **http\_health\_check** dictionary | | A nested object resource. |
| | **host** string | | The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | | The TCP port number for the HTTP health check request. The default value is 80. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| | **proxy\_header** string | **Default:**"NONE" | Specifies the type of proxy header to append before sending data to the backend. Some valid choices include: "NONE", "PROXY\_V1" |
| | **request\_path** string | **Default:**"/" | The request path of the HTTP health check request. The default value is /. |
| | **response** string | | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **https\_health\_check** dictionary | | A nested object resource. |
| | **host** string | | The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | | The TCP port number for the HTTPS health check request. The default value is 443. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| | **proxy\_header** string | **Default:**"NONE" | Specifies the type of proxy header to append before sending data to the backend. Some valid choices include: "NONE", "PROXY\_V1" |
| | **request\_path** string | **Default:**"/" | The request path of the HTTPS health check request. The default value is /. |
| | **response** string | | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string | | The region where the regional health check resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **ssl\_health\_check** dictionary | | A nested object resource. |
| | **port** integer | | The TCP port number for the SSL health check request. The default value is 443. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, SSL health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| | **proxy\_header** string | **Default:**"NONE" | Specifies the type of proxy header to append before sending data to the backend. Some valid choices include: "NONE", "PROXY\_V1" |
| | **request** string | | The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | **response** string | | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **tcp\_health\_check** dictionary | | A nested object resource. |
| | **port** integer | | The TCP port number for the TCP health check request. The default value is 80. |
| | **port\_name** string | | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **port\_specification** string | | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in `port` and `portName` fields. Some valid choices include: "USE\_FIXED\_PORT", "USE\_NAMED\_PORT", "USE\_SERVING\_PORT" |
| | **proxy\_header** string | **Default:**"NONE" | Specifies the type of proxy header to append before sending data to the backend. Some valid choices include: "NONE", "PROXY\_V1" |
| | **request** string | | The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | **response** string | | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **timeout\_sec** integer | **Default:**"5" | How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. |
| **type** string | | Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. Some valid choices include: "TCP", "SSL", "HTTP", "HTTPS", "HTTP2" |
| **unhealthy\_threshold** integer | **Default:**"2" | A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/regionHealthChecks>
* Official Documentation: <https://cloud.google.com/load-balancing/docs/health-checks>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a region health check
google.cloud.gcp_compute_region_health_check:
name: test_object
type: TCP
tcp_health_check:
port_name: service-health
request: ping
response: pong
healthy_threshold: 10
timeout_sec: 2
unhealthy_threshold: 5
region: us-central1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **checkIntervalSec** integer | success | How often (in seconds) to send a health check. The default value is 5 seconds. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **grpcHealthCheck** complex | success | A nested object resource. |
| | **grpcServiceName** string | success | The gRPC service name for the health check. The value of grpcServiceName has the following meanings by convention: \* Empty serviceName means the overall status of all services at the backend. \* Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII. |
| | **port** integer | success | The port number for the health check request. Must be specified if portName and portSpecification are not set or if port\_specification is USE\_FIXED\_PORT. Valid values are 1 through 65535. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified in `port` and `portName` fields. |
| **healthyThreshold** integer | success | A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. |
| **http2HealthCheck** complex | success | A nested object resource. |
| | **host** string | success | The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | success | The TCP port number for the HTTP2 health check request. The default value is 443. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified in `port` and `portName` fields. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **requestPath** string | success | The request path of the HTTP2 health check request. The default value is /. |
| | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **httpHealthCheck** complex | success | A nested object resource. |
| | **host** string | success | The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | success | The TCP port number for the HTTP health check request. The default value is 80. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified in `port` and `portName` fields. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **requestPath** string | success | The request path of the HTTP health check request. The default value is /. |
| | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **httpsHealthCheck** complex | success | A nested object resource. |
| | **host** string | success | The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | **port** integer | success | The TCP port number for the HTTPS health check request. The default value is 443. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified in `port` and `portName` fields. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **requestPath** string | success | The request path of the HTTPS health check request. The default value is /. |
| | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **region** string | success | The region where the regional health check resides. |
| **sslHealthCheck** complex | success | A nested object resource. |
| | **port** integer | success | The TCP port number for the SSL health check request. The default value is 443. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, SSL health check follows behavior specified in `port` and `portName` fields. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **request** string | success | The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **tcpHealthCheck** complex | success | A nested object resource. |
| | **port** integer | success | The TCP port number for the TCP health check request. The default value is 80. |
| | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in `port` and `portName` fields. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **request** string | success | The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| **timeoutSec** integer | success | How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. |
| **type** string | success | Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. |
| **unhealthyThreshold** integer | success | A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_iam_service_account β Creates a GCP ServiceAccount google.cloud.gcp\_iam\_service\_account β Creates a GCP ServiceAccount
======================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_iam_service_account`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A service account in the Identity and Access Management API.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **display\_name** string | | User specified description of service account. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string | | The name of the service account. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Examples
--------
```
- name: create a service account
google.cloud.gcp_iam_service_account:
name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com
display_name: My Ansible test key
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **displayName** string | success | User specified description of service account. |
| **email** string | success | Email address of the service account. |
| **name** string | success | The name of the service account. |
| **oauth2ClientId** string | success | OAuth2 client id for the service account. |
| **projectId** string | success | Id of the project that owns the service account. |
| **uniqueId** string | success | Unique and stable id of the service account. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_sql_ssl_cert β Creates a GCP SslCert google.cloud.gcp\_sql\_ssl\_cert β Creates a GCP SslCert
========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_sql_ssl_cert`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents an SSL certificate created for a Cloud SQL instance. To use the SSL certificate you must have the SSL Client Certificate and the associated SSL Client Key. The Client Key can be downloaded only when the SSL certificate is created with the insert method.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **cert** string | | PEM representation of the X.509 certificate. |
| **cert\_serial\_number** string | | Serial number, as extracted from the certificate. |
| **common\_name** string | | User supplied name. Constrained to [a-zA-Z.-\_ ]+. |
| **create\_time** string | | The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **expiration\_time** string | | The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. |
| **instance** dictionary / required | | The name of the Cloud SQL instance. This does not include the project ID. This field represents a link to a Instance resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_sql\_instance task and then set this instance field to "{{ name-of-resource }}" |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **sha1\_fingerprint** string / required | | The SHA-1 of the certificate. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Examples
--------
```
- name: create a instance
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-2"
settings:
ip_configuration:
authorized_networks:
- name: google dns server
value: 8.8.8.8/32
tier: db-n1-standard-1
region: us-central1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: instance
- name: create a SSL cert
google.cloud.gcp_sql_ssl_cert:
common_name: "{{resource_name}}"
instance: "{{instance['name'}}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cert** string | success | PEM representation of the X.509 certificate. |
| **certSerialNumber** string | success | Serial number, as extracted from the certificate. |
| **commonName** string | success | User supplied name. Constrained to [a-zA-Z.-\_ ]+. |
| **createTime** string | success | The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. |
| **expirationTime** string | success | The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. |
| **instance** dictionary | success | The name of the Cloud SQL instance. This does not include the project ID. |
| **sha1Fingerprint** string | success | The SHA-1 of the certificate. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_network_endpoint_group β Creates a GCP NetworkEndpointGroup google.cloud.gcp\_compute\_network\_endpoint\_group β Creates a GCP NetworkEndpointGroup
========================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_network_endpoint_group`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Network endpoint groups (NEGs) are zonal resources that represent collections of IP address and port combinations for GCP resources within a single subnet. Each IP address and port combination is called a network endpoint.
* Network endpoint groups can be used as backends in backend services for HTTP(S), TCP proxy, and SSL proxy load balancers. You cannot use NEGs as a backend with internal load balancers. Because NEG backends allow you to specify IP addresses and ports, you can distribute traffic in a granular fashion among applications or containers running within VM instances.
* Recreating a network endpoint group thatβs in use by another resource will give a `resourceInUseByAnotherResource` error. Use `lifecycle.create_before_destroy` to avoid this type of error.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **default\_port** integer | | The default port used if the port number is not specified in the network endpoint. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary / required | | The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified. This field represents a link to a Network resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_network task and then set this network field to "{{ name-of-resource }}" |
| **network\_endpoint\_type** string | **Default:**"GCE\_VM\_IP\_PORT" | Type of network endpoints in this network endpoint group. Some valid choices include: "GCE\_VM\_IP\_PORT" |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **subnetwork** dictionary | | Optional subnetwork to which all network endpoints in the NEG belong. This field represents a link to a Subnetwork resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_subnetwork task and then set this subnetwork field to "{{ name-of-resource }}" |
| **zone** string / required | | Zone where the network endpoint group is located. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/beta/networkEndpointGroups>
* Official Documentation: <https://cloud.google.com/load-balancing/docs/negs/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a network
google.cloud.gcp_compute_network:
name: "{{ resource_name }}"
auto_create_subnetworks: 'false'
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: network
- name: create a subnetwork
google.cloud.gcp_compute_subnetwork:
name: "{{ resource_name }}"
ip_cidr_range: 10.0.0.0/16
region: us-central1
network: "{{ network }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: subnetwork
- name: create a network endpoint group
google.cloud.gcp_compute_network_endpoint_group:
name: test_object
network: "{{ network }}"
subnetwork: "{{ subnetwork }}"
default_port: 90
zone: us-central1-a
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **defaultPort** integer | success | The default port used if the port number is not specified in the network endpoint. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **id** integer | success | The unique identifier for the resource. |
| **name** string | success | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary | success | The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified. |
| **networkEndpointType** string | success | Type of network endpoints in this network endpoint group. |
| **size** integer | success | Number of network endpoints in the network endpoint group. |
| **subnetwork** dictionary | success | Optional subnetwork to which all network endpoints in the NEG belong. |
| **zone** string | success | Zone where the network endpoint group is located. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_filestore_instance_info β Gather info for GCP Instance google.cloud.gcp\_filestore\_instance\_info β Gather info for GCP Instance
==========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_filestore_instance_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Instance
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone** string / required | | The name of the Filestore zone of the instance. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an instance
gcp_filestore_instance_info:
zone: us-central1-b
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **createTime** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | A description of the instance. |
| | **etag** string | success | Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other. |
| | **fileShares** complex | success | File system shares on the instance. For this version, only a single file share is supported. |
| | | **capacityGb** integer | success | File share capacity in GiB. This must be at least 1024 GiB for the standard tier, or 2560 GiB for the premium tier. |
| | | **name** string | success | The name of the fileshare (16 characters or less) . |
| | **labels** dictionary | success | Resource labels to represent user-provided metadata. |
| | **name** string | success | The resource name of the instance. |
| | **networks** complex | success | VPC networks to which the instance is connected. For this version, only a single network is supported. |
| | | **ipAddresses** list / elements=string | success | A list of IPv4 or IPv6 addresses. |
| | | **modes** list / elements=string | success | IP versions for which the instance has IP addresses assigned. |
| | | **network** string | success | The name of the GCE VPC network to which the instance is connected. |
| | | **reservedIpRange** string | success | A /29 CIDR block that identifies the range of IP addresses reserved for this instance. |
| | **tier** string | success | The service tier of the instance. |
| | **zone** string | success | The name of the Filestore zone of the instance. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_serviceusage_service_info β Gather info for GCP Service google.cloud.gcp\_serviceusage\_service\_info β Gather info for GCP Service
===========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_serviceusage_service_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Service
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a service
gcp_serviceusage_service_info:
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **config** complex | success | The service configuration of the available service. |
| | | **apis** complex | success | The list of API interfaces exported by this service. |
| | | | **name** string | success | Name of the API. |
| | | | **version** string | success | The version of the API. |
| | | **name** string | success | The DNS address at which this service is available. |
| | | **title** string | success | The product title for this service. |
| | **disableDependentServices** boolean | success | Indicates if dependent services should also be disabled. Can only be turned on if service is disabled. |
| | **name** string | success | The resource name of the service . |
| | **parent** string | success | The name of the parent of this service. For example 'projects/123' . |
| | **state** string | success | Whether or not the service has been enabled for use by the consumer. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_ssl_certificate β Creates a GCP SslCertificate google.cloud.gcp\_compute\_ssl\_certificate β Creates a GCP SslCertificate
==========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_ssl_certificate`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* An SslCertificate resource, used for HTTPS load balancing. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **certificate** string / required | | The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **private\_key** string / required | | The write-only private key in PEM format. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/sslCertificates>
* Official Documentation: <https://cloud.google.com/load-balancing/docs/ssl-certificates>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a SSL certificate
google.cloud.gcp_compute_ssl_certificate:
name: test_object
region: us-central1
description: A certificate for testing. Do not use this certificate in production
certificate: |-
-----BEGIN CERTIFICATE-----
MIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG
EwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT
BgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm
b3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN
AQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2
MDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP
BgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM
FUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z
aXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH
KoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ
4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O
BBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn
0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O
M3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ
zqGNhIPGq2ULqXKK8BY=
-----END CERTIFICATE-----
private_key: |-
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIObtRo8tkUqoMjeHhsOh2ouPpXCgBcP+EDxZCB/tws15oAoGCCqGSM49
AwEHoUQDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ4mzkzTv0dXyB750f
OGN02HtkpBOZzzvUARTR10JQoSe2/5PIwQ==
-----END EC PRIVATE KEY-----
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **certificate** string | success | The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **id** integer | success | The unique identifier for the resource. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **privateKey** string | success | The write-only private key in PEM format. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_region_url_map_info β Gather info for GCP RegionUrlMap google.cloud.gcp\_compute\_region\_url\_map\_info β Gather info for GCP RegionUrlMap
====================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_url_map_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP RegionUrlMap
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | A reference to the region where the url map resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a region URL map
gcp_compute_region_url_map_info:
region: us-central1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **defaultService** dictionary | success | The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| | **defaultUrlRedirect** complex | success | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **fingerprint** string | success | Fingerprint of this resource. This field is used internally during updates of this resource. |
| | **hostRules** complex | success | The list of HostRules to use against the URL. |
| | | **description** string | success | An optional description of this HostRule. Provide this property when you create the resource. |
| | | **hosts** list / elements=string | success | The list of host patterns to match. They must be valid hostnames, except \* will match any string of ([a-z0-9-.]\*). In that case, \* must be the first character and must be followed in the pattern by either - or . |
| | | **pathMatcher** string | success | The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **pathMatchers** complex | success | The list of named PathMatchers to use against the URL. |
| | | **defaultService** dictionary | success | A reference to a RegionBackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's path portion. |
| | | **defaultUrlRedirect** complex | success | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | | **description** string | success | An optional description of this resource. |
| | | **name** string | success | The name to which this PathMatcher is referred by the HostRule. |
| | | **pathRules** complex | success | The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/\* will match before /a/b/\* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. |
| | | | **paths** list / elements=string | success | The list of path patterns to match. Each must start with / and the only place a \* is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| | | | **routeAction** complex | success | In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. |
| | | | | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | | **maxAge** integer | success | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | | **backendService** dictionary | success | The RegionBackendService resource being mirrored to. |
| | | | | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | | | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. |
| | | | | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. |
| | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **retryConditions** list / elements=string | success | Specifies one or more conditions when this retry rule applies. Valid values are: - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. - refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | | **backendService** dictionary | success | The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | | **service** dictionary | success | The region backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
| | | | **urlRedirect** complex | success | When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | | **routeRules** complex | success | The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. |
| | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].r outeAction.weightedBackendService.backendServiceWeightAction[].headerAction . |
| | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | **headerName** string | success | The name of the header. |
| | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | **headerName** string | success | The name of the header. |
| | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | **matchRules** complex | success | The rules for determining a match. |
| | | | | **fullPathMatch** string | success | For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | | **headerMatches** complex | success | Specifies a list of header match criteria, all of which must match corresponding headers in the request. |
| | | | | | **exactMatch** string | success | The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **headerName** string | success | The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". |
| | | | | | **invertMatch** boolean | success | If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false. |
| | | | | | **prefixMatch** string | success | The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **presentMatch** boolean | success | A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value or not. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **rangeMatch** complex | success | The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] \* -3 will match \* 0 will not match \* 0.25 will not match \* -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | | **rangeEnd** integer | success | The end of the range (exclusive). |
| | | | | | | **rangeStart** integer | success | The start of the range (inclusive). |
| | | | | | **regexMatch** string | success | The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **suffixMatch** string | success | The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **ignoreCase** boolean | success | Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false. |
| | | | | **metadataFilters** complex | success | Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH\_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH\_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL\_SELF\_MANAGED. |
| | | | | | **filterLabels** complex | success | The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. |
| | | | | | | **name** string | success | Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long. |
| | | | | | | **value** string | success | The value of the label must match the specified value. value can have a maximum length of 1024 characters. |
| | | | | | **filterMatchCriteria** string | success | Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are: \* MATCH\_ANY: At least one of the filterLabels must have a matching label in the provided metadata. \* MATCH\_ALL: All filterLabels must have matching labels in the provided metadata. |
| | | | | **prefixMatch** string | success | For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /. The value must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | | **queryParameterMatches** complex | success | Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. |
| | | | | | **exactMatch** string | success | The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | | **name** string | success | The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails. |
| | | | | | **presentMatch** boolean | success | Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | | **regexMatch** string | success | The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | **regexMatch** string | success | For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | **priority** integer | success | For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules. |
| | | | **routeAction** complex | success | In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. which indicates that the CORS policy is in effect. Defaults to false. |
| | | | | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | | **maxAge** integer | success | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | | **backendService** dictionary | success | The RegionBackendService resource being mirrored to. |
| | | | | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | | | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. |
| | | | | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. |
| | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **retryConditions** list / elements=string | success | Specifies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | | **backendService** dictionary | success | The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | | **service** dictionary | success | The region backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
| | | | **urlRedirect** complex | success | When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default value is false. |
| | **region** string | success | A reference to the region where the url map resides. |
| | **tests** complex | success | The list of expected URL mappings. Requests to update this UrlMap will succeed only if all of the test cases pass. |
| | | **description** string | success | Description of this test case. |
| | | **host** string | success | Host portion of the URL. |
| | | **path** string | success | Path portion of the URL. |
| | | **service** dictionary | success | A reference to expected RegionBackendService resource the given URL should be mapped to. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_url_map β Creates a GCP UrlMap google.cloud.gcp\_compute\_url\_map β Creates a GCP UrlMap
==========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_url_map`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* UrlMaps are used to route requests to a backend service based on rules that you define for the host and path of an incoming URL.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **default\_route\_action** dictionary | | defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. |
| | **cors\_policy** dictionary | | The specification for allowing client side cross-origin requests. Please see [W3C Recommendation for Cross Origin Resource Sharing](https://www.w3.org/TR/cors/) . |
| | | **allow\_credentials** boolean | **Choices:*** no
* yes
**Default:**"false" | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. |
| | | **allow\_headers** list / elements=string | | Specifies the content for the Access-Control-Allow-Headers header. |
| | | **allow\_methods** list / elements=string | | Specifies the content for the Access-Control-Allow-Methods header. |
| | | **allow\_origin\_regexes** list / elements=string | | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | **allow\_origins** list / elements=string | | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | **disabled** boolean | **Choices:*** no
* yes
**Default:**"false" | If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. |
| | | **expose\_headers** list / elements=string | | Specifies the content for the Access-Control-Expose-Headers header. |
| | | **max\_age** integer | | Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header. |
| | **fault\_injection\_policy** dictionary | | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. |
| | | **abort** dictionary | | The specification for how client requests are aborted as part of fault injection. |
| | | | **http\_status** integer | | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | **percentage** string | | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | **delay** dictionary | | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | **fixed\_delay** dictionary | | Specifies the value of the fixed delay interval. |
| | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | | **percentage** string | | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | **request\_mirror\_policy** dictionary | | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | **backend\_service** dictionary / required | | The full or partial URL to the BackendService resource being mirrored to. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | **retry\_policy** dictionary | | Specifies the retry policy associated with this route. |
| | | **num\_retries** integer | **Default:**"1" | Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. |
| | | **per\_try\_timeout** dictionary | | Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. |
| | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** string | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | **retry\_conditions** list / elements=string | | Specfies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, \* connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | **timeout** dictionary | | Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. |
| | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | **seconds** string | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | **url\_rewrite** dictionary | | The spec to modify the URL of the request, prior to forwarding the request to the matched service. |
| | | **host\_rewrite** string | | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | **path\_prefix\_rewrite** string | | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | **weighted\_backend\_services** list / elements=dictionary | | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | **backend\_service** dictionary | | The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | | **header\_action** dictionary | | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | **request\_headers\_to\_add** list / elements=dictionary | | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | **header\_name** string | | The name of the header to add. |
| | | | | **header\_value** string | | The value of the header to add. |
| | | | | **replace** boolean | **Choices:*** no
* yes
**Default:**"false" | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **request\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | **response\_headers\_to\_add** list / elements=dictionary | | Headers to add the response prior to sending the response back to the client. |
| | | | | **header\_name** string | | The name of the header to add. |
| | | | | **header\_value** string | | The value of the header to add. |
| | | | | **replace** boolean | **Choices:*** no
* yes
**Default:**"false" | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **response\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | **weight** integer | | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| **default\_service** dictionary | | The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this default\_service field to "{{ name-of-resource }}" |
| **default\_url\_redirect** dictionary | | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | **host\_redirect** string | | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | **https\_redirect** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | **path\_redirect** string | | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | **prefix\_redirect** string | | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | **redirect\_response\_code** string | | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. Some valid choices include: "FOUND", "MOVED\_PERMANENTLY\_DEFAULT", "PERMANENT\_REDIRECT", "SEE\_OTHER", "TEMPORARY\_REDIRECT" |
| | **strip\_query** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **header\_action** dictionary | | Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here take effect after headerAction specified under pathMatcher. |
| | **request\_headers\_to\_add** list / elements=dictionary | | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | **header\_name** string / required | | The name of the header. |
| | | **header\_value** string / required | | The value of the header to add. |
| | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | **request\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | **response\_headers\_to\_add** list / elements=dictionary | | Headers to add the response prior to sending the response back to the client. |
| | | **header\_name** string / required | | The name of the header. |
| | | **header\_value** string / required | | The value of the header to add. |
| | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | **response\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| **host\_rules** list / elements=dictionary | | The list of HostRules to use against the URL. |
| | **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| | **hosts** list / elements=string / required | | The list of host patterns to match. They must be valid hostnames, except \* will match any string of ([a-z0-9-.]\*). In that case, \* must be the first character and must be followed in the pattern by either - or . |
| | **path\_matcher** string / required | | The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **path\_matchers** list / elements=dictionary | | The list of named PathMatchers to use against the URL. |
| | **default\_route\_action** dictionary | | defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. |
| | | **cors\_policy** dictionary | | The specification for allowing client side cross-origin requests. Please see [W3C Recommendation for Cross Origin Resource Sharing](https://www.w3.org/TR/cors/) . |
| | | | **allow\_credentials** boolean | **Choices:*** no
* yes
**Default:**"false" | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. |
| | | | **allow\_headers** list / elements=string | | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | **allow\_methods** list / elements=string | | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | **allow\_origin\_regexes** list / elements=string | | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | | **allow\_origins** list / elements=string | | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | | **disabled** boolean | **Choices:*** no
* yes
**Default:**"false" | If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. |
| | | | **expose\_headers** list / elements=string | | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | **max\_age** integer | | Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header. |
| | | **fault\_injection\_policy** dictionary | | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. |
| | | | **abort** dictionary | | The specification for how client requests are aborted as part of fault injection. |
| | | | | **http\_status** integer | | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | **percentage** string | | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **delay** dictionary | | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | **fixed\_delay** dictionary | | Specifies the value of the fixed delay interval. |
| | | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | | | **percentage** string | | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | **request\_mirror\_policy** dictionary | | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | **backend\_service** dictionary / required | | The full or partial URL to the BackendService resource being mirrored to. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | | **retry\_policy** dictionary | | Specifies the retry policy associated with this route. |
| | | | **num\_retries** integer | **Default:**"1" | Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. |
| | | | **per\_try\_timeout** dictionary | | Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. |
| | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | | **retry\_conditions** list / elements=string | | Specfies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, \* connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | **timeout** dictionary | | Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. |
| | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** string | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | **url\_rewrite** dictionary | | The spec to modify the URL of the request, prior to forwarding the request to the matched service. |
| | | | **host\_rewrite** string | | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | **path\_prefix\_rewrite** string | | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | **weighted\_backend\_services** list / elements=dictionary | | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | **backend\_service** dictionary | | The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | | | **header\_action** dictionary | | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | **request\_headers\_to\_add** list / elements=dictionary | | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | **header\_name** string | | The name of the header to add. |
| | | | | | **header\_value** string | | The value of the header to add. |
| | | | | | **replace** boolean | **Choices:*** no
* yes
**Default:**"false" | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | **request\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | **response\_headers\_to\_add** list / elements=dictionary | | Headers to add the response prior to sending the response back to the client. |
| | | | | | **header\_name** string | | The name of the header to add. |
| | | | | | **header\_value** string | | The value of the header to add. |
| | | | | | **replace** boolean | **Choices:*** no
* yes
**Default:**"false" | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | **response\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | **weight** integer | | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | **default\_service** dictionary | | The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - <https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService> - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource defaultService: - compute.backendBuckets.use - compute.backendServices.use . This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this default\_service field to "{{ name-of-resource }}" |
| | **default\_url\_redirect** dictionary | | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | | **host\_redirect** string | | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | **https\_redirect** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | **path\_redirect** string | | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **prefix\_redirect** string | | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **redirect\_response\_code** string | | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. Some valid choices include: "FOUND", "MOVED\_PERMANENTLY\_DEFAULT", "PERMANENT\_REDIRECT", "SEE\_OTHER", "TEMPORARY\_REDIRECT" |
| | | **strip\_query** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| | **header\_action** dictionary | | Specifies changes to request and response headers that need to take effect for the selected backendService. HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap . |
| | | **request\_headers\_to\_add** list / elements=dictionary | | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | **header\_name** string / required | | The name of the header. |
| | | | **header\_value** string / required | | The value of the header to add. |
| | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | **request\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | **response\_headers\_to\_add** list / elements=dictionary | | Headers to add the response prior to sending the response back to the client. |
| | | | **header\_name** string / required | | The name of the header. |
| | | | **header\_value** string / required | | The value of the header to add. |
| | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | **response\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | **name** string / required | | The name to which this PathMatcher is referred by the HostRule. |
| | **path\_rules** list / elements=dictionary | | The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/\* will match before /a/b/\* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. |
| | | **paths** list / elements=string / required | | The list of path patterns to match. Each must start with / and the only place a \* is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| | | **route\_action** dictionary | | In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | **cors\_policy** dictionary | | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | **allow\_credentials** boolean | **Choices:*** no
* yes
**Default:**"false" | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | **allow\_headers** list / elements=string | | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | **allow\_methods** list / elements=string | | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | **allow\_origin\_regexes** list / elements=string | | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **allow\_origins** list / elements=string | | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **disabled** boolean / required | **Choices:*** no
* yes
| If true, specifies the CORS policy is disabled. |
| | | | | **expose\_headers** list / elements=string | | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | **max\_age** integer | | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | **fault\_injection\_policy** dictionary | | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | **abort** dictionary | | The specification for how client requests are aborted as part of fault injection. |
| | | | | | **http\_status** integer / required | | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | **percentage** string / required | | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **delay** dictionary | | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | **fixed\_delay** dictionary / required | | Specifies the value of the fixed delay interval. |
| | | | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **percentage** string / required | | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **request\_mirror\_policy** dictionary | | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | **backend\_service** dictionary / required | | The BackendService resource being mirrored to. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | | | **retry\_policy** dictionary | | Specifies the retry policy associated with this route. |
| | | | | **num\_retries** integer | | Specifies the allowed number retries. This number must be > 0. |
| | | | | **per\_try\_timeout** dictionary | | Specifies a non-zero timeout per retry attempt. |
| | | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **retry\_conditions** list / elements=string | | Specifies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | **timeout** dictionary | | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | **url\_rewrite** dictionary | | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | **host\_rewrite** string | | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | **path\_prefix\_rewrite** string | | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | **weighted\_backend\_services** list / elements=dictionary | | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | **backend\_service** dictionary / required | | The default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | | | | **header\_action** dictionary | | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | **request\_headers\_to\_add** list / elements=dictionary | | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | **header\_name** string / required | | The name of the header. |
| | | | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **request\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | **response\_headers\_to\_add** list / elements=dictionary | | Headers to add the response prior to sending the response back to the client. |
| | | | | | | **header\_name** string / required | | The name of the header. |
| | | | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **response\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | **weight** integer / required | | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | **service** dictionary | | The backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this service field to "{{ name-of-resource }}" |
| | | **url\_redirect** dictionary | | When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | **host\_redirect** string | | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | **https\_redirect** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | | **path\_redirect** string | | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **prefix\_redirect** string | | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **redirect\_response\_code** string | | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. Some valid choices include: "FOUND", "MOVED\_PERMANENTLY\_DEFAULT", "PERMANENT\_REDIRECT", "SEE\_OTHER", "TEMPORARY\_REDIRECT" |
| | | | **strip\_query** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | **route\_rules** list / elements=dictionary | | The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. |
| | | **header\_action** dictionary | | Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].r outeAction.weightedBackendService.backendServiceWeightAction[].headerAction . |
| | | | **request\_headers\_to\_add** list / elements=dictionary | | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | **header\_name** string / required | | The name of the header. |
| | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **request\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | **response\_headers\_to\_add** list / elements=dictionary | | Headers to add the response prior to sending the response back to the client. |
| | | | | **header\_name** string / required | | The name of the header. |
| | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **response\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | **match\_rules** list / elements=dictionary | | The rules for determining a match. |
| | | | **full\_path\_match** string | | For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | **header\_matches** list / elements=dictionary | | Specifies a list of header match criteria, all of which must match corresponding headers in the request. |
| | | | | **exact\_match** string | | The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **header\_name** string / required | | The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". |
| | | | | **invert\_match** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false. |
| | | | | **prefix\_match** string | | The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **present\_match** boolean | **Choices:*** no
* yes
| A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value or not. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **range\_match** dictionary | | The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **range\_end** integer / required | | The end of the range (exclusive). |
| | | | | | **range\_start** integer / required | | The start of the range (inclusive). |
| | | | | **regex\_match** string | | The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **suffix\_match** string | | The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | **ignore\_case** boolean | **Choices:*** no
* yes
**Default:**"false" | Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false. |
| | | | **metadata\_filters** list / elements=dictionary | | Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH\_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH\_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL\_SELF\_MANAGED. |
| | | | | **filter\_labels** list / elements=dictionary / required | | The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. |
| | | | | | **name** string / required | | Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long. |
| | | | | | **value** string / required | | The value of the label must match the specified value. value can have a maximum length of 1024 characters. |
| | | | | **filter\_match\_criteria** string / required | | Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are: - MATCH\_ANY: At least one of the filterLabels must have a matching label in the provided metadata. - MATCH\_ALL: All filterLabels must have matching labels in the provided metadata. Some valid choices include: "MATCH\_ALL", "MATCH\_ANY" |
| | | | **prefix\_match** string | | For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /. The value must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | **query\_parameter\_matches** list / elements=dictionary | | Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. |
| | | | | **exact\_match** string | | The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | **name** string / required | | The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails. |
| | | | | **present\_match** boolean | **Choices:*** no
* yes
| Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | **regex\_match** string | | The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | **regex\_match** string | | For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | **priority** integer / required | | For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules. |
| | | **route\_action** dictionary | | In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | **cors\_policy** dictionary | | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | **allow\_credentials** boolean | **Choices:*** no
* yes
**Default:**"false" | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | **allow\_headers** list / elements=string | | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | **allow\_methods** list / elements=string | | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | **allow\_origin\_regexes** list / elements=string | | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **allow\_origins** list / elements=string | | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **disabled** boolean | **Choices:*** no
* yes
**Default:**"false" | If true, specifies the CORS policy is disabled. which indicates that the CORS policy is in effect. Defaults to false. |
| | | | | **expose\_headers** list / elements=string | | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | **max\_age** integer | | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | **fault\_injection\_policy** dictionary | | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | **abort** dictionary | | The specification for how client requests are aborted as part of fault injection. |
| | | | | | **http\_status** integer | | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | **percentage** string | | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **delay** dictionary | | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | **fixed\_delay** dictionary | | Specifies the value of the fixed delay interval. |
| | | | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **percentage** string | | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **request\_mirror\_policy** dictionary | | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | **backend\_service** dictionary / required | | The BackendService resource being mirrored to. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | | | **retry\_policy** dictionary | | Specifies the retry policy associated with this route. |
| | | | | **num\_retries** integer / required | | Specifies the allowed number retries. This number must be > 0. |
| | | | | **per\_try\_timeout** dictionary | | Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. |
| | | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **retry\_conditions** list / elements=string | | Specfies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | **timeout** dictionary | | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | **url\_rewrite** dictionary | | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | **host\_rewrite** string | | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | **path\_prefix\_rewrite** string | | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | **weighted\_backend\_services** list / elements=dictionary | | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | **backend\_service** dictionary / required | | The default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | | | | **header\_action** dictionary | | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | **request\_headers\_to\_add** list / elements=dictionary | | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | **header\_name** string / required | | The name of the header. |
| | | | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **request\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | **response\_headers\_to\_add** list / elements=dictionary | | Headers to add the response prior to sending the response back to the client. |
| | | | | | | **header\_name** string / required | | The name of the header. |
| | | | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **response\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | **weight** integer / required | | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | **service** dictionary | | The backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this service field to "{{ name-of-resource }}" |
| | | **url\_redirect** dictionary | | When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | **host\_redirect** string | | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | **https\_redirect** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. Defaults to false. |
| | | | **path\_redirect** string | | The path that will be used in the redirect response instead of the one that was supplied in the request. Only one of pathRedirect or prefixRedirect must be specified. The value must be between 1 and 1024 characters. |
| | | | **prefix\_redirect** string | | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. |
| | | | **redirect\_response\_code** string | | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. Some valid choices include: "FOUND", "MOVED\_PERMANENTLY\_DEFAULT", "PERMANENT\_REDIRECT", "SEE\_OTHER", "TEMPORARY\_REDIRECT" |
| | | | **strip\_query** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. Defaults to false. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **tests** list / elements=dictionary | | The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. |
| | **description** string | | Description of this test case. |
| | **host** string / required | | Host portion of the URL. |
| | **path** string / required | | Path portion of the URL. |
| | **service** dictionary / required | | Expected BackendService resource the given URL should be mapped to. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this service field to "{{ name-of-resource }}" |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/urlMaps>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a instance group
google.cloud.gcp_compute_instance_group:
name: instancegroup-urlmap
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: instancegroup
- name: create a HTTP health check
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-urlmap
healthy_threshold: 10
port: 8080
timeout_sec: 2
unhealthy_threshold: 5
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: healthcheck
- name: create a backend service
google.cloud.gcp_compute_backend_service:
name: backendservice-urlmap
backends:
- group: "{{ instancegroup.selfLink }}"
health_checks:
- "{{ healthcheck.selfLink }}"
enable_cdn: 'true'
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: backendservice
- name: create a URL map
google.cloud.gcp_compute_url_map:
name: test_object
default_service: "{{ backendservice }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **defaultRouteAction** complex | success | defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. |
| | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see [W3C Recommendation for Cross Origin Resource Sharing](https://www.w3.org/TR/cors/) . |
| | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. |
| | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. |
| | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | **maxAge** integer | success | Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header. |
| | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. |
| | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | **backendService** dictionary | success | The full or partial URL to the BackendService resource being mirrored to. |
| | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. |
| | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. |
| | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | **retryConditions** list / elements=string | success | Specfies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, \* connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. |
| | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service. |
| | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | **backendService** dictionary | success | The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | **headerName** string | success | The name of the header to add. |
| | | | | **headerValue** string | success | The value of the header to add. |
| | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | **headerName** string | success | The name of the header to add. |
| | | | | **headerValue** string | success | The value of the header to add. |
| | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| **defaultService** dictionary | success | The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| **defaultUrlRedirect** complex | success | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **fingerprint** string | success | Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. |
| **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here take effect after headerAction specified under pathMatcher. |
| | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | **headerName** string | success | The name of the header. |
| | | **headerValue** string | success | The value of the header to add. |
| | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | **headerName** string | success | The name of the header. |
| | | **headerValue** string | success | The value of the header to add. |
| | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| **hostRules** complex | success | The list of HostRules to use against the URL. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **hosts** list / elements=string | success | The list of host patterns to match. They must be valid hostnames, except \* will match any string of ([a-z0-9-.]\*). In that case, \* must be the first character and must be followed in the pattern by either - or . |
| | **pathMatcher** string | success | The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
| **id** integer | success | The unique identifier for the resource. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **pathMatchers** complex | success | The list of named PathMatchers to use against the URL. |
| | **defaultRouteAction** complex | success | defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. |
| | | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see [W3C Recommendation for Cross Origin Resource Sharing](https://www.w3.org/TR/cors/) . |
| | | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. |
| | | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allowOrigins or an item in allowOriginRegexes. |
| | | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect. |
| | | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | **maxAge** integer | success | Specifies how long results of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header. |
| | | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retryPolicy will be ignored by clients that are configured with a faultInjectionPolicy. |
| | | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | **backendService** dictionary | success | The full or partial URL to the BackendService resource being mirrored to. |
| | | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. If not specified, defaults to 1. |
| | | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. |
| | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | | **retryConditions** list / elements=string | success | Specfies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, \* connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream:Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, will use the largest timeout among all backend services associated with the route. |
| | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min \* 60 min/hr \* 24 hr/day \* 365.25 days/year \* 10000 years . |
| | | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service. |
| | | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | **backendService** dictionary | success | The full or partial URL to the default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | **headerName** string | success | The name of the header to add. |
| | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | **headerName** string | success | The name of the header to add. |
| | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | **defaultService** dictionary | success | The full or partial URL to the BackendService resource. This will be used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - <https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService> - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. Authorization requires one or more of the following Google IAM permissions on the specified resource defaultService: - compute.backendBuckets.use - compute.backendServices.use . |
| | **defaultUrlRedirect** complex | success | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap . |
| | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | **headerName** string | success | The name of the header. |
| | | | **headerValue** string | success | The value of the header to add. |
| | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | **headerName** string | success | The name of the header. |
| | | | **headerValue** string | success | The value of the header to add. |
| | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | **name** string | success | The name to which this PathMatcher is referred by the HostRule. |
| | **pathRules** complex | success | The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/\* will match before /a/b/\* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. |
| | | **paths** list / elements=string | success | The list of path patterns to match. Each must start with / and the only place a \* is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| | | **routeAction** complex | success | In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. |
| | | | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | **maxAge** integer | success | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | **backendService** dictionary | success | The BackendService resource being mirrored to. |
| | | | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. |
| | | | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. |
| | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **retryConditions** list / elements=string | success | Specifies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | **backendService** dictionary | success | The default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | **service** dictionary | success | The backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
| | | **urlRedirect** complex | success | When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | **routeRules** complex | success | The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. |
| | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].r outeAction.weightedBackendService.backendServiceWeightAction[].headerAction . |
| | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | **headerName** string | success | The name of the header. |
| | | | | **headerValue** string | success | The value of the header to add. |
| | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | **headerName** string | success | The name of the header. |
| | | | | **headerValue** string | success | The value of the header to add. |
| | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | **matchRules** complex | success | The rules for determining a match. |
| | | | **fullPathMatch** string | success | For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | **headerMatches** complex | success | Specifies a list of header match criteria, all of which must match corresponding headers in the request. |
| | | | | **exactMatch** string | success | The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **headerName** string | success | The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". |
| | | | | **invertMatch** boolean | success | If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false. |
| | | | | **prefixMatch** string | success | The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **presentMatch** boolean | success | A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value or not. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **rangeMatch** complex | success | The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **rangeEnd** integer | success | The end of the range (exclusive). |
| | | | | | **rangeStart** integer | success | The start of the range (inclusive). |
| | | | | **regexMatch** string | success | The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **suffixMatch** string | success | The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | **ignoreCase** boolean | success | Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false. |
| | | | **metadataFilters** complex | success | Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH\_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH\_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL\_SELF\_MANAGED. |
| | | | | **filterLabels** complex | success | The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. |
| | | | | | **name** string | success | Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long. |
| | | | | | **value** string | success | The value of the label must match the specified value. value can have a maximum length of 1024 characters. |
| | | | | **filterMatchCriteria** string | success | Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are: - MATCH\_ANY: At least one of the filterLabels must have a matching label in the provided metadata. - MATCH\_ALL: All filterLabels must have matching labels in the provided metadata. |
| | | | **prefixMatch** string | success | For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /. The value must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | **queryParameterMatches** complex | success | Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. |
| | | | | **exactMatch** string | success | The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | **name** string | success | The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails. |
| | | | | **presentMatch** boolean | success | Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | **regexMatch** string | success | The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | **regexMatch** string | success | For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | **priority** integer | success | For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules. |
| | | **routeAction** complex | success | In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. which indicates that the CORS policy is in effect. Defaults to false. |
| | | | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | **maxAge** integer | success | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | **backendService** dictionary | success | The BackendService resource being mirrored to. |
| | | | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. |
| | | | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. |
| | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **retryConditions** list / elements=string | success | Specfies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | **backendService** dictionary | success | The default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | **service** dictionary | success | The backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
| | | **urlRedirect** complex | success | When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. Defaults to false. |
| | | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. Only one of pathRedirect or prefixRedirect must be specified. The value must be between 1 and 1024 characters. |
| | | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. |
| | | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. Defaults to false. |
| **tests** complex | success | The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. |
| | **description** string | success | Description of this test case. |
| | **host** string | success | Host portion of the URL. |
| | **path** string | success | Path portion of the URL. |
| | **service** dictionary | success | Expected BackendService resource the given URL should be mapped to. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_bigtable_instance_info β Gather info for GCP Instance google.cloud.gcp\_bigtable\_instance\_info β Gather info for GCP Instance
=========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_bigtable_instance_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Instance
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an instance
gcp_bigtable_instance_info:
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **clusters** complex | success | An array of clusters. Maximum 4. |
| | | **defaultStorageType** string | success | The type of storage used by this cluster to serve its parent instance's tables, unless explicitly overridden. |
| | | **location** string | success | The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/<project>/locations/<zone>`. |
| | | **name** string | success | The unique name of the cluster. |
| | | **serveNodes** integer | success | The number of nodes allocated to this cluster. More nodes enable higher throughput and more consistent performance. |
| | | **state** string | success | The current state of the cluster. |
| | **displayName** string | success | The descriptive name for this instance as it appears in UIs. Can be changed at any time, but should be kept globally unique to avoid confusion. |
| | **labels** dictionary | success | Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. They can be used to filter resources and aggregate metrics. |
| | **name** string | success | The unique name of the instance. |
| | **state** string | success | The current state of the instance. |
| | **type** string | success | The type of the instance. Defaults to `PRODUCTION`. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_sourcerepo_repository_info β Gather info for GCP Repository google.cloud.gcp\_sourcerepo\_repository\_info β Gather info for GCP Repository
===============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_sourcerepo_repository_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Repository
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a repository
gcp_sourcerepo_repository_info:
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **name** string | success | Resource name of the repository, of the form projects/{{project}}/repos/{{repo}}. The repo name may contain slashes. eg, projects/myproject/repos/name/with/slash . |
| | **size** integer | success | The disk usage of the repo, in bytes. |
| | **url** string | success | URL to clone the repository from Google Cloud Source Repositories. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_target_vpn_gateway β Creates a GCP TargetVpnGateway google.cloud.gcp\_compute\_target\_vpn\_gateway β Creates a GCP TargetVpnGateway
================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_target_vpn_gateway`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a VPN gateway running in GCP. This virtual device is managed by Google, but used only by you.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary / required | | The network this VPN gateway is accepting traffic for. This field represents a link to a Network resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_network task and then set this network field to "{{ name-of-resource }}" |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The region this gateway should sit in. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/targetVpnGateways>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a address
google.cloud.gcp_compute_address:
name: address-vpngateway
region: us-west1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: address
- name: create a network
google.cloud.gcp_compute_network:
name: network-vpngateway
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: network
- name: create a target vpn gateway
google.cloud.gcp_compute_target_vpn_gateway:
name: test_object
region: us-west1
network: "{{ network }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **forwardingRules** list / elements=string | success | A list of references to the ForwardingRule resources associated with this VPN gateway. |
| **id** integer | success | The unique identifier for the resource. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary | success | The network this VPN gateway is accepting traffic for. |
| **region** string | success | The region this gateway should sit in. |
| **tunnels** list / elements=string | success | A list of references to VpnTunnel resources associated with this VPN gateway. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_reservation β Creates a GCP Reservation google.cloud.gcp\_compute\_reservation β Creates a GCP Reservation
==================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_reservation`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running.
* Reservations apply only to Compute Engine, Cloud Dataproc, and Google Kubernetes Engine VM usage.Reservations do not apply to `f1-micro` or `g1-small` machine types, preemptible VMs, sole tenant nodes, or other services not listed above like Cloud SQL and Dataflow.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **specific\_reservation** dictionary / required | | Reservation for instances with specific machine shapes. |
| | **count** integer / required | | The number of resources that are allocated. |
| | **instance\_properties** dictionary / required | | The instance properties for the reservation. |
| | | **guest\_accelerators** list / elements=dictionary | | Guest accelerator type and count. |
| | | | **accelerator\_count** integer / required | | The number of the guest accelerator cards exposed to this instance. |
| | | | **accelerator\_type** string / required | | The full or partial URL of the accelerator type to attach to this instance. For example: `projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100` If you are creating an instance template, specify only the accelerator name. |
| | | **local\_ssds** list / elements=dictionary | | The amount of local ssd to reserve with each instance. This reserves disks of type `local-ssd`. |
| | | | **disk\_size\_gb** integer / required | | The size of the disk in base-2 GB. |
| | | | **interface** string | **Default:**"SCSI" | The disk interface to use for attaching this disk. Some valid choices include: "SCSI", "NVME" |
| | | **machine\_type** string / required | | The name of the machine type to reserve. |
| | | **min\_cpu\_platform** string | | The minimum CPU platform for the reservation. For example, `"Intel Skylake"`. See <https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones> for information on available CPU platforms. |
| **specific\_reservation\_required** boolean | **Choices:*** no
* yes
**Default:**"false" | When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **zone** string / required | | The zone where the reservation is made. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/reservations>
* Reserving zonal resources: <https://cloud.google.com/compute/docs/instances/reserving-zonal-resources>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a reservation
google.cloud.gcp_compute_reservation:
name: test_object
zone: us-central1-a
specific_reservation:
count: 1
instance_properties:
min_cpu_platform: Intel Cascade Lake
machine_type: n2-standard-2
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **commitment** string | success | Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **id** integer | success | The unique identifier for the resource. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **specificReservation** complex | success | Reservation for instances with specific machine shapes. |
| | **count** integer | success | The number of resources that are allocated. |
| | **instanceProperties** complex | success | The instance properties for the reservation. |
| | | **guestAccelerators** complex | success | Guest accelerator type and count. |
| | | | **acceleratorCount** integer | success | The number of the guest accelerator cards exposed to this instance. |
| | | | **acceleratorType** string | success | The full or partial URL of the accelerator type to attach to this instance. For example: `projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100` If you are creating an instance template, specify only the accelerator name. |
| | | **localSsds** complex | success | The amount of local ssd to reserve with each instance. This reserves disks of type `local-ssd`. |
| | | | **diskSizeGb** integer | success | The size of the disk in base-2 GB. |
| | | | **interface** string | success | The disk interface to use for attaching this disk. |
| | | **machineType** string | success | The name of the machine type to reserve. |
| | | **minCpuPlatform** string | success | The minimum CPU platform for the reservation. For example, `"Intel Skylake"`. See <https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones> for information on available CPU platforms. |
| | **inUseCount** integer | success | How many instances are in use. |
| **specificReservationRequired** boolean | success | When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false. |
| **status** string | success | The status of the reservation. |
| **zone** string | success | The zone where the reservation is made. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_global_forwarding_rule β Creates a GCP GlobalForwardingRule google.cloud.gcp\_compute\_global\_forwarding\_rule β Creates a GCP GlobalForwardingRule
========================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_global_forwarding_rule`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a GlobalForwardingRule resource. Global forwarding rules are used to forward traffic to the correct load balancer for HTTP load balancing. Global forwarding rules can only be used for HTTP load balancing.
* For more information, see <https://cloud.google.com/compute/docs/load-balancing/http/> .
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **ip\_address** string | | The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: \* 100.1.2.3 \* <https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address> \* projects/project/regions/region/addresses/address \* regions/region/addresses/address \* global/addresses/address \* address . |
| **ip\_protocol** string | | The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL\_SELF\_MANAGED, only TCP is valid. Some valid choices include: "TCP", "UDP", "ESP", "AH", "SCTP", "ICMP" |
| **ip\_version** string | | The IP Version that will be used by this global forwarding rule. Some valid choices include: "IPV4", "IPV6" |
| **load\_balancing\_scheme** string | **Default:**"EXTERNAL" | This signifies what the GlobalForwardingRule will be used for. The value of INTERNAL\_SELF\_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) NOTE: Currently global forwarding rules cannot be used for INTERNAL load balancing. Some valid choices include: "EXTERNAL", "INTERNAL\_SELF\_MANAGED" |
| **metadata\_filters** list / elements=dictionary | | Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH\_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH\_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overridden by those specified in the UrlMap that this ForwardingRule references. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL\_SELF\_MANAGED. |
| | **filter\_labels** list / elements=dictionary / required | | The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. |
| | | **name** string / required | | Name of the metadata label. The length must be between 1 and 1024 characters, inclusive. |
| | | **value** string / required | | The value that the label must match. The value has a maximum length of 1024 characters. |
| | **filter\_match\_criteria** string / required | | Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. MATCH\_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH\_ALL - All filterLabels must have matching labels in the provided metadata. Some valid choices include: "MATCH\_ANY", "MATCH\_ALL" |
| **name** string / required | | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary | | This field is not used for external load balancing. For INTERNAL\_SELF\_MANAGED load balancing, this field identifies the network that the load balanced IP should belong to for this global forwarding rule. If this field is not specified, the default network will be used. This field represents a link to a Network resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_network task and then set this network field to "{{ name-of-resource }}" |
| **port\_range** string | | This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports: \* TargetHttpProxy: 80, 8080 \* TargetHttpsProxy: 443 \* TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \* TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \* TargetVpnGateway: 500, 4500 . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **target** string / required | | The URL of the target resource to receive the matched traffic. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL\_SELF\_MANAGED load balancing, only HTTP and HTTPS targets are valid. |
Examples
--------
```
- name: create a global address
google.cloud.gcp_compute_global_address:
name: globaladdress-globalforwardingrule
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: globaladdress
- name: create a instance group
google.cloud.gcp_compute_instance_group:
name: instancegroup-globalforwardingrule
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: instancegroup
- name: create a HTTP health check
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-globalforwardingrule
healthy_threshold: 10
port: 8080
timeout_sec: 2
unhealthy_threshold: 5
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: healthcheck
- name: create a backend service
google.cloud.gcp_compute_backend_service:
name: backendservice-globalforwardingrule
backends:
- group: "{{ instancegroup.selfLink }}"
health_checks:
- "{{ healthcheck.selfLink }}"
enable_cdn: 'true'
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: backendservice
- name: create a URL map
google.cloud.gcp_compute_url_map:
name: urlmap-globalforwardingrule
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: urlmap
- name: create a target HTTP proxy
google.cloud.gcp_compute_target_http_proxy:
name: targethttpproxy-globalforwardingrule
url_map: "{{ urlmap }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: httpproxy
- name: create a global forwarding rule
google.cloud.gcp_compute_global_forwarding_rule:
name: test_object
ip_address: "{{ globaladdress.address }}"
ip_protocol: TCP
port_range: 80-80
target: "{{ httpproxy.selfLink }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **id** integer | success | The unique identifier for the resource. |
| **IPAddress** string | success | The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: \* 100.1.2.3 \* <https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address> \* projects/project/regions/region/addresses/address \* regions/region/addresses/address \* global/addresses/address \* address . |
| **IPProtocol** string | success | The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL\_SELF\_MANAGED, only TCP is valid. |
| **ipVersion** string | success | The IP Version that will be used by this global forwarding rule. |
| **loadBalancingScheme** string | success | This signifies what the GlobalForwardingRule will be used for. The value of INTERNAL\_SELF\_MANAGED means that this will be used for Internal Global HTTP(S) LB. The value of EXTERNAL means that this will be used for External Global Load Balancing (HTTP(S) LB, External TCP/UDP LB, SSL Proxy) NOTE: Currently global forwarding rules cannot be used for INTERNAL load balancing. |
| **metadataFilters** complex | success | Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH\_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH\_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overridden by those specified in the UrlMap that this ForwardingRule references. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL\_SELF\_MANAGED. |
| | **filterLabels** complex | success | The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. |
| | | **name** string | success | Name of the metadata label. The length must be between 1 and 1024 characters, inclusive. |
| | | **value** string | success | The value that the label must match. The value has a maximum length of 1024 characters. |
| | **filterMatchCriteria** string | success | Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. MATCH\_ANY - At least one of the filterLabels must have a matching label in the provided metadata. MATCH\_ALL - All filterLabels must have matching labels in the provided metadata. |
| **name** string | success | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary | success | This field is not used for external load balancing. For INTERNAL\_SELF\_MANAGED load balancing, this field identifies the network that the load balanced IP should belong to for this global forwarding rule. If this field is not specified, the default network will be used. |
| **portRange** string | success | This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports: \* TargetHttpProxy: 80, 8080 \* TargetHttpsProxy: 443 \* TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \* TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \* TargetVpnGateway: 500, 4500 . |
| **target** string | success | The URL of the target resource to receive the matched traffic. The forwarded traffic must be of a type appropriate to the target object. For INTERNAL\_SELF\_MANAGED load balancing, only HTTP and HTTPS targets are valid. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_global_address_info β Gather info for GCP GlobalAddress google.cloud.gcp\_compute\_global\_address\_info β Gather info for GCP GlobalAddress
====================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_global_address_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP GlobalAddress
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a global address
gcp_compute_global_address_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **address** string | success | The static external IP address represented by this resource. |
| | **addressType** string | success | The type of the address to reserve. \* EXTERNAL indicates public/external single IP address. \* INTERNAL indicates internal IP ranges belonging to some network. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| | **ipVersion** string | success | The IP Version that will be used by this address. The default value is `IPV4`. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **network** dictionary | success | The URL of the network in which to reserve the IP range. The IP range must be in RFC1918 space. The network cannot be deleted if there are any reserved IP ranges referring to it. This should only be set when using an Internal address. |
| | **prefixLength** integer | success | The prefix length of the IP range. If not present, it means the address field is a single IP address. This field is not applicable to addresses with addressType=EXTERNAL. |
| | **purpose** string | success | The purpose of the resource. For global internal addresses it can be \* VPC\_PEERING - for peer networks This should only be set when using an Internal address. |
| | **region** string | success | A reference to the region where the regional address resides. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_dns_managed_zone_info β Gather info for GCP ManagedZone google.cloud.gcp\_dns\_managed\_zone\_info β Gather info for GCP ManagedZone
============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_dns_managed_zone_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP ManagedZone
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **dns\_name** list / elements=string | | Restricts the list to return only zones with this domain name. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a managed zone
gcp_dns_managed_zone_info:
dns_name: test.somewild2.example.com.
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTime** string | success | The time that this resource was created on the server. This is in RFC3339 text format. |
| | **description** string | success | A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function. |
| | **dnsName** string | success | The DNS name of this managed zone, for instance "example.com.". |
| | **dnssecConfig** complex | success | DNSSEC configuration. |
| | | **defaultKeySpecs** complex | success | Specifies parameters that will be used for generating initial DnsKeys for this ManagedZone. If you provide a spec for keySigning or zoneSigning, you must also provide one for the other. default\_key\_specs can only be updated when the state is `off`. |
| | | | **algorithm** string | success | String mnemonic specifying the DNSSEC algorithm of this key. |
| | | | **keyLength** integer | success | Length of the keys in bits. |
| | | | **keyType** string | success | Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets. |
| | | | **kind** string | success | Identifies what kind of resource this is. |
| | | **kind** string | success | Identifies what kind of resource this is. |
| | | **nonExistence** string | success | Specifies the mechanism used to provide authenticated denial-of-existence responses. non\_existence can only be updated when the state is `off`. |
| | | **state** string | success | Specifies whether DNSSEC is enabled, and what mode it is in. |
| | **forwardingConfig** complex | success | The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. |
| | | **targetNameServers** complex | success | List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given. |
| | | | **forwardingPath** string | success | Forwarding path for this TargetNameServer. If unset or `default` Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to `private`, Cloud DNS will always send queries through VPC for this target . |
| | | | **ipv4Address** string | success | IPv4 address of a target name server. |
| | **id** integer | success | Unique identifier for the resource; defined by the server. |
| | **labels** dictionary | success | A set of key/value label pairs to assign to this ManagedZone. |
| | **name** string | success | User assigned name for this resource. Must be unique within the project. |
| | **nameServers** list / elements=string | success | Delegate your managed\_zone to these virtual name servers; defined by the server . |
| | **nameServerSet** string | success | Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users will leave this field unset. |
| | **peeringConfig** complex | success | The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. |
| | | **targetNetwork** complex | success | The network with which to peer. |
| | | | **networkUrl** string | success | The fully qualified URL of the VPC network to forward queries to. This should be formatted like `[https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`](#) . |
| | **privateVisibilityConfig** complex | success | For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. |
| | | **networks** complex | success | The list of VPC networks that can see this zone. |
| | | | **networkUrl** string | success | The fully qualified URL of the VPC network to bind to. This should be formatted like `[https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`](#) . |
| | **visibility** string | success | The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_image_info β Gather info for GCP Image google.cloud.gcp\_compute\_image\_info β Gather info for GCP Image
==================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_image_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Image
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an image
gcp_compute_image_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **archiveSizeBytes** integer | success | Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **deprecated** complex | success | The deprecation status associated with this image. |
| | | **deleted** string | success | An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it. |
| | | **deprecated** string | success | An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it. |
| | | **obsolete** string | success | An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it. |
| | | **replacement** string | success | The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. |
| | | **state** string | success | The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **diskSizeGb** integer | success | Size of the image when restored onto a persistent disk (in GB). |
| | **family** string | success | The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035. |
| | **guestOsFeatures** complex | success | A list of features to enable on the guest operating system. Applicable only for bootable images. |
| | | **type** string | success | The type of supported feature. |
| | **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| | **imageEncryptionKey** complex | success | Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) . |
| | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | **labelFingerprint** string | success | The fingerprint used for optimistic locking of this resource. Used internally during updates. |
| | **labels** dictionary | success | Labels to apply to this Image. |
| | **licenses** list / elements=string | success | Any applicable license URI. |
| | **name** string | success | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **rawDisk** complex | success | The parameters of the raw disk image. |
| | | **containerType** string | success | The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created. |
| | | **sha1Checksum** string | success | An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created. |
| | | **source** string | success | The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both. |
| | **sourceDisk** dictionary | success | The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image. |
| | **sourceDiskEncryptionKey** complex | success | The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key. |
| | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | **sourceDiskId** string | success | The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name. |
| | **sourceImage** dictionary | success | URL of the source image used to create this image. In order to create an image, you must provide the full or partial URL of one of the following: \* The selfLink URL \* This property \* The rawDisk.source URL \* The sourceDisk URL . |
| | **sourceSnapshot** dictionary | success | URL of the source snapshot used to create this image. In order to create an image, you must provide the full or partial URL of one of the following: \* The selfLink URL \* This property \* The sourceImage URL \* The rawDisk.source URL \* The sourceDisk URL . |
| | **sourceType** string | success | The type of the image used to create this disk. The default and only value is RAW . |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_network_endpoint_group_info β Gather info for GCP NetworkEndpointGroup google.cloud.gcp\_compute\_network\_endpoint\_group\_info β Gather info for GCP NetworkEndpointGroup
====================================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_network_endpoint_group_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP NetworkEndpointGroup
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone** string / required | | Zone where the network endpoint group is located. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a network endpoint group
gcp_compute_network_endpoint_group_info:
zone: us-central1-a
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **defaultPort** integer | success | The default port used if the port number is not specified in the network endpoint. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **network** dictionary | success | The network to which all network endpoints in the NEG belong. Uses "default" project network if unspecified. |
| | **networkEndpointType** string | success | Type of network endpoints in this network endpoint group. |
| | **size** integer | success | Number of network endpoints in the network endpoint group. |
| | **subnetwork** dictionary | success | Optional subnetwork to which all network endpoints in the NEG belong. |
| | **zone** string | success | Zone where the network endpoint group is located. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_pubsub_subscription β Creates a GCP Subscription google.cloud.gcp\_pubsub\_subscription β Creates a GCP Subscription
===================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_pubsub_subscription`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A named resource representing the stream of messages from a single, specific topic, to be delivered to the subscribing application.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **ack\_deadline\_seconds** integer | | This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call subscriptions.modifyAckDeadline with the corresponding ackId if using pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **dead\_letter\_policy** dictionary | | A policy that specifies the conditions for dead lettering messages in this subscription. If dead\_letter\_policy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscription's parent project (i.e., service-{project\_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription. |
| | **dead\_letter\_topic** string | | The name of the topic to which dead letter messages should be published. Format is `projects/{project}/topics/{topic}`. The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project\_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost. |
| | **max\_delivery\_attempts** integer | | The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack\_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used. |
| **enable\_message\_ordering** boolean | **Choices:*** no
* yes
| If `true`, messages published with the same orderingKey in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **expiration\_policy** dictionary | | A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be used. If it is set but ttl is "", the resource never expires. The minimum allowed value for expirationPolicy.ttl is 1 day. |
| | **ttl** string / required | | Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. If ttl is not set, the associated resource never expires. A duration in seconds with up to nine fractional digits, terminated by 's'. Example - "3.5s". |
| **filter** string | | The subscription only delivers the messages that match the filter. Pub/Sub automatically acknowledges the messages that don't match the filter. You can filter messages by their attributes. The maximum length of a filter is 256 bytes. After creating the subscription, you can't modify the filter. |
| **labels** dictionary | | A set of key/value label pairs to assign to this Subscription. |
| **message\_retention\_duration** string | **Default:**"604800s" | How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If retainAckedMessages is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a subscriptions.seek can be done. Defaults to 7 days. Cannot be more than 7 days (`"604800s"`) or less than 10 minutes (`"600s"`). A duration in seconds with up to nine fractional digits, terminated by 's'. Example: `"600.5s"`. |
| **name** string / required | | Name of the subscription. |
| **project** string | | The Google Cloud Platform project to use. |
| **push\_config** dictionary | | If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods. |
| | **attributes** dictionary | | Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is x-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the subscriptions.create call, it will default to the version of the API used to make such call. If not present during a subscriptions.modifyPushConfig call, its value will not be changed. subscriptions.get calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: - v1beta1: uses the push format defined in the v1beta1 Pub/Sub API. - v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API. |
| | **oidc\_token** dictionary | | If specified, Pub/Sub will generate and attach an OIDC JWT token as an Authorization header in the HTTP request for every pushed message. |
| | | **audience** string | | Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: <https://tools.ietf.org/html/rfc7519#section-4.1.3> Note: if not specified, the Push endpoint URL will be used. |
| | | **service\_account\_email** string / required | | Service account email to be used for generating the OIDC token. The caller (for subscriptions.create, subscriptions.patch, and subscriptions.modifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account. |
| | **push\_endpoint** string / required | | A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "[https://example.com/push"](#). |
| **retain\_acked\_messages** boolean | **Choices:*** no
* yes
| Indicates whether to retain acknowledged messages. If `true`, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the messageRetentionDuration window. |
| **retry\_policy** dictionary | | A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message . |
| | **maximum\_backoff** string | | The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". |
| | **minimum\_backoff** string | | The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **topic** dictionary / required | | A reference to a Topic resource. This field represents a link to a Topic resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_pubsub\_topic task and then set this topic field to "{{ name-of-resource }}" |
Notes
-----
Note
* API Reference: <https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions>
* Managing Subscriptions: <https://cloud.google.com/pubsub/docs/admin#managing_subscriptions>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a topic
google.cloud.gcp_pubsub_topic:
name: topic-subscription
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: topic
- name: create a subscription
google.cloud.gcp_pubsub_subscription:
name: test_object
topic: "{{ topic }}"
ack_deadline_seconds: 300
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **ackDeadlineSeconds** integer | success | This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call subscriptions.modifyAckDeadline with the corresponding ackId if using pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. |
| **deadLetterPolicy** complex | success | A policy that specifies the conditions for dead lettering messages in this subscription. If dead\_letter\_policy is not set, dead lettering is disabled. The Cloud Pub/Sub service account associated with this subscription's parent project (i.e., service-{project\_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription. |
| | **deadLetterTopic** string | success | The name of the topic to which dead letter messages should be published. Format is `projects/{project}/topics/{topic}`. The Cloud Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project\_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost. |
| | **maxDeliveryAttempts** integer | success | The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack\_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used. |
| **enableMessageOrdering** boolean | success | If `true`, messages published with the same orderingKey in PubsubMessage will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order. |
| **expirationPolicy** complex | success | A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If expirationPolicy is not set, a default policy with ttl of 31 days will be used. If it is set but ttl is "", the resource never expires. The minimum allowed value for expirationPolicy.ttl is 1 day. |
| | **ttl** string | success | Specifies the "time-to-live" duration for an associated resource. The resource expires if it is not active for a period of ttl. If ttl is not set, the associated resource never expires. A duration in seconds with up to nine fractional digits, terminated by 's'. Example - "3.5s". |
| **filter** string | success | The subscription only delivers the messages that match the filter. Pub/Sub automatically acknowledges the messages that don't match the filter. You can filter messages by their attributes. The maximum length of a filter is 256 bytes. After creating the subscription, you can't modify the filter. |
| **labels** dictionary | success | A set of key/value label pairs to assign to this Subscription. |
| **messageRetentionDuration** string | success | How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If retainAckedMessages is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a subscriptions.seek can be done. Defaults to 7 days. Cannot be more than 7 days (`"604800s"`) or less than 10 minutes (`"600s"`). A duration in seconds with up to nine fractional digits, terminated by 's'. Example: `"600.5s"`. |
| **name** string | success | Name of the subscription. |
| **pushConfig** complex | success | If push delivery is used with this subscription, this field is used to configure it. An empty pushConfig signifies that the subscriber will pull and ack messages using API methods. |
| | **attributes** dictionary | success | Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is x-goog-version, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the subscriptions.create call, it will default to the version of the API used to make such call. If not present during a subscriptions.modifyPushConfig call, its value will not be changed. subscriptions.get calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: - v1beta1: uses the push format defined in the v1beta1 Pub/Sub API. - v1 or v1beta2: uses the push format defined in the v1 Pub/Sub API. |
| | **oidcToken** complex | success | If specified, Pub/Sub will generate and attach an OIDC JWT token as an Authorization header in the HTTP request for every pushed message. |
| | | **audience** string | success | Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: <https://tools.ietf.org/html/rfc7519#section-4.1.3> Note: if not specified, the Push endpoint URL will be used. |
| | | **serviceAccountEmail** string | success | Service account email to be used for generating the OIDC token. The caller (for subscriptions.create, subscriptions.patch, and subscriptions.modifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account. |
| | **pushEndpoint** string | success | A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "[https://example.com/push"](#). |
| **retainAckedMessages** boolean | success | Indicates whether to retain acknowledged messages. If `true`, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the messageRetentionDuration window. |
| **retryPolicy** complex | success | A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message . |
| | **maximumBackoff** string | success | The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". |
| | **minimumBackoff** string | success | The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". |
| **topic** dictionary | success | A reference to a Topic resource. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_kms_crypto_key_info β Gather info for GCP CryptoKey google.cloud.gcp\_kms\_crypto\_key\_info β Gather info for GCP CryptoKey
========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_kms_crypto_key_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP CryptoKey
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **key\_ring** string / required | | The KeyRing that this key belongs to. Format: `'projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}'`. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a crypto key
gcp_kms_crypto_key_info:
key_ring: projects/{{ gcp_project }}/locations/us-central1/keyRings/key-key-ring
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **createTime** string | success | The time that this resource was created on the server. This is in RFC3339 text format. |
| | **keyRing** string | success | The KeyRing that this key belongs to. Format: `'projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}'`. |
| | **labels** dictionary | success | Labels with user-defined metadata to apply to this resource. |
| | **name** string | success | The resource name for the CryptoKey. |
| | **nextRotationTime** string | success | The time when KMS will create a new version of this Crypto Key. |
| | **purpose** string | success | Immutable purpose of CryptoKey. See <https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKeyPurpose> for inputs. |
| | **rotationPeriod** string | success | Every time this period passes, generate a new CryptoKeyVersion and set it as the primary. The first rotation will take place after the specified period. The rotation period has the format of a decimal number with up to 9 fractional digits, followed by the letter `s` (seconds). It must be greater than a day (ie, 86400). |
| | **skipInitialVersionCreation** boolean | success | If set to true, the request will create a CryptoKey without any CryptoKeyVersions. You must use the `google\_kms\_key\_ring\_import\_job` resource to import the CryptoKeyVersion. |
| | **versionTemplate** complex | success | A template describing settings for new crypto key versions. |
| | | **algorithm** string | success | The algorithm to use when creating a version based on this template. See the [algorithm reference](<https://cloud.google.com/kms/docs/reference/rest/v1/CryptoKeyVersionAlgorithm>) for possible inputs. |
| | | **protectionLevel** string | success | The protection level to use when creating a version based on this template. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_bigquery_table_info β Gather info for GCP Table google.cloud.gcp\_bigquery\_table\_info β Gather info for GCP Table
===================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_bigquery_table_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Table
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **dataset** string | | Name of the dataset. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a table
gcp_bigquery_table_info:
dataset: example_dataset
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **clustering** list / elements=string | success | One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| | **creationTime** integer | success | The time when this dataset was created, in milliseconds since the epoch. |
| | **dataset** string | success | Name of the dataset. |
| | **description** string | success | A user-friendly description of the dataset. |
| | **encryptionConfiguration** complex | success | Custom encryption configuration. |
| | | **kmsKeyName** string | success | Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| | **expirationTime** integer | success | The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. |
| | **externalDataConfiguration** complex | success | Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table. |
| | | **autodetect** boolean | success | Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| | | **bigtableOptions** complex | success | Additional options if sourceFormat is set to BIGTABLE. |
| | | | **columnFamilies** complex | success | List of column families to expose in the table schema along with their types. |
| | | | | **columns** complex | success | Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. |
| | | | | | **encoding** string | success | The encoding of the values when the type is not STRING. |
| | | | | | **fieldName** string | success | If the qualifier is not a valid BigQuery field identifier, a valid identifier must be provided as the column field name and is used as field name in queries. |
| | | | | | **onlyReadLatest** boolean | success | If this is set, only the latest version of value in this column are exposed . |
| | | | | | **qualifierString** string | success | Qualifier of the column. |
| | | | | | **type** string | success | The type to convert the value in cells of this column. |
| | | | | **encoding** string | success | The encoding of the values when the type is not STRING. |
| | | | | **familyId** string | success | Identifier of the column family. |
| | | | | **onlyReadLatest** boolean | success | If this is set only the latest version of value are exposed for all columns in this column family . |
| | | | | **type** string | success | The type to convert the value in cells of this column family. |
| | | | **ignoreUnspecifiedColumnFamilies** boolean | success | If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema . |
| | | | **readRowkeyAsString** boolean | success | If field is true, then the rowkey column families will be read and converted to string. |
| | | **compression** string | success | The compression type of the data source. |
| | | **csvOptions** complex | success | Additional properties to set if sourceFormat is set to CSV. |
| | | | **allowJaggedRows** boolean | success | Indicates if BigQuery should accept rows that are missing trailing optional columns . |
| | | | **allowQuotedNewlines** boolean | success | Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file . |
| | | | **encoding** string | success | The character encoding of the data. |
| | | | **fieldDelimiter** string | success | The separator for fields in a CSV file. |
| | | | **quote** string | success | The value that is used to quote data sections in a CSV file. |
| | | | **skipLeadingRows** integer | success | The number of rows at the top of a CSV file that BigQuery will skip when reading the data. |
| | | **googleSheetsOptions** complex | success | Additional options if sourceFormat is set to GOOGLE\_SHEETS. |
| | | | **skipLeadingRows** integer | success | The number of rows at the top of a Google Sheet that BigQuery will skip when reading the data. |
| | | **ignoreUnknownValues** boolean | success | Indicates if BigQuery should allow extra values that are not represented in the table schema . |
| | | **maxBadRecords** integer | success | The maximum number of bad records that BigQuery can ignore when reading data . |
| | | **schema** complex | success | The schema for the data. Schema is required for CSV and JSON formats. |
| | | | **fields** complex | success | Describes the fields in a table. |
| | | | | **description** string | success | The field description. |
| | | | | **fields** list / elements=string | success | Describes the nested schema fields if the type property is set to RECORD . |
| | | | | **mode** string | success | Field mode. |
| | | | | **name** string | success | Field name. |
| | | | | **type** string | success | Field data type. |
| | | **sourceFormat** string | success | The data format. |
| | | **sourceUris** list / elements=string | success | The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '\*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '\*' wildcard character is not allowed. |
| | **friendlyName** string | success | A descriptive name for this table. |
| | **id** string | success | An opaque ID uniquely identifying the table. |
| | **labels** dictionary | success | The labels associated with this dataset. You can use these to organize and group your datasets . |
| | **lastModifiedTime** integer | success | The time when this table was last modified, in milliseconds since the epoch. |
| | **location** string | success | The geographic location where the table resides. This value is inherited from the dataset. |
| | **name** string | success | Name of the table. |
| | **numBytes** integer | success | The size of this table in bytes, excluding any data in the streaming buffer. |
| | **numLongTermBytes** integer | success | The number of bytes in the table that are considered "long-term storage". |
| | **numRows** integer | success | The number of rows of data in this table, excluding any data in the streaming buffer. |
| | **requirePartitionFilter** boolean | success | If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. |
| | **schema** complex | success | Describes the schema of this table. |
| | | **fields** complex | success | Describes the fields in a table. |
| | | | **description** string | success | The field description. The maximum length is 1,024 characters. |
| | | | **fields** list / elements=string | success | Describes the nested schema fields if the type property is set to RECORD. |
| | | | **mode** string | success | The field mode. |
| | | | **name** string | success | The field name. |
| | | | **type** string | success | The field data type. |
| | **streamingBuffer** complex | success | Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer. |
| | | **estimatedBytes** integer | success | A lower-bound estimate of the number of bytes currently in the streaming buffer. |
| | | **estimatedRows** integer | success | A lower-bound estimate of the number of rows currently in the streaming buffer. |
| | | **oldestEntryTime** integer | success | Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available. |
| | **tableReference** complex | success | Reference describing the ID of this table. |
| | | **datasetId** string | success | The ID of the dataset containing this table. |
| | | **projectId** string | success | The ID of the project containing this table. |
| | | **tableId** string | success | The ID of the the table. |
| | **timePartitioning** complex | success | If specified, configures time-based partitioning for this table. |
| | | **expirationMs** integer | success | Number of milliseconds for which to keep the storage for a partition. |
| | | **field** string | success | If not set, the table is partitioned by pseudo column, referenced via either '\_PARTITIONTIME' as TIMESTAMP type, or '\_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
| | | **type** string | success | The only type supported is DAY, which will generate one partition per day. |
| | **type** string | success | Describes the table type. |
| | **view** complex | success | The view definition. |
| | | **useLegacySql** boolean | success | Specifies whether to use BigQuery's legacy SQL for this view . |
| | | **userDefinedFunctionResources** complex | success | Describes user-defined function resources used in the query. |
| | | | **inlineCode** string | success | An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| | | | **resourceUri** string | success | A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_instance_info β Gather info for GCP Instance google.cloud.gcp\_compute\_instance\_info β Gather info for GCP Instance
========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_instance_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Instance
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone** string / required | | A reference to the zone where the machine resides. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an instance
gcp_compute_instance_info:
zone: us-central1-a
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **canIpForward** boolean | success | Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. |
| | **cpuPlatform** string | success | The CPU platform used by this instance. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **deletionProtection** boolean | success | Whether the resource should be protected against deletion. |
| | **disks** complex | success | An array of disks that are associated with the instances that are created from this template. |
| | | **autoDelete** boolean | success | Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). Tip: Disks should be set to autoDelete=true so that leftover disks are not left behind on machine deletion. |
| | | **boot** boolean | success | Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| | | **deviceName** string | success | Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-\* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. |
| | | **diskEncryptionKey** complex | success | Encrypts or decrypts a disk using a customer-supplied encryption key. |
| | | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | | **rsaEncryptedKey** string | success | Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. |
| | | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | | **index** integer | success | Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. |
| | | **initializeParams** complex | success | Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. |
| | | | **diskName** string | success | Specifies the disk name. If not specified, the default is to use the name of the instance. |
| | | | **diskSizeGb** integer | success | Specifies the size of the disk in base-2 GB. |
| | | | **diskType** string | success | Reference to a disk type. Specifies the disk type to use to create the instance. If not specified, the default is pd-standard. |
| | | | **sourceImage** string | success | The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. To create a disk with one of the public operating system images, specify the image by its family name. |
| | | | **sourceImageEncryptionKey** complex | success | The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. |
| | | | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | | **interface** string | success | Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. |
| | | **mode** string | success | The mode in which to attach this disk, either READ\_WRITE or READ\_ONLY. If not specified, the default is to attach the disk in READ\_WRITE mode. |
| | | **source** dictionary | success | Reference to a disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. |
| | | **type** string | success | Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. |
| | **guestAccelerators** complex | success | List of the type and count of accelerator cards attached to the instance . |
| | | **acceleratorCount** integer | success | The number of the guest accelerator cards exposed to this instance. |
| | | **acceleratorType** string | success | Full or partial URL of the accelerator type resource to expose to this instance. |
| | **hostname** string | success | The hostname of the instance to be created. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE\_NAME].c.[PROJECT\_ID].internal when using the global DNS, and [INSTANCE\_NAME].[ZONE].c.[PROJECT\_ID].internal when using zonal DNS. |
| | **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| | **labelFingerprint** string | success | The fingerprint used for optimistic locking of this resource. Used internally during updates. |
| | **labels** dictionary | success | Labels to apply to this instance. A list of key->value pairs. |
| | **machineType** string | success | A reference to a machine type which defines VM kind. |
| | **metadata** dictionary | success | The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. |
| | **minCpuPlatform** string | success | Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms . |
| | **name** string | success | The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **networkInterfaces** complex | success | An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one network interface is supported per instance. |
| | | **accessConfigs** complex | success | An array of configurations for this interface. Currently, only one access config, ONE\_TO\_ONE\_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access. |
| | | | **name** string | success | The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access. |
| | | | **natIP** dictionary | success | Reference to an address. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. |
| | | | **networkTier** string | success | This signifies the networking tier used for configuring this access configuration. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. |
| | | | **publicPtrDomainName** string | success | The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled. |
| | | | **setPublicPtr** boolean | success | Specifies whether a public DNS PTR record should be created to map the external IP address of the instance to a DNS domain name. |
| | | | **type** string | success | The type of configuration. The default and only option is ONE\_TO\_ONE\_NAT. |
| | | **aliasIpRanges** complex | success | An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. |
| | | | **ipCidrRange** string | success | The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). |
| | | | **subnetworkRangeName** string | success | Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used. |
| | | **name** string | success | The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc . |
| | | **network** dictionary | success | Specifies the title of an existing network. Not setting the network title will select the default network interface, which could have SSH already configured . |
| | | **networkIP** string | success | An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. |
| | | **subnetwork** dictionary | success | Reference to a VPC network. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. |
| | **scheduling** complex | success | Sets the scheduling options for this instance. |
| | | **automaticRestart** boolean | success | Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. |
| | | **onHostMaintenance** string | success | Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. |
| | | **preemptible** boolean | success | Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created. |
| | **serviceAccounts** complex | success | A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. |
| | | **email** string | success | Email address of the service account. |
| | | **scopes** list / elements=string | success | The list of scopes to be made available for this service account. |
| | **shieldedInstanceConfig** complex | success | Configuration for various parameters related to shielded instances. |
| | | **enableIntegrityMonitoring** boolean | success | Defines whether the instance has integrity monitoring enabled. |
| | | **enableSecureBoot** boolean | success | Defines whether the instance has Secure Boot enabled. |
| | | **enableVtpm** boolean | success | Defines whether the instance has the vTPM enabled. |
| | **status** string | success | The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED. As a user, use RUNNING to keep a machine "on" and TERMINATED to turn a machine off . |
| | **statusMessage** string | success | An optional, human-readable explanation of the status. |
| | **tags** complex | success | A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. |
| | | **fingerprint** string | success | Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
| | | **items** list / elements=string | success | An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. |
| | **zone** string | success | A reference to the zone where the machine resides. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_backend_service_info β Gather info for GCP BackendService google.cloud.gcp\_compute\_backend\_service\_info β Gather info for GCP BackendService
======================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_backend_service_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP BackendService
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a backend service
gcp_compute_backend_service_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **affinityCookieTtlSec** integer | success | Lifetime of cookies in seconds if session\_affinity is GENERATED\_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used. |
| | **backends** complex | success | The set of backends that serve this BackendService. |
| | | **balancingMode** string | success | Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL). |
| | | **capacityScaler** string | success | A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0]. |
| | | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | | **group** string | success | The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL. |
| | | **maxConnections** integer | success | The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance or maxConnectionsPerEndpoint, as appropriate for group type, must be set. |
| | | **maxConnectionsPerEndpoint** integer | success | The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set. |
| | | **maxConnectionsPerInstance** integer | success | The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. |
| | | **maxRate** integer | success | The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set. |
| | | **maxRatePerEndpoint** string | success | The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. |
| | | **maxRatePerInstance** string | success | The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. |
| | | **maxUtilization** string | success | Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0]. |
| | **cdnPolicy** complex | success | Cloud CDN configuration for this BackendService. |
| | | **cacheKeyPolicy** complex | success | The CacheKeyPolicy for this CdnPolicy. |
| | | | **includeHost** boolean | success | If true requests to different hosts will be cached separately. |
| | | | **includeProtocol** boolean | success | If true, http and https requests will be cached separately. |
| | | | **includeQueryString** boolean | success | If true, include query string parameters in the cache key according to query\_string\_whitelist and query\_string\_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely. |
| | | | **queryStringBlacklist** list / elements=string | success | Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | | | **queryStringWhitelist** list / elements=string | success | Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | | **signedUrlCacheMaxAgeSec** integer | success | Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. |
| | **circuitBreakers** complex | success | Settings controlling the volume of connections to a backend service. This field is applicable only when the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. |
| | | **maxConnections** integer | success | The maximum number of connections to the backend cluster. Defaults to 1024. |
| | | **maxPendingRequests** integer | success | The maximum number of pending requests to the backend cluster. Defaults to 1024. |
| | | **maxRequests** integer | success | The maximum number of parallel requests to the backend cluster. Defaults to 1024. |
| | | **maxRequestsPerConnection** integer | success | Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. |
| | | **maxRetries** integer | success | The maximum number of parallel retries to the backend cluster. Defaults to 3. |
| | **connectionDraining** complex | success | Settings for connection draining . |
| | | **drainingTimeoutSec** integer | success | Time for which instance will be drained (not accept new connections, but still work to finish started). |
| | **consistentHash** complex | success | Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies if the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. This field is only applicable when locality\_lb\_policy is set to MAGLEV or RING\_HASH. |
| | | **httpCookie** complex | success | Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP\_COOKIE. |
| | | | **name** string | success | Name of the cookie. |
| | | | **path** string | success | Path to set for the cookie. |
| | | | **ttl** complex | success | Lifetime of the cookie. |
| | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | **httpHeaderName** string | success | The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER\_FIELD. |
| | | **minimumRingSize** integer | success | The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **customRequestHeaders** list / elements=string | success | Headers that the HTTP/S load balancer should add to proxied requests. |
| | **description** string | success | An optional description of this resource. |
| | **enableCDN** boolean | success | If true, enable Cloud CDN for this BackendService. |
| | **fingerprint** string | success | Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. |
| | **healthChecks** list / elements=string | success | The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. For internal load balancing, a URL to a HealthCheck resource must be specified instead. |
| | **iap** complex | success | Settings for enabling Cloud Identity Aware Proxy. |
| | | **enabled** boolean | success | Enables IAP. |
| | | **oauth2ClientId** string | success | OAuth2 Client ID for IAP . |
| | | **oauth2ClientSecret** string | success | OAuth2 Client Secret for IAP . |
| | | **oauth2ClientSecretSha256** string | success | OAuth2 Client Secret SHA-256 for IAP . |
| | **id** integer | success | The unique identifier for the resource. |
| | **loadBalancingScheme** string | success | Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. |
| | **localityLbPolicy** string | success | The load balancing algorithm used within the scope of the locality. The possible values are - \* ROUND\_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. \* LEAST\_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. \* RING\_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. \* RANDOM - The load balancer selects a random healthy host. \* ORIGINAL\_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. \* MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. |
| | **logConfig** complex | success | This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. |
| | | **enable** boolean | success | Whether to enable logging for the load balancer traffic served by this backend service. |
| | | **sampleRate** string | success | This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **outlierDetection** complex | success | Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. |
| | | **baseEjectionTime** complex | success | The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. |
| | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | **consecutiveErrors** integer | success | Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5. |
| | | **consecutiveGatewayFailure** integer | success | The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5. |
| | | **enforcingConsecutiveErrors** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | | **enforcingConsecutiveGatewayFailure** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0. |
| | | **enforcingSuccessRate** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | | **interval** complex | success | Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. |
| | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | **maxEjectionPercent** integer | success | Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%. |
| | | **successRateMinimumHosts** integer | success | The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5. |
| | | **successRateRequestVolume** integer | success | The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100. |
| | | **successRateStdevFactor** integer | success | This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev \* success\_rate\_stdev\_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900. |
| | **portName** string | success | Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL. |
| | **protocol** string | success | The protocol this BackendService uses to communicate with backends. The default is HTTP. \*\*NOTE\*\*: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API. |
| | **securityPolicy** string | success | The security policy associated with this backend service. |
| | **sessionAffinity** string | success | Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP. |
| | **timeoutSec** integer | success | How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400]. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_interconnect_attachment_info β Gather info for GCP InterconnectAttachment google.cloud.gcp\_compute\_interconnect\_attachment\_info β Gather info for GCP InterconnectAttachment
======================================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_interconnect_attachment_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP InterconnectAttachment
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | Region where the regional interconnect attachment resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an interconnect attachment
gcp_compute_interconnect_attachment_info:
region: us-central1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **adminEnabled** boolean | success | Whether the VLAN attachment is enabled or disabled. When using PARTNER type this will Pre-Activate the interconnect attachment . |
| | **bandwidth** string | success | Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER\_PROVIDER and DEDICATED, Defaults to BPS\_10G . |
| | **candidateSubnets** list / elements=string | success | Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress and customerRouterIpAddress for this attachment. All prefixes must be within link-local address space (169.254.0.0/16) and must be /29 or shorter (/28, /27, etc). Google will attempt to select an unused /29 from the supplied candidate prefix(es). The request will fail if all possible /29s are in use on Google's edge. If not supplied, Google will randomly select an unused /29 from all of link-local space. |
| | **cloudRouterIpAddress** string | success | IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **customerRouterIpAddress** string | success | IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment. |
| | **description** string | success | An optional description of this resource. |
| | **edgeAvailabilityDomain** string | success | Desired availability domain for the attachment. Only available for type PARTNER, at creation time. For improved reliability, customers should configure a pair of attachments with one per availability domain. The selected availability domain will be provided to the Partner via the pairing key so that the provisioned circuit will lie in the specified domain. If not specified, the value will default to AVAILABILITY\_DOMAIN\_ANY. |
| | **googleReferenceId** string | success | Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues. |
| | **id** string | success | The unique identifier for the resource. This identifier is defined by the server. |
| | **interconnect** string | success | URL of the underlying Interconnect object that this attachment's traffic will traverse through. Required if type is DEDICATED, must not be set if type is PARTNER. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **pairingKey** string | success | [Output only for type PARTNER. Not present for DEDICATED]. The opaque identifier of an PARTNER attachment used to initiate provisioning with a selected partner. Of the form "XXXXX/region/domain" . |
| | **partnerAsn** string | success | [Output only for type PARTNER. Not present for DEDICATED]. Optional BGP ASN for the router that should be supplied by a layer 3 Partner if they configured BGP on behalf of the customer. |
| | **privateInterconnectInfo** complex | success | Information specific to an InterconnectAttachment. This property is populated if the interconnect that this is attached to is of type DEDICATED. |
| | | **tag8021q** integer | success | 802.1q encapsulation tag to be used for traffic between Google and the customer, going to and from this network and region. |
| | **region** string | success | Region where the regional interconnect attachment resides. |
| | **router** dictionary | success | URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network & region within which the Cloud Router is configured. |
| | **state** string | success | [Output Only] The current state of this attachment's functionality. |
| | **type** string | success | The type of InterconnectAttachment you wish to create. Defaults to DEDICATED. |
| | **vlanTag8021q** integer | success | The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using PARTNER type this will be managed upstream. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_image β Creates a GCP Image google.cloud.gcp\_compute\_image β Creates a GCP Image
======================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_image`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents an Image resource.
* Google Compute Engine uses operating system images to create the root persistent disks for your instances. You specify an image when you create an instance. Images contain a boot loader, an operating system, and a root file system. Linux operating system images are also capable of running containers on Compute Engine.
* Images can be either public or custom.
* Public images are provided and maintained by Google, open-source communities, and third-party vendors. By default, all projects have access to these images and can use them to create instances. Custom images are available only to your project. You can create a custom image from root persistent disks and other images. Then, use the custom image to create an instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **disk\_size\_gb** integer | | Size of the image when restored onto a persistent disk (in GB). |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **family** string | | The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035. |
| **guest\_os\_features** list / elements=dictionary | | A list of features to enable on the guest operating system. Applicable only for bootable images. |
| | **type** string / required | | The type of supported feature. Some valid choices include: "MULTI\_IP\_SUBNET", "SECURE\_BOOT", "SEV\_CAPABLE", "UEFI\_COMPATIBLE", "VIRTIO\_SCSI\_MULTIQUEUE", "WINDOWS", "GVNIC" |
| **image\_encryption\_key** dictionary | | Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) . |
| | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| **labels** dictionary | | Labels to apply to this Image. |
| **licenses** list / elements=string | | Any applicable license URI. |
| **name** string / required | | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **raw\_disk** dictionary | | The parameters of the raw disk image. |
| | **container\_type** string | | The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created. Some valid choices include: "TAR" |
| | **sha1\_checksum** string | | An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created. |
| | **source** string / required | | The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **source\_disk** dictionary | | The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image. This field represents a link to a Disk resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_disk task and then set this source\_disk field to "{{ name-of-resource }}" |
| **source\_disk\_encryption\_key** dictionary | | The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key. |
| | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| **source\_disk\_id** string | | The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name. |
| **source\_image** dictionary | | URL of the source image used to create this image. In order to create an image, you must provide the full or partial URL of one of the following: \* The selfLink URL \* This property \* The rawDisk.source URL \* The sourceDisk URL . This field represents a link to a Image resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_image task and then set this source\_image field to "{{ name-of-resource }}" |
| **source\_snapshot** dictionary | | URL of the source snapshot used to create this image. In order to create an image, you must provide the full or partial URL of one of the following: \* The selfLink URL \* This property \* The sourceImage URL \* The rawDisk.source URL \* The sourceDisk URL . This field represents a link to a Snapshot resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_snapshot task and then set this source\_snapshot field to "{{ name-of-resource }}" |
| **source\_type** string | | The type of the image used to create this disk. The default and only value is RAW . Some valid choices include: "RAW" |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/v1/images>
* Official Documentation: <https://cloud.google.com/compute/docs/images>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a disk
google.cloud.gcp_compute_disk:
name: disk-image
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: disk
- name: create a image
google.cloud.gcp_compute_image:
name: test_object
source_disk: "{{ disk }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **archiveSizeBytes** integer | success | Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **deprecated** complex | success | The deprecation status associated with this image. |
| | **deleted** string | success | An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DELETED. This is only informational and the status will not change unless the client explicitly changes it. |
| | **deprecated** string | success | An optional RFC3339 timestamp on or after which the state of this resource is intended to change to DEPRECATED. This is only informational and the status will not change unless the client explicitly changes it. |
| | **obsolete** string | success | An optional RFC3339 timestamp on or after which the state of this resource is intended to change to OBSOLETE. This is only informational and the status will not change unless the client explicitly changes it. |
| | **replacement** string | success | The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource. |
| | **state** string | success | The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **diskSizeGb** integer | success | Size of the image when restored onto a persistent disk (in GB). |
| **family** string | success | The name of the image family to which this image belongs. You can create disks by specifying an image family instead of a specific image name. The image family always returns its latest image that is not deprecated. The name of the image family must comply with RFC1035. |
| **guestOsFeatures** complex | success | A list of features to enable on the guest operating system. Applicable only for bootable images. |
| | **type** string | success | The type of supported feature. |
| **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| **imageEncryptionKey** complex | success | Encrypts the image using a customer-supplied encryption key. After you encrypt an image with a customer-supplied key, you must provide the same key if you use the image later (e.g. to create a disk from the image) . |
| | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| **labelFingerprint** string | success | The fingerprint used for optimistic locking of this resource. Used internally during updates. |
| **labels** dictionary | success | Labels to apply to this Image. |
| **licenses** list / elements=string | success | Any applicable license URI. |
| **name** string | success | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **rawDisk** complex | success | The parameters of the raw disk image. |
| | **containerType** string | success | The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created. |
| | **sha1Checksum** string | success | An optional SHA1 checksum of the disk image before unpackaging. This is provided by the client when the disk image is created. |
| | **source** string | success | The full Google Cloud Storage URL where disk storage is stored You must provide either this property or the sourceDisk property but not both. |
| **sourceDisk** dictionary | success | The source disk to create this image based on. You must provide either this property or the rawDisk.source property but not both to create an image. |
| **sourceDiskEncryptionKey** complex | success | The customer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key. |
| | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| **sourceDiskId** string | success | The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name. |
| **sourceImage** dictionary | success | URL of the source image used to create this image. In order to create an image, you must provide the full or partial URL of one of the following: \* The selfLink URL \* This property \* The rawDisk.source URL \* The sourceDisk URL . |
| **sourceSnapshot** dictionary | success | URL of the source snapshot used to create this image. In order to create an image, you must provide the full or partial URL of one of the following: \* The selfLink URL \* This property \* The sourceImage URL \* The rawDisk.source URL \* The sourceDisk URL . |
| **sourceType** string | success | The type of the image used to create this disk. The default and only value is RAW . |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_target_pool β Creates a GCP TargetPool google.cloud.gcp\_compute\_target\_pool β Creates a GCP TargetPool
==================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_target_pool`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a TargetPool resource, used for Load Balancing.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **backup\_pool** dictionary | | This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. This field represents a link to a TargetPool resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_target\_pool task and then set this backup\_pool field to "{{ name-of-resource }}" |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **failover\_ratio** string | | This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. |
| **health\_check** dictionary | | A reference to a HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. If not specified it means all member instances will be considered healthy at all times. This field represents a link to a HttpHealthCheck resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_http\_health\_check task and then set this health\_check field to "{{ name-of-resource }}" |
| **instances** list / elements=dictionary | | A list of virtual machine instances serving this pool. They must live in zones contained in the same region as this pool. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The region where the target pool resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **session\_affinity** string | | Session affinity option. Must be one of these values: \* NONE: Connections from the same client IP may go to any instance in the pool. \* CLIENT\_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. \* CLIENT\_IP\_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy. Some valid choices include: "NONE", "CLIENT\_IP", "CLIENT\_IP\_PROTO" |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/targetPools>
* Official Documentation: <https://cloud.google.com/compute/docs/load-balancing/network/target-pools>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a target pool
google.cloud.gcp_compute_target_pool:
name: test_object
region: us-west1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **backupPool** dictionary | success | This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **failoverRatio** string | success | This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. |
| **healthCheck** dictionary | success | A reference to a HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. If not specified it means all member instances will be considered healthy at all times. |
| **id** integer | success | The unique identifier for the resource. |
| **instances** list / elements=string | success | A list of virtual machine instances serving this pool. They must live in zones contained in the same region as this pool. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **region** string | success | The region where the target pool resides. |
| **sessionAffinity** string | success | Session affinity option. Must be one of these values: \* NONE: Connections from the same client IP may go to any instance in the pool. \* CLIENT\_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. \* CLIENT\_IP\_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_tpu_node_info β Gather info for GCP Node google.cloud.gcp\_tpu\_node\_info β Gather info for GCP Node
============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_tpu_node_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Node
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone** string | | The GCP location for the TPU. If it is not provided, the provider zone is used. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a node
gcp_tpu_node_info:
zone: us-central1-b
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **acceleratorType** string | success | The type of hardware accelerators associated with this node. |
| | **cidrBlock** string | success | The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block. |
| | **description** string | success | The user-supplied description of the TPU. Maximum of 512 characters. |
| | **labels** dictionary | success | Resource labels to represent user provided metadata. |
| | **name** string | success | The immutable name of the TPU. |
| | **network** string | success | The name of a network to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, "default" will be used. |
| | **networkEndpoints** complex | success | The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node first reach out to the first (index 0) entry. |
| | | **ipAddress** string | success | The IP address of this network endpoint. |
| | | **port** integer | success | The port of this network endpoint. |
| | **schedulingConfig** complex | success | Sets the scheduling options for this TPU instance. |
| | | **preemptible** boolean | success | Defines whether the TPU instance is preemptible. |
| | **serviceAccount** string | success | The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data. |
| | **tensorflowVersion** string | success | The version of Tensorflow running in the Node. |
| | **useServiceNetworking** boolean | success | Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr\_block field should not be specified. If the network that you want to peer the TPU Node to is a Shared VPC network, the node must be created with this this field enabled. |
| | **zone** string | success | The GCP location for the TPU. If it is not provided, the provider zone is used. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_sql_database β Creates a GCP Database google.cloud.gcp\_sql\_database β Creates a GCP Database
========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_sql_database`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a SQL database inside the Cloud SQL instance, hosted in Googleβs cloud.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **charset** string | | The charset value. See MySQL's [Supported Character Sets and Collations](<https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html>) and Postgres' [Character Set Support](<https://www.postgresql.org/docs/9.6/static/multibyte.html>) for more details and supported values. Postgres databases only support a value of `UTF8` at creation time. |
| **collation** string | | The collation value. See MySQL's [Supported Character Sets and Collations](<https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html>) and Postgres' [Collation Support](<https://www.postgresql.org/docs/9.6/static/collation.html>) for more details and supported values. Postgres databases only support a value of `en\_US.UTF8` at creation time. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **instance** string / required | | The name of the Cloud SQL instance. This does not include the project ID. |
| **name** string / required | | The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Examples
--------
```
- name: create a instance
google.cloud.gcp_sql_instance:
name: "{{resource_name}}-3"
settings:
ip_configuration:
authorized_networks:
- name: google dns server
value: 8.8.8.8/32
tier: db-n1-standard-1
region: us-central1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: instance
- name: create a database
google.cloud.gcp_sql_database:
name: test_object
charset: utf8
instance: "{{ instance.name }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **charset** string | success | The charset value. See MySQL's [Supported Character Sets and Collations](<https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html>) and Postgres' [Character Set Support](<https://www.postgresql.org/docs/9.6/static/multibyte.html>) for more details and supported values. Postgres databases only support a value of `UTF8` at creation time. |
| **collation** string | success | The collation value. See MySQL's [Supported Character Sets and Collations](<https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html>) and Postgres' [Collation Support](<https://www.postgresql.org/docs/9.6/static/collation.html>) for more details and supported values. Postgres databases only support a value of `en\_US.UTF8` at creation time. |
| **instance** string | success | The name of the Cloud SQL instance. This does not include the project ID. |
| **name** string | success | The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_target_pool_info β Gather info for GCP TargetPool google.cloud.gcp\_compute\_target\_pool\_info β Gather info for GCP TargetPool
==============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_target_pool_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP TargetPool
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The region where the target pool resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a target pool
gcp_compute_target_pool_info:
region: us-west1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **backupPool** dictionary | success | This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool, and its failoverRatio field is properly set to a value between [0, 1]. backupPool and failoverRatio together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below failoverRatio, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio and backupPool are not set, or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **failoverRatio** string | success | This field is applicable only when the containing target pool is serving a forwarding rule as the primary pool (i.e., not as a backup pool to some other target pool). The value of the field must be in [0, 1]. If set, backupPool must also be set. They together define the fallback behavior of the primary target pool: if the ratio of the healthy instances in the primary pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio is not set or all the instances in the backup pool are unhealthy, the traffic will be directed back to the primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. |
| | **healthCheck** dictionary | success | A reference to a HttpHealthCheck resource. A member instance in this pool is considered healthy if and only if the health checks pass. If not specified it means all member instances will be considered healthy at all times. |
| | **id** integer | success | The unique identifier for the resource. |
| | **instances** list / elements=string | success | A list of virtual machine instances serving this pool. They must live in zones contained in the same region as this pool. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **region** string | success | The region where the target pool resides. |
| | **sessionAffinity** string | success | Session affinity option. Must be one of these values: \* NONE: Connections from the same client IP may go to any instance in the pool. \* CLIENT\_IP: Connections from the same client IP will go to the same instance in the pool while that instance remains healthy. \* CLIENT\_IP\_PROTO: Connections from the same client IP with the same IP protocol will go to the same instance in the pool while that instance remains healthy. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_filestore_instance β Creates a GCP Instance google.cloud.gcp\_filestore\_instance β Creates a GCP Instance
==============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_filestore_instance`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A Google Cloud Filestore instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | A description of the instance. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **file\_shares** list / elements=dictionary / required | | File system shares on the instance. For this version, only a single file share is supported. |
| | **capacity\_gb** integer / required | | File share capacity in GiB. This must be at least 1024 GiB for the standard tier, or 2560 GiB for the premium tier. |
| | **name** string / required | | The name of the fileshare (16 characters or less) . |
| **labels** dictionary | | Resource labels to represent user-provided metadata. |
| **name** string / required | | The resource name of the instance. |
| **networks** list / elements=dictionary / required | | VPC networks to which the instance is connected. For this version, only a single network is supported. |
| | **modes** list / elements=string / required | | IP versions for which the instance has IP addresses assigned. |
| | **network** string / required | | The name of the GCE VPC network to which the instance is connected. |
| | **reserved\_ip\_range** string | | A /29 CIDR block that identifies the range of IP addresses reserved for this instance. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **tier** string / required | | The service tier of the instance. Some valid choices include: "TIER\_UNSPECIFIED", "STANDARD", "PREMIUM", "BASIC\_HDD", "BASIC\_SSD", "HIGH\_SCALE\_SSD" |
| **zone** string / required | | The name of the Filestore zone of the instance. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/filestore/docs/reference/rest/v1beta1/projects.locations.instances/create>
* Official Documentation: <https://cloud.google.com/filestore/docs/creating-instances>
* Use with Kubernetes: <https://cloud.google.com/filestore/docs/accessing-fileshares>
* Copying Data In/Out: <https://cloud.google.com/filestore/docs/copying-data>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a instance
google.cloud.gcp_filestore_instance:
name: test_object
zone: us-central1-b
tier: PREMIUM
file_shares:
- capacity_gb: 2660
name: share1
networks:
- network: default
modes:
- MODE_IPV4
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **createTime** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | A description of the instance. |
| **etag** string | success | Server-specified ETag for the instance resource to prevent simultaneous updates from overwriting each other. |
| **fileShares** complex | success | File system shares on the instance. For this version, only a single file share is supported. |
| | **capacityGb** integer | success | File share capacity in GiB. This must be at least 1024 GiB for the standard tier, or 2560 GiB for the premium tier. |
| | **name** string | success | The name of the fileshare (16 characters or less) . |
| **labels** dictionary | success | Resource labels to represent user-provided metadata. |
| **name** string | success | The resource name of the instance. |
| **networks** complex | success | VPC networks to which the instance is connected. For this version, only a single network is supported. |
| | **ipAddresses** list / elements=string | success | A list of IPv4 or IPv6 addresses. |
| | **modes** list / elements=string | success | IP versions for which the instance has IP addresses assigned. |
| | **network** string | success | The name of the GCE VPC network to which the instance is connected. |
| | **reservedIpRange** string | success | A /29 CIDR block that identifies the range of IP addresses reserved for this instance. |
| **tier** string | success | The service tier of the instance. |
| **zone** string | success | The name of the Filestore zone of the instance. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_logging_metric_info β Gather info for GCP Metric google.cloud.gcp\_logging\_metric\_info β Gather info for GCP Metric
====================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_logging_metric_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Metric
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a metric
gcp_logging_metric_info:
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **bucketOptions** complex | success | The bucketOptions are required when the logs-based metric is using a DISTRIBUTION value type and it describes the bucket boundaries used to create a histogram of the extracted values. |
| | | **explicitBuckets** complex | success | Specifies a set of buckets with arbitrary widths. |
| | | | **bounds** list / elements=string | success | The values must be monotonically increasing. |
| | | **exponentialBuckets** complex | success | Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket. |
| | | | **growthFactor** string | success | Must be greater than 1. |
| | | | **numFiniteBuckets** integer | success | Must be greater than 0. |
| | | | **scale** string | success | Must be greater than 0. |
| | | **linearBuckets** complex | success | Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket. |
| | | | **numFiniteBuckets** integer | success | Must be greater than 0. |
| | | | **offset** string | success | Lower bound of the first bucket. |
| | | | **width** integer | success | Must be greater than 0. |
| | **description** string | success | A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. |
| | **filter** string | success | An advanced logs filter (<https://cloud.google.com/logging/docs/view/advanced-filters>) which is used to match log entries. |
| | **labelExtractors** dictionary | success | A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the valueExtractor field. |
| | **metricDescriptor** complex | success | The metric descriptor associated with the logs-based metric. |
| | | **displayName** string | success | A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example "Request count". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota. |
| | | **labels** complex | success | The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response\_latencies metric type has a label for the HTTP response code, response\_code, so you can look at latencies for successful responses or just for responses that failed. |
| | | | **description** string | success | A human-readable description for the label. |
| | | | **key** string | success | The label key. |
| | | | **valueType** string | success | The type of data that can be assigned to the label. |
| | | **metricKind** string | success | Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metricKind and valueType might not be supported. For counter metrics, set this to DELTA. |
| | | **type** string | success | The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name `custom.googleapis.com` or `external.googleapis.com`. |
| | | **unit** string | success | The unit in which the metric value is reported. It is only applicable if the valueType is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The supported units are a subset of [The Unified Code for Units of Measure](<http://unitsofmeasure.org/ucum.html>) standard . |
| | | **valueType** string | success | Whether the measurement is an integer, a floating-point number, etc. Some combinations of metricKind and valueType might not be supported. For counter metrics, set this to INT64. |
| | **name** string | success | The client-assigned metric identifier. Examples - "error\_count", "nginx/requests". Metric identifiers are limited to 100 characters and can include only the following characters A-Z, a-z, 0-9, and the special characters \_-.,+!\*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name. |
| | **valueExtractor** string | success | A valueExtractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction - EXTRACT(field) or REGEXP\_EXTRACT(field, regex). The argument are 1. field - The name of the log entry field from which the value is to be extracted. 2. regex - A regular expression using the Google RE2 syntax (<https://github.com/google/re2/wiki/Syntax>) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_autoscaler_info β Gather info for GCP Autoscaler google.cloud.gcp\_compute\_autoscaler\_info β Gather info for GCP Autoscaler
============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_autoscaler_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Autoscaler
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone** string / required | | URL of the zone where the instance group resides. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an autoscaler
gcp_compute_autoscaler_info:
zone: us-central1-a
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **autoscalingPolicy** complex | success | The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. |
| | | **coolDownPeriodSec** integer | success | The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process. |
| | | **cpuUtilization** complex | success | Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. |
| | | | **utilizationTarget** string | success | The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6. If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization. If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization. |
| | | **customMetricUtilizations** complex | success | Configuration parameters of autoscaling based on a custom metric. |
| | | | **metric** string | success | The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE. |
| | | | **utilizationTarget** string | success | The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric. For example, a good metric to use as a utilizationTarget is <www.googleapis.com/compute/instance/network/received_bytes_count>. The autoscaler will work to keep this value constant for each of the instances. |
| | | | **utilizationTargetType** string | success | Defines how target utilization value is expressed for a Stackdriver Monitoring metric. |
| | | **loadBalancingUtilization** complex | success | Configuration parameters of autoscaling based on a load balancer. |
| | | | **utilizationTarget** string | success | Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. |
| | | **maxNumReplicas** integer | success | The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas. |
| | | **minNumReplicas** integer | success | The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed. |
| | | **mode** string | success | Defines operating mode for this policy. |
| | | **scaleInControl** complex | success | Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events . |
| | | | **maxScaledInReplicas** complex | success | A nested object resource. |
| | | | | **fixed** integer | success | Specifies a fixed number of VM instances. This must be a positive integer. |
| | | | | **percent** integer | success | Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. |
| | | | **timeWindowSec** integer | success | How long back autoscaling should look when computing recommendations to include directives regarding slower scale down, as described above. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | Unique identifier for the resource. |
| | **name** string | success | Name of the resource. The name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **target** dictionary | success | URL of the managed instance group that this autoscaler will scale. |
| | **zone** string | success | URL of the zone where the instance group resides. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_instance β Creates a GCP Instance google.cloud.gcp\_compute\_instance β Creates a GCP Instance
============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_instance`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* An instance is a virtual machine (VM) hosted on Googleβs infrastructure.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **can\_ip\_forward** boolean | **Choices:*** no
* yes
| Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes.
aliases: ip\_forward |
| **deletion\_protection** boolean | **Choices:*** no
* yes
| Whether the resource should be protected against deletion. |
| **disks** list / elements=dictionary | | An array of disks that are associated with the instances that are created from this template. |
| | **auto\_delete** boolean | **Choices:*** no
* yes
| Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). Tip: Disks should be set to autoDelete=true so that leftover disks are not left behind on machine deletion. |
| | **boot** boolean | **Choices:*** no
* yes
| Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| | **device\_name** string | | Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-\* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. |
| | **disk\_encryption\_key** dictionary | | Encrypts or decrypts a disk using a customer-supplied encryption key. |
| | | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | **rsa\_encrypted\_key** string | | Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. |
| | **index** integer | | Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. |
| | **initialize\_params** dictionary | | Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. |
| | | **disk\_name** string | | Specifies the disk name. If not specified, the default is to use the name of the instance. |
| | | **disk\_size\_gb** integer | | Specifies the size of the disk in base-2 GB. |
| | | **disk\_type** string | | Reference to a disk type. Specifies the disk type to use to create the instance. If not specified, the default is pd-standard. |
| | | **source\_image** string | | The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. To create a disk with one of the public operating system images, specify the image by its family name.
aliases: image, image\_family |
| | | **source\_image\_encryption\_key** dictionary | | The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. |
| | | | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | **interface** string | | Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Some valid choices include: "SCSI", "NVME" |
| | **mode** string | | The mode in which to attach this disk, either READ\_WRITE or READ\_ONLY. If not specified, the default is to attach the disk in READ\_WRITE mode. Some valid choices include: "READ\_WRITE", "READ\_ONLY" |
| | **source** dictionary | | Reference to a disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. This field represents a link to a Disk resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_disk task and then set this source field to "{{ name-of-resource }}" |
| | **type** string | | Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Some valid choices include: "SCRATCH", "PERSISTENT" |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **guest\_accelerators** list / elements=dictionary | | List of the type and count of accelerator cards attached to the instance . |
| | **accelerator\_count** integer | | The number of the guest accelerator cards exposed to this instance. |
| | **accelerator\_type** string | | Full or partial URL of the accelerator type resource to expose to this instance. |
| **hostname** string | | The hostname of the instance to be created. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE\_NAME].c.[PROJECT\_ID].internal when using the global DNS, and [INSTANCE\_NAME].[ZONE].c.[PROJECT\_ID].internal when using zonal DNS. |
| **labels** dictionary | | Labels to apply to this instance. A list of key->value pairs. |
| **machine\_type** string | | A reference to a machine type which defines VM kind. |
| **metadata** dictionary | | The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. |
| **min\_cpu\_platform** string | | Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms . |
| **name** string | | The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network\_interfaces** list / elements=dictionary | | An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one network interface is supported per instance. |
| | **access\_configs** list / elements=dictionary | | An array of configurations for this interface. Currently, only one access config, ONE\_TO\_ONE\_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access. |
| | | **name** string / required | | The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access. |
| | | **nat\_ip** dictionary | | Reference to an address. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. This field represents a link to a Address resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'address' and value of your resource's address Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_address task and then set this nat\_ip field to "{{ name-of-resource }}" |
| | | **network\_tier** string | | This signifies the networking tier used for configuring this access configuration. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Some valid choices include: "PREMIUM", "STANDARD" |
| | | **public\_ptr\_domain\_name** string | | The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled. |
| | | **set\_public\_ptr** boolean | **Choices:*** no
* yes
| Specifies whether a public DNS PTR record should be created to map the external IP address of the instance to a DNS domain name. |
| | | **type** string / required | | The type of configuration. The default and only option is ONE\_TO\_ONE\_NAT. Some valid choices include: "ONE\_TO\_ONE\_NAT" |
| | **alias\_ip\_ranges** list / elements=dictionary | | An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. |
| | | **ip\_cidr\_range** string | | The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). |
| | | **subnetwork\_range\_name** string | | Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used. |
| | **network** dictionary | | Specifies the title of an existing network. Not setting the network title will select the default network interface, which could have SSH already configured . This field represents a link to a Network resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_network task and then set this network field to "{{ name-of-resource }}" |
| | **network\_ip** string | | An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. |
| | **subnetwork** dictionary | | Reference to a VPC network. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. This field represents a link to a Subnetwork resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_subnetwork task and then set this subnetwork field to "{{ name-of-resource }}" |
| **project** string | | The Google Cloud Platform project to use. |
| **scheduling** dictionary | | Sets the scheduling options for this instance. |
| | **automatic\_restart** boolean | **Choices:*** no
* yes
| Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. |
| | **on\_host\_maintenance** string | | Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. |
| | **preemptible** boolean | **Choices:*** no
* yes
| Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **service\_accounts** list / elements=dictionary | | A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. |
| | **email** string | | Email address of the service account. |
| | **scopes** list / elements=string | | The list of scopes to be made available for this service account. |
| **shielded\_instance\_config** dictionary | | Configuration for various parameters related to shielded instances. |
| | **enable\_integrity\_monitoring** boolean | **Choices:*** no
* yes
| Defines whether the instance has integrity monitoring enabled. |
| | **enable\_secure\_boot** boolean | **Choices:*** no
* yes
| Defines whether the instance has Secure Boot enabled. |
| | **enable\_vtpm** boolean | **Choices:*** no
* yes
| Defines whether the instance has the vTPM enabled. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **status** string | | The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED. As a user, use RUNNING to keep a machine "on" and TERMINATED to turn a machine off . Some valid choices include: "PROVISIONING", "STAGING", "RUNNING", "STOPPING", "SUSPENDING", "SUSPENDED", "TERMINATED" |
| **tags** dictionary | | A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. |
| | **fingerprint** string | | Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
| | **items** list / elements=string | | An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. |
| **zone** string / required | | A reference to the zone where the machine resides. |
Examples
--------
```
- name: create a disk
google.cloud.gcp_compute_disk:
name: disk-instance
size_gb: 50
source_image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: disk
- name: create a network
google.cloud.gcp_compute_network:
name: network-instance
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: network
- name: create a address
google.cloud.gcp_compute_address:
name: address-instance
region: us-central1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: address
- name: create a instance
google.cloud.gcp_compute_instance:
name: test_object
machine_type: n1-standard-1
disks:
- auto_delete: 'true'
boot: 'true'
source: "{{ disk }}"
- auto_delete: 'true'
interface: NVME
type: SCRATCH
initialize_params:
disk_type: local-ssd
metadata:
startup-script-url: gs:://graphite-playground/bootstrap.sh
cost-center: '12345'
labels:
environment: production
network_interfaces:
- network: "{{ network }}"
access_configs:
- name: External NAT
nat_ip: "{{ address }}"
type: ONE_TO_ONE_NAT
zone: us-central1-a
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **canIpForward** boolean | success | Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. |
| **cpuPlatform** string | success | The CPU platform used by this instance. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **deletionProtection** boolean | success | Whether the resource should be protected against deletion. |
| **disks** complex | success | An array of disks that are associated with the instances that are created from this template. |
| | **autoDelete** boolean | success | Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). Tip: Disks should be set to autoDelete=true so that leftover disks are not left behind on machine deletion. |
| | **boot** boolean | success | Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| | **deviceName** string | success | Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-\* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. |
| | **diskEncryptionKey** complex | success | Encrypts or decrypts a disk using a customer-supplied encryption key. |
| | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | **rsaEncryptedKey** string | success | Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. |
| | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | **index** integer | success | Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. |
| | **initializeParams** complex | success | Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. |
| | | **diskName** string | success | Specifies the disk name. If not specified, the default is to use the name of the instance. |
| | | **diskSizeGb** integer | success | Specifies the size of the disk in base-2 GB. |
| | | **diskType** string | success | Reference to a disk type. Specifies the disk type to use to create the instance. If not specified, the default is pd-standard. |
| | | **sourceImage** string | success | The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. To create a disk with one of the public operating system images, specify the image by its family name. |
| | | **sourceImageEncryptionKey** complex | success | The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. |
| | | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | **interface** string | success | Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. |
| | **mode** string | success | The mode in which to attach this disk, either READ\_WRITE or READ\_ONLY. If not specified, the default is to attach the disk in READ\_WRITE mode. |
| | **source** dictionary | success | Reference to a disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. |
| | **type** string | success | Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. |
| **guestAccelerators** complex | success | List of the type and count of accelerator cards attached to the instance . |
| | **acceleratorCount** integer | success | The number of the guest accelerator cards exposed to this instance. |
| | **acceleratorType** string | success | Full or partial URL of the accelerator type resource to expose to this instance. |
| **hostname** string | success | The hostname of the instance to be created. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE\_NAME].c.[PROJECT\_ID].internal when using the global DNS, and [INSTANCE\_NAME].[ZONE].c.[PROJECT\_ID].internal when using zonal DNS. |
| **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| **labelFingerprint** string | success | The fingerprint used for optimistic locking of this resource. Used internally during updates. |
| **labels** dictionary | success | Labels to apply to this instance. A list of key->value pairs. |
| **machineType** string | success | A reference to a machine type which defines VM kind. |
| **metadata** dictionary | success | The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. |
| **minCpuPlatform** string | success | Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms . |
| **name** string | success | The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **networkInterfaces** complex | success | An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one network interface is supported per instance. |
| | **accessConfigs** complex | success | An array of configurations for this interface. Currently, only one access config, ONE\_TO\_ONE\_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access. |
| | | **name** string | success | The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access. |
| | | **natIP** dictionary | success | Reference to an address. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. |
| | | **networkTier** string | success | This signifies the networking tier used for configuring this access configuration. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. |
| | | **publicPtrDomainName** string | success | The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled. |
| | | **setPublicPtr** boolean | success | Specifies whether a public DNS PTR record should be created to map the external IP address of the instance to a DNS domain name. |
| | | **type** string | success | The type of configuration. The default and only option is ONE\_TO\_ONE\_NAT. |
| | **aliasIpRanges** complex | success | An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. |
| | | **ipCidrRange** string | success | The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). |
| | | **subnetworkRangeName** string | success | Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used. |
| | **name** string | success | The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc . |
| | **network** dictionary | success | Specifies the title of an existing network. Not setting the network title will select the default network interface, which could have SSH already configured . |
| | **networkIP** string | success | An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. |
| | **subnetwork** dictionary | success | Reference to a VPC network. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. |
| **scheduling** complex | success | Sets the scheduling options for this instance. |
| | **automaticRestart** boolean | success | Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. |
| | **onHostMaintenance** string | success | Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. |
| | **preemptible** boolean | success | Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created. |
| **serviceAccounts** complex | success | A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. |
| | **email** string | success | Email address of the service account. |
| | **scopes** list / elements=string | success | The list of scopes to be made available for this service account. |
| **shieldedInstanceConfig** complex | success | Configuration for various parameters related to shielded instances. |
| | **enableIntegrityMonitoring** boolean | success | Defines whether the instance has integrity monitoring enabled. |
| | **enableSecureBoot** boolean | success | Defines whether the instance has Secure Boot enabled. |
| | **enableVtpm** boolean | success | Defines whether the instance has the vTPM enabled. |
| **status** string | success | The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, and TERMINATED. As a user, use RUNNING to keep a machine "on" and TERMINATED to turn a machine off . |
| **statusMessage** string | success | An optional, human-readable explanation of the status. |
| **tags** complex | success | A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. |
| | **fingerprint** string | success | Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
| | **items** list / elements=string | success | An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. |
| **zone** string | success | A reference to the zone where the machine resides. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_disk β Creates a GCP Disk google.cloud.gcp\_compute\_disk β Creates a GCP Disk
====================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_disk`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Persistent disks are durable storage devices that function similarly to the physical disks in a desktop or a server. Compute Engine manages the hardware behind these devices to ensure data redundancy and optimize performance for you. Persistent disks are available as either standard hard disk drives (HDD) or solid-state drives (SSD).
* Persistent disks are located independently from your virtual machine instances, so you can detach or move persistent disks to keep your data even after you delete your instances. Persistent disk performance scales automatically with size, so you can resize your existing persistent disks or add more persistent disks to an instance to meet your performance and storage space requirements.
* Add a persistent disk to your instance when you need reliable and affordable storage with consistent performance characteristics.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **disk\_encryption\_key** dictionary | | Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. |
| | **kms\_key\_name** string | | The name of the encryption key that is stored in Google Cloud KMS. Your project's Compute Engine System service account (`service-{{PROJECT\_NUMBER}}@compute-system.iam.gserviceaccount.com`) must have `roles/cloudkms.cryptoKeyEncrypterDecrypter` to use this feature. |
| | **kms\_key\_service\_account** string | | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **labels** dictionary | | Labels to apply to this disk. A list of key->value pairs. |
| **licenses** list / elements=string | | Any applicable publicly visible licenses. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **physical\_block\_size\_bytes** integer | | Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **size\_gb** integer | | Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. |
| **source\_image** string | | The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a private image that you created, specify the image name in the following format: global/images/my-private-image You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-private-family . |
| **source\_image\_encryption\_key** dictionary | | The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. |
| | **kms\_key\_name** string | | The name of the encryption key that is stored in Google Cloud KMS. |
| | **kms\_key\_service\_account** string | | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| **source\_snapshot** dictionary | | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. This field represents a link to a Snapshot resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_snapshot task and then set this source\_snapshot field to "{{ name-of-resource }}" |
| **source\_snapshot\_encryption\_key** dictionary | | The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. |
| | **kms\_key\_name** string | | The name of the encryption key that is stored in Google Cloud KMS. |
| | **kms\_key\_service\_account** string | | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **type** string | | URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. |
| **zone** string / required | | A reference to the zone where the disk resides. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/v1/disks>
* Adding a persistent disk: <https://cloud.google.com/compute/docs/disks/add-persistent-disk>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a disk
google.cloud.gcp_compute_disk:
name: test_object
size_gb: 50
disk_encryption_key:
raw_key: SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=
zone: us-central1-a
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **diskEncryptionKey** complex | success | Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. |
| | **kmsKeyName** string | success | The name of the encryption key that is stored in Google Cloud KMS. Your project's Compute Engine System service account (`service-{{PROJECT\_NUMBER}}@compute-system.iam.gserviceaccount.com`) must have `roles/cloudkms.cryptoKeyEncrypterDecrypter` to use this feature. |
| | **kmsKeyServiceAccount** string | success | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| **id** integer | success | The unique identifier for the resource. |
| **labelFingerprint** string | success | The fingerprint used for optimistic locking of this resource. Used internally during updates. |
| **labels** dictionary | success | Labels to apply to this disk. A list of key->value pairs. |
| **lastAttachTimestamp** string | success | Last attach timestamp in RFC3339 text format. |
| **lastDetachTimestamp** string | success | Last detach timestamp in RFC3339 text format. |
| **licenses** list / elements=string | success | Any applicable publicly visible licenses. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **physicalBlockSizeBytes** integer | success | Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. |
| **sizeGb** integer | success | Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. |
| **sourceImage** string | success | The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a private image that you created, specify the image name in the following format: global/images/my-private-image You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-private-family . |
| **sourceImageEncryptionKey** complex | success | The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. |
| | **kmsKeyName** string | success | The name of the encryption key that is stored in Google Cloud KMS. |
| | **kmsKeyServiceAccount** string | success | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| **sourceImageId** string | success | The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used. |
| **sourceSnapshot** dictionary | success | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. |
| **sourceSnapshotEncryptionKey** complex | success | The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. |
| | **kmsKeyName** string | success | The name of the encryption key that is stored in Google Cloud KMS. |
| | **kmsKeyServiceAccount** string | success | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| **sourceSnapshotId** string | success | The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used. |
| **type** string | success | URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. |
| **users** list / elements=string | success | Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance . |
| **zone** string | success | A reference to the zone where the disk resides. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_target_http_proxy_info β Gather info for GCP TargetHttpProxy google.cloud.gcp\_compute\_target\_http\_proxy\_info β Gather info for GCP TargetHttpProxy
==========================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_target_http_proxy_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP TargetHttpProxy
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a target HTTP proxy
gcp_compute_target_http_proxy_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **urlMap** dictionary | success | A reference to the UrlMap resource that defines the mapping from URL to the BackendService. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_storage_bucket β Creates a GCP Bucket google.cloud.gcp\_storage\_bucket β Creates a GCP Bucket
========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_storage_bucket`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* The Buckets resource represents a bucket in Google Cloud Storage. There is a single global namespace shared by all buckets. For more information, see Bucket Name Requirements.
* Buckets contain objects which can be accessed by their own methods. In addition to the acl property, buckets contain bucketAccessControls, for use in fine-grained manipulation of an existing bucketβs access controls.
* A bucket is always owned by the project team owners group.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **acl** list / elements=dictionary | | Access controls on the bucket. |
| | **bucket** dictionary / required | | The name of the bucket. This field represents a link to a Bucket resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_storage\_bucket task and then set this bucket field to "{{ name-of-resource }}" |
| | **entity** string / required | | The entity holding the permission, in one of the following forms: user-userId user-email group-groupId group-email domain-domain project-team-projectId allUsers allAuthenticatedUsers Examples: The user [email protected] would be [email protected]. The group [email protected] would be [email protected]. To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| | **entity\_id** string | | The ID for the entity. |
| | **project\_team** dictionary | | The project team associated with the entity. |
| | | **project\_number** string | | The project team associated with the entity. |
| | | **team** string | | The team. Some valid choices include: "editors", "owners", "viewers" |
| | **role** string | | The access permission for the entity. Some valid choices include: "OWNER", "READER", "WRITER" |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **cors** list / elements=dictionary | | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| | **max\_age\_seconds** integer | | The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. |
| | **method** list / elements=string | | The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "\*" is permitted in the list of methods, and means "any method". |
| | **origin** list / elements=string | | The list of Origins eligible to receive CORS response headers. Note: "\*" is permitted in the list of origins, and means "any Origin". |
| | **response\_header** list / elements=string | | The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. |
| **default\_event\_based\_hold** boolean | **Choices:*** no
* yes
| Whether or not to automatically apply an eventBasedHold to new objects added to the bucket. |
| **default\_object\_acl** list / elements=dictionary | | Default access controls to apply to new objects when no ACL is provided. |
| | **bucket** dictionary / required | | The name of the bucket. This field represents a link to a Bucket resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_storage\_bucket task and then set this bucket field to "{{ name-of-resource }}" |
| | **entity** string / required | | The entity holding the permission, in one of the following forms: \* user-{{userId}} \* user-{{email}} (such as "[email protected]") \* group-{{groupId}} \* group-{{email}} (such as "[email protected]") \* domain-{{domain}} (such as "domain-example.com") \* project-team-{{projectId}} \* allUsers \* allAuthenticatedUsers . |
| | **object** string | | The name of the object, if applied to an object. |
| | **role** string / required | | The access permission for the entity. Some valid choices include: "OWNER", "READER" |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **labels** dictionary | | Labels applied to this bucket. A list of key->value pairs. |
| **lifecycle** dictionary | | The bucket's lifecycle configuration. See <https://developers.google.com/storage/docs/lifecycle> for more information. |
| | **rule** list / elements=dictionary | | A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. |
| | | **action** dictionary | | The action to take. |
| | | | **storage\_class** string | | Target storage class. Required iff the type of the action is SetStorageClass. |
| | | | **type** string | | Type of the action. Currently, only Delete and SetStorageClass are supported. Some valid choices include: "Delete", "SetStorageClass" |
| | | **condition** dictionary | | The condition(s) under which the action will be taken. |
| | | | **age\_days** integer | | Age of an object (in days). This condition is satisfied when an object reaches the specified age. |
| | | | **created\_before** string | | A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. |
| | | | **is\_live** boolean | **Choices:*** no
* yes
| Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. |
| | | | **matches\_storage\_class** list / elements=string | | Objects having any of the storage classes specified by this condition will be matched. Values include MULTI\_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE\_REDUCED\_AVAILABILITY. |
| | | | **num\_newer\_versions** integer | | Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. |
| **location** string | | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. |
| **logging** dictionary | | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| | **log\_bucket** string | | The destination bucket where the current bucket's logs should be placed. |
| | **log\_object\_prefix** string | | A prefix for log object names. |
| **metageneration** integer | | The metadata generation of this bucket. |
| **name** string | | The name of the bucket. |
| **owner** dictionary | | The owner of the bucket. This is always the project team's owner group. |
| | **entity** string | | The entity, in the form project-owner-projectId. |
| **predefined\_default\_object\_acl** string | | Apply a predefined set of default object access controls to this bucket. Acceptable values are: - "authenticatedRead": Object owner gets OWNER access, and allAuthenticatedUsers get READER access. - "bucketOwnerFullControl": Object owner gets OWNER access, and project team owners get OWNER access. - "bucketOwnerRead": Object owner gets OWNER access, and project team owners get READER access. - "private": Object owner gets OWNER access. - "projectPrivate": Object owner gets OWNER access, and project team members get access according to their roles. - "publicRead": Object owner gets OWNER access, and allUsers get READER access. Some valid choices include: "authenticatedRead", "bucketOwnerFullControl", "bucketOwnerRead", "private", "projectPrivate", "publicRead" |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **storage\_class** string | | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. Some valid choices include: "MULTI\_REGIONAL", "REGIONAL", "STANDARD", "NEARLINE", "COLDLINE", "ARCHIVE", "DURABLE\_REDUCED\_AVAILABILITY" |
| **versioning** dictionary | | The bucket's versioning configuration. |
| | **enabled** boolean | **Choices:*** no
* yes
| While set to true, versioning is fully enabled for this bucket. |
| **website** dictionary | | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. |
| | **main\_page\_suffix** string | | If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. |
| | **not\_found\_page** string | | If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. |
Examples
--------
```
- name: create a bucket
google.cloud.gcp_storage_bucket:
name: ansible-storage-module
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **acl** complex | success | Access controls on the bucket. |
| | **bucket** dictionary | success | The name of the bucket. |
| | **domain** string | success | The domain associated with the entity. |
| | **email** string | success | The email address associated with the entity. |
| | **entity** string | success | The entity holding the permission, in one of the following forms: user-userId user-email group-groupId group-email domain-domain project-team-projectId allUsers allAuthenticatedUsers Examples: The user [email protected] would be [email protected]. The group [email protected] would be [email protected]. To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com. |
| | **entityId** string | success | The ID for the entity. |
| | **id** string | success | The ID of the access-control entry. |
| | **projectTeam** complex | success | The project team associated with the entity. |
| | | **projectNumber** string | success | The project team associated with the entity. |
| | | **team** string | success | The team. |
| | **role** string | success | The access permission for the entity. |
| **cors** complex | success | The bucket's Cross-Origin Resource Sharing (CORS) configuration. |
| | **maxAgeSeconds** integer | success | The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses. |
| | **method** list / elements=string | success | The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: "\*" is permitted in the list of methods, and means "any method". |
| | **origin** list / elements=string | success | The list of Origins eligible to receive CORS response headers. Note: "\*" is permitted in the list of origins, and means "any Origin". |
| | **responseHeader** list / elements=string | success | The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains. |
| **defaultEventBasedHold** boolean | success | Whether or not to automatically apply an eventBasedHold to new objects added to the bucket. |
| **defaultObjectAcl** complex | success | Default access controls to apply to new objects when no ACL is provided. |
| | **bucket** dictionary | success | The name of the bucket. |
| | **domain** string | success | The domain associated with the entity. |
| | **email** string | success | The email address associated with the entity. |
| | **entity** string | success | The entity holding the permission, in one of the following forms: \* user-{{userId}} \* user-{{email}} (such as "[email protected]") \* group-{{groupId}} \* group-{{email}} (such as "[email protected]") \* domain-{{domain}} (such as "domain-example.com") \* project-team-{{projectId}} \* allUsers \* allAuthenticatedUsers . |
| | **entityId** string | success | The ID for the entity. |
| | **generation** integer | success | The content generation of the object, if applied to an object. |
| | **id** string | success | The ID of the access-control entry. |
| | **object** string | success | The name of the object, if applied to an object. |
| | **projectTeam** complex | success | The project team associated with the entity. |
| | | **projectNumber** string | success | The project team associated with the entity. |
| | | **team** string | success | The team. |
| | **role** string | success | The access permission for the entity. |
| **id** string | success | The ID of the bucket. For buckets, the id and name properities are the same. |
| **labels** dictionary | success | Labels applied to this bucket. A list of key->value pairs. |
| **lifecycle** complex | success | The bucket's lifecycle configuration. See <https://developers.google.com/storage/docs/lifecycle> for more information. |
| | **rule** complex | success | A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken. |
| | | **action** complex | success | The action to take. |
| | | | **storageClass** string | success | Target storage class. Required iff the type of the action is SetStorageClass. |
| | | | **type** string | success | Type of the action. Currently, only Delete and SetStorageClass are supported. |
| | | **condition** complex | success | The condition(s) under which the action will be taken. |
| | | | **ageDays** integer | success | Age of an object (in days). This condition is satisfied when an object reaches the specified age. |
| | | | **createdBefore** string | success | A date in RFC 3339 format with only the date part (for instance, "2013-01-15"). This condition is satisfied when an object is created before midnight of the specified date in UTC. |
| | | | **isLive** boolean | success | Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects. |
| | | | **matchesStorageClass** list / elements=string | success | Objects having any of the storage classes specified by this condition will be matched. Values include MULTI\_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE\_REDUCED\_AVAILABILITY. |
| | | | **numNewerVersions** integer | success | Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object. |
| **location** string | success | The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list. |
| **logging** complex | success | The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs. |
| | **logBucket** string | success | The destination bucket where the current bucket's logs should be placed. |
| | **logObjectPrefix** string | success | A prefix for log object names. |
| **metageneration** integer | success | The metadata generation of this bucket. |
| **name** string | success | The name of the bucket. |
| **owner** complex | success | The owner of the bucket. This is always the project team's owner group. |
| | **entity** string | success | The entity, in the form project-owner-projectId. |
| | **entityId** string | success | The ID for the entity. |
| **predefinedDefaultObjectAcl** string | success | Apply a predefined set of default object access controls to this bucket. Acceptable values are: - "authenticatedRead": Object owner gets OWNER access, and allAuthenticatedUsers get READER access. - "bucketOwnerFullControl": Object owner gets OWNER access, and project team owners get OWNER access. - "bucketOwnerRead": Object owner gets OWNER access, and project team owners get READER access. - "private": Object owner gets OWNER access. - "projectPrivate": Object owner gets OWNER access, and project team members get access according to their roles. - "publicRead": Object owner gets OWNER access, and allUsers get READER access. |
| **project** string | success | A valid API project identifier. |
| **projectNumber** string | success | The project number of the project the bucket belongs to. |
| **storageClass** string | success | The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI\_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE\_REDUCED\_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes. |
| **timeCreated** string | success | The creation time of the bucket in RFC 3339 format. |
| **updated** string | success | The modification time of the bucket in RFC 3339 format. |
| **versioning** complex | success | The bucket's versioning configuration. |
| | **enabled** boolean | success | While set to true, versioning is fully enabled for this bucket. |
| **website** complex | success | The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information. |
| | **mainPageSuffix** string | success | If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages. |
| | **notFoundPage** string | success | If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_logging_metric β Creates a GCP Metric google.cloud.gcp\_logging\_metric β Creates a GCP Metric
========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_logging_metric`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Logs-based metric can also be used to extract values from logs and create a a distribution of the values. The distribution records the statistics of the extracted values along with an optional histogram of the values as specified by the bucket options.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **bucket\_options** dictionary | | The bucketOptions are required when the logs-based metric is using a DISTRIBUTION value type and it describes the bucket boundaries used to create a histogram of the extracted values. |
| | **explicit\_buckets** dictionary | | Specifies a set of buckets with arbitrary widths. |
| | | **bounds** list / elements=string / required | | The values must be monotonically increasing. |
| | **exponential\_buckets** dictionary | | Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket. |
| | | **growth\_factor** string | | Must be greater than 1. |
| | | **num\_finite\_buckets** integer | | Must be greater than 0. |
| | | **scale** string | | Must be greater than 0. |
| | **linear\_buckets** dictionary | | Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket. |
| | | **num\_finite\_buckets** integer | | Must be greater than 0. |
| | | **offset** string | | Lower bound of the first bucket. |
| | | **width** integer | | Must be greater than 0. |
| **description** string | | A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filter** string / required | | An advanced logs filter (<https://cloud.google.com/logging/docs/view/advanced-filters>) which is used to match log entries. |
| **label\_extractors** dictionary | | A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the valueExtractor field. |
| **metric\_descriptor** dictionary / required | | The metric descriptor associated with the logs-based metric. |
| | **display\_name** string | | A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example "Request count". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota. |
| | **labels** list / elements=dictionary | | The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response\_latencies metric type has a label for the HTTP response code, response\_code, so you can look at latencies for successful responses or just for responses that failed. |
| | | **description** string | | A human-readable description for the label. |
| | | **key** string / required | | The label key. |
| | | **value\_type** string | **Default:**"STRING" | The type of data that can be assigned to the label. Some valid choices include: "BOOL", "INT64", "STRING" |
| | **metric\_kind** string / required | | Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metricKind and valueType might not be supported. For counter metrics, set this to DELTA. Some valid choices include: "DELTA", "GAUGE", "CUMULATIVE" |
| | **unit** string | **Default:**"1" | The unit in which the metric value is reported. It is only applicable if the valueType is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The supported units are a subset of [The Unified Code for Units of Measure](<http://unitsofmeasure.org/ucum.html>) standard . |
| | **value\_type** string / required | | Whether the measurement is an integer, a floating-point number, etc. Some combinations of metricKind and valueType might not be supported. For counter metrics, set this to INT64. Some valid choices include: "BOOL", "INT64", "DOUBLE", "STRING", "DISTRIBUTION", "MONEY" |
| **name** string / required | | The client-assigned metric identifier. Examples - "error\_count", "nginx/requests". Metric identifiers are limited to 100 characters and can include only the following characters A-Z, a-z, 0-9, and the special characters \_-.,+!\*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **value\_extractor** string | | A valueExtractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction - EXTRACT(field) or REGEXP\_EXTRACT(field, regex). The argument are 1. field - The name of the log entry field from which the value is to be extracted. 2. regex - A regular expression using the Google RE2 syntax (<https://github.com/google/re2/wiki/Syntax>) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics/create>
* Official Documentation: <https://cloud.google.com/logging/docs/apis>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a metric
google.cloud.gcp_logging_metric:
name: test_object
filter: resource.type=gae_app AND severity>=ERROR
metric_descriptor:
metric_kind: DELTA
value_type: DISTRIBUTION
unit: '1'
labels:
- key: mass
value_type: STRING
description: amount of matter
value_extractor: EXTRACT(jsonPayload.request)
label_extractors:
mass: EXTRACT(jsonPayload.request)
bucket_options:
linear_buckets:
num_finite_buckets: 3
width: 1
offset: 1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **bucketOptions** complex | success | The bucketOptions are required when the logs-based metric is using a DISTRIBUTION value type and it describes the bucket boundaries used to create a histogram of the extracted values. |
| | **explicitBuckets** complex | success | Specifies a set of buckets with arbitrary widths. |
| | | **bounds** list / elements=string | success | The values must be monotonically increasing. |
| | **exponentialBuckets** complex | success | Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket. |
| | | **growthFactor** string | success | Must be greater than 1. |
| | | **numFiniteBuckets** integer | success | Must be greater than 0. |
| | | **scale** string | success | Must be greater than 0. |
| | **linearBuckets** complex | success | Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket. |
| | | **numFiniteBuckets** integer | success | Must be greater than 0. |
| | | **offset** string | success | Lower bound of the first bucket. |
| | | **width** integer | success | Must be greater than 0. |
| **description** string | success | A description of this metric, which is used in documentation. The maximum length of the description is 8000 characters. |
| **filter** string | success | An advanced logs filter (<https://cloud.google.com/logging/docs/view/advanced-filters>) which is used to match log entries. |
| **labelExtractors** dictionary | success | A map from a label key string to an extractor expression which is used to extract data from a log entry field and assign as the label value. Each label key specified in the LabelDescriptor must have an associated extractor expression in this map. The syntax of the extractor expression is the same as for the valueExtractor field. |
| **metricDescriptor** complex | success | The metric descriptor associated with the logs-based metric. |
| | **displayName** string | success | A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example "Request count". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota. |
| | **labels** complex | success | The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response\_latencies metric type has a label for the HTTP response code, response\_code, so you can look at latencies for successful responses or just for responses that failed. |
| | | **description** string | success | A human-readable description for the label. |
| | | **key** string | success | The label key. |
| | | **valueType** string | success | The type of data that can be assigned to the label. |
| | **metricKind** string | success | Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metricKind and valueType might not be supported. For counter metrics, set this to DELTA. |
| | **type** string | success | The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name `custom.googleapis.com` or `external.googleapis.com`. |
| | **unit** string | success | The unit in which the metric value is reported. It is only applicable if the valueType is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The supported units are a subset of [The Unified Code for Units of Measure](<http://unitsofmeasure.org/ucum.html>) standard . |
| | **valueType** string | success | Whether the measurement is an integer, a floating-point number, etc. Some combinations of metricKind and valueType might not be supported. For counter metrics, set this to INT64. |
| **name** string | success | The client-assigned metric identifier. Examples - "error\_count", "nginx/requests". Metric identifiers are limited to 100 characters and can include only the following characters A-Z, a-z, 0-9, and the special characters \_-.,+!\*',()%/. The forward-slash character (/) denotes a hierarchy of name pieces, and it cannot be the first character of the name. |
| **valueExtractor** string | success | A valueExtractor is required when using a distribution logs-based metric to extract the values to record from a log entry. Two functions are supported for value extraction - EXTRACT(field) or REGEXP\_EXTRACT(field, regex). The argument are 1. field - The name of the log entry field from which the value is to be extracted. 2. regex - A regular expression using the Google RE2 syntax (<https://github.com/google/re2/wiki/Syntax>) with a single capture group to extract data from the specified log entry field. The value of the field is converted to a string before applying the regex. It is an error to specify a regex that does not include exactly one capture group. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_cloudbuild_trigger β Creates a GCP Trigger google.cloud.gcp\_cloudbuild\_trigger β Creates a GCP Trigger
=============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_cloudbuild_trigger`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Configuration for an automated build in response to source repository changes.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **build** dictionary | | Contents of the build template. Either a filename or build template must be provided. |
| | **artifacts** dictionary | | Artifacts produced by the build that should be uploaded upon successful completion of all build steps. |
| | | **images** list / elements=string | | A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE. |
| | | **objects** dictionary | | A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. |
| | | | **location** string | | Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix. |
| | | | **paths** list / elements=string | | Path globs used to match files in the build's workspace. |
| | **images** list / elements=string | | A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE. |
| | **logs\_bucket** string | | Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logsBucket}/log-${build\_id}.txt. |
| | **options** dictionary | | Special options for this build. |
| | | **disk\_size\_gb** integer | | Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error. |
| | | **dynamic\_substitutions** boolean | **Choices:*** no
* yes
| Option to specify whether or not to apply bash style string operations to the substitutions. NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file. |
| | | **env** list / elements=string | | A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". |
| | | **log\_streaming\_option** string | | Option to define build log streaming behavior to Google Cloud Storage. Some valid choices include: "STREAM\_DEFAULT", "STREAM\_ON", "STREAM\_OFF" |
| | | **logging** string | | Option to specify the logging mode, which determines if and where build logs are stored. Some valid choices include: "LOGGING\_UNSPECIFIED", "LEGACY", "GCS\_ONLY", "STACKDRIVER\_ONLY", "NONE" |
| | | **machine\_type** string | | Compute Engine machine type on which to run the build. Some valid choices include: "UNSPECIFIED", "N1\_HIGHCPU\_8", "N1\_HIGHCPU\_32" |
| | | **requested\_verify\_option** string | | Requested verifiability options. Some valid choices include: "NOT\_VERIFIED", "VERIFIED" |
| | | **secret\_env** list / elements=string | | A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build. |
| | | **source\_provenance\_hash** list / elements=string | | Requested hash for SourceProvenance. |
| | | **substitution\_option** string | | Option to specify behavior when there is an error in the substitution checks. NOTE this is always set to ALLOW\_LOOSE for triggered builds and cannot be overridden in the build configuration file. Some valid choices include: "MUST\_MATCH", "ALLOW\_LOOSE" |
| | | **volumes** list / elements=dictionary | | Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration. |
| | | | **name** string | | Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. |
| | | | **path** string | | Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. |
| | | **worker\_pool** string | | Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool} This field is experimental. |
| | **queue\_ttl** string | | TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from createTime. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". |
| | **secrets** list / elements=dictionary | | Secrets to decrypt using Cloud Key Management Service. |
| | | **kms\_key\_name** string / required | | Cloud KMS key name to use to decrypt these envs. |
| | | **secret\_env** dictionary | | Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets. |
| | **source** dictionary | | The location of the source files to build. |
| | | **repo\_source** dictionary | | Location of the source in a Google Cloud Source Repository. |
| | | | **branch\_name** string | | Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at <https://github.com/google/re2/wiki/Syntax> . |
| | | | **commit\_sha** string | | Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided. |
| | | | **dir** string | | Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution. |
| | | | **invert\_regex** boolean | **Choices:*** no
* yes
| Only trigger a build if the revision regex does NOT match the revision regex. |
| | | | **project\_id** string | | ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. |
| | | | **repo\_name** string / required | | Name of the Cloud Source Repository. |
| | | | **substitutions** dictionary | | Substitutions to use in a triggered build. Should only be used with triggers.run . |
| | | | **tag\_name** string | | Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at <https://github.com/google/re2/wiki/Syntax> . |
| | | **storage\_source** dictionary | | Location of the source in an archive file in Google Cloud Storage. |
| | | | **bucket** string / required | | Google Cloud Storage bucket containing the source. |
| | | | **generation** string | | Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used . |
| | | | **object** string / required | | Google Cloud Storage object containing the source. This object must be a gzipped archive file (.tar.gz) containing source to build. |
| | **steps** list / elements=dictionary / required | | The operations to be performed on the workspace. |
| | | **args** list / elements=string | | A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the args are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments. |
| | | **dir** string | | Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution. |
| | | **entrypoint** string | | Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used . |
| | | **env** list / elements=string | | A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". |
| | | **id** string | | Unique identifier for this build step, used in `wait\_for` to reference this build step as a dependency. |
| | | **name** string / required | | The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps (see <https://github.com/GoogleCloudPlatform/cloud-builders> for images and examples). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step. |
| | | **secret\_env** list / elements=string | | A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. |
| | | **timeout** string | | Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out. |
| | | **timing** string | | Output only. Stores timing information for executing this build step. |
| | | **volumes** list / elements=dictionary | | List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. |
| | | | **name** string / required | | Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. |
| | | | **path** string / required | | Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. |
| | | **wait\_for** list / elements=string | | The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait\_for` have completed successfully. If `wait\_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully. |
| | **substitutions** dictionary | | Substitutions data for Build resource. |
| | **tags** list / elements=string | | Tags for annotation of a Build. These are not docker tags. |
| | **timeout** string | **Default:**"600s" | Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. This timeout must be equal to or greater than the sum of the timeouts for build steps within the build. The expected format is the number of seconds followed by s. Default time is ten minutes (600s). |
| **description** string | | Human-readable description of the trigger. |
| **disabled** boolean | **Choices:*** no
* yes
| Whether the trigger is disabled or not. If true, the trigger will never result in a build. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filename** string | | Path, from the source root, to a file whose contents is used for the template. Either a filename or build template must be provided. |
| **github** dictionary | | Describes the configuration of a trigger that creates a build whenever a GitHub event is received. |
| | **name** string | | Name of the repository. For example: The name for <https://github.com/googlecloudplatform/cloud-builders> is "cloud-builders". |
| | **owner** string | | Owner of the repository. For example: The owner for <https://github.com/googlecloudplatform/cloud-builders> is "googlecloudplatform". |
| | **pull\_request** dictionary | | filter to match changes in pull requests. Specify only one of pullRequest or push. |
| | | **branch** string / required | | Regex of branches to match. |
| | | **comment\_control** string | | Whether to block builds on a "/gcbrun" comment from a repository owner or collaborator. Some valid choices include: "COMMENTS\_DISABLED", "COMMENTS\_ENABLED", "COMMENTS\_ENABLED\_FOR\_EXTERNAL\_CONTRIBUTORS\_ONLY" |
| | | **invert\_regex** boolean | **Choices:*** no
* yes
| If true, branches that do NOT match the git\_ref will trigger a build. |
| | **push** dictionary | | filter to match changes in refs, like branches or tags. Specify only one of pullRequest or push. |
| | | **branch** string | | Regex of branches to match. Specify only one of branch or tag. |
| | | **invert\_regex** boolean | **Choices:*** no
* yes
| When true, only trigger a build if the revision regex does NOT match the git\_ref regex. |
| | | **tag** string | | Regex of tags to match. Specify only one of branch or tag. |
| **id** string | | The unique identifier for the trigger. |
| **ignored\_files** list / elements=string | | ignoredFiles and includedFiles are file glob matches using <https://golang.org/pkg/path/filepath/#Match> extended with support for `\*\*`. If ignoredFiles and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignoredFiles is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. |
| **included\_files** list / elements=string | | ignoredFiles and includedFiles are file glob matches using <https://golang.org/pkg/path/filepath/#Match> extended with support for `\*\*`. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is not empty, then we make sure that at least one of those files matches a includedFiles glob. If not, then we do not trigger a build. |
| **name** string | | Name of the trigger. Must be unique within the project. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **substitutions** dictionary | | Substitutions data for Build resource. |
| **tags** list / elements=string | | Tags for annotation of a BuildTrigger . |
| **trigger\_template** dictionary | | Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. |
| | **branch\_name** string | | Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided. This field is a regular expression. |
| | **commit\_sha** string | | Explicit commit SHA to build. Exactly one of a branch name, tag, or commit SHA must be provided. |
| | **dir** string | | Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution. |
| | **invert\_regex** boolean | **Choices:*** no
* yes
| Only trigger a build if the revision regex does NOT match the revision regex. |
| | **project\_id** string | | ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. |
| | **repo\_name** string | **Default:**"default" | Name of the Cloud Source Repository. If omitted, the name "default" is assumed. |
| | **tag\_name** string | | Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided. This field is a regular expression. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/cloud-build/docs/api/reference/rest/v1/projects.triggers>
* Automating builds using build triggers: <https://cloud.google.com/cloud-build/docs/running-builds/automate-builds>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
* The id for this resource is created by the API after you create the resource the first time. If you want to manage this resource after creation, youβll have to copy the generated id into the playbook. If you do not, new triggers will be created on subsequent runs.
Examples
--------
```
- name: create a repository
google.cloud.gcp_sourcerepo_repository:
name: projects/{{ gcp_project }}/repos/{{ resource_name }}
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
- name: create a trigger
google.cloud.gcp_cloudbuild_trigger:
trigger_template:
branch_name: master
project_id: test_project
repo_name: test_object
filename: cloudbuild.yaml
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **build** complex | success | Contents of the build template. Either a filename or build template must be provided. |
| | **artifacts** complex | success | Artifacts produced by the build that should be uploaded upon successful completion of all build steps. |
| | | **images** list / elements=string | success | A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE. |
| | | **objects** complex | success | A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. |
| | | | **location** string | success | Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix. |
| | | | **paths** list / elements=string | success | Path globs used to match files in the build's workspace. |
| | | | **timing** complex | success | Output only. Stores timing information for pushing all artifact objects. |
| | | | | **endTime** string | success | End of time span. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". |
| | | | | **startTime** string | success | Start of time span. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". |
| | **images** list / elements=string | success | A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE. |
| | **logsBucket** string | success | Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logsBucket}/log-${build\_id}.txt. |
| | **options** complex | success | Special options for this build. |
| | | **diskSizeGb** integer | success | Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error. |
| | | **dynamicSubstitutions** boolean | success | Option to specify whether or not to apply bash style string operations to the substitutions. NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file. |
| | | **env** list / elements=string | success | A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". |
| | | **logging** string | success | Option to specify the logging mode, which determines if and where build logs are stored. |
| | | **logStreamingOption** string | success | Option to define build log streaming behavior to Google Cloud Storage. |
| | | **machineType** string | success | Compute Engine machine type on which to run the build. |
| | | **requestedVerifyOption** string | success | Requested verifiability options. |
| | | **secretEnv** list / elements=string | success | A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build. |
| | | **sourceProvenanceHash** list / elements=string | success | Requested hash for SourceProvenance. |
| | | **substitutionOption** string | success | Option to specify behavior when there is an error in the substitution checks. NOTE this is always set to ALLOW\_LOOSE for triggered builds and cannot be overridden in the build configuration file. |
| | | **volumes** complex | success | Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration. |
| | | | **name** string | success | Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. |
| | | | **path** string | success | Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. |
| | | **workerPool** string | success | Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool} This field is experimental. |
| | **queueTtl** string | success | TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from createTime. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". |
| | **secrets** complex | success | Secrets to decrypt using Cloud Key Management Service. |
| | | **kmsKeyName** string | success | Cloud KMS key name to use to decrypt these envs. |
| | | **secretEnv** dictionary | success | Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets. |
| | **source** complex | success | The location of the source files to build. |
| | | **repoSource** complex | success | Location of the source in a Google Cloud Source Repository. |
| | | | **branchName** string | success | Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at <https://github.com/google/re2/wiki/Syntax> . |
| | | | **commitSha** string | success | Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided. |
| | | | **dir** string | success | Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution. |
| | | | **invertRegex** boolean | success | Only trigger a build if the revision regex does NOT match the revision regex. |
| | | | **projectId** string | success | ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. |
| | | | **repoName** string | success | Name of the Cloud Source Repository. |
| | | | **substitutions** dictionary | success | Substitutions to use in a triggered build. Should only be used with triggers.run . |
| | | | **tagName** string | success | Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at <https://github.com/google/re2/wiki/Syntax> . |
| | | **storageSource** complex | success | Location of the source in an archive file in Google Cloud Storage. |
| | | | **bucket** string | success | Google Cloud Storage bucket containing the source. |
| | | | **generation** string | success | Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used . |
| | | | **object** string | success | Google Cloud Storage object containing the source. This object must be a gzipped archive file (.tar.gz) containing source to build. |
| | **steps** complex | success | The operations to be performed on the workspace. |
| | | **args** list / elements=string | success | A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the args are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments. |
| | | **dir** string | success | Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution. |
| | | **entrypoint** string | success | Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used . |
| | | **env** list / elements=string | success | A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". |
| | | **id** string | success | Unique identifier for this build step, used in `wait\_for` to reference this build step as a dependency. |
| | | **name** string | success | The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps (see <https://github.com/GoogleCloudPlatform/cloud-builders> for images and examples). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step. |
| | | **secretEnv** list / elements=string | success | A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. |
| | | **timeout** string | success | Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out. |
| | | **timing** string | success | Output only. Stores timing information for executing this build step. |
| | | **volumes** complex | success | List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. |
| | | | **name** string | success | Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. |
| | | | **path** string | success | Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. |
| | | **waitFor** list / elements=string | success | The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait\_for` have completed successfully. If `wait\_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully. |
| | **substitutions** dictionary | success | Substitutions data for Build resource. |
| | **tags** list / elements=string | success | Tags for annotation of a Build. These are not docker tags. |
| | **timeout** string | success | Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. This timeout must be equal to or greater than the sum of the timeouts for build steps within the build. The expected format is the number of seconds followed by s. Default time is ten minutes (600s). |
| **createTime** string | success | Time when the trigger was created. |
| **description** string | success | Human-readable description of the trigger. |
| **disabled** boolean | success | Whether the trigger is disabled or not. If true, the trigger will never result in a build. |
| **filename** string | success | Path, from the source root, to a file whose contents is used for the template. Either a filename or build template must be provided. |
| **github** complex | success | Describes the configuration of a trigger that creates a build whenever a GitHub event is received. |
| | **name** string | success | Name of the repository. For example: The name for <https://github.com/googlecloudplatform/cloud-builders> is "cloud-builders". |
| | **owner** string | success | Owner of the repository. For example: The owner for <https://github.com/googlecloudplatform/cloud-builders> is "googlecloudplatform". |
| | **pullRequest** complex | success | filter to match changes in pull requests. Specify only one of pullRequest or push. |
| | | **branch** string | success | Regex of branches to match. |
| | | **commentControl** string | success | Whether to block builds on a "/gcbrun" comment from a repository owner or collaborator. |
| | | **invertRegex** boolean | success | If true, branches that do NOT match the git\_ref will trigger a build. |
| | **push** complex | success | filter to match changes in refs, like branches or tags. Specify only one of pullRequest or push. |
| | | **branch** string | success | Regex of branches to match. Specify only one of branch or tag. |
| | | **invertRegex** boolean | success | When true, only trigger a build if the revision regex does NOT match the git\_ref regex. |
| | | **tag** string | success | Regex of tags to match. Specify only one of branch or tag. |
| **id** string | success | The unique identifier for the trigger. |
| **ignoredFiles** list / elements=string | success | ignoredFiles and includedFiles are file glob matches using <https://golang.org/pkg/path/filepath/#Match> extended with support for `\*\*`. If ignoredFiles and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignoredFiles is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. |
| **includedFiles** list / elements=string | success | ignoredFiles and includedFiles are file glob matches using <https://golang.org/pkg/path/filepath/#Match> extended with support for `\*\*`. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is not empty, then we make sure that at least one of those files matches a includedFiles glob. If not, then we do not trigger a build. |
| **name** string | success | Name of the trigger. Must be unique within the project. |
| **substitutions** dictionary | success | Substitutions data for Build resource. |
| **tags** list / elements=string | success | Tags for annotation of a BuildTrigger . |
| **triggerTemplate** complex | success | Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. |
| | **branchName** string | success | Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided. This field is a regular expression. |
| | **commitSha** string | success | Explicit commit SHA to build. Exactly one of a branch name, tag, or commit SHA must be provided. |
| | **dir** string | success | Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution. |
| | **invertRegex** boolean | success | Only trigger a build if the revision regex does NOT match the revision regex. |
| | **projectId** string | success | ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. |
| | **repoName** string | success | Name of the Cloud Source Repository. If omitted, the name "default" is assumed. |
| | **tagName** string | success | Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided. This field is a regular expression. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_sql_user_info β Gather info for GCP User google.cloud.gcp\_sql\_user\_info β Gather info for GCP User
============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_sql_user_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP User
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **instance** dictionary / required | | The name of the Cloud SQL instance. This does not include the project ID. This field represents a link to a Instance resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_sql\_instance task and then set this instance field to "{{ name-of-resource }}" |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a user
gcp_sql_user_info:
instance: "{{ instance }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **host** string | success | The host name from which the user can connect. For insert operations, host defaults to an empty string. For update operations, host is specified as part of the request URL. The host name cannot be updated after insertion. |
| | **instance** dictionary | success | The name of the Cloud SQL instance. This does not include the project ID. |
| | **name** string | success | The name of the user in the Cloud SQL instance. |
| | **password** string | success | The password for the user. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_vpn_tunnel_info β Gather info for GCP VpnTunnel google.cloud.gcp\_compute\_vpn\_tunnel\_info β Gather info for GCP VpnTunnel
============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_vpn_tunnel_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP VpnTunnel
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The region where the tunnel is located. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a vpn tunnel
gcp_compute_vpn_tunnel_info:
region: us-west1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** string | success | The unique identifier for the resource. This identifier is defined by the server. |
| | **ikeVersion** integer | success | IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2. |
| | **localTrafficSelector** list / elements=string | success | Local traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example `192.168.0.0/16`. The ranges should be disjoint. Only IPv4 is supported. |
| | **name** string | success | Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **peerExternalGateway** dictionary | success | URL of the peer side external VPN gateway to which this VPN tunnel is connected. |
| | **peerExternalGatewayInterface** integer | success | The interface ID of the external VPN gateway to which this VPN tunnel is connected. |
| | **peerGcpGateway** dictionary | success | URL of the peer side HA GCP VPN gateway to which this VPN tunnel is connected. If provided, the VPN tunnel will automatically use the same vpn\_gateway\_interface ID in the peer GCP VPN gateway. |
| | **peerIp** string | success | IP address of the peer VPN gateway. Only IPv4 is supported. |
| | **region** string | success | The region where the tunnel is located. |
| | **remoteTrafficSelector** list / elements=string | success | Remote traffic selector to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example `192.168.0.0/16`. The ranges should be disjoint. Only IPv4 is supported. |
| | **router** dictionary | success | URL of router resource to be used for dynamic routing. |
| | **sharedSecret** string | success | Shared secret used to set the secure session between the Cloud VPN gateway and the peer VPN gateway. |
| | **sharedSecretHash** string | success | Hash of the shared secret. |
| | **targetVpnGateway** dictionary | success | URL of the Target VPN gateway with which this VPN tunnel is associated. |
| | **vpnGateway** dictionary | success | URL of the VPN gateway with which this VPN tunnel is associated. This must be used if a High Availability VPN gateway resource is created. |
| | **vpnGatewayInterface** integer | success | The interface ID of the VPN gateway with which this VPN tunnel is associated. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_storage_object β Creates a GCP Object google.cloud.gcp\_storage\_object β Creates a GCP Object
========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_storage_object`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Upload or download a file from a GCS bucket.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
* google-cloud-storage >= 1.2..0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | **Choices:*** download
* upload
* delete
| The actions to be taken on this object. You can download the object, upload the object, or delete it. |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **bucket** string | | The name of the bucket. |
| **dest** path | | Destination location of file (may be local machine or cloud depending on action). Cloud location need to be urlencoded including slashes. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **src** path | | Source location of file (may be local machine or cloud depending on action). Cloud locations need to be urlencoded including slashes. |
Examples
--------
```
- name: create a object
google.cloud.gcp_storage_object:
action: download
bucket: ansible-bucket
src: modules.zip
dest: "~/modules.zip"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **bucket** string | download, upload | The bucket where the object is contained. |
| **cache\_control** string | download, upload | HTTP 'Cache-Control' header for this object |
| **chunk\_size** string | download, upload | Get the blob's default chunk size |
| **media\_link** string | download, upload | The link for the media |
| **self\_link** string | download, upload | The self\_link for the media. |
| **storage\_class** string | download, upload | The storage class for the object. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_target_https_proxy β Creates a GCP TargetHttpsProxy google.cloud.gcp\_compute\_target\_https\_proxy β Creates a GCP TargetHttpsProxy
================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_target_https_proxy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a TargetHttpsProxy resource, which is used by one or more global forwarding rule to route incoming HTTPS requests to a URL map.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **quic\_override** string | | Specifies the QUIC override policy for this resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE. Some valid choices include: "NONE", "ENABLE", "DISABLE" |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **ssl\_certificates** list / elements=dictionary / required | | A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. |
| **ssl\_policy** dictionary | | A reference to the SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured. This field represents a link to a SslPolicy resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_ssl\_policy task and then set this ssl\_policy field to "{{ name-of-resource }}" |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **url\_map** dictionary / required | | A reference to the UrlMap resource that defines the mapping from URL to the BackendService. This field represents a link to a UrlMap resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_url\_map task and then set this url\_map field to "{{ name-of-resource }}" |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/v1/targetHttpsProxies>
* Official Documentation: <https://cloud.google.com/compute/docs/load-balancing/http/target-proxies>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a instance group
google.cloud.gcp_compute_instance_group:
name: instancegroup-targethttpsproxy
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: instancegroup
- name: create a HTTP health check
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-targethttpsproxy
healthy_threshold: 10
port: 8080
timeout_sec: 2
unhealthy_threshold: 5
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: healthcheck
- name: create a backend service
google.cloud.gcp_compute_backend_service:
name: backendservice-targethttpsproxy
backends:
- group: "{{ instancegroup.selfLink }}"
health_checks:
- "{{ healthcheck.selfLink }}"
enable_cdn: 'true'
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: backendservice
- name: create a URL map
google.cloud.gcp_compute_url_map:
name: urlmap-targethttpsproxy
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: urlmap
- name: create a SSL certificate
google.cloud.gcp_compute_ssl_certificate:
name: sslcert-targethttpsproxy
description: A certificate for testing. Do not use this certificate in production
certificate: |-
-----BEGIN CERTIFICATE-----
MIICqjCCAk+gAwIBAgIJAIuJ+0352Kq4MAoGCCqGSM49BAMCMIGwMQswCQYDVQQG
EwJVUzETMBEGA1UECAwKV2FzaGluZ3RvbjERMA8GA1UEBwwIS2lya2xhbmQxFTAT
BgNVBAoMDEdvb2dsZSwgSW5jLjEeMBwGA1UECwwVR29vZ2xlIENsb3VkIFBsYXRm
b3JtMR8wHQYDVQQDDBZ3d3cubXktc2VjdXJlLXNpdGUuY29tMSEwHwYJKoZIhvcN
AQkBFhJuZWxzb25hQGdvb2dsZS5jb20wHhcNMTcwNjI4MDQ1NjI2WhcNMjcwNjI2
MDQ1NjI2WjCBsDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCldhc2hpbmd0b24xETAP
BgNVBAcMCEtpcmtsYW5kMRUwEwYDVQQKDAxHb29nbGUsIEluYy4xHjAcBgNVBAsM
FUdvb2dsZSBDbG91ZCBQbGF0Zm9ybTEfMB0GA1UEAwwWd3d3Lm15LXNlY3VyZS1z
aXRlLmNvbTEhMB8GCSqGSIb3DQEJARYSbmVsc29uYUBnb29nbGUuY29tMFkwEwYH
KoZIzj0CAQYIKoZIzj0DAQcDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ
4mzkzTv0dXyB750fOGN02HtkpBOZzzvUARTR10JQoSe2/5PIwaNQME4wHQYDVR0O
BBYEFKIQC3A2SDpxcdfn0YLKineDNq/BMB8GA1UdIwQYMBaAFKIQC3A2SDpxcdfn
0YLKineDNq/BMAwGA1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSQAwRgIhALs4vy+O
M3jcqgA4fSW/oKw6UJxp+M6a+nGMX+UJR3YgAiEAvvl39QRVAiv84hdoCuyON0lJ
zqGNhIPGq2ULqXKK8BY=
-----END CERTIFICATE-----
private_key: |-
-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIObtRo8tkUqoMjeHhsOh2ouPpXCgBcP+EDxZCB/tws15oAoGCCqGSM49
AwEHoUQDQgAEHGzpcRJ4XzfBJCCPMQeXQpTXwlblimODQCuQ4mzkzTv0dXyB750f
OGN02HtkpBOZzzvUARTR10JQoSe2/5PIwQ==
-----END EC PRIVATE KEY-----
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: sslcert
- name: create a target HTTPS proxy
google.cloud.gcp_compute_target_https_proxy:
name: test_object
ssl_certificates:
- "{{ sslcert }}"
url_map: "{{ urlmap }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **id** integer | success | The unique identifier for the resource. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **quicOverride** string | success | Specifies the QUIC override policy for this resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE. |
| **sslCertificates** list / elements=string | success | A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. |
| **sslPolicy** dictionary | success | A reference to the SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured. |
| **urlMap** dictionary | success | A reference to the UrlMap resource that defines the mapping from URL to the BackendService. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_container_cluster β Creates a GCP Cluster google.cloud.gcp\_container\_cluster β Creates a GCP Cluster
============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_container_cluster`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A Google Container Engine cluster.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **addons\_config** dictionary | | Configurations for the various addons available to run in the cluster. |
| | **horizontal\_pod\_autoscaling** dictionary | | Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. |
| | | **disabled** boolean | **Choices:*** no
* yes
| Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. When enabled, it ensures that a Heapster pod is running in the cluster, which is also used by the Cloud Monitoring service. |
| | **http\_load\_balancing** dictionary | | Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. |
| | | **disabled** boolean | **Choices:*** no
* yes
| Whether the HTTP Load Balancing controller is enabled in the cluster. When enabled, it runs a small pod in the cluster that manages the load balancers. |
| | **network\_policy\_config** dictionary | | Configuration for NetworkPolicy. This only tracks whether the addon is enabled or not on the Master, it does not track whether network policy is enabled for the nodes. |
| | | **disabled** boolean | **Choices:*** no
* yes
| Whether NetworkPolicy is enabled for this cluster. |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **binary\_authorization** dictionary | | Configuration for the BinaryAuthorization feature. |
| | **enabled** boolean | **Choices:*** no
* yes
| If enabled, all container images will be validated by Binary Authorization. |
| **cluster\_ipv4\_cidr** string | | The IP address range of the container pods in this cluster, in CIDR notation (e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8. |
| **database\_encryption** dictionary | | Configuration of etcd encryption. |
| | **key\_name** string | | Name of CloudKMS key to use for the encryption of secrets in etcd. Ex. `projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key` . |
| | **state** string | | Denotes the state of etcd encryption. Some valid choices include: "ENCRYPTED", "DECRYPTED" |
| **default\_max\_pods\_constraint** dictionary | | The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. |
| | **max\_pods\_per\_node** string | | Constraint enforced on the max num of pods per node. |
| **description** string | | An optional description of this cluster. |
| **enable\_kubernetes\_alpha** boolean | **Choices:*** no
* yes
| Kubernetes alpha features are enabled on this cluster. This includes alpha API groups (e.g. v1alpha1) and features that may not be production ready in the kubernetes version of the master and nodes. |
| **enable\_tpu** boolean | **Choices:*** no
* yes
| (Optional) Whether to enable Cloud TPU resources in this cluster. See the official documentation - <https://cloud.google.com/tpu/docs/kubernetes-engine-setup> . |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **initial\_cluster\_version** string | | The software version of the master endpoint and kubelets used in the cluster when it was first created. The version can be upgraded over time. |
| **initial\_node\_count** integer | | The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "nodeConfig") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. This field has been deprecated. Please use nodePool.initial\_node\_count instead. |
| **ip\_allocation\_policy** dictionary | | Configuration for controlling how IPs are allocated in the cluster. |
| | **cluster\_ipv4\_cidr\_block** string | | The IP address range for the cluster pod IPs. If this field is set, then cluster.cluster\_ipv4\_cidr must be left blank. This field is only applicable when useIpAliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | **cluster\_secondary\_range\_name** string | | The name of the secondary range to be used for the cluster CIDR block. The secondary range will be used for pod IP addresses. This must be an existing secondary range associated with the cluster subnetwork . |
| | **create\_subnetwork** boolean | **Choices:*** no
* yes
| Whether a new subnetwork will be created automatically for the cluster. |
| | **node\_ipv4\_cidr\_block** string | | The IP address range of the instance IPs in this cluster. This is applicable only if createSubnetwork is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | **services\_ipv4\_cidr\_block** string | | The IP address range of the services IPs in this cluster. If blank, a range will be automatically chosen with the default size. This field is only applicable when useIpAliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | **services\_secondary\_range\_name** string | | The name of the secondary range to be used as for the services CIDR block. The secondary range will be used for service ClusterIPs. This must be an existing secondary range associated with the cluster subnetwork. |
| | **subnetwork\_name** string | | A custom subnetwork name to be used if createSubnetwork is true. If this field is empty, then an automatic name will be chosen for the new subnetwork. |
| | **tpu\_ipv4\_cidr\_block** string | | The IP address range of the Cloud TPUs in this cluster. If unspecified, a range will be automatically chosen with the default size. This field is only applicable when useIpAliases is true. If unspecified, the range will use the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | **use\_ip\_aliases** boolean | **Choices:*** no
* yes
| Whether alias IPs will be used for pod IPs in the cluster. |
| **kubectl\_context** string | | The name of the context for the kubectl config file. Will default to the cluster name. |
| **kubectl\_path** string | | The path that the kubectl config file will be written to. The file will not be created if this path is unset. Any existing file at this path will be completely overwritten. This requires the PyYaml library. |
| **legacy\_abac** dictionary | | Configuration for the legacy ABAC authorization mode. |
| | **enabled** boolean | **Choices:*** no
* yes
| Whether the ABAC authorizer is enabled for this cluster. When enabled, identities in the system, including service accounts, nodes, and controllers, will have statically granted permissions beyond those provided by the RBAC configuration or IAM. |
| **location** string / required | | The location where the cluster is deployed.
aliases: zone |
| **locations** list / elements=string | | The list of Google Compute Engine zones in which the cluster's nodes should be located.
aliases: nodeLocations |
| **logging\_service** string | | The logging service the cluster should use to write logs. Currently available options: logging.googleapis.com - the Google Cloud Logging service. none - no logs will be exported from the cluster. if left as an empty string,logging.googleapis.com will be used. Some valid choices include: "logging.googleapis.com", "none" |
| **master\_auth** dictionary | | The authentication information for accessing the master endpoint. |
| | **client\_certificate\_config** dictionary | | Configuration for client certificate authentication on the cluster. For clusters before v1.12, if no configuration is specified, a client certificate is issued. |
| | | **issue\_client\_certificate** boolean | **Choices:*** no
* yes
| Issue a client certificate. |
| | **password** string | | The password to use for HTTP basic authentication to the master endpoint. Because the master endpoint is open to the Internet, you should create a strong password with a minimum of 16 characters. |
| | **username** string | | The username to use for HTTP basic authentication to the master endpoint. |
| **master\_authorized\_networks\_config** dictionary | | Configuration for controlling how IPs are allocated in the cluster. |
| | **cidr\_blocks** list / elements=dictionary | | Define up to 50 external networks that could access Kubernetes master through HTTPS. |
| | | **cidr\_block** string | | Block specified in CIDR notation. |
| | | **display\_name** string | | Optional field used to identify cidr blocks. |
| | **enabled** boolean | **Choices:*** no
* yes
| Whether or not master authorized networks is enabled. |
| **monitoring\_service** string | | The monitoring service the cluster should use to write metrics. Currently available options: monitoring.googleapis.com - the Google Cloud Monitoring service. none - no metrics will be exported from the cluster. if left as an empty string, monitoring.googleapis.com will be used. Some valid choices include: "monitoring.googleapis.com", "none" |
| **name** string | | The name of this cluster. The name must be unique within this project and location, and can be up to 40 characters. Must be Lowercase letters, numbers, and hyphens only. Must start with a letter. Must end with a number or a letter. |
| **network** string | | The name of the Google Compute Engine network to which the cluster is connected. If left unspecified, the default network will be used. |
| **network\_config** dictionary | | Network configurations . |
| | **default\_snat\_status** boolean | **Choices:*** no
* yes
| Whether the cluster disables default in-node sNAT rules. In-node sNAT rules will be disabled when defaultSnatStatus is disabled. |
| | **enable\_intra\_node\_visibility** boolean | **Choices:*** no
* yes
| Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network. |
| **network\_policy** dictionary | | Configuration options for the NetworkPolicy feature. |
| | **enabled** boolean | **Choices:*** no
* yes
| Whether network policy is enabled on the cluster. |
| | **provider** string | | The selected network policy provider. Some valid choices include: "PROVIDER\_UNSPECIFIED", "CALICO" |
| **node\_config** dictionary | | Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "initialNodeCount") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. For responses, this field will be populated with the node configuration of the first node pool. If unspecified, the defaults are used. |
| | **accelerators** list / elements=dictionary | | A list of hardware accelerators to be attached to each node. See <https://cloud.google.com/compute/docs/gpus> for more information about support for GPUs. |
| | | **accelerator\_count** string | | The number of accelerator cards exposed to an instance. |
| | | **accelerator\_type** string | | The accelerator type resource name. |
| | **disk\_size\_gb** integer | | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB. |
| | **disk\_type** string | | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') If unspecified, the default disk type is 'pd-standard' . |
| | **image\_type** string | | The image type to use for this node. Note that for a given image type, the latest version of it will be used. |
| | **labels** dictionary | | The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that Kubernetes may apply to the node. In case of conflict in label keys, the applied set may differ depending on the Kubernetes version -- it's best to assume the behavior is undefined and conflicts should be avoided. For more information, including usage and the valid values, see: <http://kubernetes.io/v1.1/docs/user-guide/labels.html> An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| | **local\_ssd\_count** integer | | The number of local SSD disks to be attached to the node. The limit for this value is dependant upon the maximum number of disks available on a machine per zone. See: <https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits> for more information. |
| | **machine\_type** string | | The name of a Google Compute Engine machine type (e.g. n1-standard-1). If unspecified, the default machine type is n1-standard-1. |
| | **metadata** dictionary | | The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-\_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| | **min\_cpu\_platform** string | | Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform. |
| | **oauth\_scopes** list / elements=string | | The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: <https://www.googleapis.com/auth/compute> is required for mounting persistent storage on your nodes.
<https://www.googleapis.com/auth/devstorage.read_only> is required for communicating with gcr.io (the Google Container Registry). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added. |
| | **preemptible** boolean | **Choices:*** no
* yes
| Whether the nodes are created as preemptible VM instances. See: <https://cloud.google.com/compute/docs/instances/preemptible> for more information about preemptible VM instances. |
| | **service\_account** string | | The Google Cloud Platform Service Account to be used by the node VMs. If no Service Account is specified, the "default" service account is used. |
| | **shielded\_instance\_config** dictionary | | Shielded Instance options. |
| | | **enable\_integrity\_monitoring** boolean | **Choices:*** no
* yes
| Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. |
| | | **enable\_secure\_boot** boolean | **Choices:*** no
* yes
| Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. |
| | **tags** list / elements=string | | The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035. |
| | **taints** list / elements=dictionary | | List of kubernetes taints to be applied to each node. For more information, including usage and the valid values, see: <https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/> . |
| | | **effect** string | | Effect for taint. Some valid choices include: "EFFECT\_UNSPECIFIED", "NO\_SCHEDULE", "PREFER\_NO\_SCHEDULE", "NO\_EXECUTE" |
| | | **key** string | | Key for taint. |
| | | **value** string | | Value for taint. |
| **private\_cluster\_config** dictionary | | Configuration for a private cluster. |
| | **enable\_private\_endpoint** boolean | **Choices:*** no
* yes
| Whether the master's internal IP address is used as the cluster endpoint. |
| | **enable\_private\_nodes** boolean | **Choices:*** no
* yes
| Whether nodes have internal IP addresses only. If enabled, all nodes are given only RFC 1918 private addresses and communicate with the master via private networking. |
| | **master\_ipv4\_cidr\_block** string | | The IP range in CIDR notation to use for the hosted master network. This range will be used for assigning internal IP addresses to the master or set of masters, as well as the ILB VIP. This range must not overlap with any other ranges in use within the cluster's network. |
| **project** string | | The Google Cloud Platform project to use. |
| **release\_channel** dictionary | | ReleaseChannel indicates which release channel a cluster is subscribed to. Release channels are arranged in order of risk and frequency of updates. |
| | **channel** string | | Which release channel the cluster is subscribed to. Some valid choices include: "UNSPECIFIED", "RAPID", "REGULAR", "STABLE" |
| **resource\_labels** dictionary | | The resource labels for the cluster to use to annotate any related Google Compute Engine resources. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **shielded\_nodes** dictionary | | Shielded Nodes configuration. |
| | **enabled** boolean | **Choices:*** no
* yes
| Whether Shielded Nodes features are enabled on all nodes in this cluster. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **subnetwork** string | | The name of the Google Compute Engine subnetwork to which the cluster is connected. |
Examples
--------
```
- name: create a cluster
google.cloud.gcp_container_cluster:
name: my-cluster
initial_node_count: 2
master_auth:
username: cluster_admin
password: my-secret-password
node_config:
machine_type: n1-standard-4
disk_size_gb: 500
location: us-central1-a
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **addonsConfig** complex | success | Configurations for the various addons available to run in the cluster. |
| | **horizontalPodAutoscaling** complex | success | Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. |
| | | **disabled** boolean | success | Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. When enabled, it ensures that a Heapster pod is running in the cluster, which is also used by the Cloud Monitoring service. |
| | **httpLoadBalancing** complex | success | Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. |
| | | **disabled** boolean | success | Whether the HTTP Load Balancing controller is enabled in the cluster. When enabled, it runs a small pod in the cluster that manages the load balancers. |
| | **networkPolicyConfig** complex | success | Configuration for NetworkPolicy. This only tracks whether the addon is enabled or not on the Master, it does not track whether network policy is enabled for the nodes. |
| | | **disabled** boolean | success | Whether NetworkPolicy is enabled for this cluster. |
| **binaryAuthorization** complex | success | Configuration for the BinaryAuthorization feature. |
| | **enabled** boolean | success | If enabled, all container images will be validated by Binary Authorization. |
| **clusterIpv4Cidr** string | success | The IP address range of the container pods in this cluster, in CIDR notation (e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8. |
| **conditions** complex | success | Which conditions caused the current cluster state. |
| | **code** string | success | Machine-friendly representation of the condition. |
| | **message** string | success | Human-friendly representation of the condition. |
| **createTime** string | success | The time the cluster was created, in RFC3339 text format. |
| **currentMasterVersion** string | success | The current software version of the master endpoint. |
| **currentNodeCount** integer | success | The number of nodes currently in the cluster. |
| **currentNodeVersion** string | success | The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes. |
| **databaseEncryption** complex | success | Configuration of etcd encryption. |
| | **keyName** string | success | Name of CloudKMS key to use for the encryption of secrets in etcd. Ex. `projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key` . |
| | **state** string | success | Denotes the state of etcd encryption. |
| **defaultMaxPodsConstraint** complex | success | The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. |
| | **maxPodsPerNode** string | success | Constraint enforced on the max num of pods per node. |
| **description** string | success | An optional description of this cluster. |
| **enableKubernetesAlpha** boolean | success | Kubernetes alpha features are enabled on this cluster. This includes alpha API groups (e.g. v1alpha1) and features that may not be production ready in the kubernetes version of the master and nodes. |
| **enableTpu** boolean | success | (Optional) Whether to enable Cloud TPU resources in this cluster. See the official documentation - <https://cloud.google.com/tpu/docs/kubernetes-engine-setup> . |
| **endpoint** string | success | The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at https://username:password@endpoint/ See the masterAuth property of this resource for username and password information. |
| **expireTime** string | success | The time the cluster will be automatically deleted in RFC3339 text format. |
| **initialClusterVersion** string | success | The software version of the master endpoint and kubelets used in the cluster when it was first created. The version can be upgraded over time. |
| **initialNodeCount** integer | success | The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "nodeConfig") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. This field has been deprecated. Please use nodePool.initial\_node\_count instead. |
| **ipAllocationPolicy** complex | success | Configuration for controlling how IPs are allocated in the cluster. |
| | **clusterIpv4CidrBlock** string | success | The IP address range for the cluster pod IPs. If this field is set, then cluster.cluster\_ipv4\_cidr must be left blank. This field is only applicable when useIpAliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | **clusterSecondaryRangeName** string | success | The name of the secondary range to be used for the cluster CIDR block. The secondary range will be used for pod IP addresses. This must be an existing secondary range associated with the cluster subnetwork . |
| | **createSubnetwork** boolean | success | Whether a new subnetwork will be created automatically for the cluster. |
| | **nodeIpv4CidrBlock** string | success | The IP address range of the instance IPs in this cluster. This is applicable only if createSubnetwork is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | **servicesIpv4CidrBlock** string | success | The IP address range of the services IPs in this cluster. If blank, a range will be automatically chosen with the default size. This field is only applicable when useIpAliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | **servicesSecondaryRangeName** string | success | The name of the secondary range to be used as for the services CIDR block. The secondary range will be used for service ClusterIPs. This must be an existing secondary range associated with the cluster subnetwork. |
| | **subnetworkName** string | success | A custom subnetwork name to be used if createSubnetwork is true. If this field is empty, then an automatic name will be chosen for the new subnetwork. |
| | **tpuIpv4CidrBlock** string | success | The IP address range of the Cloud TPUs in this cluster. If unspecified, a range will be automatically chosen with the default size. This field is only applicable when useIpAliases is true. If unspecified, the range will use the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | **useIpAliases** boolean | success | Whether alias IPs will be used for pod IPs in the cluster. |
| **kubectlContext** string | success | The name of the context for the kubectl config file. Will default to the cluster name. |
| **kubectlPath** string | success | The path that the kubectl config file will be written to. The file will not be created if this path is unset. Any existing file at this path will be completely overwritten. This requires the PyYaml library. |
| **labelFingerprint** string | success | The fingerprint of the set of labels for this cluster. |
| **legacyAbac** complex | success | Configuration for the legacy ABAC authorization mode. |
| | **enabled** boolean | success | Whether the ABAC authorizer is enabled for this cluster. When enabled, identities in the system, including service accounts, nodes, and controllers, will have statically granted permissions beyond those provided by the RBAC configuration or IAM. |
| **location** string | success | The location where the cluster is deployed. |
| **locations** list / elements=string | success | The list of Google Compute Engine zones in which the cluster's nodes should be located. |
| **loggingService** string | success | The logging service the cluster should use to write logs. Currently available options: logging.googleapis.com - the Google Cloud Logging service. none - no logs will be exported from the cluster. if left as an empty string,logging.googleapis.com will be used. |
| **masterAuth** complex | success | The authentication information for accessing the master endpoint. |
| | **clientCertificate** string | success | Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. |
| | **clientCertificateConfig** complex | success | Configuration for client certificate authentication on the cluster. For clusters before v1.12, if no configuration is specified, a client certificate is issued. |
| | | **issueClientCertificate** boolean | success | Issue a client certificate. |
| | **clientKey** string | success | Base64-encoded private key used by clients to authenticate to the cluster endpoint. |
| | **clusterCaCertificate** string | success | Base64-encoded public certificate that is the root of trust for the cluster. |
| | **password** string | success | The password to use for HTTP basic authentication to the master endpoint. Because the master endpoint is open to the Internet, you should create a strong password with a minimum of 16 characters. |
| | **username** string | success | The username to use for HTTP basic authentication to the master endpoint. |
| **masterAuthorizedNetworksConfig** complex | success | Configuration for controlling how IPs are allocated in the cluster. |
| | **cidrBlocks** complex | success | Define up to 50 external networks that could access Kubernetes master through HTTPS. |
| | | **cidrBlock** string | success | Block specified in CIDR notation. |
| | | **displayName** string | success | Optional field used to identify cidr blocks. |
| | **enabled** boolean | success | Whether or not master authorized networks is enabled. |
| **monitoringService** string | success | The monitoring service the cluster should use to write metrics. Currently available options: monitoring.googleapis.com - the Google Cloud Monitoring service. none - no metrics will be exported from the cluster. if left as an empty string, monitoring.googleapis.com will be used. |
| **name** string | success | The name of this cluster. The name must be unique within this project and location, and can be up to 40 characters. Must be Lowercase letters, numbers, and hyphens only. Must start with a letter. Must end with a number or a letter. |
| **network** string | success | The name of the Google Compute Engine network to which the cluster is connected. If left unspecified, the default network will be used. |
| **networkConfig** complex | success | Network configurations . |
| | **defaultSnatStatus** boolean | success | Whether the cluster disables default in-node sNAT rules. In-node sNAT rules will be disabled when defaultSnatStatus is disabled. |
| | **enableIntraNodeVisibility** boolean | success | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network. |
| | **network** string | success | The relative name of the Google Compute Engine network to which the cluster is connected. Example: projects/my-project/global/networks/my-network . |
| | **subnetwork** string | success | The relative name of the Google Compute Engine subnetwork to which the cluster is connected. Example: projects/my-project/regions/us-central1/subnetworks/my-subnet . |
| **networkPolicy** complex | success | Configuration options for the NetworkPolicy feature. |
| | **enabled** boolean | success | Whether network policy is enabled on the cluster. |
| | **provider** string | success | The selected network policy provider. |
| **nodeConfig** complex | success | Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "initialNodeCount") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. For responses, this field will be populated with the node configuration of the first node pool. If unspecified, the defaults are used. |
| | **accelerators** complex | success | A list of hardware accelerators to be attached to each node. See <https://cloud.google.com/compute/docs/gpus> for more information about support for GPUs. |
| | | **acceleratorCount** string | success | The number of accelerator cards exposed to an instance. |
| | | **acceleratorType** string | success | The accelerator type resource name. |
| | **diskSizeGb** integer | success | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB. |
| | **diskType** string | success | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') If unspecified, the default disk type is 'pd-standard' . |
| | **imageType** string | success | The image type to use for this node. Note that for a given image type, the latest version of it will be used. |
| | **labels** dictionary | success | The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that Kubernetes may apply to the node. In case of conflict in label keys, the applied set may differ depending on the Kubernetes version -- it's best to assume the behavior is undefined and conflicts should be avoided. For more information, including usage and the valid values, see: <http://kubernetes.io/v1.1/docs/user-guide/labels.html> An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| | **localSsdCount** integer | success | The number of local SSD disks to be attached to the node. The limit for this value is dependant upon the maximum number of disks available on a machine per zone. See: <https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits> for more information. |
| | **machineType** string | success | The name of a Google Compute Engine machine type (e.g. n1-standard-1). If unspecified, the default machine type is n1-standard-1. |
| | **metadata** dictionary | success | The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-\_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| | **minCpuPlatform** string | success | Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform. |
| | **oauthScopes** list / elements=string | success | The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: <https://www.googleapis.com/auth/compute> is required for mounting persistent storage on your nodes.
<https://www.googleapis.com/auth/devstorage.read_only> is required for communicating with gcr.io (the Google Container Registry). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added. |
| | **preemptible** boolean | success | Whether the nodes are created as preemptible VM instances. See: <https://cloud.google.com/compute/docs/instances/preemptible> for more information about preemptible VM instances. |
| | **serviceAccount** string | success | The Google Cloud Platform Service Account to be used by the node VMs. If no Service Account is specified, the "default" service account is used. |
| | **shieldedInstanceConfig** complex | success | Shielded Instance options. |
| | | **enableIntegrityMonitoring** boolean | success | Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. |
| | | **enableSecureBoot** boolean | success | Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. |
| | **tags** list / elements=string | success | The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035. |
| | **taints** complex | success | List of kubernetes taints to be applied to each node. For more information, including usage and the valid values, see: <https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/> . |
| | | **effect** string | success | Effect for taint. |
| | | **key** string | success | Key for taint. |
| | | **value** string | success | Value for taint. |
| **nodeIpv4CidrSize** integer | success | The size of the address space on each node for hosting containers. This is provisioned from within the container\_ipv4\_cidr range. |
| **nodePools** complex | success | Node pools belonging to this cluster. |
| | **name** string | success | Name of the node pool. |
| **privateClusterConfig** complex | success | Configuration for a private cluster. |
| | **enablePrivateEndpoint** boolean | success | Whether the master's internal IP address is used as the cluster endpoint. |
| | **enablePrivateNodes** boolean | success | Whether nodes have internal IP addresses only. If enabled, all nodes are given only RFC 1918 private addresses and communicate with the master via private networking. |
| | **masterIpv4CidrBlock** string | success | The IP range in CIDR notation to use for the hosted master network. This range will be used for assigning internal IP addresses to the master or set of masters, as well as the ILB VIP. This range must not overlap with any other ranges in use within the cluster's network. |
| | **privateEndpoint** string | success | The internal IP address of this cluster's master endpoint. |
| | **publicEndpoint** string | success | The external IP address of this cluster's master endpoint. |
| **releaseChannel** complex | success | ReleaseChannel indicates which release channel a cluster is subscribed to. Release channels are arranged in order of risk and frequency of updates. |
| | **channel** string | success | Which release channel the cluster is subscribed to. |
| **resourceLabels** dictionary | success | The resource labels for the cluster to use to annotate any related Google Compute Engine resources. |
| **servicesIpv4Cidr** string | success | The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in the last /16 from the container CIDR. |
| **shieldedNodes** complex | success | Shielded Nodes configuration. |
| | **enabled** boolean | success | Whether Shielded Nodes features are enabled on all nodes in this cluster. |
| **status** string | success | The current status of this cluster. |
| **statusMessage** string | success | Additional information about the current status of this cluster, if available. |
| **subnetwork** string | success | The name of the Google Compute Engine subnetwork to which the cluster is connected. |
| **tpuIpv4CidrBlock** string | success | The IP address range of the Cloud TPUs in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless\_Inter-Domain\_Routing) notation (e.g. `1.2.3.4/29`). |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_storage_default_object_acl β Creates a GCP DefaultObjectACL google.cloud.gcp\_storage\_default\_object\_acl β Creates a GCP DefaultObjectACL
================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_storage_default_object_acl`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* The DefaultObjectAccessControls resources represent the Access Control Lists (ACLs) applied to a new object within a Google Cloud Storage bucket when no ACL was provided for that object. ACLs let you specify who has access to your bucket contents and to what extent.
* There are two roles that can be assigned to an entity: READERs can get an object, though the acl property will not be revealed.
* OWNERs are READERs, and they can get the acl property, update an object, and call all objectAccessControls methods on the object. The owner of an object is always an OWNER.
* For more information, see Access Control, with the caveat that this API uses READER and OWNER instead of READ and FULL\_CONTROL.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **bucket** dictionary / required | | The name of the bucket. This field represents a link to a Bucket resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_storage\_bucket task and then set this bucket field to "{{ name-of-resource }}" |
| **entity** string / required | | The entity holding the permission, in one of the following forms: \* user-{{userId}} \* user-{{email}} (such as "[email protected]") \* group-{{groupId}} \* group-{{email}} (such as "[email protected]") \* domain-{{domain}} (such as "domain-example.com") \* project-team-{{projectId}} \* allUsers \* allAuthenticatedUsers . |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **object** string | | The name of the object, if applied to an object. |
| **project** string | | The Google Cloud Platform project to use. |
| **role** string / required | | The access permission for the entity. Some valid choices include: "OWNER", "READER" |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/storage/docs/json_api/v1/defaultObjectAccessControls>
* Official Documentation: <https://cloud.google.com/storage/docs/access-control/create-manage-lists>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a bucket
google.cloud.gcp_storage_bucket:
name: "{{ resource_name }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: bucket
- name: create a default object acl
google.cloud.gcp_storage_default_object_acl:
bucket: "{{ bucket }}"
entity: OWNER:[email protected]
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **bucket** dictionary | success | The name of the bucket. |
| **domain** string | success | The domain associated with the entity. |
| **email** string | success | The email address associated with the entity. |
| **entity** string | success | The entity holding the permission, in one of the following forms: \* user-{{userId}} \* user-{{email}} (such as "[email protected]") \* group-{{groupId}} \* group-{{email}} (such as "[email protected]") \* domain-{{domain}} (such as "domain-example.com") \* project-team-{{projectId}} \* allUsers \* allAuthenticatedUsers . |
| **entityId** string | success | The ID for the entity. |
| **generation** integer | success | The content generation of the object, if applied to an object. |
| **id** string | success | The ID of the access-control entry. |
| **object** string | success | The name of the object, if applied to an object. |
| **projectTeam** complex | success | The project team associated with the entity. |
| | **projectNumber** string | success | The project team associated with the entity. |
| | **team** string | success | The team. |
| **role** string | success | The access permission for the entity. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_https_health_check β Creates a GCP HttpsHealthCheck google.cloud.gcp\_compute\_https\_health\_check β Creates a GCP HttpsHealthCheck
================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_https_health_check`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* An HttpsHealthCheck resource. This resource defines a template for how individual VMs should be checked for health, via HTTPS.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **check\_interval\_sec** integer | | How often (in seconds) to send a health check. The default value is 5 seconds. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **healthy\_threshold** integer | | A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. |
| **host** string | | The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **port** integer | | The TCP port number for the HTTPS health check request. The default value is 80. |
| **project** string | | The Google Cloud Platform project to use. |
| **request\_path** string | | The request path of the HTTPS health check request. The default value is /. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **timeout\_sec** integer | | How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
aliases: timeout\_seconds |
| **unhealthy\_threshold** integer | | A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/v1/httpsHealthChecks>
* Adding Health Checks: <https://cloud.google.com/compute/docs/load-balancing/health-checks#legacy_health_checks>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a HTTPS health check
google.cloud.gcp_compute_https_health_check:
name: test_object
healthy_threshold: 10
port: 8080
timeout_sec: 2
unhealthy_threshold: 5
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **checkIntervalSec** integer | success | How often (in seconds) to send a health check. The default value is 5 seconds. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **healthyThreshold** integer | success | A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. |
| **host** string | success | The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **port** integer | success | The TCP port number for the HTTPS health check request. The default value is 80. |
| **requestPath** string | success | The request path of the HTTPS health check request. The default value is /. |
| **timeoutSec** integer | success | How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. |
| **unhealthyThreshold** integer | success | A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_node_template_info β Gather info for GCP NodeTemplate google.cloud.gcp\_compute\_node\_template\_info β Gather info for GCP NodeTemplate
==================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_node_template_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP NodeTemplate
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | Region where nodes using the node template will be created . |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a node template
gcp_compute_node_template_info:
region: us-central1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional textual description of the resource. |
| | **name** string | success | Name of the resource. |
| | **nodeAffinityLabels** dictionary | success | Labels to use for node affinity, which will be used in instance scheduling. |
| | **nodeType** string | success | Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified. |
| | **nodeTypeFlexibility** complex | success | Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. |
| | | **cpus** string | success | Number of virtual CPUs to use. |
| | | **localSsd** string | success | Use local SSD . |
| | | **memory** string | success | Physical memory available to the node, defined in MB. |
| | **region** string | success | Region where nodes using the node template will be created . |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_pubsub_topic β Creates a GCP Topic google.cloud.gcp\_pubsub\_topic β Creates a GCP Topic
=====================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_pubsub_topic`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A named resource to which messages are sent by publishers.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **kms\_key\_name** string | | The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. Your project's PubSub service account (`service-{{PROJECT\_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com`) must have `roles/cloudkms.cryptoKeyEncrypterDecrypter` to use this feature. The expected format is `projects/\*/locations/\*/keyRings/\*/cryptoKeys/\*` . |
| **labels** dictionary | | A set of key/value label pairs to assign to this Topic. |
| **message\_storage\_policy** dictionary | | Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. |
| | **allowed\_persistence\_regions** list / elements=string / required | | A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration. |
| **name** string / required | | Name of the topic. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics>
* Managing Topics: <https://cloud.google.com/pubsub/docs/admin#managing_topics>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a topic
google.cloud.gcp_pubsub_topic:
name: test-topic1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **kmsKeyName** string | success | The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. Your project's PubSub service account (`service-{{PROJECT\_NUMBER}}@gcp-sa-pubsub.iam.gserviceaccount.com`) must have `roles/cloudkms.cryptoKeyEncrypterDecrypter` to use this feature. The expected format is `projects/\*/locations/\*/keyRings/\*/cryptoKeys/\*` . |
| **labels** dictionary | success | A set of key/value label pairs to assign to this Topic. |
| **messageStoragePolicy** complex | success | Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect. |
| | **allowedPersistenceRegions** list / elements=string | success | A list of IDs of GCP regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed GCP regions (or running outside of GCP altogether) will be routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration. |
| **name** string | success | Name of the topic. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_mlengine_version β Creates a GCP Version google.cloud.gcp\_mlengine\_version β Creates a GCP Version
===========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_mlengine_version`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Each version is a trained model deployed in the cloud, ready to handle prediction requests. A model can have multiple versions .
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **auto\_scaling** dictionary | | Automatically scale the number of nodes used to serve the model in response to increases and decreases in traffic. Care should be taken to ramp up traffic according to the model's ability to scale or you will start seeing increases in latency and 429 response codes. |
| | **min\_nodes** integer | | The minimum number of nodes to allocate for this mode. |
| **deployment\_uri** string / required | | The Cloud Storage location of the trained model used to create the version. |
| **description** string | | The description specified for the version when it was created. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **framework** string | | The machine learning framework AI Platform uses to train this version of the model. Some valid choices include: "FRAMEWORK\_UNSPECIFIED", "TENSORFLOW", "SCIKIT\_LEARN", "XGBOOST" |
| **is\_default** boolean | **Choices:*** no
* yes
| If true, this version will be used to handle prediction requests that do not specify a version.
aliases: default |
| **labels** dictionary | | One or more labels that you can add, to organize your model versions. |
| **machine\_type** string | | The type of machine on which to serve the model. Currently only applies to online prediction service. Some valid choices include: "mls1-c1-m2", "mls1-c4-m2" |
| **manual\_scaling** dictionary | | Manually select the number of nodes to use for serving the model. You should generally use autoScaling with an appropriate minNodes instead, but this option is available if you want more predictable billing. Beware that latency and error rates will increase if the traffic exceeds that capability of the system to serve it based on the selected number of nodes. |
| | **nodes** integer | | The number of nodes to allocate for this model. These nodes are always up, starting from the time the model is deployed. |
| **model** dictionary / required | | The model that this version belongs to. This field represents a link to a Model resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_mlengine\_model task and then set this model field to "{{ name-of-resource }}" |
| **name** string / required | | The name specified for the version when it was created. The version name must be unique within the model it is created in. |
| **prediction\_class** string | | The fully qualified name (module\_name.class\_name) of a class that implements the Predictor interface described in this reference field. The module containing this class should be included in a package provided to the packageUris field. |
| **project** string | | The Google Cloud Platform project to use. |
| **python\_version** string | | The version of Python used in prediction. If not set, the default version is '2.7'. Python '3.5' is available when runtimeVersion is set to '1.4' and above. Python '2.7' works with all supported runtime versions. Some valid choices include: "2.7", "3.5" |
| **runtime\_version** string | | The AI Platform runtime version to use for this deployment. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account** string | | Specifies the service account for resource access control. |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Examples
--------
```
- name: create a model
google.cloud.gcp_mlengine_model:
name: model_version
description: My model
regions:
- us-central1
online_prediction_logging: 'true'
online_prediction_console_logging: 'true'
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: model
- name: create a version
google.cloud.gcp_mlengine_version:
name: "{{ resource_name | replace('-', '_') }}"
model: "{{ model }}"
runtime_version: 1.13
python_version: 3.5
is_default: 'true'
deployment_uri: gs://ansible-cloudml-bucket/
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **autoScaling** complex | success | Automatically scale the number of nodes used to serve the model in response to increases and decreases in traffic. Care should be taken to ramp up traffic according to the model's ability to scale or you will start seeing increases in latency and 429 response codes. |
| | **minNodes** integer | success | The minimum number of nodes to allocate for this mode. |
| **createTime** string | success | The time the version was created. |
| **deploymentUri** string | success | The Cloud Storage location of the trained model used to create the version. |
| **description** string | success | The description specified for the version when it was created. |
| **errorMessage** string | success | The details of a failure or cancellation. |
| **framework** string | success | The machine learning framework AI Platform uses to train this version of the model. |
| **isDefault** boolean | success | If true, this version will be used to handle prediction requests that do not specify a version. |
| **labels** dictionary | success | One or more labels that you can add, to organize your model versions. |
| **lastUseTime** string | success | The time the version was last used for prediction. |
| **machineType** string | success | The type of machine on which to serve the model. Currently only applies to online prediction service. |
| **manualScaling** complex | success | Manually select the number of nodes to use for serving the model. You should generally use autoScaling with an appropriate minNodes instead, but this option is available if you want more predictable billing. Beware that latency and error rates will increase if the traffic exceeds that capability of the system to serve it based on the selected number of nodes. |
| | **nodes** integer | success | The number of nodes to allocate for this model. These nodes are always up, starting from the time the model is deployed. |
| **model** dictionary | success | The model that this version belongs to. |
| **name** string | success | The name specified for the version when it was created. The version name must be unique within the model it is created in. |
| **packageUris** list / elements=string | success | Cloud Storage paths (gs://β¦) of packages for custom prediction routines or scikit-learn pipelines with custom code. |
| **predictionClass** string | success | The fully qualified name (module\_name.class\_name) of a class that implements the Predictor interface described in this reference field. The module containing this class should be included in a package provided to the packageUris field. |
| **pythonVersion** string | success | The version of Python used in prediction. If not set, the default version is '2.7'. Python '3.5' is available when runtimeVersion is set to '1.4' and above. Python '2.7' works with all supported runtime versions. |
| **runtimeVersion** string | success | The AI Platform runtime version to use for this deployment. |
| **serviceAccount** string | success | Specifies the service account for resource access control. |
| **state** string | success | The state of a version. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_node_group β Creates a GCP NodeGroup google.cloud.gcp\_compute\_node\_group β Creates a GCP NodeGroup
================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_node_group`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a NodeGroup resource to manage a group of sole-tenant nodes.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **autoscaling\_policy** dictionary | | If you use sole-tenant nodes for your workloads, you can use the node group autoscaler to automatically manage the sizes of your node groups. |
| | **max\_nodes** integer / required | | Maximum size of the node group. Set to a value less than or equal to 100 and greater than or equal to min-nodes. |
| | **min\_nodes** integer | | Minimum size of the node group. Must be less than or equal to max-nodes. The default value is 0. |
| | **mode** string / required | | The autoscaling mode. Set to one of the following: - OFF: Disables the autoscaler. - ON: Enables scaling in and scaling out. - ONLY\_SCALE\_OUT: Enables only scaling out. You must use this mode if your node groups are configured to restart their hosted VMs on minimal servers. Some valid choices include: "OFF", "ON", "ONLY\_SCALE\_OUT" |
| **description** string | | An optional textual description of the resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **maintenance\_policy** string | **Default:**"DEFAULT" | Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART\_IN\_PLACE, or MIGRATE\_WITHIN\_NODE\_GROUP. The default value is DEFAULT. |
| **name** string | | Name of the resource. |
| **node\_template** dictionary / required | | The URL of the node template to which this node group belongs. This field represents a link to a NodeTemplate resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_node\_template task and then set this node\_template field to "{{ name-of-resource }}" |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **size** integer / required | | The total number of nodes in the node group. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **zone** string / required | | Zone where this node group is located . |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups>
* Sole-Tenant Nodes: <https://cloud.google.com/compute/docs/nodes/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a node template
google.cloud.gcp_compute_node_template:
name: "{{ resource_name }}"
region: us-central1
node_type: n1-node-96-624
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: node_template
- name: create a node group
google.cloud.gcp_compute_node_group:
name: test_object
zone: us-central1-a
description: example group for ansible
size: 1
node_template: "{{ node_template }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **autoscalingPolicy** complex | success | If you use sole-tenant nodes for your workloads, you can use the node group autoscaler to automatically manage the sizes of your node groups. |
| | **maxNodes** integer | success | Maximum size of the node group. Set to a value less than or equal to 100 and greater than or equal to min-nodes. |
| | **minNodes** integer | success | Minimum size of the node group. Must be less than or equal to max-nodes. The default value is 0. |
| | **mode** string | success | The autoscaling mode. Set to one of the following: - OFF: Disables the autoscaler. - ON: Enables scaling in and scaling out. - ONLY\_SCALE\_OUT: Enables only scaling out. You must use this mode if your node groups are configured to restart their hosted VMs on minimal servers. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional textual description of the resource. |
| **maintenancePolicy** string | success | Specifies how to handle instances when a node in the group undergoes maintenance. Set to one of: DEFAULT, RESTART\_IN\_PLACE, or MIGRATE\_WITHIN\_NODE\_GROUP. The default value is DEFAULT. |
| **name** string | success | Name of the resource. |
| **nodeTemplate** dictionary | success | The URL of the node template to which this node group belongs. |
| **size** integer | success | The total number of nodes in the node group. |
| **zone** string | success | Zone where this node group is located . |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_iam_role β Creates a GCP Role google.cloud.gcp\_iam\_role β Creates a GCP Role
================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_iam_role`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A role in the Identity and Access Management API .
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | Human-readable description for the role. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **included\_permissions** list / elements=string | | Names of permissions this role grants when bound in an IAM policy. |
| **name** string / required | | The name of the role. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **stage** string | | The current launch stage of the role. Some valid choices include: "ALPHA", "BETA", "GA", "DEPRECATED", "DISABLED", "EAP" |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **title** string | | A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
Examples
--------
```
- name: create a role
google.cloud.gcp_iam_role:
name: myCustomRole2
title: My Custom Role
description: My custom role description
included_permissions:
- iam.roles.list
- iam.roles.create
- iam.roles.delete
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **deleted** boolean | success | The current deleted state of the role. |
| **description** string | success | Human-readable description for the role. |
| **includedPermissions** list / elements=string | success | Names of permissions this role grants when bound in an IAM policy. |
| **name** string | success | The name of the role. |
| **stage** string | success | The current launch stage of the role. |
| **title** string | success | A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_sql_database_info β Gather info for GCP Database google.cloud.gcp\_sql\_database\_info β Gather info for GCP Database
====================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_sql_database_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Database
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **instance** string / required | | The name of the Cloud SQL instance. This does not include the project ID. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a database
gcp_sql_database_info:
instance: "{{ instance.name }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **charset** string | success | The charset value. See MySQL's [Supported Character Sets and Collations](<https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html>) and Postgres' [Character Set Support](<https://www.postgresql.org/docs/9.6/static/multibyte.html>) for more details and supported values. Postgres databases only support a value of `UTF8` at creation time. |
| | **collation** string | success | The collation value. See MySQL's [Supported Character Sets and Collations](<https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html>) and Postgres' [Collation Support](<https://www.postgresql.org/docs/9.6/static/collation.html>) for more details and supported values. Postgres databases only support a value of `en\_US.UTF8` at creation time. |
| | **instance** string | success | The name of the Cloud SQL instance. This does not include the project ID. |
| | **name** string | success | The name of the database in the Cloud SQL instance. This does not include the project ID or instance name. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_region_target_http_proxy β Creates a GCP RegionTargetHttpProxy google.cloud.gcp\_compute\_region\_target\_http\_proxy β Creates a GCP RegionTargetHttpProxy
============================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_target_http_proxy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a RegionTargetHttpProxy resource, which is used by one or more forwarding rules to route incoming HTTP requests to a URL map.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The region where the regional proxy resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **url\_map** dictionary / required | | A reference to the RegionUrlMap resource that defines the mapping from URL to the BackendService. This field represents a link to a RegionUrlMap resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_region\_url\_map task and then set this url\_map field to "{{ name-of-resource }}" |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/regionTargetHttpProxies>
* Official Documentation: <https://cloud.google.com/compute/docs/load-balancing/http/target-proxies>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a instance group
google.cloud.gcp_compute_instance_group:
name: instancegroup-targethttpproxy
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: instancegroup
- name: create a HTTP health check
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-targethttpproxy
healthy_threshold: 10
port: 8080
timeout_sec: 2
unhealthy_threshold: 5
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: healthcheck
- name: create a backend service
google.cloud.gcp_compute_backend_service:
name: backendservice-targethttpproxy
backends:
- group: "{{ instancegroup.selfLink }}"
health_checks:
- "{{ healthcheck.selfLink }}"
enable_cdn: 'true'
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: backendservice
- name: create a URL map
google.cloud.gcp_compute_url_map:
name: urlmap-targethttpproxy
default_service: "{{ backendservice }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: urlmap
- name: create a region target HTTP proxy
google.cloud.gcp_compute_region_target_http_proxy:
name: test_object
region: us-central1
url_map: "{{ urlmap }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **id** integer | success | The unique identifier for the resource. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **region** string | success | The region where the regional proxy resides. |
| **urlMap** dictionary | success | A reference to the RegionUrlMap resource that defines the mapping from URL to the BackendService. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_instance_group β Creates a GCP InstanceGroup google.cloud.gcp\_compute\_instance\_group β Creates a GCP InstanceGroup
========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_instance_group`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents an Instance Group resource. Instance groups are self-managed and can contain identical or different instances. Instance groups do not use an instance template. Unlike managed instance groups, you must create and add instances to an instance group manually.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **instances** list / elements=dictionary | | The list of instances associated with this InstanceGroup. All instances must be created before being added to an InstanceGroup. All instances not in this list will be removed from the InstanceGroup and will not be deleted. Only the full identifier of the instance will be returned. |
| **name** string | | The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. |
| **named\_ports** list / elements=dictionary | | Assigns a name to a port number. For example: {name: "http", port: 80}. This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}] Named ports apply to all instances in this instance group. |
| | **name** string | | The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. |
| | **port** integer | | The port number, which can be a value between 1 and 65535. |
| **network** dictionary | | The network to which all instances in the instance group belong. This field represents a link to a Network resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_network task and then set this network field to "{{ name-of-resource }}" |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string | | The region where the instance group is located (for regional resources). |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **subnetwork** dictionary | | The subnetwork to which all instances in the instance group belong. This field represents a link to a Subnetwork resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_subnetwork task and then set this subnetwork field to "{{ name-of-resource }}" |
| **zone** string / required | | A reference to the zone where the instance group resides. |
Examples
--------
```
- name: create a network
google.cloud.gcp_compute_network:
name: network-instancegroup
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: network
- name: create a instance group
google.cloud.gcp_compute_instance_group:
name: test_object
named_ports:
- name: ansible
port: 1234
network: "{{ network }}"
zone: us-central1-a
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **id** integer | success | A unique identifier for this instance group. |
| **instances** list / elements=string | success | The list of instances associated with this InstanceGroup. All instances must be created before being added to an InstanceGroup. All instances not in this list will be removed from the InstanceGroup and will not be deleted. Only the full identifier of the instance will be returned. |
| **name** string | success | The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. |
| **namedPorts** complex | success | Assigns a name to a port number. For example: {name: "http", port: 80}. This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}] Named ports apply to all instances in this instance group. |
| | **name** string | success | The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. |
| | **port** integer | success | The port number, which can be a value between 1 and 65535. |
| **network** dictionary | success | The network to which all instances in the instance group belong. |
| **region** string | success | The region where the instance group is located (for regional resources). |
| **subnetwork** dictionary | success | The subnetwork to which all instances in the instance group belong. |
| **zone** string | success | A reference to the zone where the instance group resides. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_kms_key_ring_info β Gather info for GCP KeyRing google.cloud.gcp\_kms\_key\_ring\_info β Gather info for GCP KeyRing
====================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_kms_key_ring_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP KeyRing
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **location** string / required | | The location for the KeyRing. A full list of valid locations can be found by running `gcloud kms locations list`. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a key ring
gcp_kms_key_ring_info:
location: us-central1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **createTime** string | success | The time that this resource was created on the server. This is in RFC3339 text format. |
| | **location** string | success | The location for the KeyRing. A full list of valid locations can be found by running `gcloud kms locations list`. |
| | **name** string | success | The resource name for the KeyRing. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_resource_policy β Creates a GCP ResourcePolicy google.cloud.gcp\_compute\_resource\_policy β Creates a GCP ResourcePolicy
==========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_resource_policy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A policy that can be attached to a resource to specify or schedule actions on that resource.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **group\_placement\_policy** dictionary | | Policy for creating snapshots of persistent disks. |
| | **availability\_domain\_count** integer | | The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network . |
| | **collocation** string | | Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. Specify `COLLOCATED` to enable collocation. Can only be specified with `vm\_count`. If compute instances are created with a COLLOCATED policy, then exactly `vm\_count` instances must be created at the same time with the resource policy attached. Some valid choices include: "COLLOCATED" |
| | **vm\_count** integer | | Number of vms in this placement group. |
| **name** string / required | | The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])`? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | Region where resource policy resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **snapshot\_schedule\_policy** dictionary | | Policy for creating snapshots of persistent disks. |
| | **retention\_policy** dictionary | | Retention policy applied to snapshots created by this resource policy. |
| | | **max\_retention\_days** integer / required | | Maximum age of the snapshot that is allowed to be kept. |
| | | **on\_source\_disk\_delete** string | **Default:**"KEEP\_AUTO\_SNAPSHOTS" | Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. Some valid choices include: "KEEP\_AUTO\_SNAPSHOTS", "APPLY\_RETENTION\_POLICY" |
| | **schedule** dictionary / required | | Contains one of an `hourlySchedule`, `dailySchedule`, or `weeklySchedule`. |
| | | **daily\_schedule** dictionary | | The policy will execute every nth day at the specified time. |
| | | | **days\_in\_cycle** integer / required | | The number of days between snapshots. |
| | | | **start\_time** string / required | | This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid. |
| | | **hourly\_schedule** dictionary | | The policy will execute every nth hour starting at the specified time. |
| | | | **hours\_in\_cycle** integer / required | | The number of hours between snapshots. |
| | | | **start\_time** string / required | | Time within the window to start the operations. It must be in an hourly format "HH:MM", where HH : [00-23] and MM : [00] GMT. eg: 21:00 . |
| | | **weekly\_schedule** dictionary | | Allows specifying a snapshot time for each day of the week. |
| | | | **day\_of\_weeks** list / elements=dictionary / required | | May contain up to seven (one for each day of the week) snapshot times. |
| | | | | **day** string / required | | The day of the week to create the snapshot. e.g. MONDAY . Some valid choices include: "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY" |
| | | | | **start\_time** string / required | | Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. |
| | **snapshot\_properties** dictionary | | Properties with which the snapshots are created, such as labels. |
| | | **guest\_flush** boolean | **Choices:*** no
* yes
| Whether to perform a 'guest aware' snapshot. |
| | | **labels** dictionary | | A set of key-value pairs. |
| | | **storage\_locations** list / elements=string | | Cloud Storage bucket location to store the auto snapshot (regional or multi-regional) . |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Examples
--------
```
- name: create a resource policy
google.cloud.gcp_compute_resource_policy:
name: test_object
region: us-central1
snapshot_schedule_policy:
schedule:
daily_schedule:
days_in_cycle: 1
start_time: '04:00'
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **groupPlacementPolicy** complex | success | Policy for creating snapshots of persistent disks. |
| | **availabilityDomainCount** integer | success | The number of availability domains instances will be spread across. If two instances are in different availability domain, they will not be put in the same low latency network . |
| | **collocation** string | success | Collocation specifies whether to place VMs inside the same availability domain on the same low-latency network. Specify `COLLOCATED` to enable collocation. Can only be specified with `vm\_count`. If compute instances are created with a COLLOCATED policy, then exactly `vm\_count` instances must be created at the same time with the resource policy attached. |
| | **vmCount** integer | success | Number of vms in this placement group. |
| **name** string | success | The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])`? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **region** string | success | Region where resource policy resides. |
| **snapshotSchedulePolicy** complex | success | Policy for creating snapshots of persistent disks. |
| | **retentionPolicy** complex | success | Retention policy applied to snapshots created by this resource policy. |
| | | **maxRetentionDays** integer | success | Maximum age of the snapshot that is allowed to be kept. |
| | | **onSourceDiskDelete** string | success | Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. |
| | **schedule** complex | success | Contains one of an `hourlySchedule`, `dailySchedule`, or `weeklySchedule`. |
| | | **dailySchedule** complex | success | The policy will execute every nth day at the specified time. |
| | | | **daysInCycle** integer | success | The number of days between snapshots. |
| | | | **startTime** string | success | This must be in UTC format that resolves to one of 00:00, 04:00, 08:00, 12:00, 16:00, or 20:00. For example, both 13:00-5 and 08:00 are valid. |
| | | **hourlySchedule** complex | success | The policy will execute every nth hour starting at the specified time. |
| | | | **hoursInCycle** integer | success | The number of hours between snapshots. |
| | | | **startTime** string | success | Time within the window to start the operations. It must be in an hourly format "HH:MM", where HH : [00-23] and MM : [00] GMT. eg: 21:00 . |
| | | **weeklySchedule** complex | success | Allows specifying a snapshot time for each day of the week. |
| | | | **dayOfWeeks** complex | success | May contain up to seven (one for each day of the week) snapshot times. |
| | | | | **day** string | success | The day of the week to create the snapshot. e.g. MONDAY . |
| | | | | **startTime** string | success | Time within the window to start the operations. It must be in format "HH:MM", where HH : [00-23] and MM : [00-00] GMT. |
| | **snapshotProperties** complex | success | Properties with which the snapshots are created, such as labels. |
| | | **guestFlush** boolean | success | Whether to perform a 'guest aware' snapshot. |
| | | **labels** dictionary | success | A set of key-value pairs. |
| | | **storageLocations** list / elements=string | success | Cloud Storage bucket location to store the auto snapshot (regional or multi-regional) . |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_region_target_http_proxy_info β Gather info for GCP RegionTargetHttpProxy google.cloud.gcp\_compute\_region\_target\_http\_proxy\_info β Gather info for GCP RegionTargetHttpProxy
========================================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_target_http_proxy_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP RegionTargetHttpProxy
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The region where the regional proxy resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a region target HTTP proxy
gcp_compute_region_target_http_proxy_info:
region: us-central1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **region** string | success | The region where the regional proxy resides. |
| | **urlMap** dictionary | success | A reference to the RegionUrlMap resource that defines the mapping from URL to the BackendService. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_ssl_policy β Creates a GCP SslPolicy google.cloud.gcp\_compute\_ssl\_policy β Creates a GCP SslPolicy
================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_ssl_policy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a SSL policy. SSL policies give you the ability to control the features of SSL that your SSL proxy or HTTPS load balancer negotiates.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **custom\_features** list / elements=string | | A list of features enabled when the selected profile is CUSTOM. The method returns the set of features that can be specified in this list. This field must be empty if the profile is not CUSTOM. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **min\_tls\_version** string | | The minimum version of SSL protocol that can be used by the clients to establish a connection with the load balancer. Some valid choices include: "TLS\_1\_0", "TLS\_1\_1", "TLS\_1\_2" |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **profile** string | | Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. If using `CUSTOM`, the set of SSL features to enable must be specified in the `customFeatures` field. Some valid choices include: "COMPATIBLE", "MODERN", "RESTRICTED", "CUSTOM" |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/sslPolicies>
* Using SSL Policies: <https://cloud.google.com/compute/docs/load-balancing/ssl-policies>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a SSL policy
google.cloud.gcp_compute_ssl_policy:
name: test_object
profile: CUSTOM
min_tls_version: TLS_1_2
custom_features:
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **customFeatures** list / elements=string | success | A list of features enabled when the selected profile is CUSTOM. The method returns the set of features that can be specified in this list. This field must be empty if the profile is not CUSTOM. |
| **description** string | success | An optional description of this resource. |
| **enabledFeatures** list / elements=string | success | The list of features enabled in the SSL policy. |
| **fingerprint** string | success | Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. |
| **id** integer | success | The unique identifier for the resource. |
| **minTlsVersion** string | success | The minimum version of SSL protocol that can be used by the clients to establish a connection with the load balancer. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **profile** string | success | Profile specifies the set of SSL features that can be used by the load balancer when negotiating SSL with clients. If using `CUSTOM`, the set of SSL features to enable must be specified in the `customFeatures` field. |
| **warnings** complex | success | If potential misconfigurations are detected for this SSL policy, this field will be populated with warning messages. |
| | **code** string | success | A warning code, if applicable. |
| | **message** string | success | A human-readable description of the warning code. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_kms_key_ring β Creates a GCP KeyRing google.cloud.gcp\_kms\_key\_ring β Creates a GCP KeyRing
========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_kms_key_ring`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A `KeyRing` is a toplevel logical grouping of `CryptoKeys`.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **location** string / required | | The location for the KeyRing. A full list of valid locations can be found by running `gcloud kms locations list`. |
| **name** string / required | | The resource name for the KeyRing. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings>
* Creating a key ring: <https://cloud.google.com/kms/docs/creating-keys#create_a_key_ring>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a key ring
google.cloud.gcp_kms_key_ring:
name: test_object
location: us-central1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **createTime** string | success | The time that this resource was created on the server. This is in RFC3339 text format. |
| **location** string | success | The location for the KeyRing. A full list of valid locations can be found by running `gcloud kms locations list`. |
| **name** string | success | The resource name for the KeyRing. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_instance_group_manager_info β Gather info for GCP InstanceGroupManager google.cloud.gcp\_compute\_instance\_group\_manager\_info β Gather info for GCP InstanceGroupManager
====================================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_instance_group_manager_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP InstanceGroupManager
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone** string / required | | The zone the managed instance group resides. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an instance group manager
gcp_compute_instance_group_manager_info:
zone: us-west1-a
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **baseInstanceName** string | success | The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035. |
| | **creationTimestamp** string | success | The creation timestamp for this managed instance group in RFC3339 text format. |
| | **currentActions** complex | success | The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions. |
| | | **abandoning** integer | success | The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it. |
| | | **creating** integer | success | The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully. If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. |
| | | **creatingWithoutRetries** integer | success | The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly. |
| | | **deleting** integer | success | The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. |
| | | **none** integer | success | The number of instances in the managed instance group that are running and have no scheduled actions. |
| | | **recreating** integer | success | The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template. |
| | | **refreshing** integer | success | The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance. |
| | | **restarting** integer | success | The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **id** integer | success | A unique identifier for this resource. |
| | **instanceGroup** dictionary | success | The instance group being managed. |
| | **instanceTemplate** dictionary | success | The instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. |
| | **name** string | success | The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. |
| | **namedPorts** complex | success | Named ports configured for the Instance Groups complementary to this Instance Group Manager. |
| | | **name** string | success | The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. |
| | | **port** integer | success | The port number, which can be a value between 1 and 65535. |
| | **region** string | success | The region this managed instance group resides (for regional resources). |
| | **targetPools** list / elements=string | success | TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group. |
| | **targetSize** integer | success | The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number. |
| | **zone** string | success | The zone the managed instance group resides. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_runtimeconfig_variable β Creates a GCP Variable google.cloud.gcp\_runtimeconfig\_variable β Creates a GCP Variable
==================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_runtimeconfig_variable`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Describes a single variable within a runtime config resource.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **config** string / required | | The name of the runtime config that this variable belongs to. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | The name of the variable resource. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **text** string | | The string value of the variable. Either this or `value` can be set. |
| **value** string | | The binary value of the variable. Either this or `text` can be set. |
Examples
--------
```
- name: create a config
google.cloud.gcp_runtimeconfig_config:
name: my-config
description: My config
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: config
- name: create a variable
google.cloud.gcp_runtimeconfig_variable:
name: prod-variables/hostname
config: my-config
text: example.com
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **config** string | success | The name of the runtime config that this variable belongs to. |
| **name** string | success | The name of the variable resource. |
| **text** string | success | The string value of the variable. Either this or `value` can be set. |
| **value** string | success | The binary value of the variable. Either this or `text` can be set. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_region_disk β Creates a GCP RegionDisk google.cloud.gcp\_compute\_region\_disk β Creates a GCP RegionDisk
==================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_disk`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Persistent disks are durable storage devices that function similarly to the physical disks in a desktop or a server. Compute Engine manages the hardware behind these devices to ensure data redundancy and optimize performance for you. Persistent disks are available as either standard hard disk drives (HDD) or solid-state drives (SSD).
* Persistent disks are located independently from your virtual machine instances, so you can detach or move persistent disks to keep your data even after you delete your instances. Persistent disk performance scales automatically with size, so you can resize your existing persistent disks or add more persistent disks to an instance to meet your performance and storage space requirements.
* Add a persistent disk to your instance when you need reliable and affordable storage with consistent performance characteristics.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **disk\_encryption\_key** dictionary | | Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. |
| | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **labels** dictionary | | Labels to apply to this disk. A list of key->value pairs. |
| **licenses** list / elements=string | | Any applicable publicly visible licenses. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **physical\_block\_size\_bytes** integer | | Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | A reference to the region where the disk resides. |
| **replica\_zones** list / elements=string / required | | URLs of the zones where the disk should be replicated to. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **size\_gb** integer | | Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. |
| **source\_snapshot** dictionary | | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. This field represents a link to a Snapshot resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_snapshot task and then set this source\_snapshot field to "{{ name-of-resource }}" |
| **source\_snapshot\_encryption\_key** dictionary | | The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. |
| | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **type** string | | URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/regionDisks>
* Adding or Resizing Regional Persistent Disks: <https://cloud.google.com/compute/docs/disks/regional-persistent-disk>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a region disk
google.cloud.gcp_compute_region_disk:
name: test_object
size_gb: 500
disk_encryption_key:
raw_key: SGVsbG8gZnJvbSBHb29nbGUgQ2xvdWQgUGxhdGZvcm0=
region: us-central1
replica_zones:
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-a
- https://www.googleapis.com/compute/v1/projects/google.com:graphite-playground/zones/us-central1-b
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **diskEncryptionKey** complex | success | Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. |
| | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| **id** integer | success | The unique identifier for the resource. |
| **labelFingerprint** string | success | The fingerprint used for optimistic locking of this resource. Used internally during updates. |
| **labels** dictionary | success | Labels to apply to this disk. A list of key->value pairs. |
| **lastAttachTimestamp** string | success | Last attach timestamp in RFC3339 text format. |
| **lastDetachTimestamp** string | success | Last detach timestamp in RFC3339 text format. |
| **licenses** list / elements=string | success | Any applicable publicly visible licenses. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **physicalBlockSizeBytes** integer | success | Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. |
| **region** string | success | A reference to the region where the disk resides. |
| **replicaZones** list / elements=string | success | URLs of the zones where the disk should be replicated to. |
| **sizeGb** integer | success | Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. |
| **sourceSnapshot** dictionary | success | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. |
| **sourceSnapshotEncryptionKey** complex | success | The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. |
| | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| **sourceSnapshotId** string | success | The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used. |
| **type** string | success | URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. |
| **users** list / elements=string | success | Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance . |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_bigquery_table β Creates a GCP Table google.cloud.gcp\_bigquery\_table β Creates a GCP Table
=======================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_bigquery_table`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A Table that belongs to a Dataset .
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **clustering** list / elements=string | | One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| **dataset** string | | Name of the dataset. |
| **description** string | | A user-friendly description of the dataset. |
| **encryption\_configuration** dictionary | | Custom encryption configuration. |
| | **kms\_key\_name** string | | Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **expiration\_time** integer | | The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. |
| **external\_data\_configuration** dictionary | | Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table. |
| | **autodetect** boolean | **Choices:*** no
* yes
| Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| | **bigtable\_options** dictionary | | Additional options if sourceFormat is set to BIGTABLE. |
| | | **column\_families** list / elements=dictionary | | List of column families to expose in the table schema along with their types. |
| | | | **columns** list / elements=dictionary | | Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. |
| | | | | **encoding** string | | The encoding of the values when the type is not STRING. Some valid choices include: "TEXT", "BINARY" |
| | | | | **field\_name** string | | If the qualifier is not a valid BigQuery field identifier, a valid identifier must be provided as the column field name and is used as field name in queries. |
| | | | | **only\_read\_latest** boolean | **Choices:*** no
* yes
| If this is set, only the latest version of value in this column are exposed . |
| | | | | **qualifier\_string** string / required | | Qualifier of the column. |
| | | | | **type** string | | The type to convert the value in cells of this column. Some valid choices include: "BYTES", "STRING", "INTEGER", "FLOAT", "BOOLEAN" |
| | | | **encoding** string | | The encoding of the values when the type is not STRING. Some valid choices include: "TEXT", "BINARY" |
| | | | **family\_id** string | | Identifier of the column family. |
| | | | **only\_read\_latest** boolean | **Choices:*** no
* yes
| If this is set only the latest version of value are exposed for all columns in this column family . |
| | | | **type** string | | The type to convert the value in cells of this column family. Some valid choices include: "BYTES", "STRING", "INTEGER", "FLOAT", "BOOLEAN" |
| | | **ignore\_unspecified\_column\_families** boolean | **Choices:*** no
* yes
| If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema . |
| | | **read\_rowkey\_as\_string** boolean | **Choices:*** no
* yes
| If field is true, then the rowkey column families will be read and converted to string. |
| | **compression** string | | The compression type of the data source. Some valid choices include: "GZIP", "NONE" |
| | **csv\_options** dictionary | | Additional properties to set if sourceFormat is set to CSV. |
| | | **allow\_jagged\_rows** boolean | **Choices:*** no
* yes
| Indicates if BigQuery should accept rows that are missing trailing optional columns . |
| | | **allow\_quoted\_newlines** boolean | **Choices:*** no
* yes
| Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file . |
| | | **encoding** string | | The character encoding of the data. Some valid choices include: "UTF-8", "ISO-8859-1" |
| | | **field\_delimiter** string | | The separator for fields in a CSV file. |
| | | **quote** string | | The value that is used to quote data sections in a CSV file. |
| | | **skip\_leading\_rows** integer | | The number of rows at the top of a CSV file that BigQuery will skip when reading the data. |
| | **google\_sheets\_options** dictionary | | Additional options if sourceFormat is set to GOOGLE\_SHEETS. |
| | | **skip\_leading\_rows** integer | | The number of rows at the top of a Google Sheet that BigQuery will skip when reading the data. |
| | **ignore\_unknown\_values** boolean | **Choices:*** no
* yes
| Indicates if BigQuery should allow extra values that are not represented in the table schema . |
| | **max\_bad\_records** integer | | The maximum number of bad records that BigQuery can ignore when reading data . |
| | **schema** dictionary | | The schema for the data. Schema is required for CSV and JSON formats. |
| | | **fields** list / elements=dictionary | | Describes the fields in a table. |
| | | | **description** string | | The field description. |
| | | | **fields** list / elements=string | | Describes the nested schema fields if the type property is set to RECORD . |
| | | | **mode** string | | Field mode. Some valid choices include: "NULLABLE", "REQUIRED", "REPEATED" |
| | | | **name** string | | Field name. |
| | | | **type** string | | Field data type. Some valid choices include: "STRING", "BYTES", "INTEGER", "FLOAT", "TIMESTAMP", "DATE", "TIME", "DATETIME", "RECORD" |
| | **source\_format** string | | The data format. Some valid choices include: "CSV", "GOOGLE\_SHEETS", "NEWLINE\_DELIMITED\_JSON", "AVRO", "DATASTORE\_BACKUP", "BIGTABLE", "ORC" |
| | **source\_uris** list / elements=string | | The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '\*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '\*' wildcard character is not allowed. |
| **friendly\_name** string | | A descriptive name for this table. |
| **labels** dictionary | | The labels associated with this dataset. You can use these to organize and group your datasets . |
| **name** string | | Name of the table. |
| **num\_rows** integer | | The number of rows of data in this table, excluding any data in the streaming buffer. |
| **project** string | | The Google Cloud Platform project to use. |
| **schema** dictionary | | Describes the schema of this table. |
| | **fields** list / elements=dictionary | | Describes the fields in a table. |
| | | **description** string | | The field description. The maximum length is 1,024 characters. |
| | | **fields** list / elements=string | | Describes the nested schema fields if the type property is set to RECORD. |
| | | **mode** string | | The field mode. Some valid choices include: "NULLABLE", "REQUIRED", "REPEATED" |
| | | **name** string | | The field name. |
| | | **type** string | | The field data type. Some valid choices include: "STRING", "BYTES", "INTEGER", "FLOAT", "TIMESTAMP", "DATE", "TIME", "DATETIME", "RECORD" |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **table\_reference** dictionary | | Reference describing the ID of this table. |
| | **dataset\_id** string | | The ID of the dataset containing this table. |
| | **project\_id** string | | The ID of the project containing this table. |
| | **table\_id** string | | The ID of the the table. |
| **time\_partitioning** dictionary | | If specified, configures time-based partitioning for this table. |
| | **expiration\_ms** integer | | Number of milliseconds for which to keep the storage for a partition. |
| | **field** string | | If not set, the table is partitioned by pseudo column, referenced via either '\_PARTITIONTIME' as TIMESTAMP type, or '\_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
| | **type** string | | The only type supported is DAY, which will generate one partition per day. Some valid choices include: "DAY" |
| **view** dictionary | | The view definition. |
| | **use\_legacy\_sql** boolean | **Choices:*** no
* yes
| Specifies whether to use BigQuery's legacy SQL for this view . |
| | **user\_defined\_function\_resources** list / elements=dictionary | | Describes user-defined function resources used in the query. |
| | | **inline\_code** string | | An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| | | **resource\_uri** string | | A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
Examples
--------
```
- name: create a dataset
google.cloud.gcp_bigquery_dataset:
name: example_dataset
dataset_reference:
dataset_id: example_dataset
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: dataset
- name: create a table
google.cloud.gcp_bigquery_table:
name: example_table
dataset: example_dataset
table_reference:
dataset_id: example_dataset
project_id: test_project
table_id: example_table
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **clustering** list / elements=string | success | One or more fields on which data should be clustered. Only top-level, non-repeated, simple-type fields are supported. When you cluster a table using multiple columns, the order of columns you specify is important. The order of the specified columns determines the sort order of the data. |
| **creationTime** integer | success | The time when this dataset was created, in milliseconds since the epoch. |
| **dataset** string | success | Name of the dataset. |
| **description** string | success | A user-friendly description of the dataset. |
| **encryptionConfiguration** complex | success | Custom encryption configuration. |
| | **kmsKeyName** string | success | Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| **expirationTime** integer | success | The time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. |
| **externalDataConfiguration** complex | success | Describes the data format, location, and other properties of a table stored outside of BigQuery. By defining these properties, the data source can then be queried as if it were a standard BigQuery table. |
| | **autodetect** boolean | success | Try to detect schema and format options automatically. Any option specified explicitly will be honored. |
| | **bigtableOptions** complex | success | Additional options if sourceFormat is set to BIGTABLE. |
| | | **columnFamilies** complex | success | List of column families to expose in the table schema along with their types. |
| | | | **columns** complex | success | Lists of columns that should be exposed as individual fields as opposed to a list of (column name, value) pairs. |
| | | | | **encoding** string | success | The encoding of the values when the type is not STRING. |
| | | | | **fieldName** string | success | If the qualifier is not a valid BigQuery field identifier, a valid identifier must be provided as the column field name and is used as field name in queries. |
| | | | | **onlyReadLatest** boolean | success | If this is set, only the latest version of value in this column are exposed . |
| | | | | **qualifierString** string | success | Qualifier of the column. |
| | | | | **type** string | success | The type to convert the value in cells of this column. |
| | | | **encoding** string | success | The encoding of the values when the type is not STRING. |
| | | | **familyId** string | success | Identifier of the column family. |
| | | | **onlyReadLatest** boolean | success | If this is set only the latest version of value are exposed for all columns in this column family . |
| | | | **type** string | success | The type to convert the value in cells of this column family. |
| | | **ignoreUnspecifiedColumnFamilies** boolean | success | If field is true, then the column families that are not specified in columnFamilies list are not exposed in the table schema . |
| | | **readRowkeyAsString** boolean | success | If field is true, then the rowkey column families will be read and converted to string. |
| | **compression** string | success | The compression type of the data source. |
| | **csvOptions** complex | success | Additional properties to set if sourceFormat is set to CSV. |
| | | **allowJaggedRows** boolean | success | Indicates if BigQuery should accept rows that are missing trailing optional columns . |
| | | **allowQuotedNewlines** boolean | success | Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file . |
| | | **encoding** string | success | The character encoding of the data. |
| | | **fieldDelimiter** string | success | The separator for fields in a CSV file. |
| | | **quote** string | success | The value that is used to quote data sections in a CSV file. |
| | | **skipLeadingRows** integer | success | The number of rows at the top of a CSV file that BigQuery will skip when reading the data. |
| | **googleSheetsOptions** complex | success | Additional options if sourceFormat is set to GOOGLE\_SHEETS. |
| | | **skipLeadingRows** integer | success | The number of rows at the top of a Google Sheet that BigQuery will skip when reading the data. |
| | **ignoreUnknownValues** boolean | success | Indicates if BigQuery should allow extra values that are not represented in the table schema . |
| | **maxBadRecords** integer | success | The maximum number of bad records that BigQuery can ignore when reading data . |
| | **schema** complex | success | The schema for the data. Schema is required for CSV and JSON formats. |
| | | **fields** complex | success | Describes the fields in a table. |
| | | | **description** string | success | The field description. |
| | | | **fields** list / elements=string | success | Describes the nested schema fields if the type property is set to RECORD . |
| | | | **mode** string | success | Field mode. |
| | | | **name** string | success | Field name. |
| | | | **type** string | success | Field data type. |
| | **sourceFormat** string | success | The data format. |
| | **sourceUris** list / elements=string | success | The fully-qualified URIs that point to your data in Google Cloud. For Google Cloud Storage URIs: Each URI can contain one '\*' wildcard character and it must come after the 'bucket' name. Size limits related to load jobs apply to external data sources. For Google Cloud Bigtable URIs: Exactly one URI can be specified and it has be a fully specified and valid HTTPS URL for a Google Cloud Bigtable table. For Google Cloud Datastore backups, exactly one URI can be specified. Also, the '\*' wildcard character is not allowed. |
| **friendlyName** string | success | A descriptive name for this table. |
| **id** string | success | An opaque ID uniquely identifying the table. |
| **labels** dictionary | success | The labels associated with this dataset. You can use these to organize and group your datasets . |
| **lastModifiedTime** integer | success | The time when this table was last modified, in milliseconds since the epoch. |
| **location** string | success | The geographic location where the table resides. This value is inherited from the dataset. |
| **name** string | success | Name of the table. |
| **numBytes** integer | success | The size of this table in bytes, excluding any data in the streaming buffer. |
| **numLongTermBytes** integer | success | The number of bytes in the table that are considered "long-term storage". |
| **numRows** integer | success | The number of rows of data in this table, excluding any data in the streaming buffer. |
| **requirePartitionFilter** boolean | success | If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. |
| **schema** complex | success | Describes the schema of this table. |
| | **fields** complex | success | Describes the fields in a table. |
| | | **description** string | success | The field description. The maximum length is 1,024 characters. |
| | | **fields** list / elements=string | success | Describes the nested schema fields if the type property is set to RECORD. |
| | | **mode** string | success | The field mode. |
| | | **name** string | success | The field name. |
| | | **type** string | success | The field data type. |
| **streamingBuffer** complex | success | Contains information regarding this table's streaming buffer, if one is present. This field will be absent if the table is not being streamed to or if there is no data in the streaming buffer. |
| | **estimatedBytes** integer | success | A lower-bound estimate of the number of bytes currently in the streaming buffer. |
| | **estimatedRows** integer | success | A lower-bound estimate of the number of rows currently in the streaming buffer. |
| | **oldestEntryTime** integer | success | Contains the timestamp of the oldest entry in the streaming buffer, in milliseconds since the epoch, if the streaming buffer is available. |
| **tableReference** complex | success | Reference describing the ID of this table. |
| | **datasetId** string | success | The ID of the dataset containing this table. |
| | **projectId** string | success | The ID of the project containing this table. |
| | **tableId** string | success | The ID of the the table. |
| **timePartitioning** complex | success | If specified, configures time-based partitioning for this table. |
| | **expirationMs** integer | success | Number of milliseconds for which to keep the storage for a partition. |
| | **field** string | success | If not set, the table is partitioned by pseudo column, referenced via either '\_PARTITIONTIME' as TIMESTAMP type, or '\_PARTITIONDATE' as DATE type. If field is specified, the table is instead partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. |
| | **type** string | success | The only type supported is DAY, which will generate one partition per day. |
| **type** string | success | Describes the table type. |
| **view** complex | success | The view definition. |
| | **useLegacySql** boolean | success | Specifies whether to use BigQuery's legacy SQL for this view . |
| | **userDefinedFunctionResources** complex | success | Describes user-defined function resources used in the query. |
| | | **inlineCode** string | success | An inline resource that contains code for a user-defined function (UDF). Providing a inline code resource is equivalent to providing a URI for a file containing the same code. |
| | | **resourceUri** string | success | A code resource to load from a Google Cloud Storage URI (gs://bucket/path). |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute β Google Cloud Compute Engine inventory source google.cloud.gcp\_compute β Google Cloud Compute Engine inventory source
========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get inventory hosts from Google Cloud Platform GCE.
* Uses a YAML configuration file that ends with gcp\_compute.(yml|yaml) or gcp.(yml|yaml).
Requirements
------------
The below requirements are needed on the local controller node that executes this inventory.
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* serviceaccount
* machineaccount
| env:GCP\_AUTH\_KIND added in 2.8.2 of google.cloud | The type of credential used. |
| **cache** boolean | **Choices:*** **no** β
* yes
| ini entries: [inventory]cache = no env:ANSIBLE\_INVENTORY\_CACHE | Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. |
| **cache\_connection** string | | ini entries: [defaults]fact\_caching\_connection = None [inventory]cache\_connection = None env:ANSIBLE\_CACHE\_PLUGIN\_CONNECTION env:ANSIBLE\_INVENTORY\_CACHE\_CONNECTION | Cache connection data or path, read cache plugin documentation for specifics. |
| **cache\_plugin** string | **Default:**"memory" | ini entries: [defaults]fact\_caching = memory [inventory]cache\_plugin = memory env:ANSIBLE\_CACHE\_PLUGIN env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN | Cache plugin to use for the inventory's source data. |
| **cache\_prefix** string | **Default:**"ansible\_inventory\_" | ini entries: [default]fact\_caching\_prefix = ansible\_inventory\_ [inventory]cache\_prefix = ansible\_inventory\_ env:ANSIBLE\_CACHE\_PLUGIN\_PREFIX env:ANSIBLE\_INVENTORY\_CACHE\_PLUGIN\_PREFIX | Prefix to use for cache plugin files/tables |
| **cache\_timeout** integer | **Default:**3600 | ini entries: [defaults]fact\_caching\_timeout = 3600 [inventory]cache\_timeout = 3600 env:ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT env:ANSIBLE\_INVENTORY\_CACHE\_TIMEOUT | Cache duration in seconds |
| **compose** dictionary | **Default:**{} | | Create vars from jinja2 expressions. |
| **filters** list / elements=string | | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/compute/docs/reference/rest/v1/instances/aggregatedList>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) |
| **folders** list / elements=string | | | A folder that contains many projects |
| **groups** dictionary | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. |
| **hostnames** list / elements=string | **Default:**["public\_ip", "private\_ip", "name"] | | A list of options that describe the ordering for which hostnames should be assigned. Currently supported hostnames are 'public\_ip', 'private\_ip', or 'name'. |
| **keyed\_groups** list / elements=string | **Default:**[] | | Add hosts to group based on the values of a variable. |
| **leading\_separator** boolean added in 2.11 of ansible.builtin | **Choices:*** no
* **yes** β
| | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. |
| **plugin** string / required | **Choices:*** gcp\_compute
| | token that ensures this is a source file for the 'gcp\_compute' plugin. |
| **projects** list / elements=string | | | A list of projects in which to describe GCE instances. |
| **retrieve\_image\_info** boolean added in 2.8 of google.cloud | **Choices:*** **no** β
* yes
| | Populate the `image` host fact for the instances returned with the GCP image name By default this plugin does not attempt to resolve the boot image of an instance to the image name cataloged in GCP because of the performance overhead of the task. Unless this option is enabled, the `image` host variable will be `null`
|
| **scopes** list / elements=string | **Default:**["https://www.googleapis.com/auth/compute"] | env:GCP\_SCOPES added in 2.8.2 of google.cloud | list of authentication scopes |
| **service\_account\_contents** string added in 2.8.2 of google.cloud | | env:GCP\_SERVICE\_ACCOUNT\_CONTENTS | A string representing the contents of a Service Account JSON file. This should not be passed in as a dictionary, but a string that has the exact contents of a service account json file (valid JSON). |
| **service\_account\_email** string | | env:GCP\_SERVICE\_ACCOUNT\_EMAIL added in 2.8.2 of google.cloud | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | env:GCP\_SERVICE\_ACCOUNT\_FILE added in 2.8.2 of google.cloud env:GCE\_CREDENTIALS\_FILE\_PATH added in 2.8 of google.cloud | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **strict** boolean | **Choices:*** **no** β
* yes
| | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. |
| **use\_contrib\_script\_compatible\_sanitization** boolean added in 2.8 of google.cloud | **Choices:*** **no** β
* yes
| | By default this plugin is using a general group name sanitization to create safe and usable group names for use in Ansible. This option allows you to override that, in efforts to allow migration from the old inventory script. For this to work you should also turn off the TRANSFORM\_INVALID\_GROUP\_CHARS setting, otherwise the core engine will just use the standard sanitization on top. This is not the default as such names break certain functionality as not all characters are valid Python identifiers which group names end up being used as. |
| **use\_extra\_vars** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [inventory\_plugins]use\_extra\_vars = no env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS | Merge extra vars into the available variables for composition (highest precedence). |
| **vars\_prefix** string | **Default:**"" | | prefix to apply to host variables, does not include facts nor params |
| **zones** list / elements=string | | | A list of regions in which to describe GCE instances. If none provided, it defaults to all zones available to a given project. |
Examples
--------
```
plugin: google.cloud.gcp_compute
zones: # populate inventory with instances in these regions
- us-east1-a
projects:
- gcp-prod-gke-100
- gcp-cicd-101
filters:
- machineType = n1-standard-1
- scheduling.automaticRestart = true AND machineType = n1-standard-1
service_account_file: /tmp/service_account.json
auth_kind: serviceaccount
scopes:
- 'https://www.googleapis.com/auth/cloud-platform'
- 'https://www.googleapis.com/auth/compute.readonly'
keyed_groups:
# Create groups from GCE labels
- prefix: gcp
key: labels
hostnames:
# List host by name instead of the default public ip
- name
compose:
# Set an inventory parameter to use the Public IP address to connect to the host
# For Private ip use "networkInterfaces[0].networkIP"
ansible_host: networkInterfaces[0].accessConfigs[0].natIP
```
ansible google.cloud.gcp_compute_interconnect_attachment β Creates a GCP InterconnectAttachment google.cloud.gcp\_compute\_interconnect\_attachment β Creates a GCP InterconnectAttachment
==========================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_interconnect_attachment`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents an InterconnectAttachment (VLAN attachment) resource. For more information, see Creating VLAN Attachments.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **admin\_enabled** boolean | **Choices:*** no
* yes
**Default:**"true" | Whether the VLAN attachment is enabled or disabled. When using PARTNER type this will Pre-Activate the interconnect attachment . |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **bandwidth** string | | Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER\_PROVIDER and DEDICATED, Defaults to BPS\_10G . Some valid choices include: "BPS\_50M", "BPS\_100M", "BPS\_200M", "BPS\_300M", "BPS\_400M", "BPS\_500M", "BPS\_1G", "BPS\_2G", "BPS\_5G", "BPS\_10G", "BPS\_20G", "BPS\_50G" |
| **candidate\_subnets** list / elements=string | | Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress and customerRouterIpAddress for this attachment. All prefixes must be within link-local address space (169.254.0.0/16) and must be /29 or shorter (/28, /27, etc). Google will attempt to select an unused /29 from the supplied candidate prefix(es). The request will fail if all possible /29s are in use on Google's edge. If not supplied, Google will randomly select an unused /29 from all of link-local space. |
| **description** string | | An optional description of this resource. |
| **edge\_availability\_domain** string | | Desired availability domain for the attachment. Only available for type PARTNER, at creation time. For improved reliability, customers should configure a pair of attachments with one per availability domain. The selected availability domain will be provided to the Partner via the pairing key so that the provisioned circuit will lie in the specified domain. If not specified, the value will default to AVAILABILITY\_DOMAIN\_ANY. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **interconnect** string | | URL of the underlying Interconnect object that this attachment's traffic will traverse through. Required if type is DEDICATED, must not be set if type is PARTNER. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | Region where the regional interconnect attachment resides. |
| **router** dictionary / required | | URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network & region within which the Cloud Router is configured. This field represents a link to a Router resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_router task and then set this router field to "{{ name-of-resource }}" |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **type** string | | The type of InterconnectAttachment you wish to create. Defaults to DEDICATED. Some valid choices include: "DEDICATED", "PARTNER", "PARTNER\_PROVIDER" |
| **vlan\_tag8021q** integer | | The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using PARTNER type this will be managed upstream. |
Examples
--------
```
- name: create a interconnect attachment
google.cloud.gcp_compute_interconnect_attachment:
name: test_object
region: us-central1
project: test_project
auth_kind: serviceaccount
interconnect: https://googleapis.com/compute/v1/projects/test_project/global/interconnects/...
router: https://googleapis.com/compute/v1/projects/test_project/regions/us-central1/routers/...
service_account_file: "/tmp/auth.pem"
state: present
register: disk
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **adminEnabled** boolean | success | Whether the VLAN attachment is enabled or disabled. When using PARTNER type this will Pre-Activate the interconnect attachment . |
| **bandwidth** string | success | Provisioned bandwidth capacity for the interconnect attachment. For attachments of type DEDICATED, the user can set the bandwidth. For attachments of type PARTNER, the Google Partner that is operating the interconnect must set the bandwidth. Output only for PARTNER type, mutable for PARTNER\_PROVIDER and DEDICATED, Defaults to BPS\_10G . |
| **candidateSubnets** list / elements=string | success | Up to 16 candidate prefixes that can be used to restrict the allocation of cloudRouterIpAddress and customerRouterIpAddress for this attachment. All prefixes must be within link-local address space (169.254.0.0/16) and must be /29 or shorter (/28, /27, etc). Google will attempt to select an unused /29 from the supplied candidate prefix(es). The request will fail if all possible /29s are in use on Google's edge. If not supplied, Google will randomly select an unused /29 from all of link-local space. |
| **cloudRouterIpAddress** string | success | IPv4 address + prefix length to be configured on Cloud Router Interface for this interconnect attachment. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **customerRouterIpAddress** string | success | IPv4 address + prefix length to be configured on the customer router subinterface for this interconnect attachment. |
| **description** string | success | An optional description of this resource. |
| **edgeAvailabilityDomain** string | success | Desired availability domain for the attachment. Only available for type PARTNER, at creation time. For improved reliability, customers should configure a pair of attachments with one per availability domain. The selected availability domain will be provided to the Partner via the pairing key so that the provisioned circuit will lie in the specified domain. If not specified, the value will default to AVAILABILITY\_DOMAIN\_ANY. |
| **googleReferenceId** string | success | Google reference ID, to be used when raising support tickets with Google or otherwise to debug backend connectivity issues. |
| **id** string | success | The unique identifier for the resource. This identifier is defined by the server. |
| **interconnect** string | success | URL of the underlying Interconnect object that this attachment's traffic will traverse through. Required if type is DEDICATED, must not be set if type is PARTNER. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **pairingKey** string | success | [Output only for type PARTNER. Not present for DEDICATED]. The opaque identifier of an PARTNER attachment used to initiate provisioning with a selected partner. Of the form "XXXXX/region/domain" . |
| **partnerAsn** string | success | [Output only for type PARTNER. Not present for DEDICATED]. Optional BGP ASN for the router that should be supplied by a layer 3 Partner if they configured BGP on behalf of the customer. |
| **privateInterconnectInfo** complex | success | Information specific to an InterconnectAttachment. This property is populated if the interconnect that this is attached to is of type DEDICATED. |
| | **tag8021q** integer | success | 802.1q encapsulation tag to be used for traffic between Google and the customer, going to and from this network and region. |
| **region** string | success | Region where the regional interconnect attachment resides. |
| **router** dictionary | success | URL of the cloud router to be used for dynamic routing. This router must be in the same region as this InterconnectAttachment. The InterconnectAttachment will automatically connect the Interconnect to the network & region within which the Cloud Router is configured. |
| **state** string | success | [Output Only] The current state of this attachment's functionality. |
| **type** string | success | The type of InterconnectAttachment you wish to create. Defaults to DEDICATED. |
| **vlanTag8021q** integer | success | The IEEE 802.1Q VLAN tag for this attachment, in the range 2-4094. When using PARTNER type this will be managed upstream. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_spanner_database_info β Gather info for GCP Database google.cloud.gcp\_spanner\_database\_info β Gather info for GCP Database
========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_spanner_database_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Database
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **instance** dictionary / required | | The instance to create the database on. This field represents a link to a Instance resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_spanner\_instance task and then set this instance field to "{{ name-of-resource }}" |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a database
gcp_spanner_database_info:
instance: "{{ instance }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **extraStatements** list / elements=string | success | An optional list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created. |
| | **instance** dictionary | success | The instance to create the database on. |
| | **name** string | success | A unique identifier for the database, which cannot be changed after the instance is created. Values are of the form [a-z][-a-z0-9]\*[a-z0-9]. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_region_url_map β Creates a GCP RegionUrlMap google.cloud.gcp\_compute\_region\_url\_map β Creates a GCP RegionUrlMap
========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_url_map`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* UrlMaps are used to route requests to a backend service based on rules that you define for the host and path of an incoming URL.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **default\_service** dictionary | | The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. This field represents a link to a RegionBackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_region\_backend\_service task and then set this default\_service field to "{{ name-of-resource }}" |
| **default\_url\_redirect** dictionary | | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | **host\_redirect** string | | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | **https\_redirect** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | **path\_redirect** string | | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | **prefix\_redirect** string | | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | **redirect\_response\_code** string | | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. Some valid choices include: "FOUND", "MOVED\_PERMANENTLY\_DEFAULT", "PERMANENT\_REDIRECT", "SEE\_OTHER", "TEMPORARY\_REDIRECT" |
| | **strip\_query** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **host\_rules** list / elements=dictionary | | The list of HostRules to use against the URL. |
| | **description** string | | An optional description of this HostRule. Provide this property when you create the resource. |
| | **hosts** list / elements=string / required | | The list of host patterns to match. They must be valid hostnames, except \* will match any string of ([a-z0-9-.]\*). In that case, \* must be the first character and must be followed in the pattern by either - or . |
| | **path\_matcher** string / required | | The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **path\_matchers** list / elements=dictionary | | The list of named PathMatchers to use against the URL. |
| | **default\_service** dictionary | | A reference to a RegionBackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's path portion. This field represents a link to a RegionBackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_region\_backend\_service task and then set this default\_service field to "{{ name-of-resource }}" |
| | **default\_url\_redirect** dictionary | | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | | **host\_redirect** string | | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | **https\_redirect** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | **path\_redirect** string | | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **prefix\_redirect** string | | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **redirect\_response\_code** string | | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. Some valid choices include: "FOUND", "MOVED\_PERMANENTLY\_DEFAULT", "PERMANENT\_REDIRECT", "SEE\_OTHER", "TEMPORARY\_REDIRECT" |
| | | **strip\_query** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | **description** string | | An optional description of this resource. |
| | **name** string / required | | The name to which this PathMatcher is referred by the HostRule. |
| | **path\_rules** list / elements=dictionary | | The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/\* will match before /a/b/\* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. |
| | | **paths** list / elements=string / required | | The list of path patterns to match. Each must start with / and the only place a \* is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| | | **route\_action** dictionary | | In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | **cors\_policy** dictionary | | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | **allow\_credentials** boolean | **Choices:*** no
* yes
**Default:**"false" | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | **allow\_headers** list / elements=string | | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | **allow\_methods** list / elements=string | | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | **allow\_origin\_regexes** list / elements=string | | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **allow\_origins** list / elements=string | | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **disabled** boolean / required | **Choices:*** no
* yes
| If true, specifies the CORS policy is disabled. |
| | | | | **expose\_headers** list / elements=string | | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | **max\_age** integer | | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | **fault\_injection\_policy** dictionary | | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | **abort** dictionary | | The specification for how client requests are aborted as part of fault injection. |
| | | | | | **http\_status** integer / required | | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | **percentage** string / required | | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **delay** dictionary | | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | **fixed\_delay** dictionary / required | | Specifies the value of the fixed delay interval. |
| | | | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **percentage** string / required | | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **request\_mirror\_policy** dictionary | | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | **backend\_service** dictionary / required | | The RegionBackendService resource being mirrored to. This field represents a link to a RegionBackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_region\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | | | **retry\_policy** dictionary | | Specifies the retry policy associated with this route. |
| | | | | **num\_retries** integer | | Specifies the allowed number retries. This number must be > 0. |
| | | | | **per\_try\_timeout** dictionary | | Specifies a non-zero timeout per retry attempt. |
| | | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **retry\_conditions** list / elements=string | | Specifies one or more conditions when this retry rule applies. Valid values are: - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. - refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | **timeout** dictionary | | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | **url\_rewrite** dictionary | | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | **host\_rewrite** string | | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | **path\_prefix\_rewrite** string | | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | **weighted\_backend\_services** list / elements=dictionary | | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | **backend\_service** dictionary / required | | The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. This field represents a link to a RegionBackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_region\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | | | | **header\_action** dictionary | | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | **request\_headers\_to\_add** list / elements=dictionary | | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | **header\_name** string / required | | The name of the header. |
| | | | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **request\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | **response\_headers\_to\_add** list / elements=dictionary | | Headers to add the response prior to sending the response back to the client. |
| | | | | | | **header\_name** string / required | | The name of the header. |
| | | | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **response\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | **weight** integer / required | | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | **service** dictionary | | The region backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. This field represents a link to a RegionBackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_region\_backend\_service task and then set this service field to "{{ name-of-resource }}" |
| | | **url\_redirect** dictionary | | When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | **host\_redirect** string | | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | **https\_redirect** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | | **path\_redirect** string | | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **prefix\_redirect** string | | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **redirect\_response\_code** string | | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. Some valid choices include: "FOUND", "MOVED\_PERMANENTLY\_DEFAULT", "PERMANENT\_REDIRECT", "SEE\_OTHER", "TEMPORARY\_REDIRECT" |
| | | | **strip\_query** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | **route\_rules** list / elements=dictionary | | The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. |
| | | **header\_action** dictionary | | Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].r outeAction.weightedBackendService.backendServiceWeightAction[].headerAction . |
| | | | **request\_headers\_to\_add** list / elements=dictionary | | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | **header\_name** string / required | | The name of the header. |
| | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **request\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | **response\_headers\_to\_add** list / elements=dictionary | | Headers to add the response prior to sending the response back to the client. |
| | | | | **header\_name** string / required | | The name of the header. |
| | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **response\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | **match\_rules** list / elements=dictionary | | The rules for determining a match. |
| | | | **full\_path\_match** string | | For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | **header\_matches** list / elements=dictionary | | Specifies a list of header match criteria, all of which must match corresponding headers in the request. |
| | | | | **exact\_match** string | | The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **header\_name** string / required | | The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". |
| | | | | **invert\_match** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false. |
| | | | | **prefix\_match** string | | The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **present\_match** boolean | **Choices:*** no
* yes
| A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value or not. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **range\_match** dictionary | | The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] \* -3 will match \* 0 will not match \* 0.25 will not match \* -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **range\_end** integer / required | | The end of the range (exclusive). |
| | | | | | **range\_start** integer / required | | The start of the range (inclusive). |
| | | | | **regex\_match** string | | The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **suffix\_match** string | | The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | **ignore\_case** boolean | **Choices:*** no
* yes
**Default:**"false" | Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false. |
| | | | **metadata\_filters** list / elements=dictionary | | Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH\_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH\_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL\_SELF\_MANAGED. |
| | | | | **filter\_labels** list / elements=dictionary / required | | The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. |
| | | | | | **name** string / required | | Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long. |
| | | | | | **value** string / required | | The value of the label must match the specified value. value can have a maximum length of 1024 characters. |
| | | | | **filter\_match\_criteria** string / required | | Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are: \* MATCH\_ANY: At least one of the filterLabels must have a matching label in the provided metadata. \* MATCH\_ALL: All filterLabels must have matching labels in the provided metadata. Some valid choices include: "MATCH\_ALL", "MATCH\_ANY" |
| | | | **prefix\_match** string | | For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /. The value must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | **query\_parameter\_matches** list / elements=dictionary | | Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. |
| | | | | **exact\_match** string | | The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | **name** string / required | | The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails. |
| | | | | **present\_match** boolean | **Choices:*** no
* yes
| Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | **regex\_match** string | | The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | **regex\_match** string | | For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | **priority** integer / required | | For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules. |
| | | **route\_action** dictionary | | In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | **cors\_policy** dictionary | | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | **allow\_credentials** boolean | **Choices:*** no
* yes
**Default:**"false" | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | **allow\_headers** list / elements=string | | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | **allow\_methods** list / elements=string | | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | **allow\_origin\_regexes** list / elements=string | | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **allow\_origins** list / elements=string | | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **disabled** boolean | **Choices:*** no
* yes
**Default:**"false" | If true, specifies the CORS policy is disabled. which indicates that the CORS policy is in effect. Defaults to false. |
| | | | | **expose\_headers** list / elements=string | | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | **max\_age** integer | | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | **fault\_injection\_policy** dictionary | | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | **abort** dictionary | | The specification for how client requests are aborted as part of fault injection. |
| | | | | | **http\_status** integer | | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | **percentage** string | | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **delay** dictionary | | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | **fixed\_delay** dictionary | | Specifies the value of the fixed delay interval. |
| | | | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **percentage** string | | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **request\_mirror\_policy** dictionary | | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | **backend\_service** dictionary / required | | The RegionBackendService resource being mirrored to. This field represents a link to a RegionBackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_region\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | | | **retry\_policy** dictionary | | Specifies the retry policy associated with this route. |
| | | | | **num\_retries** integer / required | | Specifies the allowed number retries. This number must be > 0. |
| | | | | **per\_try\_timeout** dictionary | | Specifies a non-zero timeout per retry attempt. |
| | | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **retry\_conditions** list / elements=string | | Specifies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | **timeout** dictionary | | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | **url\_rewrite** dictionary | | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | **host\_rewrite** string | | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | **path\_prefix\_rewrite** string | | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | **weighted\_backend\_services** list / elements=dictionary | | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | **backend\_service** dictionary / required | | The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. This field represents a link to a RegionBackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_region\_backend\_service task and then set this backend\_service field to "{{ name-of-resource }}" |
| | | | | **header\_action** dictionary | | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | **request\_headers\_to\_add** list / elements=dictionary | | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | **header\_name** string / required | | The name of the header. |
| | | | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **request\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | **response\_headers\_to\_add** list / elements=dictionary | | Headers to add the response prior to sending the response back to the client. |
| | | | | | | **header\_name** string / required | | The name of the header. |
| | | | | | | **header\_value** string / required | | The value of the header to add. |
| | | | | | | **replace** boolean / required | **Choices:*** no
* yes
| If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **response\_headers\_to\_remove** list / elements=string | | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | **weight** integer / required | | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | **service** dictionary | | The region backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. This field represents a link to a RegionBackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_region\_backend\_service task and then set this service field to "{{ name-of-resource }}" |
| | | **url\_redirect** dictionary | | When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | **host\_redirect** string | | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | **https\_redirect** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | | **path\_redirect** string | | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **prefix\_redirect** string | | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **redirect\_response\_code** string | | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. Some valid choices include: "FOUND", "MOVED\_PERMANENTLY\_DEFAULT", "PERMANENT\_REDIRECT", "SEE\_OTHER", "TEMPORARY\_REDIRECT" |
| | | | **strip\_query** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default value is false. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | A reference to the region where the url map resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **tests** list / elements=dictionary | | The list of expected URL mappings. Requests to update this UrlMap will succeed only if all of the test cases pass. |
| | **description** string | | Description of this test case. |
| | **host** string / required | | Host portion of the URL. |
| | **path** string / required | | Path portion of the URL. |
| | **service** dictionary / required | | A reference to expected RegionBackendService resource the given URL should be mapped to. This field represents a link to a RegionBackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_region\_backend\_service task and then set this service field to "{{ name-of-resource }}" |
Examples
--------
```
- name: create a health check
google.cloud.gcp_compute_health_check:
name: "{{ resource_name }}"
type: HTTP
http_health_check:
port: 80
check_interval_sec: 1
timeout_sec: 1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: healthcheck
- name: create a region backend service
google.cloud.gcp_compute_region_backend_service:
name: "{{ resource_name }}"
region: us-central1
health_checks:
- "{{ healthcheck.selfLink }}"
protocol: HTTP
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: backendservice
- name: create a region URL map
google.cloud.gcp_compute_region_url_map:
name: test_object
region: us-central1
default_service: "{{ backendservice }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **defaultService** dictionary | success | The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService must be set. |
| **defaultUrlRedirect** complex | success | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **fingerprint** string | success | Fingerprint of this resource. This field is used internally during updates of this resource. |
| **hostRules** complex | success | The list of HostRules to use against the URL. |
| | **description** string | success | An optional description of this HostRule. Provide this property when you create the resource. |
| | **hosts** list / elements=string | success | The list of host patterns to match. They must be valid hostnames, except \* will match any string of ([a-z0-9-.]\*). In that case, \* must be the first character and must be followed in the pattern by either - or . |
| | **pathMatcher** string | success | The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. |
| **id** integer | success | The unique identifier for the resource. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **pathMatchers** complex | success | The list of named PathMatchers to use against the URL. |
| | **defaultService** dictionary | success | A reference to a RegionBackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's path portion. |
| | **defaultUrlRedirect** complex | success | When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. |
| | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | **description** string | success | An optional description of this resource. |
| | **name** string | success | The name to which this PathMatcher is referred by the HostRule. |
| | **pathRules** complex | success | The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/\* will match before /a/b/\* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. |
| | | **paths** list / elements=string | success | The list of path patterns to match. Each must start with / and the only place a \* is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. |
| | | **routeAction** complex | success | In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. |
| | | | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | **maxAge** integer | success | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | **backendService** dictionary | success | The RegionBackendService resource being mirrored to. |
| | | | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. |
| | | | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. |
| | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **retryConditions** list / elements=string | success | Specifies one or more conditions when this retry rule applies. Valid values are: - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. - refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | **backendService** dictionary | success | The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | **service** dictionary | success | The region backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
| | | **urlRedirect** complex | success | When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. |
| | **routeRules** complex | success | The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. |
| | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].r outeAction.weightedBackendService.backendServiceWeightAction[].headerAction . |
| | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | **headerName** string | success | The name of the header. |
| | | | | **headerValue** string | success | The value of the header to add. |
| | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | **headerName** string | success | The name of the header. |
| | | | | **headerValue** string | success | The value of the header to add. |
| | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | **matchRules** complex | success | The rules for determining a match. |
| | | | **fullPathMatch** string | success | For satisfying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | **headerMatches** complex | success | Specifies a list of header match criteria, all of which must match corresponding headers in the request. |
| | | | | **exactMatch** string | success | The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **headerName** string | success | The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". |
| | | | | **invertMatch** boolean | success | If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false. |
| | | | | **prefixMatch** string | success | The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **presentMatch** boolean | success | A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value or not. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **rangeMatch** complex | success | The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] \* -3 will match \* 0 will not match \* 0.25 will not match \* -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | | **rangeEnd** integer | success | The end of the range (exclusive). |
| | | | | | **rangeStart** integer | success | The start of the range (inclusive). |
| | | | | **regexMatch** string | success | The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | | **suffixMatch** string | success | The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. |
| | | | **ignoreCase** boolean | success | Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false. |
| | | | **metadataFilters** complex | success | Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH\_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH\_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL\_SELF\_MANAGED. |
| | | | | **filterLabels** complex | success | The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. |
| | | | | | **name** string | success | Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long. |
| | | | | | **value** string | success | The value of the label must match the specified value. value can have a maximum length of 1024 characters. |
| | | | | **filterMatchCriteria** string | success | Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are: \* MATCH\_ANY: At least one of the filterLabels must have a matching label in the provided metadata. \* MATCH\_ALL: All filterLabels must have matching labels in the provided metadata. |
| | | | **prefixMatch** string | success | For satisfying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /. The value must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | | **queryParameterMatches** complex | success | Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. |
| | | | | **exactMatch** string | success | The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | **name** string | success | The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails. |
| | | | | **presentMatch** boolean | success | Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | | **regexMatch** string | success | The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set. |
| | | | **regexMatch** string | success | For satisfying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript Only one of prefixMatch, fullPathMatch or regexMatch must be specified. |
| | | **priority** integer | success | For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules. |
| | | **routeAction** complex | success | In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. |
| | | | **corsPolicy** complex | success | The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing . |
| | | | | **allowCredentials** boolean | success | In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. |
| | | | | **allowHeaders** list / elements=string | success | Specifies the content for the Access-Control-Allow-Headers header. |
| | | | | **allowMethods** list / elements=string | success | Specifies the content for the Access-Control-Allow-Methods header. |
| | | | | **allowOriginRegexes** list / elements=string | success | Specifies the regular expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **allowOrigins** list / elements=string | success | Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow\_origins or allow\_origin\_regex. |
| | | | | **disabled** boolean | success | If true, specifies the CORS policy is disabled. which indicates that the CORS policy is in effect. Defaults to false. |
| | | | | **exposeHeaders** list / elements=string | success | Specifies the content for the Access-Control-Expose-Headers header. |
| | | | | **maxAge** integer | success | Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. |
| | | | **faultInjectionPolicy** complex | success | The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry\_policy will be ignored by clients that are configured with a fault\_injection\_policy. |
| | | | | **abort** complex | success | The specification for how client requests are aborted as part of fault injection. |
| | | | | | **httpStatus** integer | success | The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. |
| | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | | **delay** complex | success | The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. |
| | | | | | **fixedDelay** complex | success | Specifies the value of the fixed delay interval. |
| | | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | | **percentage** string | success | The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. |
| | | | **requestMirrorPolicy** complex | success | Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. |
| | | | | **backendService** dictionary | success | The RegionBackendService resource being mirrored to. |
| | | | **retryPolicy** complex | success | Specifies the retry policy associated with this route. |
| | | | | **numRetries** integer | success | Specifies the allowed number retries. This number must be > 0. |
| | | | | **perTryTimeout** complex | success | Specifies a non-zero timeout per retry attempt. |
| | | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | | **retryConditions** list / elements=string | success | Specifies one or more conditions when this retry rule applies. Valid values are: \* 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. \* gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. \* connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. \* retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. \* refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED\_STREAM error code. This reset type indicates that it is safe to retry. \* cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled \* deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded \* resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted \* unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable . |
| | | | **timeout** complex | success | Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. |
| | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** string | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | | **urlRewrite** complex | success | The spec to modify the URL of the request, prior to forwarding the request to the matched service . |
| | | | | **hostRewrite** string | success | Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. |
| | | | | **pathPrefixRewrite** string | success | Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. |
| | | | **weightedBackendServices** complex | success | A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. |
| | | | | **backendService** dictionary | success | The default RegionBackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. |
| | | | | **headerAction** complex | success | Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. |
| | | | | | **requestHeadersToAdd** complex | success | Headers to add to a matching request prior to forwarding the request to the backendService. |
| | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **requestHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. |
| | | | | | **responseHeadersToAdd** complex | success | Headers to add the response prior to sending the response back to the client. |
| | | | | | | **headerName** string | success | The name of the header. |
| | | | | | | **headerValue** string | success | The value of the header to add. |
| | | | | | | **replace** boolean | success | If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. |
| | | | | | **responseHeadersToRemove** list / elements=string | success | A list of header names for headers that need to be removed from the response prior to sending the response back to the client. |
| | | | | **weight** integer | success | Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 . |
| | | **service** dictionary | success | The region backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. |
| | | **urlRedirect** complex | success | When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. |
| | | | **hostRedirect** string | success | The host that will be used in the redirect response instead of the one that was supplied in the request. The value must be between 1 and 255 characters. |
| | | | **httpsRedirect** boolean | success | If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. This must only be set for UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted. The default is set to false. |
| | | | **pathRedirect** string | success | The path that will be used in the redirect response instead of the one that was supplied in the request. pathRedirect cannot be supplied together with prefixRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **prefixRedirect** string | success | The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. prefixRedirect cannot be supplied together with pathRedirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect. The value must be between 1 and 1024 characters. |
| | | | **redirectResponseCode** string | success | The HTTP Status code to use for this RedirectAction. Supported values are: \* MOVED\_PERMANENTLY\_DEFAULT, which is the default value and corresponds to 301. \* FOUND, which corresponds to 302. \* SEE\_OTHER which corresponds to 303. \* TEMPORARY\_REDIRECT, which corresponds to 307. In this case, the request method will be retained. \* PERMANENT\_REDIRECT, which corresponds to 308. In this case, the request method will be retained. |
| | | | **stripQuery** boolean | success | If set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default value is false. |
| **region** string | success | A reference to the region where the url map resides. |
| **tests** complex | success | The list of expected URL mappings. Requests to update this UrlMap will succeed only if all of the test cases pass. |
| | **description** string | success | Description of this test case. |
| | **host** string | success | Host portion of the URL. |
| | **path** string | success | Path portion of the URL. |
| | **service** dictionary | success | A reference to expected RegionBackendService resource the given URL should be mapped to. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_route_info β Gather info for GCP Route google.cloud.gcp\_compute\_route\_info β Gather info for GCP Route
==================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_route_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Route
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a route
gcp_compute_route_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **destRange** string | success | The destination range of outgoing packets that this route applies to. Only IPv4 is supported. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **network** dictionary | success | The network that this route applies to. |
| | **nextHopGateway** string | success | URL to a gateway that should handle matching packets. Currently, you can only specify the internet gateway, using a full or partial valid URL: \* <https://www.googleapis.com/compute/v1/projects/project/global/gateways/default-internet-gateway> \* projects/project/global/gateways/default-internet-gateway \* global/gateways/default-internet-gateway . |
| | **nextHopIlb** dictionary | success | The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: <https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule> regions/region/forwardingRules/forwardingRule Note that this can only be used when the destinationRange is a public (non-RFC 1918) IP CIDR range. |
| | **nextHopInstance** dictionary | success | URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: \* <https://www.googleapis.com/compute/v1/projects/project/zones/zone/> instances/instance \* projects/project/zones/zone/instances/instance \* zones/zone/instances/instance . |
| | **nextHopIp** string | success | Network IP address of an instance that should handle matching packets. |
| | **nextHopNetwork** string | success | URL to a Network that should handle matching packets. |
| | **nextHopVpnTunnel** dictionary | success | URL to a VpnTunnel that should handle matching packets. |
| | **priority** integer | success | The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535. |
| | **tags** list / elements=string | success | A list of instance tags to which this route applies. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_cloudbuild_trigger_info β Gather info for GCP Trigger google.cloud.gcp\_cloudbuild\_trigger\_info β Gather info for GCP Trigger
=========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_cloudbuild_trigger_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Trigger
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a trigger
gcp_cloudbuild_trigger_info:
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **build** complex | success | Contents of the build template. Either a filename or build template must be provided. |
| | | **artifacts** complex | success | Artifacts produced by the build that should be uploaded upon successful completion of all build steps. |
| | | | **images** list / elements=string | success | A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE. |
| | | | **objects** complex | success | A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE. |
| | | | | **location** string | success | Cloud Storage bucket and optional object path, in the form "gs://bucket/path/to/somewhere/". Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix. |
| | | | | **paths** list / elements=string | success | Path globs used to match files in the build's workspace. |
| | | | | **timing** complex | success | Output only. Stores timing information for pushing all artifact objects. |
| | | | | | **endTime** string | success | End of time span. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". |
| | | | | | **startTime** string | success | Start of time span. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". |
| | | **images** list / elements=string | success | A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE. |
| | | **logsBucket** string | success | Google Cloud Storage bucket where logs should be written. Logs file names will be of the format ${logsBucket}/log-${build\_id}.txt. |
| | | **options** complex | success | Special options for this build. |
| | | | **diskSizeGb** integer | success | Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 1000GB; builds that request more than the maximum are rejected with an error. |
| | | | **dynamicSubstitutions** boolean | success | Option to specify whether or not to apply bash style string operations to the substitutions. NOTE this is always enabled for triggered builds and cannot be overridden in the build configuration file. |
| | | | **env** list / elements=string | success | A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". |
| | | | **logging** string | success | Option to specify the logging mode, which determines if and where build logs are stored. |
| | | | **logStreamingOption** string | success | Option to define build log streaming behavior to Google Cloud Storage. |
| | | | **machineType** string | success | Compute Engine machine type on which to run the build. |
| | | | **requestedVerifyOption** string | success | Requested verifiability options. |
| | | | **secretEnv** list / elements=string | success | A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build. |
| | | | **sourceProvenanceHash** list / elements=string | success | Requested hash for SourceProvenance. |
| | | | **substitutionOption** string | success | Option to specify behavior when there is an error in the substitution checks. NOTE this is always set to ALLOW\_LOOSE for triggered builds and cannot be overridden in the build configuration file. |
| | | | **volumes** complex | success | Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration. |
| | | | | **name** string | success | Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. |
| | | | | **path** string | success | Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. |
| | | | **workerPool** string | success | Option to specify a WorkerPool for the build. Format projects/{project}/workerPools/{workerPool} This field is experimental. |
| | | **queueTtl** string | success | TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from createTime. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". |
| | | **secrets** complex | success | Secrets to decrypt using Cloud Key Management Service. |
| | | | **kmsKeyName** string | success | Cloud KMS key name to use to decrypt these envs. |
| | | | **secretEnv** dictionary | success | Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets. |
| | | **source** complex | success | The location of the source files to build. |
| | | | **repoSource** complex | success | Location of the source in a Google Cloud Source Repository. |
| | | | | **branchName** string | success | Regex matching branches to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at <https://github.com/google/re2/wiki/Syntax> . |
| | | | | **commitSha** string | success | Explicit commit SHA to build. Exactly one a of branch name, tag, or commit SHA must be provided. |
| | | | | **dir** string | success | Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution. |
| | | | | **invertRegex** boolean | success | Only trigger a build if the revision regex does NOT match the revision regex. |
| | | | | **projectId** string | success | ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. |
| | | | | **repoName** string | success | Name of the Cloud Source Repository. |
| | | | | **substitutions** dictionary | success | Substitutions to use in a triggered build. Should only be used with triggers.run . |
| | | | | **tagName** string | success | Regex matching tags to build. Exactly one a of branch name, tag, or commit SHA must be provided. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at <https://github.com/google/re2/wiki/Syntax> . |
| | | | **storageSource** complex | success | Location of the source in an archive file in Google Cloud Storage. |
| | | | | **bucket** string | success | Google Cloud Storage bucket containing the source. |
| | | | | **generation** string | success | Google Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used . |
| | | | | **object** string | success | Google Cloud Storage object containing the source. This object must be a gzipped archive file (.tar.gz) containing source to build. |
| | | **steps** complex | success | The operations to be performed on the workspace. |
| | | | **args** list / elements=string | success | A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the args are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments. |
| | | | **dir** string | success | Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution. |
| | | | **entrypoint** string | success | Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used . |
| | | | **env** list / elements=string | success | A list of environment variable definitions to be used when running a step. The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". |
| | | | **id** string | success | Unique identifier for this build step, used in `wait\_for` to reference this build step as a dependency. |
| | | | **name** string | success | The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps (see <https://github.com/GoogleCloudPlatform/cloud-builders> for images and examples). The Docker daemon will also have cached many of the layers for some popular images, like "ubuntu", "debian", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step. |
| | | | **secretEnv** list / elements=string | success | A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. |
| | | | **timeout** string | success | Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out. |
| | | | **timing** string | success | Output only. Stores timing information for executing this build step. |
| | | | **volumes** complex | success | List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration. |
| | | | | **name** string | success | Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. |
| | | | | **path** string | success | Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. |
| | | | **waitFor** list / elements=string | success | The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait\_for` have completed successfully. If `wait\_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully. |
| | | **substitutions** dictionary | success | Substitutions data for Build resource. |
| | | **tags** list / elements=string | success | Tags for annotation of a Build. These are not docker tags. |
| | | **timeout** string | success | Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. This timeout must be equal to or greater than the sum of the timeouts for build steps within the build. The expected format is the number of seconds followed by s. Default time is ten minutes (600s). |
| | **createTime** string | success | Time when the trigger was created. |
| | **description** string | success | Human-readable description of the trigger. |
| | **disabled** boolean | success | Whether the trigger is disabled or not. If true, the trigger will never result in a build. |
| | **filename** string | success | Path, from the source root, to a file whose contents is used for the template. Either a filename or build template must be provided. |
| | **github** complex | success | Describes the configuration of a trigger that creates a build whenever a GitHub event is received. |
| | | **name** string | success | Name of the repository. For example: The name for <https://github.com/googlecloudplatform/cloud-builders> is "cloud-builders". |
| | | **owner** string | success | Owner of the repository. For example: The owner for <https://github.com/googlecloudplatform/cloud-builders> is "googlecloudplatform". |
| | | **pullRequest** complex | success | filter to match changes in pull requests. Specify only one of pullRequest or push. |
| | | | **branch** string | success | Regex of branches to match. |
| | | | **commentControl** string | success | Whether to block builds on a "/gcbrun" comment from a repository owner or collaborator. |
| | | | **invertRegex** boolean | success | If true, branches that do NOT match the git\_ref will trigger a build. |
| | | **push** complex | success | filter to match changes in refs, like branches or tags. Specify only one of pullRequest or push. |
| | | | **branch** string | success | Regex of branches to match. Specify only one of branch or tag. |
| | | | **invertRegex** boolean | success | When true, only trigger a build if the revision regex does NOT match the git\_ref regex. |
| | | | **tag** string | success | Regex of tags to match. Specify only one of branch or tag. |
| | **id** string | success | The unique identifier for the trigger. |
| | **ignoredFiles** list / elements=string | success | ignoredFiles and includedFiles are file glob matches using <https://golang.org/pkg/path/filepath/#Match> extended with support for `\*\*`. If ignoredFiles and changed files are both empty, then they are not used to determine whether or not to trigger a build. If ignoredFiles is not empty, then we ignore any files that match any of the ignored\_file globs. If the change has no files that are outside of the ignoredFiles globs, then we do not trigger a build. |
| | **includedFiles** list / elements=string | success | ignoredFiles and includedFiles are file glob matches using <https://golang.org/pkg/path/filepath/#Match> extended with support for `\*\*`. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is empty, then as far as this filter is concerned, we should trigger the build. If any of the files altered in the commit pass the ignoredFiles filter and includedFiles is not empty, then we make sure that at least one of those files matches a includedFiles glob. If not, then we do not trigger a build. |
| | **name** string | success | Name of the trigger. Must be unique within the project. |
| | **substitutions** dictionary | success | Substitutions data for Build resource. |
| | **tags** list / elements=string | success | Tags for annotation of a BuildTrigger . |
| | **triggerTemplate** complex | success | Template describing the types of source changes to trigger a build. Branch and tag names in trigger templates are interpreted as regular expressions. Any branch or tag change that matches that regular expression will trigger a build. |
| | | **branchName** string | success | Name of the branch to build. Exactly one a of branch name, tag, or commit SHA must be provided. This field is a regular expression. |
| | | **commitSha** string | success | Explicit commit SHA to build. Exactly one of a branch name, tag, or commit SHA must be provided. |
| | | **dir** string | success | Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's dir is specified and is an absolute path, this value is ignored for that step's execution. |
| | | **invertRegex** boolean | success | Only trigger a build if the revision regex does NOT match the revision regex. |
| | | **projectId** string | success | ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed. |
| | | **repoName** string | success | Name of the Cloud Source Repository. If omitted, the name "default" is assumed. |
| | | **tagName** string | success | Name of the tag to build. Exactly one of a branch name, tag, or commit SHA must be provided. This field is a regular expression. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_dns_resource_record_set_info β Gather info for GCP ResourceRecordSet google.cloud.gcp\_dns\_resource\_record\_set\_info β Gather info for GCP ResourceRecordSet
==========================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_dns_resource_record_set_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP ResourceRecordSet
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **managed\_zone** dictionary / required | | Identifies the managed zone addressed by this request. This must be a dictionary that contains both a 'name' key and a 'dnsName' key. You can pass in the results of the gcp\_dns\_managed\_zone module, which will contain both. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a resource record set
gcp_dns_resource_record_set_info:
managed_zone: "{{ managed_zone }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **managed\_zone** dictionary | success | Identifies the managed zone addressed by this request. This must be a dictionary that contains both a 'name' key and a 'dnsName' key. You can pass in the results of the gcp\_dns\_managed\_zone module, which will contain both. |
| | **name** string | success | For example, <www.example.com>. |
| | **target** list / elements=string | success | As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) . |
| | **ttl** integer | success | Number of seconds that this ResourceRecordSet can be cached by resolvers. |
| | **type** string | success | One of valid DNS resource types. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_reservation_info β Gather info for GCP Reservation google.cloud.gcp\_compute\_reservation\_info β Gather info for GCP Reservation
==============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_reservation_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Reservation
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone** string / required | | The zone where the reservation is made. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a reservation
gcp_compute_reservation_info:
zone: us-central1-a
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **commitment** string | success | Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **specificReservation** complex | success | Reservation for instances with specific machine shapes. |
| | | **count** integer | success | The number of resources that are allocated. |
| | | **instanceProperties** complex | success | The instance properties for the reservation. |
| | | | **guestAccelerators** complex | success | Guest accelerator type and count. |
| | | | | **acceleratorCount** integer | success | The number of the guest accelerator cards exposed to this instance. |
| | | | | **acceleratorType** string | success | The full or partial URL of the accelerator type to attach to this instance. For example: `projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100` If you are creating an instance template, specify only the accelerator name. |
| | | | **localSsds** complex | success | The amount of local ssd to reserve with each instance. This reserves disks of type `local-ssd`. |
| | | | | **diskSizeGb** integer | success | The size of the disk in base-2 GB. |
| | | | | **interface** string | success | The disk interface to use for attaching this disk. |
| | | | **machineType** string | success | The name of the machine type to reserve. |
| | | | **minCpuPlatform** string | success | The minimum CPU platform for the reservation. For example, `"Intel Skylake"`. See <https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform#availablezones> for information on available CPU platforms. |
| | | **inUseCount** integer | success | How many instances are in use. |
| | **specificReservationRequired** boolean | success | When set to true, only VMs that target this reservation by name can consume this reservation. Otherwise, it can be consumed by VMs with affinity for any reservation. Defaults to false. |
| | **status** string | success | The status of the reservation. |
| | **zone** string | success | The zone where the reservation is made. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_firewall β Creates a GCP Firewall google.cloud.gcp\_compute\_firewall β Creates a GCP Firewall
============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_firewall`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Each network has its own firewall controlling access to and from the instances.
* All traffic to instances, even from other instances, is blocked by the firewall unless firewall rules are created to allow it.
* The default network has automatically created firewall rules that are shown in default firewall rules. No manually created network has automatically created firewall rules except for a default βallowβ rule for outgoing traffic and a default βdenyβ for incoming traffic. For all networks except the default network, you must create any firewall rules you need.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allowed** list / elements=dictionary | | The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. |
| | **ip\_protocol** string / required | | The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip, all), or the IP protocol number. |
| | **ports** list / elements=string | | An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **denied** list / elements=dictionary | | The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. |
| | **ip\_protocol** string / required | | The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip, all), or the IP protocol number. |
| | **ports** list / elements=string | | An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **destination\_ranges** list / elements=string | | If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported. |
| **direction** string | | Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags. Some valid choices include: "INGRESS", "EGRESS" |
| **disabled** boolean | **Choices:*** no
* yes
| Denotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **log\_config** dictionary | | This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. |
| | **enable** boolean | **Choices:*** no
* yes
| This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver. |
| | **metadata** string | | This field denotes whether to include or exclude metadata for firewall logs. Some valid choices include: "EXCLUDE\_ALL\_METADATA", "INCLUDE\_ALL\_METADATA" |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary | **Default:**{"selfLink": "global/networks/default"} | URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: <https://www.googleapis.com/compute/v1/projects/myproject/global/> networks/my-network projects/myproject/global/networks/my-network global/networks/default . This field represents a link to a Network resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_network task and then set this network field to "{{ name-of-resource }}" |
| **priority** integer | **Default:**"1000" | Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **source\_ranges** list / elements=string | | If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported. |
| **source\_service\_accounts** list / elements=string | | If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. |
| **source\_tags** list / elements=string | | If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **target\_service\_accounts** list / elements=string | | A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. |
| **target\_tags** list / elements=string | | A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/v1/firewalls>
* Official Documentation: <https://cloud.google.com/vpc/docs/firewalls>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a firewall
google.cloud.gcp_compute_firewall:
name: test_object
allowed:
- ip_protocol: tcp
ports:
- '22'
target_tags:
- test-ssh-server
- staging-ssh-server
source_tags:
- test-ssh-clients
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **allowed** complex | success | The list of ALLOW rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a permitted connection. |
| | **ip\_protocol** string | success | The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip, all), or the IP protocol number. |
| | **ports** list / elements=string | success | An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **denied** complex | success | The list of DENY rules specified by this firewall. Each rule specifies a protocol and port-range tuple that describes a denied connection. |
| | **ip\_protocol** string | success | The IP protocol to which this rule applies. The protocol type is required when creating a firewall rule. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp, ipip, all), or the IP protocol number. |
| | **ports** list / elements=string | success | An optional list of ports to which this rule applies. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, this rule applies to connections through any port. Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **destinationRanges** list / elements=string | success | If destination ranges are specified, the firewall will apply only to traffic that has destination IP address in these ranges. These ranges must be expressed in CIDR format. Only IPv4 is supported. |
| **direction** string | success | Direction of traffic to which this firewall applies; default is INGRESS. Note: For INGRESS traffic, it is NOT supported to specify destinationRanges; For EGRESS traffic, it is NOT supported to specify sourceRanges OR sourceTags. |
| **disabled** boolean | success | Denotes whether the firewall rule is disabled, i.e not applied to the network it is associated with. When set to true, the firewall rule is not enforced and the network behaves as if it did not exist. If this is unspecified, the firewall rule will be enabled. |
| **id** integer | success | The unique identifier for the resource. |
| **logConfig** complex | success | This field denotes the logging options for a particular firewall rule. If logging is enabled, logs will be exported to Cloud Logging. |
| | **enable** boolean | success | This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver. |
| | **metadata** string | success | This field denotes whether to include or exclude metadata for firewall logs. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary | success | URL of the network resource for this firewall rule. If not specified when creating a firewall rule, the default network is used: global/networks/default If you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: <https://www.googleapis.com/compute/v1/projects/myproject/global/> networks/my-network projects/myproject/global/networks/my-network global/networks/default . |
| **priority** integer | success | Priority for this rule. This is an integer between 0 and 65535, both inclusive. When not specified, the value assumed is 1000. Relative priorities determine precedence of conflicting rules. Lower value of priority implies higher precedence (eg, a rule with priority 0 has higher precedence than a rule with priority 1). DENY rules take precedence over ALLOW rules having equal priority. |
| **sourceRanges** list / elements=string | success | If source ranges are specified, the firewall will apply only to traffic that has source IP address in these ranges. These ranges must be expressed in CIDR format. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. Only IPv4 is supported. |
| **sourceServiceAccounts** list / elements=string | success | If source service accounts are specified, the firewall will apply only to traffic originating from an instance with a service account in this list. Source service accounts cannot be used to control traffic to an instance's external IP address because service accounts are associated with an instance, not an IP address. sourceRanges can be set at the same time as sourceServiceAccounts. If both are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP belongs to an instance with service account listed in sourceServiceAccount. The connection does not need to match both properties for the firewall to apply. sourceServiceAccounts cannot be used at the same time as sourceTags or targetTags. |
| **sourceTags** list / elements=string | success | If source tags are specified, the firewall will apply only to traffic with source IP that belongs to a tag listed in source tags. Source tags cannot be used to control traffic to an instance's external IP address. Because tags are associated with an instance, not an IP address. One or both of sourceRanges and sourceTags may be set. If both properties are set, the firewall will apply to traffic that has source IP address within sourceRanges OR the source IP that belongs to a tag listed in the sourceTags property. The connection does not need to match both properties for the firewall to apply. |
| **targetServiceAccounts** list / elements=string | success | A list of service accounts indicating sets of instances located in the network that may make network connections as specified in allowed[]. targetServiceAccounts cannot be used at the same time as targetTags or sourceTags. If neither targetServiceAccounts nor targetTags are specified, the firewall rule applies to all instances on the specified network. |
| **targetTags** list / elements=string | success | A list of instance tags indicating sets of instances located in the network that may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_iam_service_account_key β Creates a GCP ServiceAccountKey google.cloud.gcp\_iam\_service\_account\_key β Creates a GCP ServiceAccountKey
==============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_iam_service_account_key`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A service account in the Identity and Access Management API.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **key\_algorithm** string | | Specifies the algorithm for the key. Some valid choices include: "KEY\_ALG\_UNSPECIFIED", "KEY\_ALG\_RSA\_1024", "KEY\_ALG\_RSA\_2048" |
| **path** path | | The full name of the file that will hold the service account private key. The management of this file will depend on the value of sync\_file parameter. File path must be absolute. |
| **private\_key\_type** string | | Output format for the service account key. Some valid choices include: "TYPE\_UNSPECIFIED", "TYPE\_PKCS12\_FILE", "TYPE\_GOOGLE\_CREDENTIALS\_FILE" |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account** dictionary | | The name of the serviceAccount. This field represents a link to a ServiceAccount resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_iam\_service\_account task and then set this service\_account field to "{{ name-of-resource }}" |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Examples
--------
```
- name: create a service account
google.cloud.gcp_iam_service_account:
name: test-ansible@graphite-playground.google.com.iam.gserviceaccount.com
display_name: My Ansible test key
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: serviceaccount
- name: create a service account key
google.cloud.gcp_iam_service_account_key:
service_account: "{{ serviceaccount }}"
private_key_type: TYPE_GOOGLE_CREDENTIALS_FILE
path: "~/test_account.json"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **keyAlgorithm** string | success | Specifies the algorithm for the key. |
| **keyType** string | success | Specifies the type of the key. Possible values include KEY\_TYPE\_UNSPECIFIED, USER\_MANAGED and SYSTEM\_MANAGED . |
| **name** string | success | The name of the key. |
| **path** string | success | The full name of the file that will hold the service account private key. The management of this file will depend on the value of sync\_file parameter. File path must be absolute. |
| **privateKeyData** string | success | Private key data. Base-64 encoded. |
| **privateKeyType** string | success | Output format for the service account key. |
| **publicKeyData** string | success | Public key data. Base-64 encoded. |
| **serviceAccount** dictionary | success | The name of the serviceAccount. |
| **validAfterTime** string | success | Key can only be used after this time. |
| **validBeforeTime** string | success | Key can only be used before this time. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_resourcemanager_project_info β Gather info for GCP Project google.cloud.gcp\_resourcemanager\_project\_info β Gather info for GCP Project
==============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_resourcemanager_project_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Project
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a project
gcp_resourcemanager_project_info:
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **createTime** string | success | Time of creation. |
| | **id** string | success | The unique, user-assigned ID of the Project. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. |
| | **labels** dictionary | success | The labels associated with this Project. Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]\*[a-z0-9])?`. Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]\*[a-z0-9])?)?`. No more than 256 labels can be associated with a given resource. Clients should store labels in a representation such as JSON that does not depend on specific characters being disallowed . |
| | **lifecycleState** string | success | The Project lifecycle state. |
| | **name** string | success | The user-assigned display name of the Project. It must be 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. |
| | **number** integer | success | Number uniquely identifying the project. |
| | **parent** complex | success | A parent organization. |
| | | **id** string | success | Id of the organization. |
| | | **type** string | success | Must be organization. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_health_check_info β Gather info for GCP HealthCheck google.cloud.gcp\_compute\_health\_check\_info β Gather info for GCP HealthCheck
================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_health_check_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP HealthCheck
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a health check
gcp_compute_health_check_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **checkIntervalSec** integer | success | How often (in seconds) to send a health check. The default value is 5 seconds. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **grpcHealthCheck** complex | success | A nested object resource. |
| | | **grpcServiceName** string | success | The gRPC service name for the health check. The value of grpcServiceName has the following meanings by convention: - Empty serviceName means the overall status of all services at the backend. - Non-empty serviceName means the health of that gRPC service, as defined by the owner of the service. The grpcServiceName can only be ASCII. |
| | | **port** integer | success | The port number for the health check request. Must be specified if portName and portSpecification are not set or if port\_specification is USE\_FIXED\_PORT. Valid values are 1 through 65535. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, gRPC health check follows behavior specified in `port` and `portName` fields. |
| | **healthyThreshold** integer | success | A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2. |
| | **http2HealthCheck** complex | success | A nested object resource. |
| | | **host** string | success | The value of the host header in the HTTP2 health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | | **port** integer | success | The TCP port number for the HTTP2 health check request. The default value is 443. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP2 health check follows behavior specified in `port` and `portName` fields. |
| | | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | | **requestPath** string | success | The request path of the HTTP2 health check request. The default value is /. |
| | | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| | **httpHealthCheck** complex | success | A nested object resource. |
| | | **host** string | success | The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | | **port** integer | success | The TCP port number for the HTTP health check request. The default value is 80. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTP health check follows behavior specified in `port` and `portName` fields. |
| | | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | | **requestPath** string | success | The request path of the HTTP health check request. The default value is /. |
| | | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| | **httpsHealthCheck** complex | success | A nested object resource. |
| | | **host** string | success | The value of the host header in the HTTPS health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used. |
| | | **port** integer | success | The TCP port number for the HTTPS health check request. The default value is 443. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, HTTPS health check follows behavior specified in `port` and `portName` fields. |
| | | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | | **requestPath** string | success | The request path of the HTTPS health check request. The default value is /. |
| | | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| | **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **sslHealthCheck** complex | success | A nested object resource. |
| | | **port** integer | success | The TCP port number for the SSL health check request. The default value is 443. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, SSL health check follows behavior specified in `port` and `portName` fields. |
| | | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | | **request** string | success | The application data to send once the SSL connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| | **tcpHealthCheck** complex | success | A nested object resource. |
| | | **port** integer | success | The TCP port number for the TCP health check request. The default value is 443. |
| | | **portName** string | success | Port name as defined in InstanceGroup#NamedPort#name. If both port and port\_name are defined, port takes precedence. |
| | | **portSpecification** string | success | Specifies how port is selected for health checking, can be one of the following values: \* `USE\_FIXED\_PORT`: The port number in `port` is used for health checking. \* `USE\_NAMED\_PORT`: The `portName` is used for health checking. \* `USE\_SERVING\_PORT`: For NetworkEndpointGroup, the port specified for each network endpoint is used for health checking. For other backends, the port or named port specified in the Backend Service is used for health checking. If not specified, TCP health check follows behavior specified in `port` and `portName` fields. |
| | | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | | **request** string | success | The application data to send once the TCP connection has been established (default value is empty). If both request and response are empty, the connection establishment alone will indicate health. The request data can only be ASCII. |
| | | **response** string | success | The bytes to match against the beginning of the response data. If left empty (the default value), any response will indicate health. The response data can only be ASCII. |
| | **timeoutSec** integer | success | How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec. |
| | **type** string | success | Specifies the type of the healthCheck, either TCP, SSL, HTTP or HTTPS. If not specified, the default is TCP. Exactly one of the protocol-specific health check field must be specified, which must match type field. |
| | **unhealthyThreshold** integer | success | A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_autoscaler β Creates a GCP Autoscaler google.cloud.gcp\_compute\_autoscaler β Creates a GCP Autoscaler
================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_autoscaler`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents an Autoscaler resource.
* Autoscalers allow you to automatically scale virtual machine instances in managed instance groups according to an autoscaling policy that you define.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **autoscaling\_policy** dictionary / required | | The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. |
| | **cool\_down\_period\_sec** integer | **Default:**"60" | The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process.
aliases: cooldownPeriod |
| | **cpu\_utilization** dictionary | | Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. |
| | | **utilization\_target** string | | The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6. If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization. If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization.
aliases: target |
| | **custom\_metric\_utilizations** list / elements=dictionary | | Configuration parameters of autoscaling based on a custom metric.
aliases: metric |
| | | **metric** string / required | | The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE.
aliases: name |
| | | **utilization\_target** string | | The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric. For example, a good metric to use as a utilizationTarget is <www.googleapis.com/compute/instance/network/received_bytes_count>. The autoscaler will work to keep this value constant for each of the instances.
aliases: target |
| | | **utilization\_target\_type** string | | Defines how target utilization value is expressed for a Stackdriver Monitoring metric. Some valid choices include: "GAUGE", "DELTA\_PER\_SECOND", "DELTA\_PER\_MINUTE"
aliases: type |
| | **load\_balancing\_utilization** dictionary | | Configuration parameters of autoscaling based on a load balancer. |
| | | **utilization\_target** string | | Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8.
aliases: target |
| | **max\_num\_replicas** integer / required | | The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas.
aliases: maxReplicas |
| | **min\_num\_replicas** integer | | The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed.
aliases: minReplicas |
| | **mode** string | **Default:**"ON" | Defines operating mode for this policy. Some valid choices include: "OFF", "ONLY\_UP", "ON" |
| | **scale\_in\_control** dictionary | | Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events . |
| | | **max\_scaled\_in\_replicas** dictionary | | A nested object resource. |
| | | | **fixed** integer | | Specifies a fixed number of VM instances. This must be a positive integer. |
| | | | **percent** integer | | Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. |
| | | **time\_window\_sec** integer | | How long back autoscaling should look when computing recommendations to include directives regarding slower scale down, as described above. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Name of the resource. The name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **target** dictionary / required | | URL of the managed instance group that this autoscaler will scale. This field represents a link to a InstanceGroupManager resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_instance\_group\_manager task and then set this target field to "{{ name-of-resource }}" |
| **zone** string / required | | URL of the zone where the instance group resides. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/autoscalers>
* Autoscaling Groups of Instances: <https://cloud.google.com/compute/docs/autoscaler/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a network
google.cloud.gcp_compute_network:
name: network-instancetemplate
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: network
- name: create a address
google.cloud.gcp_compute_address:
name: address-instancetemplate
region: us-central1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: address
- name: create a instance template
google.cloud.gcp_compute_instance_template:
name: "{{ resource_name }}"
properties:
disks:
- auto_delete: 'true'
boot: 'true'
initialize_params:
source_image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts
machine_type: n1-standard-1
network_interfaces:
- network: "{{ network }}"
access_configs:
- name: test-config
type: ONE_TO_ONE_NAT
nat_ip: "{{ address }}"
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: instancetemplate
- name: create a instance group manager
google.cloud.gcp_compute_instance_group_manager:
name: "{{ resource_name }}"
base_instance_name: test1-child
instance_template: "{{ instancetemplate }}"
target_size: 3
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: igm
- name: create a autoscaler
google.cloud.gcp_compute_autoscaler:
name: test_object
zone: us-central1-a
target: "{{ igm }}"
autoscaling_policy:
max_num_replicas: 5
min_num_replicas: 1
cool_down_period_sec: 60
cpu_utilization:
utilization_target: 0.5
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **autoscalingPolicy** complex | success | The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. |
| | **coolDownPeriodSec** integer | success | The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process. |
| | **cpuUtilization** complex | success | Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. |
| | | **utilizationTarget** string | success | The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6. If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization. If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization. |
| | **customMetricUtilizations** complex | success | Configuration parameters of autoscaling based on a custom metric. |
| | | **metric** string | success | The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE. |
| | | **utilizationTarget** string | success | The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric. For example, a good metric to use as a utilizationTarget is <www.googleapis.com/compute/instance/network/received_bytes_count>. The autoscaler will work to keep this value constant for each of the instances. |
| | | **utilizationTargetType** string | success | Defines how target utilization value is expressed for a Stackdriver Monitoring metric. |
| | **loadBalancingUtilization** complex | success | Configuration parameters of autoscaling based on a load balancer. |
| | | **utilizationTarget** string | success | Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. |
| | **maxNumReplicas** integer | success | The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas. |
| | **minNumReplicas** integer | success | The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed. |
| | **mode** string | success | Defines operating mode for this policy. |
| | **scaleInControl** complex | success | Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events . |
| | | **maxScaledInReplicas** complex | success | A nested object resource. |
| | | | **fixed** integer | success | Specifies a fixed number of VM instances. This must be a positive integer. |
| | | | **percent** integer | success | Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. |
| | | **timeWindowSec** integer | success | How long back autoscaling should look when computing recommendations to include directives regarding slower scale down, as described above. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **id** integer | success | Unique identifier for the resource. |
| **name** string | success | Name of the resource. The name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **target** dictionary | success | URL of the managed instance group that this autoscaler will scale. |
| **zone** string | success | URL of the zone where the instance group resides. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_network_info β Gather info for GCP Network google.cloud.gcp\_compute\_network\_info β Gather info for GCP Network
======================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_network_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Network
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a network
gcp_compute_network_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **autoCreateSubnetworks** boolean | success | When set to `true`, the network is created in "auto subnet mode" and it will create a subnet for each region automatically across the `10.128.0.0/9` address range. When set to `false`, the network is created in "custom subnet mode" so the user can explicitly connect subnetwork resources. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. The resource must be recreated to modify this field. |
| | **gateway\_ipv4** string | success | The gateway address for default routing out of the network. This value is selected by GCP. |
| | **id** integer | success | The unique identifier for the resource. |
| | **mtu** integer | success | Maximum Transmission Unit in bytes. The minimum value for this field is 1460 and the maximum value is 1500 bytes. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **routingConfig** complex | success | The network-level routing configuration for this network. Used by Cloud Router to determine what type of network-wide routing behavior to enforce. |
| | | **routingMode** string | success | The network-wide routing mode to use. If set to `REGIONAL`, this network's cloud routers will only advertise routes with subnetworks of this network in the same region as the router. If set to `GLOBAL`, this network's cloud routers will advertise routes with all subnetworks of this network, across regions. |
| | **subnetworks** list / elements=string | success | Server-defined fully-qualified URLs for all subnetworks in this network. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_container_node_pool_info β Gather info for GCP NodePool google.cloud.gcp\_container\_node\_pool\_info β Gather info for GCP NodePool
============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_container_node_pool_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP NodePool
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **cluster** dictionary / required | | The cluster this node pool belongs to. This field represents a link to a Cluster resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_container\_cluster task and then set this cluster field to "{{ name-of-resource }}" |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **location** string / required | | The location where the node pool is deployed.
aliases: region, zone |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a node pool
gcp_container_node_pool_info:
cluster: "{{ cluster }}"
location: us-central1-a
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **autoscaling** complex | success | Autoscaler configuration for this NodePool. Autoscaler is enabled only if a valid configuration is present. |
| | | **enabled** boolean | success | Is autoscaling enabled for this node pool. |
| | | **maxNodeCount** integer | success | Maximum number of nodes in the NodePool. Must be >= minNodeCount. There has to enough quota to scale up the cluster. |
| | | **minNodeCount** integer | success | Minimum number of nodes in the NodePool. Must be >= 1 and <= maxNodeCount. |
| | **cluster** dictionary | success | The cluster this node pool belongs to. |
| | **conditions** complex | success | Which conditions caused the current node pool state. |
| | | **code** string | success | Machine-friendly representation of the condition. |
| | **config** complex | success | The node configuration of the pool. |
| | | **accelerators** complex | success | A list of hardware accelerators to be attached to each node. |
| | | | **acceleratorCount** integer | success | The number of the accelerator cards exposed to an instance. |
| | | | **acceleratorType** string | success | The accelerator type resource name. |
| | | **diskSizeGb** integer | success | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB. |
| | | **diskType** string | success | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') If unspecified, the default disk type is 'pd-standard' . |
| | | **imageType** string | success | The image type to use for this node. Note that for a given image type, the latest version of it will be used. |
| | | **labels** dictionary | success | The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that Kubernetes may apply to the node. In case of conflict in label keys, the applied set may differ depending on the Kubernetes version -- it's best to assume the behavior is undefined and conflicts should be avoided. For more information, including usage and the valid values, see: <http://kubernetes.io/v1.1/docs/user-guide/labels.html> An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| | | **localSsdCount** integer | success | The number of local SSD disks to be attached to the node. The limit for this value is dependant upon the maximum number of disks available on a machine per zone. See: <https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits> for more information. |
| | | **machineType** string | success | The name of a Google Compute Engine machine type (e.g. n1-standard-1). If unspecified, the default machine type is n1-standard-1. |
| | | **metadata** dictionary | success | The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-\_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| | | **minCpuPlatform** string | success | Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform . |
| | | **oauthScopes** list / elements=string | success | The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: <https://www.googleapis.com/auth/compute> is required for mounting persistent storage on your nodes.
<https://www.googleapis.com/auth/devstorage.read_only> is required for communicating with gcr.io (the Google Container Registry). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added. |
| | | **preemptible** boolean | success | Whether the nodes are created as preemptible VM instances. See: <https://cloud.google.com/compute/docs/instances/preemptible> for more information about preemptible VM instances. |
| | | **serviceAccount** string | success | The Google Cloud Platform Service Account to be used by the node VMs. If no Service Account is specified, the "default" service account is used. |
| | | **shieldedInstanceConfig** complex | success | Shielded Instance options. |
| | | | **enableIntegrityMonitoring** boolean | success | Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. |
| | | | **enableSecureBoot** boolean | success | Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. |
| | | **tags** list / elements=string | success | The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035. |
| | | **taints** complex | success | List of kubernetes taints to be applied to each node. |
| | | | **effect** string | success | Effect for taint. |
| | | | **key** string | success | Key for taint. |
| | | | **value** string | success | Value for taint. |
| | | **workloadMetaConfig** complex | success | WorkloadMetadataConfig defines the metadata configuration to expose to workloads on the node pool. |
| | | | **mode** string | success | Mode is the configuration for how to expose metadata to workloads running on the node pool. |
| | **initialNodeCount** integer | success | The initial node count for the pool. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. |
| | **location** string | success | The location where the node pool is deployed. |
| | **management** complex | success | Management configuration for this NodePool. |
| | | **autoRepair** boolean | success | A flag that specifies whether the node auto-repair is enabled for the node pool. If enabled, the nodes in this node pool will be monitored and, if they fail health checks too many times, an automatic repair action will be triggered. |
| | | **autoUpgrade** boolean | success | A flag that specifies whether node auto-upgrade is enabled for the node pool. If enabled, node auto-upgrade helps keep the nodes in your node pool up to date with the latest release version of Kubernetes. |
| | | **upgradeOptions** complex | success | Specifies the Auto Upgrade knobs for the node pool. |
| | | | **autoUpgradeStartTime** string | success | This field is set when upgrades are about to commence with the approximate start time for the upgrades, in RFC3339 text format. |
| | | | **description** string | success | This field is set when upgrades are about to commence with the description of the upgrade. |
| | **maxPodsConstraint** complex | success | The constraint on the maximum number of pods that can be run simultaneously on a node in the node pool. |
| | | **maxPodsPerNode** integer | success | Constraint enforced on the max num of pods per node. |
| | **name** string | success | The name of the node pool. |
| | **podIpv4CidrSize** integer | success | The pod CIDR block size per node in this node pool. |
| | **status** string | success | Status of nodes in this pool instance. |
| | **statusMessage** string | success | Additional information about the current status of this node pool instance. |
| | **version** string | success | The version of the Kubernetes of this node. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_route β Creates a GCP Route google.cloud.gcp\_compute\_route β Creates a GCP Route
======================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_route`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a Route resource.
* A route is a rule that specifies how certain packets should be handled by the virtual network. Routes are associated with virtual machines by tag, and the set of routes for a particular virtual machine is called its routing table. For each packet leaving a virtual machine, the system searches that virtual machineβs routing table for a single best matching route.
* Routes match packets by destination IP address, preferring smaller or more specific ranges over larger ones. If there is a tie, the system selects the route with the smallest priority value. If there is still a tie, it uses the layer three and four packet headers to select just one of the remaining matching routes. The packet is then forwarded as specified by the next\_hop field of the winning route β either to another virtual machine destination, a virtual machine gateway or a Compute Engine-operated gateway. Packets that do not match any route in the sending virtual machineβs routing table will be dropped.
* A Route resource must have exactly one specification of either nextHopGateway, nextHopInstance, nextHopIp, nextHopVpnTunnel, or nextHopIlb.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **dest\_range** string / required | | The destination range of outgoing packets that this route applies to. Only IPv4 is supported. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary / required | | The network that this route applies to. This field represents a link to a Network resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_network task and then set this network field to "{{ name-of-resource }}" |
| **next\_hop\_gateway** string | | URL to a gateway that should handle matching packets. Currently, you can only specify the internet gateway, using a full or partial valid URL: \* <https://www.googleapis.com/compute/v1/projects/project/global/gateways/default-internet-gateway> \* projects/project/global/gateways/default-internet-gateway \* global/gateways/default-internet-gateway . |
| **next\_hop\_ilb** dictionary | | The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: <https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule> regions/region/forwardingRules/forwardingRule Note that this can only be used when the destinationRange is a public (non-RFC 1918) IP CIDR range. This field represents a link to a ForwardingRule resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_forwarding\_rule task and then set this next\_hop\_ilb field to "{{ name-of-resource }}" |
| **next\_hop\_instance** dictionary | | URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: \* <https://www.googleapis.com/compute/v1/projects/project/zones/zone/> instances/instance \* projects/project/zones/zone/instances/instance \* zones/zone/instances/instance . This field represents a link to a Instance resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_instance task and then set this next\_hop\_instance field to "{{ name-of-resource }}" |
| **next\_hop\_ip** string | | Network IP address of an instance that should handle matching packets. |
| **next\_hop\_vpn\_tunnel** dictionary | | URL to a VpnTunnel that should handle matching packets. This field represents a link to a VpnTunnel resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_vpn\_tunnel task and then set this next\_hop\_vpn\_tunnel field to "{{ name-of-resource }}" |
| **priority** integer | | The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **tags** list / elements=string | | A list of instance tags to which this route applies. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/routes>
* Using Routes: <https://cloud.google.com/vpc/docs/using-routes>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a network
google.cloud.gcp_compute_network:
name: network-route
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: network
- name: create a route
google.cloud.gcp_compute_route:
name: test_object
dest_range: 192.168.6.0/24
next_hop_gateway: global/gateways/default-internet-gateway
network: "{{ network }}"
tags:
- backends
- databases
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **destRange** string | success | The destination range of outgoing packets that this route applies to. Only IPv4 is supported. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary | success | The network that this route applies to. |
| **nextHopGateway** string | success | URL to a gateway that should handle matching packets. Currently, you can only specify the internet gateway, using a full or partial valid URL: \* <https://www.googleapis.com/compute/v1/projects/project/global/gateways/default-internet-gateway> \* projects/project/global/gateways/default-internet-gateway \* global/gateways/default-internet-gateway . |
| **nextHopIlb** dictionary | success | The URL to a forwarding rule of type loadBalancingScheme=INTERNAL that should handle matching packets. You can only specify the forwarding rule as a partial or full URL. For example, the following are all valid URLs: <https://www.googleapis.com/compute/v1/projects/project/regions/region/forwardingRules/forwardingRule> regions/region/forwardingRules/forwardingRule Note that this can only be used when the destinationRange is a public (non-RFC 1918) IP CIDR range. |
| **nextHopInstance** dictionary | success | URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: \* <https://www.googleapis.com/compute/v1/projects/project/zones/zone/> instances/instance \* projects/project/zones/zone/instances/instance \* zones/zone/instances/instance . |
| **nextHopIp** string | success | Network IP address of an instance that should handle matching packets. |
| **nextHopNetwork** string | success | URL to a Network that should handle matching packets. |
| **nextHopVpnTunnel** dictionary | success | URL to a VpnTunnel that should handle matching packets. |
| **priority** integer | success | The priority of this route. Priority is used to break ties in cases where there is more than one matching route of equal prefix length. In the case of two routes with equal prefix length, the one with the lowest-numbered priority value wins. Default value is 1000. Valid range is 0 through 65535. |
| **tags** list / elements=string | success | A list of instance tags to which this route applies. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_kms_crypto_key β Creates a GCP CryptoKey google.cloud.gcp\_kms\_crypto\_key β Creates a GCP CryptoKey
============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_kms_crypto_key`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A `CryptoKey` represents a logical key that can be used for cryptographic operations.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **key\_ring** string / required | | The KeyRing that this key belongs to. Format: `'projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}'`. |
| **labels** dictionary | | Labels with user-defined metadata to apply to this resource. |
| **name** string / required | | The resource name for the CryptoKey. |
| **project** string | | The Google Cloud Platform project to use. |
| **purpose** string | **Default:**"ENCRYPT\_DECRYPT" | Immutable purpose of CryptoKey. See <https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKeyPurpose> for inputs. Some valid choices include: "ENCRYPT\_DECRYPT", "ASYMMETRIC\_SIGN", "ASYMMETRIC\_DECRYPT" |
| **rotation\_period** string | | Every time this period passes, generate a new CryptoKeyVersion and set it as the primary. The first rotation will take place after the specified period. The rotation period has the format of a decimal number with up to 9 fractional digits, followed by the letter `s` (seconds). It must be greater than a day (ie, 86400). |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **skip\_initial\_version\_creation** boolean | **Choices:*** no
* yes
**Default:**"false" | If set to true, the request will create a CryptoKey without any CryptoKeyVersions. You must use the `google\_kms\_key\_ring\_import\_job` resource to import the CryptoKeyVersion. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **version\_template** dictionary | | A template describing settings for new crypto key versions. |
| | **algorithm** string / required | | The algorithm to use when creating a version based on this template. See the [algorithm reference](<https://cloud.google.com/kms/docs/reference/rest/v1/CryptoKeyVersionAlgorithm>) for possible inputs. |
| | **protection\_level** string | | The protection level to use when creating a version based on this template. Some valid choices include: "SOFTWARE", "HSM" |
Notes
-----
Note
* API Reference: <https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys>
* Creating a key: <https://cloud.google.com/kms/docs/creating-keys#create_a_key>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a key ring
google.cloud.gcp_kms_key_ring:
name: key-key-ring
location: us-central1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: keyring
- name: create a crypto key
google.cloud.gcp_kms_crypto_key:
name: test_object
key_ring: projects/{{ gcp_project }}/locations/us-central1/keyRings/key-key-ring
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **createTime** string | success | The time that this resource was created on the server. This is in RFC3339 text format. |
| **keyRing** string | success | The KeyRing that this key belongs to. Format: `'projects/{{project}}/locations/{{location}}/keyRings/{{keyRing}}'`. |
| **labels** dictionary | success | Labels with user-defined metadata to apply to this resource. |
| **name** string | success | The resource name for the CryptoKey. |
| **nextRotationTime** string | success | The time when KMS will create a new version of this Crypto Key. |
| **purpose** string | success | Immutable purpose of CryptoKey. See <https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys#CryptoKeyPurpose> for inputs. |
| **rotationPeriod** string | success | Every time this period passes, generate a new CryptoKeyVersion and set it as the primary. The first rotation will take place after the specified period. The rotation period has the format of a decimal number with up to 9 fractional digits, followed by the letter `s` (seconds). It must be greater than a day (ie, 86400). |
| **skipInitialVersionCreation** boolean | success | If set to true, the request will create a CryptoKey without any CryptoKeyVersions. You must use the `google\_kms\_key\_ring\_import\_job` resource to import the CryptoKeyVersion. |
| **versionTemplate** complex | success | A template describing settings for new crypto key versions. |
| | **algorithm** string | success | The algorithm to use when creating a version based on this template. See the [algorithm reference](<https://cloud.google.com/kms/docs/reference/rest/v1/CryptoKeyVersionAlgorithm>) for possible inputs. |
| | **protectionLevel** string | success | The protection level to use when creating a version based on this template. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_spanner_database β Creates a GCP Database google.cloud.gcp\_spanner\_database β Creates a GCP Database
============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_spanner_database`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A Cloud Spanner Database which is hosted on a Spanner instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **extra\_statements** list / elements=string | | An optional list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created. |
| **instance** dictionary / required | | The instance to create the database on. This field represents a link to a Instance resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_spanner\_instance task and then set this instance field to "{{ name-of-resource }}" |
| **name** string / required | | A unique identifier for the database, which cannot be changed after the instance is created. Values are of the form [a-z][-a-z0-9]\*[a-z0-9]. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instances.databases>
* Official Documentation: <https://cloud.google.com/spanner/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a instance
google.cloud.gcp_spanner_instance:
name: instance-database
display_name: My Spanner Instance
node_count: 2
labels:
cost_center: ti-1700004
config: regional-us-central1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: instance
- name: create a database
google.cloud.gcp_spanner_database:
name: webstore
instance: "{{ instance }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **extraStatements** list / elements=string | success | An optional list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created. |
| **instance** dictionary | success | The instance to create the database on. |
| **name** string | success | A unique identifier for the database, which cannot be changed after the instance is created. Values are of the form [a-z][-a-z0-9]\*[a-z0-9]. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_router_info β Gather info for GCP Router google.cloud.gcp\_compute\_router\_info β Gather info for GCP Router
====================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_router_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Router
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | Region where the router resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a router
gcp_compute_router_info:
region: us-central1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **bgp** complex | success | BGP information specific to this router. |
| | | **advertisedGroups** list / elements=string | success | User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL\_SUBNETS . |
| | | **advertisedIpRanges** complex | success | User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. |
| | | | **description** string | success | User-specified description for the IP range. |
| | | | **range** string | success | The IP range to advertise. The value must be a CIDR-formatted string. |
| | | **advertiseMode** string | success | User-specified flag to indicate which mode to use for advertisement. |
| | | **asn** integer | success | Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **network** dictionary | success | A reference to the network to which this router belongs. |
| | **region** string | success | Region where the router resides. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_target_tcp_proxy β Creates a GCP TargetTcpProxy google.cloud.gcp\_compute\_target\_tcp\_proxy β Creates a GCP TargetTcpProxy
============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_target_tcp_proxy`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a TargetTcpProxy resource, which is used by one or more global forwarding rule to route incoming TCP requests to a Backend service.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **proxy\_header** string | | Specifies the type of proxy header to append before sending data to the backend. Some valid choices include: "NONE", "PROXY\_V1" |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service** dictionary / required | | A reference to the BackendService resource. This field represents a link to a BackendService resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_backend\_service task and then set this service field to "{{ name-of-resource }}" |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/v1/targetTcpProxies>
* Setting Up TCP proxy for Google Cloud Load Balancing: <https://cloud.google.com/compute/docs/load-balancing/tcp-ssl/tcp-proxy>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a instance group
google.cloud.gcp_compute_instance_group:
name: instancegroup-targettcpproxy
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: instancegroup
- name: create a health check
google.cloud.gcp_compute_health_check:
name: healthcheck-targettcpproxy
type: TCP
tcp_health_check:
port_name: service-health
request: ping
response: pong
healthy_threshold: 10
timeout_sec: 2
unhealthy_threshold: 5
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: healthcheck
- name: create a backend service
google.cloud.gcp_compute_backend_service:
name: backendservice-targettcpproxy
backends:
- group: "{{ instancegroup.selfLink }}"
health_checks:
- "{{ healthcheck.selfLink }}"
protocol: TCP
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: backendservice
- name: create a target TCP proxy
google.cloud.gcp_compute_target_tcp_proxy:
name: test_object
proxy_header: PROXY_V1
service: "{{ backendservice }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **id** integer | success | The unique identifier for the resource. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| **service** dictionary | success | A reference to the BackendService resource. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_sql_instance_info β Gather info for GCP Instance google.cloud.gcp\_sql\_instance\_info β Gather info for GCP Instance
====================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_sql_instance_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Instance
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an instance
gcp_sql_instance_info:
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **backendType** string | success | \* FIRST\_GEN: First Generation instance. MySQL only. \* SECOND\_GEN: Second Generation instance or PostgreSQL instance. \* EXTERNAL: A database server that is not managed by Google. |
| | **connectionName** string | success | Connection name of the Cloud SQL instance used in connection strings. |
| | **databaseVersion** string | success | The database engine type and version. For First Generation instances, can be MYSQL\_5\_5, or MYSQL\_5\_6. For Second Generation instances, can be MYSQL\_5\_6 or MYSQL\_5\_7. Defaults to MYSQL\_5\_6. PostgreSQL instances: POSTGRES\_9\_6 The databaseVersion property can not be changed after instance creation. |
| | **diskEncryptionConfiguration** complex | success | Disk encryption settings. |
| | | **kmsKeyName** string | success | The KMS key used to encrypt the Cloud SQL instance . |
| | **diskEncryptionStatus** complex | success | Disk encryption status. |
| | | **kmsKeyVersionName** string | success | The KMS key version used to encrypt the Cloud SQL instance . |
| | **failoverReplica** complex | success | The name and status of the failover replica. This property is applicable only to Second Generation instances. |
| | | **available** boolean | success | The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The master can only failover to the failover replica when the status is true. |
| | | **name** string | success | The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID. This property is applicable only to Second Generation instances. |
| | **gceZone** string | success | The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. |
| | **instanceType** string | success | The instance type. This can be one of the following. \* CLOUD\_SQL\_INSTANCE: A Cloud SQL instance that is not replicating from a master. \* ON\_PREMISES\_INSTANCE: An instance running on the customer's premises. \* READ\_REPLICA\_INSTANCE: A Cloud SQL instance configured as a read-replica. |
| | **ipAddresses** complex | success | The assigned IP addresses for the instance. |
| | | **ipAddress** string | success | The IP address assigned. |
| | | **timeToRetire** string | success | The due time for this IP to be retired in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. This field is only available when the IP is scheduled to be retired. |
| | | **type** string | success | The type of this IP address. A PRIMARY address is an address that can accept incoming connections. An OUTGOING address is the source address of connections originating from the instance, if supported. |
| | **ipv6Address** string | success | The IPv6 address assigned to the instance. This property is applicable only to First Generation instances. |
| | **masterInstanceName** string | success | The name of the instance which will act as master in the replication setup. |
| | **maxDiskSize** integer | success | The maximum disk size of the instance in bytes. |
| | **name** string | success | Name of the Cloud SQL instance. This does not include the project ID. |
| | **region** string | success | The geographical region. Defaults to us-central or us-central1 depending on the instance type (First Generation or Second Generation/PostgreSQL). |
| | **replicaConfiguration** complex | success | Configuration specific to failover replicas and read replicas. |
| | | **failoverTarget** boolean | success | Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. In case the master instance fails, the replica instance will be promoted as the new master instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the master instance. |
| | | **mysqlReplicaConfiguration** complex | success | MySQL specific configuration when replicating from a MySQL on-premises master. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named master.info in the data directory. |
| | | | **caCertificate** string | success | PEM representation of the trusted CA's x509 certificate. |
| | | | **clientCertificate** string | success | PEM representation of the replica's x509 certificate . |
| | | | **clientKey** string | success | PEM representation of the replica's private key. The corresponding public key is encoded in the client's certificate. |
| | | | **connectRetryInterval** integer | success | Seconds to wait between connect retries. MySQL's default is 60 seconds. |
| | | | **dumpFilePath** string | success | Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps should have the binlog coordinates from which replication should begin. This can be accomplished by setting --master-data to 1 when using mysqldump. |
| | | | **masterHeartbeatPeriod** integer | success | Interval in milliseconds between replication heartbeats. |
| | | | **password** string | success | The password for the replication connection. |
| | | | **sslCipher** string | success | A list of permissible ciphers to use for SSL encryption. |
| | | | **username** string | success | The username for the replication connection. |
| | | | **verifyServerCertificate** boolean | success | Whether or not to check the master's Common Name value in the certificate that it sends during the SSL handshake. |
| | | **replicaNames** list / elements=string | success | The replicas of the instance. |
| | | **serviceAccountEmailAddress** string | success | The service account email address assigned to the instance. This property is applicable only to Second Generation instances. |
| | **serverCaCert** complex | success | SSL configuration. |
| | | **cert** string | success | PEM representation of the X.509 certificate. |
| | | **certSerialNumber** string | success | Serial number, as extracted from the certificate. |
| | | **commonName** string | success | User supplied name. Constrained to [a-zA-Z.-\_ ]+. |
| | | **createTime** string | success | The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. |
| | | **expirationTime** string | success | The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. |
| | | **sha1Fingerprint** string | success | SHA-1 fingerprint of the certificate. |
| | **settings** complex | success | The user settings. |
| | | **availabilityType** string | success | The availabilityType define if your postgres instance is run zonal or regional. |
| | | **backupConfiguration** complex | success | The daily backup configuration for the instance. |
| | | | **binaryLogEnabled** boolean | success | Whether binary log is enabled. If backup configuration is disabled, binary log must be disabled as well. MySQL only. |
| | | | **enabled** boolean | success | Enable Autobackup for your instance. |
| | | | **startTime** string | success | Define the backup start time in UTC (HH:MM) . |
| | | **databaseFlags** complex | success | The database flags passed to the instance at startup. |
| | | | **name** string | success | The name of the flag. These flags are passed at instance startup, so include both server options and system variables for MySQL. Flags should be specified with underscores, not hyphens. |
| | | | **value** string | success | The value of the flag. Booleans should be set to on for true and off for false. This field must be omitted if the flag doesn't take a value. |
| | | **ipConfiguration** complex | success | The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances. |
| | | | **authorizedNetworks** complex | success | The list of external networks that are allowed to connect to the instance using the IP. In CIDR notation, also known as 'slash' notation (e.g. 192.168.100.0/24). |
| | | | | **expirationTime** string | success | The time when this access control entry expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. |
| | | | | **name** string | success | An optional label to identify this entry. |
| | | | | **value** string | success | The whitelisted value for the access control list. For example, to grant access to a client from an external IP (IPv4 or IPv6) address or subnet, use that address or subnet here. |
| | | | **ipv4Enabled** boolean | success | Whether the instance should be assigned an IP address or not. |
| | | | **requireSsl** boolean | success | Whether the mysqld should default to 'REQUIRE X509' for users connecting over IP. |
| | | **settingsVersion** integer | success | The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value. |
| | | **tier** string | success | The tier or machine type for this instance, for example db-n1-standard-1. For MySQL instances, this field determines whether the instance is Second Generation (recommended) or First Generation. |
| | | **userLabels** dictionary | success | User-provided labels, represented as a dictionary where each label is a single key value pair. |
| | **state** string | success | The current serving state of the database instance. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_cloudtasks_queue_info β Gather info for GCP Queue google.cloud.gcp\_cloudtasks\_queue\_info β Gather info for GCP Queue
=====================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_cloudtasks_queue_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Queue
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **location** string / required | | The location of the queue. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a queue
gcp_cloudtasks_queue_info:
location: us-central1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **appEngineRoutingOverride** complex | success | Overrides for task-level appEngineRouting. These settings apply only to App Engine tasks in this queue . |
| | | **host** string | success | The host that the task is sent to. |
| | | **instance** string | success | App instance. By default, the task is sent to an instance which is available when the task is attempted. |
| | | **service** string | success | App service. By default, the task is sent to the service which is the default service when the task is attempted. |
| | | **version** string | success | App version. By default, the task is sent to the version which is the default version when the task is attempted. |
| | **location** string | success | The location of the queue. |
| | **name** string | success | The queue name. |
| | **rateLimits** complex | success | Rate limits for task dispatches. The queue's actual dispatch rate is the result of: \* Number of tasks in the queue \* User-specified throttling: rateLimits, retryConfig, and the queue's state. \* System throttling due to 429 (Too Many Requests) or 503 (Service Unavailable) responses from the worker, high error rates, or to smooth sudden large traffic spikes. |
| | | **maxBurstSize** integer | success | The max burst size. Max burst size limits how fast tasks in queue are processed when many tasks are in the queue and the rate is high. This field allows the queue to have a high rate so processing starts shortly after a task is enqueued, but still limits resource usage when many tasks are enqueued in a short period of time. |
| | | **maxConcurrentDispatches** integer | success | The maximum number of concurrent tasks that Cloud Tasks allows to be dispatched for this queue. After this threshold has been reached, Cloud Tasks stops dispatching tasks until the number of concurrent requests decreases. |
| | | **maxDispatchesPerSecond** string | success | The maximum rate at which tasks are dispatched from this queue. If unspecified when the queue is created, Cloud Tasks will pick the default. |
| | **retryConfig** complex | success | Settings that determine the retry behavior. |
| | | **maxAttempts** integer | success | Number of attempts per task. Cloud Tasks will attempt the task maxAttempts times (that is, if the first attempt fails, then there will be maxAttempts - 1 retries). Must be >= -1. If unspecified when the queue is created, Cloud Tasks will pick the default. -1 indicates unlimited attempts. |
| | | **maxBackoff** string | success | A task will be scheduled for retry between minBackoff and maxBackoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. |
| | | **maxDoublings** integer | success | The time between retries will double maxDoublings times. A task's retry interval starts at minBackoff, then doubles maxDoublings times, then increases linearly, and finally retries retries at intervals of maxBackoff up to maxAttempts times. |
| | | **maxRetryDuration** string | success | If positive, maxRetryDuration specifies the time limit for retrying a failed task, measured from when the task was first attempted. Once maxRetryDuration time has passed and the task has been attempted maxAttempts times, no further attempts will be made and the task will be deleted. If zero, then the task age is unlimited. |
| | | **minBackoff** string | success | A task will be scheduled for retry between minBackoff and maxBackoff duration after it fails, if the queue's RetryConfig specifies that the task should be retried. |
| | | **purgeTime** string | success | The last time this queue was purged. |
| | **stackdriverLoggingConfig** complex | success | Configuration options for writing logs to Stackdriver Logging. |
| | | **samplingRatio** string | success | Specifies the fraction of operations to write to Stackdriver Logging. This field may contain any value between 0.0 and 1.0, inclusive. 0.0 is the default and means that no operations are logged. |
| | **status** string | success | The current state of the queue. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_region_autoscaler_info β Gather info for GCP RegionAutoscaler google.cloud.gcp\_compute\_region\_autoscaler\_info β Gather info for GCP RegionAutoscaler
==========================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_autoscaler_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP RegionAutoscaler
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | URL of the region where the instance group resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a region autoscaler
gcp_compute_region_autoscaler_info:
region: us-central1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **autoscalingPolicy** complex | success | The configuration parameters for the autoscaling algorithm. You can define one or more of the policies for an autoscaler: cpuUtilization, customMetricUtilizations, and loadBalancingUtilization. If none of these are specified, the default will be to autoscale based on cpuUtilization to 0.6 or 60%. |
| | | **coolDownPeriodSec** integer | success | The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. This prevents the autoscaler from collecting information when the instance is initializing, during which the collected usage would not be reliable. The default time autoscaler waits is 60 seconds. Virtual machine initialization times might vary because of numerous factors. We recommend that you test how long an instance may take to initialize. To do this, create an instance and time the startup process. |
| | | **cpuUtilization** complex | success | Defines the CPU utilization policy that allows the autoscaler to scale based on the average CPU utilization of a managed instance group. |
| | | | **utilizationTarget** string | success | The target CPU utilization that the autoscaler should maintain. Must be a float value in the range (0, 1]. If not specified, the default is 0.6. If the CPU level is below the target utilization, the autoscaler scales down the number of instances until it reaches the minimum number of instances you specified or until the average CPU of your instances reaches the target utilization. If the average CPU is above the target utilization, the autoscaler scales up until it reaches the maximum number of instances you specified or until the average utilization reaches the target utilization. |
| | | **customMetricUtilizations** complex | success | Configuration parameters of autoscaling based on a custom metric. |
| | | | **metric** string | success | The identifier (type) of the Stackdriver Monitoring metric. The metric cannot have negative values. The metric must have a value type of INT64 or DOUBLE. |
| | | | **utilizationTarget** string | success | The target value of the metric that autoscaler should maintain. This must be a positive value. A utilization metric scales number of virtual machines handling requests to increase or decrease proportionally to the metric. For example, a good metric to use as a utilizationTarget is <www.googleapis.com/compute/instance/network/received_bytes_count>. The autoscaler will work to keep this value constant for each of the instances. |
| | | | **utilizationTargetType** string | success | Defines how target utilization value is expressed for a Stackdriver Monitoring metric. |
| | | **loadBalancingUtilization** complex | success | Configuration parameters of autoscaling based on a load balancer. |
| | | | **utilizationTarget** string | success | Fraction of backend capacity utilization (set in HTTP(s) load balancing configuration) that autoscaler should maintain. Must be a positive float value. If not defined, the default is 0.8. |
| | | **maxNumReplicas** integer | success | The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas. |
| | | **minNumReplicas** integer | success | The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. If not provided, autoscaler will choose a default value depending on maximum number of instances allowed. |
| | | **mode** string | success | Defines operating mode for this policy. |
| | | **scaleInControl** complex | success | Defines scale in controls to reduce the risk of response latency and outages due to abrupt scale-in events . |
| | | | **maxScaledInReplicas** complex | success | A nested object resource. |
| | | | | **fixed** integer | success | Specifies a fixed number of VM instances. This must be a positive integer. |
| | | | | **percent** integer | success | Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%. |
| | | | **timeWindowSec** integer | success | How long back autoscaling should look when computing recommendations to include directives regarding slower scale down, as described above. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | Unique identifier for the resource. |
| | **name** string | success | Name of the resource. The name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **region** string | success | URL of the region where the instance group resides. |
| | **target** string | success | URL of the managed instance group that this autoscaler will scale. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_serviceusage_service β Creates a GCP Service google.cloud.gcp\_serviceusage\_service β Creates a GCP Service
===============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_serviceusage_service`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A service that is available for use .
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **disable\_dependent\_services** boolean | **Choices:*** no
* yes
| Indicates if dependent services should also be disabled. Can only be turned on if service is disabled. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | The resource name of the service . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* Getting Started: <https://cloud.google.com/service-usage/docs/getting-started>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a service
google.cloud.gcp_serviceusage_service:
name: spanner.googleapis.com
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **config** complex | success | The service configuration of the available service. |
| | **apis** complex | success | The list of API interfaces exported by this service. |
| | | **name** string | success | Name of the API. |
| | | **version** string | success | The version of the API. |
| | **name** string | success | The DNS address at which this service is available. |
| | **title** string | success | The product title for this service. |
| **disableDependentServices** boolean | success | Indicates if dependent services should also be disabled. Can only be turned on if service is disabled. |
| **name** string | success | The resource name of the service . |
| **parent** string | success | The name of the parent of this service. For example 'projects/123' . |
| **state** string | success | Whether or not the service has been enabled for use by the consumer. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_instance_template β Creates a GCP InstanceTemplate google.cloud.gcp\_compute\_instance\_template β Creates a GCP InstanceTemplate
==============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_instance_template`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Defines an Instance Template resource that provides configuration settings for your virtual machine instances. Instance templates are not tied to the lifetime of an instance and can be used and reused as to deploy virtual machines. You can also use different templates to create different virtual machine configurations. Instance templates are required when you create a managed instance group.
* Tip: Disks should be set to autoDelete=true so that leftover disks are not left behind on machine deletion.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Name of the resource. The name is 1-63 characters long and complies with RFC1035. |
| **project** string | | The Google Cloud Platform project to use. |
| **properties** dictionary | | The instance properties for this instance template. |
| | **can\_ip\_forward** boolean | **Choices:*** no
* yes
| Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. |
| | **description** string | | An optional text description for the instances that are created from this instance template. |
| | **disks** list / elements=dictionary | | An array of disks that are associated with the instances that are created from this template. |
| | | **auto\_delete** boolean | **Choices:*** no
* yes
| Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). Tip: Disks should be set to autoDelete=true so that leftover disks are not left behind on machine deletion. |
| | | **boot** boolean | **Choices:*** no
* yes
| Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| | | **device\_name** string | | Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-\* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. |
| | | **disk\_encryption\_key** dictionary | | Encrypts or decrypts a disk using a customer-supplied encryption key. |
| | | | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | | **rsa\_encrypted\_key** string | | Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. |
| | | **index** integer | | Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. |
| | | **initialize\_params** dictionary | | Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. |
| | | | **disk\_name** string | | Specifies the disk name. If not specified, the default is to use the name of the instance. |
| | | | **disk\_size\_gb** integer | | Specifies the size of the disk in base-2 GB. |
| | | | **disk\_type** string | | Reference to a disk type. Specifies the disk type to use to create the instance. If not specified, the default is pd-standard. |
| | | | **source\_image** string | | The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. To create a disk with one of the public operating system images, specify the image by its family name. |
| | | | **source\_image\_encryption\_key** dictionary | | The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. |
| | | | | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | **interface** string | | Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Some valid choices include: "SCSI", "NVME" |
| | | **mode** string | | The mode in which to attach this disk, either READ\_WRITE or READ\_ONLY. If not specified, the default is to attach the disk in READ\_WRITE mode. Some valid choices include: "READ\_WRITE", "READ\_ONLY" |
| | | **source** dictionary | | Reference to a disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name, not the URL for the disk. This field represents a link to a Disk resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_disk task and then set this source field to "{{ name-of-resource }}" |
| | | **type** string | | Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. Some valid choices include: "SCRATCH", "PERSISTENT" |
| | **guest\_accelerators** list / elements=dictionary | | List of the type and count of accelerator cards attached to the instance . |
| | | **accelerator\_count** integer | | The number of the guest accelerator cards exposed to this instance. |
| | | **accelerator\_type** string | | Full or partial URL of the accelerator type resource to expose to this instance. |
| | **labels** dictionary | | Labels to apply to this address. A list of key->value pairs. |
| | **machine\_type** string / required | | The machine type to use in the VM instance template. |
| | **metadata** dictionary | | The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. |
| | **min\_cpu\_platform** string | | Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms . |
| | **network\_interfaces** list / elements=dictionary | | An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one network interface is supported per instance. |
| | | **access\_configs** list / elements=dictionary | | An array of configurations for this interface. Currently, only one access config, ONE\_TO\_ONE\_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access. |
| | | | **name** string / required | | The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access. |
| | | | **nat\_ip** dictionary | | Reference to an address. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. This field represents a link to a Address resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'address' and value of your resource's address Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_address task and then set this nat\_ip field to "{{ name-of-resource }}" |
| | | | **network\_tier** string | | This signifies the networking tier used for configuring this access configuration. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. Some valid choices include: "PREMIUM", "STANDARD" |
| | | | **public\_ptr\_domain\_name** string | | The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled. |
| | | | **set\_public\_ptr** boolean | **Choices:*** no
* yes
| Specifies whether a public DNS PTR record should be created to map the external IP address of the instance to a DNS domain name. |
| | | | **type** string / required | | The type of configuration. The default and only option is ONE\_TO\_ONE\_NAT. Some valid choices include: "ONE\_TO\_ONE\_NAT" |
| | | **alias\_ip\_ranges** list / elements=dictionary | | An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. |
| | | | **ip\_cidr\_range** string | | The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). |
| | | | **subnetwork\_range\_name** string | | Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used. |
| | | **network** dictionary | | Specifies the title of an existing network. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. This field represents a link to a Network resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_network task and then set this network field to "{{ name-of-resource }}" |
| | | **network\_ip** string | | An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. |
| | | **subnetwork** dictionary | | Reference to a VPC network. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. This field represents a link to a Subnetwork resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_subnetwork task and then set this subnetwork field to "{{ name-of-resource }}" |
| | **scheduling** dictionary | | Sets the scheduling options for this instance. |
| | | **automatic\_restart** boolean | **Choices:*** no
* yes
| Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. |
| | | **on\_host\_maintenance** string | | Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. |
| | | **preemptible** boolean | **Choices:*** no
* yes
| Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created. |
| | **service\_accounts** list / elements=dictionary | | A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. |
| | | **email** string | | Email address of the service account. |
| | | **scopes** list / elements=string | | The list of scopes to be made available for this service account. |
| | **tags** dictionary | | A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. |
| | | **fingerprint** string | | Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
| | | **items** list / elements=string | | An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Examples
--------
```
- name: create a network
google.cloud.gcp_compute_network:
name: network-instancetemplate
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: network
- name: create a address
google.cloud.gcp_compute_address:
name: address-instancetemplate
region: us-west1
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: address
- name: create a instance template
google.cloud.gcp_compute_instance_template:
name: test_object
properties:
disks:
- auto_delete: 'true'
boot: 'true'
initialize_params:
source_image: projects/ubuntu-os-cloud/global/images/family/ubuntu-1604-lts
machine_type: n1-standard-1
network_interfaces:
- network: "{{ network }}"
access_configs:
- name: test-config
type: ONE_TO_ONE_NAT
nat_ip: "{{ address }}"
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| **name** string | success | Name of the resource. The name is 1-63 characters long and complies with RFC1035. |
| **properties** complex | success | The instance properties for this instance template. |
| | **canIpForward** boolean | success | Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. |
| | **description** string | success | An optional text description for the instances that are created from this instance template. |
| | **disks** complex | success | An array of disks that are associated with the instances that are created from this template. |
| | | **autoDelete** boolean | success | Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). Tip: Disks should be set to autoDelete=true so that leftover disks are not left behind on machine deletion. |
| | | **boot** boolean | success | Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| | | **deviceName** string | success | Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-\* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. |
| | | **diskEncryptionKey** complex | success | Encrypts or decrypts a disk using a customer-supplied encryption key. |
| | | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | | **rsaEncryptedKey** string | success | Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. |
| | | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | | **index** integer | success | Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. |
| | | **initializeParams** complex | success | Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. |
| | | | **diskName** string | success | Specifies the disk name. If not specified, the default is to use the name of the instance. |
| | | | **diskSizeGb** integer | success | Specifies the size of the disk in base-2 GB. |
| | | | **diskType** string | success | Reference to a disk type. Specifies the disk type to use to create the instance. If not specified, the default is pd-standard. |
| | | | **sourceImage** string | success | The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. To create a disk with one of the public operating system images, specify the image by its family name. |
| | | | **sourceImageEncryptionKey** complex | success | The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. |
| | | | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | | **interface** string | success | Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. |
| | | **licenses** list / elements=string | success | Any applicable license URI. |
| | | **mode** string | success | The mode in which to attach this disk, either READ\_WRITE or READ\_ONLY. If not specified, the default is to attach the disk in READ\_WRITE mode. |
| | | **source** dictionary | success | Reference to a disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name, not the URL for the disk. |
| | | **type** string | success | Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. |
| | **guestAccelerators** complex | success | List of the type and count of accelerator cards attached to the instance . |
| | | **acceleratorCount** integer | success | The number of the guest accelerator cards exposed to this instance. |
| | | **acceleratorType** string | success | Full or partial URL of the accelerator type resource to expose to this instance. |
| | **labels** dictionary | success | Labels to apply to this address. A list of key->value pairs. |
| | **machineType** string | success | The machine type to use in the VM instance template. |
| | **metadata** dictionary | success | The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. |
| | **minCpuPlatform** string | success | Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms . |
| | **networkInterfaces** complex | success | An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one network interface is supported per instance. |
| | | **accessConfigs** complex | success | An array of configurations for this interface. Currently, only one access config, ONE\_TO\_ONE\_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access. |
| | | | **name** string | success | The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access. |
| | | | **natIP** dictionary | success | Reference to an address. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. |
| | | | **networkTier** string | success | This signifies the networking tier used for configuring this access configuration. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. |
| | | | **publicPtrDomainName** string | success | The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled. |
| | | | **setPublicPtr** boolean | success | Specifies whether a public DNS PTR record should be created to map the external IP address of the instance to a DNS domain name. |
| | | | **type** string | success | The type of configuration. The default and only option is ONE\_TO\_ONE\_NAT. |
| | | **aliasIpRanges** complex | success | An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. |
| | | | **ipCidrRange** string | success | The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). |
| | | | **subnetworkRangeName** string | success | Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used. |
| | | **name** string | success | The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc . |
| | | **network** dictionary | success | Specifies the title of an existing network. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. |
| | | **networkIP** string | success | An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. |
| | | **subnetwork** dictionary | success | Reference to a VPC network. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. |
| | **scheduling** complex | success | Sets the scheduling options for this instance. |
| | | **automaticRestart** boolean | success | Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. |
| | | **onHostMaintenance** string | success | Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. |
| | | **preemptible** boolean | success | Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created. |
| | **serviceAccounts** complex | success | A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. |
| | | **email** string | success | Email address of the service account. |
| | | **scopes** list / elements=string | success | The list of scopes to be made available for this service account. |
| | **tags** complex | success | A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. |
| | | **fingerprint** string | success | Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
| | | **items** list / elements=string | success | An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_appengine_firewall_rule_info β Gather info for GCP FirewallRule google.cloud.gcp\_appengine\_firewall\_rule\_info β Gather info for GCP FirewallRule
====================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_appengine_firewall_rule_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP FirewallRule
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a firewall rule
gcp_appengine_firewall_rule_info:
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **action** string | success | The action to take if this rule matches. |
| | **description** string | success | An optional string description of this rule. |
| | **priority** integer | success | A positive integer that defines the order of rule evaluation. Rules with the lowest priority are evaluated first. A default rule at priority Int32.MaxValue matches all IPv4 and IPv6 traffic when no previous rule matches. Only the action of this rule can be modified by the user. |
| | **sourceRange** string | success | IP address or range, defined using CIDR notation, of requests that this rule applies to. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_target_https_proxy_info β Gather info for GCP TargetHttpsProxy google.cloud.gcp\_compute\_target\_https\_proxy\_info β Gather info for GCP TargetHttpsProxy
============================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_target_https_proxy_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP TargetHttpsProxy
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a target HTTPS proxy
gcp_compute_target_https_proxy_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **quicOverride** string | success | Specifies the QUIC override policy for this resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE. |
| | **sslCertificates** list / elements=string | success | A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. |
| | **sslPolicy** dictionary | success | A reference to the SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured. |
| | **urlMap** dictionary | success | A reference to the UrlMap resource that defines the mapping from URL to the BackendService. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_subnetwork_info β Gather info for GCP Subnetwork google.cloud.gcp\_compute\_subnetwork\_info β Gather info for GCP Subnetwork
============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_subnetwork_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Subnetwork
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The GCP region for this subnetwork. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a subnetwork
gcp_compute_subnetwork_info:
region: us-west1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. |
| | **gatewayAddress** string | success | The gateway address for default routes to reach destination addresses outside this subnetwork. |
| | **id** integer | success | The unique identifier for the resource. |
| | **ipCidrRange** string | success | The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. |
| | **name** string | success | The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **network** dictionary | success | The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks. |
| | **privateIpGoogleAccess** boolean | success | When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access. |
| | **privateIpv6GoogleAccess** string | success | The private IPv6 google access type for the VMs in this subnet. |
| | **region** string | success | The GCP region for this subnetwork. |
| | **secondaryIpRanges** complex | success | An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. |
| | | **ipCidrRange** string | success | The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. |
| | | **rangeName** string | success | The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_bigquery_dataset β Creates a GCP Dataset google.cloud.gcp\_bigquery\_dataset β Creates a GCP Dataset
===========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_bigquery_dataset`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Datasets allow you to organize and control access to your tables.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access** list / elements=dictionary | | An array of objects that define dataset access for one or more entities. |
| | **domain** string | | A domain to grant access to. Any users signed in with the domain specified will be granted the specified access . |
| | **group\_by\_email** string | | An email address of a Google Group to grant access to. |
| | **role** string | | Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts. See [official docs](<https://cloud.google.com/bigquery/docs/access-control>). |
| | **special\_group** string | | A special group to grant access to. Possible values include: \* `projectOwners`: Owners of the enclosing project. \* `projectReaders`: Readers of the enclosing project. \* `projectWriters`: Writers of the enclosing project. \* `allAuthenticatedUsers`: All authenticated BigQuery users. |
| | **user\_by\_email** string | | An email address of a user to grant access to. For example: [email protected] . |
| | **view** dictionary | | A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. |
| | | **dataset\_id** string / required | | The ID of the dataset containing this table. |
| | | **project\_id** string / required | | The ID of the project containing this table. |
| | | **table\_id** string / required | | The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores. The maximum length is 1,024 characters. |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **dataset\_reference** dictionary / required | | A reference that identifies the dataset. |
| | **dataset\_id** string / required | | A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores. The maximum length is 1,024 characters. |
| | **project\_id** string | | The ID of the project containing this dataset. |
| **default\_encryption\_configuration** dictionary | | The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key. |
| | **kms\_key\_name** string / required | | Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| **default\_partition\_expiration\_ms** integer | | The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an `expirationMs` property in the `timePartitioning` settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of `defaultTableExpirationMs` for partitioned tables: only one of `defaultTableExpirationMs` and `defaultPartitionExpirationMs` will be used for any new partitioned table. If you provide an explicit `timePartitioning.expirationMs` when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property. |
| **default\_table\_expiration\_ms** integer | | The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an `expirationTime` property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the `expirationTime` for a given table is reached, that table will be deleted automatically. If a table's `expirationTime` is modified or removed before the table expires, or if you provide an explicit `expirationTime` when creating a table, that value takes precedence over the default expiration time indicated by this property. |
| **description** string | | A user-friendly description of the dataset. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **friendly\_name** string | | A descriptive name for the dataset. |
| **labels** dictionary | | The labels associated with this dataset. You can use these to organize and group your datasets . |
| **location** string | **Default:**"US" | The geographic location where the dataset should reside. See [official docs](<https://cloud.google.com/bigquery/docs/dataset-locations>). There are two types of locations, regional or multi-regional. A regional location is a specific geographic place, such as Tokyo, and a multi-regional location is a large geographic area, such as the United States, that contains at least two geographic places. The default value is multi-regional location `US`. Changing this forces a new resource to be created. |
| **name** string | | Dataset name. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets>
* Datasets Intro: <https://cloud.google.com/bigquery/docs/datasets-intro>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a dataset
google.cloud.gcp_bigquery_dataset:
name: my_example_dataset
dataset_reference:
dataset_id: my_example_dataset
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **access** complex | success | An array of objects that define dataset access for one or more entities. |
| | **domain** string | success | A domain to grant access to. Any users signed in with the domain specified will be granted the specified access . |
| | **groupByEmail** string | success | An email address of a Google Group to grant access to. |
| | **role** string | success | Describes the rights granted to the user specified by the other member of the access object. Basic, predefined, and custom roles are supported. Predefined roles that have equivalent basic roles are swapped by the API to their basic counterparts. See [official docs](<https://cloud.google.com/bigquery/docs/access-control>). |
| | **specialGroup** string | success | A special group to grant access to. Possible values include: \* `projectOwners`: Owners of the enclosing project. \* `projectReaders`: Readers of the enclosing project. \* `projectWriters`: Writers of the enclosing project. \* `allAuthenticatedUsers`: All authenticated BigQuery users. |
| | **userByEmail** string | success | An email address of a user to grant access to. For example: [email protected] . |
| | **view** complex | success | A view from a different dataset to grant access to. Queries executed against that view will have read access to tables in this dataset. The role field is not required when this field is set. If that view is updated by any user, access to the view needs to be granted again via an update operation. |
| | | **datasetId** string | success | The ID of the dataset containing this table. |
| | | **projectId** string | success | The ID of the project containing this table. |
| | | **tableId** string | success | The ID of the table. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores. The maximum length is 1,024 characters. |
| **creationTime** integer | success | The time when this dataset was created, in milliseconds since the epoch. |
| **datasetReference** complex | success | A reference that identifies the dataset. |
| | **datasetId** string | success | A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores. The maximum length is 1,024 characters. |
| | **projectId** string | success | The ID of the project containing this dataset. |
| **defaultEncryptionConfiguration** complex | success | The default encryption key for all tables in the dataset. Once this property is set, all newly-created partitioned tables in the dataset will have encryption key set to this value, unless table creation request (or query) overrides the key. |
| | **kmsKeyName** string | success | Describes the Cloud KMS encryption key that will be used to protect destination BigQuery table. The BigQuery Service Account associated with your project requires access to this encryption key. |
| **defaultPartitionExpirationMs** integer | success | The default partition expiration for all partitioned tables in the dataset, in milliseconds. Once this property is set, all newly-created partitioned tables in the dataset will have an `expirationMs` property in the `timePartitioning` settings set to this value, and changing the value will only affect new tables, not existing ones. The storage in a partition will have an expiration time of its partition time plus this value. Setting this property overrides the use of `defaultTableExpirationMs` for partitioned tables: only one of `defaultTableExpirationMs` and `defaultPartitionExpirationMs` will be used for any new partitioned table. If you provide an explicit `timePartitioning.expirationMs` when creating or updating a partitioned table, that value takes precedence over the default partition expiration time indicated by this property. |
| **defaultTableExpirationMs** integer | success | The default lifetime of all tables in the dataset, in milliseconds. The minimum value is 3600000 milliseconds (one hour). Once this property is set, all newly-created tables in the dataset will have an `expirationTime` property set to the creation time plus the value in this property, and changing the value will only affect new tables, not existing ones. When the `expirationTime` for a given table is reached, that table will be deleted automatically. If a table's `expirationTime` is modified or removed before the table expires, or if you provide an explicit `expirationTime` when creating a table, that value takes precedence over the default expiration time indicated by this property. |
| **description** string | success | A user-friendly description of the dataset. |
| **etag** string | success | A hash of the resource. |
| **friendlyName** string | success | A descriptive name for the dataset. |
| **id** string | success | The fully-qualified unique name of the dataset in the format projectId:datasetId. The dataset name without the project name is given in the datasetId field . |
| **labels** dictionary | success | The labels associated with this dataset. You can use these to organize and group your datasets . |
| **lastModifiedTime** integer | success | The date when this dataset or any of its tables was last modified, in milliseconds since the epoch. |
| **location** string | success | The geographic location where the dataset should reside. See [official docs](<https://cloud.google.com/bigquery/docs/dataset-locations>). There are two types of locations, regional or multi-regional. A regional location is a specific geographic place, such as Tokyo, and a multi-regional location is a large geographic area, such as the United States, that contains at least two geographic places. The default value is multi-regional location `US`. Changing this forces a new resource to be created. |
| **name** string | success | Dataset name. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_iam_role_info β Gather info for GCP Role google.cloud.gcp\_iam\_role\_info β Gather info for GCP Role
============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_iam_role_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Role
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a role
gcp_iam_role_info:
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **deleted** boolean | success | The current deleted state of the role. |
| | **description** string | success | Human-readable description for the role. |
| | **includedPermissions** list / elements=string | success | Names of permissions this role grants when bound in an IAM policy. |
| | **name** string | success | The name of the role. |
| | **stage** string | success | The current launch stage of the role. |
| | **title** string | success | A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_node_template β Creates a GCP NodeTemplate google.cloud.gcp\_compute\_node\_template β Creates a GCP NodeTemplate
======================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_node_template`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a NodeTemplate resource. Node templates specify properties for creating sole-tenant nodes, such as node type, vCPU and memory requirements, node affinity labels, and region.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional textual description of the resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string | | Name of the resource. |
| **node\_affinity\_labels** dictionary | | Labels to use for node affinity, which will be used in instance scheduling. |
| **node\_type** string | | Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified. |
| **node\_type\_flexibility** dictionary | | Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. |
| | **cpus** string | | Number of virtual CPUs to use. |
| | **memory** string | | Physical memory available to the node, defined in MB. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | Region where nodes using the node template will be created . |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/nodeTemplates>
* Sole-Tenant Nodes: <https://cloud.google.com/compute/docs/nodes/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a node template
google.cloud.gcp_compute_node_template:
name: test_object
region: us-central1
node_type: n1-node-96-624
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional textual description of the resource. |
| **name** string | success | Name of the resource. |
| **nodeAffinityLabels** dictionary | success | Labels to use for node affinity, which will be used in instance scheduling. |
| **nodeType** string | success | Node type to use for nodes group that are created from this template. Only one of nodeTypeFlexibility and nodeType can be specified. |
| **nodeTypeFlexibility** complex | success | Flexible properties for the desired node type. Node groups that use this node template will create nodes of a type that matches these properties. Only one of nodeTypeFlexibility and nodeType can be specified. |
| | **cpus** string | success | Number of virtual CPUs to use. |
| | **localSsd** string | success | Use local SSD . |
| | **memory** string | success | Physical memory available to the node, defined in MB. |
| **region** string | success | Region where nodes using the node template will be created . |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_instance_template_info β Gather info for GCP InstanceTemplate google.cloud.gcp\_compute\_instance\_template\_info β Gather info for GCP InstanceTemplate
==========================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_instance_template_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP InstanceTemplate
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an instance template
gcp_compute_instance_template_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **id** integer | success | The unique identifier for the resource. This identifier is defined by the server. |
| | **name** string | success | Name of the resource. The name is 1-63 characters long and complies with RFC1035. |
| | **properties** complex | success | The instance properties for this instance template. |
| | | **canIpForward** boolean | success | Enables instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, specify true. If unsure, leave this set to false. |
| | | **description** string | success | An optional text description for the instances that are created from this instance template. |
| | | **disks** complex | success | An array of disks that are associated with the instances that are created from this template. |
| | | | **autoDelete** boolean | success | Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance). Tip: Disks should be set to autoDelete=true so that leftover disks are not left behind on machine deletion. |
| | | | **boot** boolean | success | Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem. |
| | | | **deviceName** string | success | Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-\* tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. |
| | | | **diskEncryptionKey** complex | success | Encrypts or decrypts a disk using a customer-supplied encryption key. |
| | | | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | | | **rsaEncryptedKey** string | success | Specifies an RFC 4648 base64 encoded, RSA-wrapped 2048-bit customer-supplied encryption key to either encrypt or decrypt this resource. |
| | | | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | | | **index** integer | success | Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value. |
| | | | **initializeParams** complex | success | Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. |
| | | | | **diskName** string | success | Specifies the disk name. If not specified, the default is to use the name of the instance. |
| | | | | **diskSizeGb** integer | success | Specifies the size of the disk in base-2 GB. |
| | | | | **diskType** string | success | Reference to a disk type. Specifies the disk type to use to create the instance. If not specified, the default is pd-standard. |
| | | | | **sourceImage** string | success | The source image to create this disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. To create a disk with one of the public operating system images, specify the image by its family name. |
| | | | | **sourceImageEncryptionKey** complex | success | The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. |
| | | | | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | | | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | | | **interface** string | success | Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. |
| | | | **licenses** list / elements=string | success | Any applicable license URI. |
| | | | **mode** string | success | The mode in which to attach this disk, either READ\_WRITE or READ\_ONLY. If not specified, the default is to attach the disk in READ\_WRITE mode. |
| | | | **source** dictionary | success | Reference to a disk. When creating a new instance, one of initializeParams.sourceImage or disks.source is required. If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. Note that for InstanceTemplate, specify the disk name, not the URL for the disk. |
| | | | **type** string | success | Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT. |
| | | **guestAccelerators** complex | success | List of the type and count of accelerator cards attached to the instance . |
| | | | **acceleratorCount** integer | success | The number of the guest accelerator cards exposed to this instance. |
| | | | **acceleratorType** string | success | Full or partial URL of the accelerator type resource to expose to this instance. |
| | | **labels** dictionary | success | Labels to apply to this address. A list of key->value pairs. |
| | | **machineType** string | success | The machine type to use in the VM instance template. |
| | | **metadata** dictionary | success | The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. |
| | | **minCpuPlatform** string | success | Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms . |
| | | **networkInterfaces** complex | success | An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Only one network interface is supported per instance. |
| | | | **accessConfigs** complex | success | An array of configurations for this interface. Currently, only one access config, ONE\_TO\_ONE\_NAT, is supported. If there are no accessConfigs specified, then this instance will have no external internet access. |
| | | | | **name** string | success | The name of this access configuration. The default and recommended name is External NAT but you can use any arbitrary string you would like. For example, My external IP or Network Access. |
| | | | | **natIP** dictionary | success | Reference to an address. An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. |
| | | | | **networkTier** string | success | This signifies the networking tier used for configuring this access configuration. If an AccessConfig is specified without a valid external IP address, an ephemeral IP will be created with this networkTier. If an AccessConfig with a valid external IP address is specified, it must match that of the networkTier associated with the Address resource owning that IP. |
| | | | | **publicPtrDomainName** string | success | The DNS domain name for the public PTR record. You can set this field only if the setPublicPtr field is enabled. |
| | | | | **setPublicPtr** boolean | success | Specifies whether a public DNS PTR record should be created to map the external IP address of the instance to a DNS domain name. |
| | | | | **type** string | success | The type of configuration. The default and only option is ONE\_TO\_ONE\_NAT. |
| | | | **aliasIpRanges** complex | success | An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. |
| | | | | **ipCidrRange** string | success | The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. This range may be a single IP address (e.g. 10.2.3.4), a netmask (e.g. /24) or a CIDR format string (e.g. 10.1.2.0/24). |
| | | | | **subnetworkRangeName** string | success | Optional subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used. |
| | | | **name** string | success | The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc . |
| | | | **network** dictionary | success | Specifies the title of an existing network. When creating an instance, if neither the network nor the subnetwork is specified, the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. |
| | | | **networkIP** string | success | An IPv4 internal network address to assign to the instance for this network interface. If not specified by the user, an unused internal IP is assigned by the system. |
| | | | **subnetwork** dictionary | success | Reference to a VPC network. If the network resource is in legacy mode, do not provide this property. If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. |
| | | **scheduling** complex | success | Sets the scheduling options for this instance. |
| | | | **automaticRestart** boolean | success | Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). You can only set the automatic restart option for standard instances. Preemptible instances cannot be automatically restarted. |
| | | | **onHostMaintenance** string | success | Defines the maintenance behavior for this instance. For standard instances, the default behavior is MIGRATE. For preemptible instances, the default and only possible behavior is TERMINATE. For more information, see Setting Instance Scheduling Options. |
| | | | **preemptible** boolean | success | Defines whether the instance is preemptible. This can only be set during instance creation, it cannot be set or changed after the instance has been created. |
| | | **serviceAccounts** complex | success | A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. |
| | | | **email** string | success | Email address of the service account. |
| | | | **scopes** list / elements=string | success | The list of scopes to be made available for this service account. |
| | | **tags** complex | success | A list of tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. |
| | | | **fingerprint** string | success | Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata. |
| | | | **items** list / elements=string | success | An array of tags. Each tag must be 1-63 characters long, and comply with RFC1035. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_mlengine_model β Creates a GCP Model google.cloud.gcp\_mlengine\_model β Creates a GCP Model
=======================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_mlengine_model`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a machine learning solution.
* A model can have multiple versions, each of which is a deployed, trained model ready to receive prediction requests. The model itself is just a container.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **default\_version** dictionary | | The default version of the model. This version will be used to handle prediction requests that do not specify a version. |
| | **name** string / required | | The name specified for the version when it was created. |
| **description** string | | The description specified for the model when it was created. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **labels** dictionary | | One or more labels that you can add, to organize your models. |
| **name** string / required | | The name specified for the model. |
| **online\_prediction\_console\_logging** boolean | **Choices:*** no
* yes
| If true, online prediction nodes send stderr and stdout streams to Stackdriver Logging. |
| **online\_prediction\_logging** boolean | **Choices:*** no
* yes
| If true, online prediction access logs are sent to StackDriver Logging. |
| **project** string | | The Google Cloud Platform project to use. |
| **regions** list / elements=string | | The list of regions where the model is going to be deployed. Currently only one region per model is supported . |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Examples
--------
```
- name: create a model
google.cloud.gcp_mlengine_model:
name: "{{ resource_name | replace('-', '_') }}"
description: My model
regions:
- us-central1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **defaultVersion** complex | success | The default version of the model. This version will be used to handle prediction requests that do not specify a version. |
| | **name** string | success | The name specified for the version when it was created. |
| **description** string | success | The description specified for the model when it was created. |
| **labels** dictionary | success | One or more labels that you can add, to organize your models. |
| **name** string | success | The name specified for the model. |
| **onlinePredictionConsoleLogging** boolean | success | If true, online prediction nodes send stderr and stdout streams to Stackdriver Logging. |
| **onlinePredictionLogging** boolean | success | If true, online prediction access logs are sent to StackDriver Logging. |
| **regions** list / elements=string | success | The list of regions where the model is going to be deployed. Currently only one region per model is supported . |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_spanner_instance_info β Gather info for GCP Instance google.cloud.gcp\_spanner\_instance\_info β Gather info for GCP Instance
========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_spanner_instance_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Instance
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an instance
gcp_spanner_instance_info:
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **config** string | success | The name of the instance's configuration (similar but not quite the same as a region) which defines defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form `regional-europe-west1` , `us-central` etc. In order to obtain a valid list please consult the [Configuration section of the docs](<https://cloud.google.com/spanner/docs/instances>). |
| | **displayName** string | success | The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length. |
| | **labels** dictionary | success | An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| | **name** string | success | A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. |
| | **nodeCount** integer | success | The number of nodes allocated to this instance. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_target_ssl_proxy_info β Gather info for GCP TargetSslProxy google.cloud.gcp\_compute\_target\_ssl\_proxy\_info β Gather info for GCP TargetSslProxy
========================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_target_ssl_proxy_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP TargetSslProxy
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a target SSL proxy
gcp_compute_target_ssl_proxy_info:
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **proxyHeader** string | success | Specifies the type of proxy header to append before sending data to the backend. |
| | **service** dictionary | success | A reference to the BackendService resource. |
| | **sslCertificates** list / elements=string | success | A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified. |
| | **sslPolicy** dictionary | success | A reference to the SslPolicy resource that will be associated with the TargetSslProxy resource. If not set, the TargetSslProxy resource will not have any SSL policy configured. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_forwarding_rule_info β Gather info for GCP ForwardingRule google.cloud.gcp\_compute\_forwarding\_rule\_info β Gather info for GCP ForwardingRule
======================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_forwarding_rule_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP ForwardingRule
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | A reference to the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a forwarding rule
gcp_compute_forwarding_rule_info:
region: us-west1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **allowGlobalAccess** boolean | success | If true, clients can access ILB from all regions. Otherwise only allows from the local region the ILB is located at. |
| | **allPorts** boolean | success | For internal TCP/UDP load balancing (i.e. load balancing scheme is INTERNAL and protocol is TCP/UDP), set this to true to allow packets addressed to any ports to be forwarded to the backends configured with this forwarding rule. Used with backend service. Cannot be set if port or portRange are set. |
| | **backendService** dictionary | success | A BackendService to receive the matched traffic. This is used only for INTERNAL load balancing. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **IPAddress** string | success | The IP address that this forwarding rule is serving on behalf of. Addresses are restricted based on the forwarding rule's load balancing scheme (EXTERNAL or INTERNAL) and scope (global or regional). When the load balancing scheme is EXTERNAL, for global forwarding rules, the address must be a global IP, and for regional forwarding rules, the address must live in the same region as the forwarding rule. If this field is empty, an ephemeral IPv4 address from the same scope (global or regional) will be assigned. A regional forwarding rule supports IPv4 only. A global forwarding rule supports either IPv4 or IPv6. When the load balancing scheme is INTERNAL, this can only be an RFC 1918 IP address belonging to the network/subnet configured for the forwarding rule. By default, if this field is empty, an ephemeral internal IP address will be automatically allocated from the IP range of the subnet or network configured for this forwarding rule. An address can be specified either by a literal IP address or a URL reference to an existing Address resource. The following examples are all valid: \* 100.1.2.3 \* <https://www.googleapis.com/compute/v1/projects/project/regions/region/addresses/address> \* projects/project/regions/region/addresses/address \* regions/region/addresses/address \* global/addresses/address \* address . |
| | **IPProtocol** string | success | The IP protocol to which this rule applies. When the load balancing scheme is INTERNAL, only TCP and UDP are valid. |
| | **isMirroringCollector** boolean | success | Indicates whether or not this load balancer can be used as a collector for packet mirroring. To prevent mirroring loops, instances behind this load balancer will not have their traffic mirrored even if a PacketMirroring rule applies to them. This can only be set to true for load balancers that have their loadBalancingScheme set to INTERNAL. |
| | **loadBalancingScheme** string | success | This signifies what the ForwardingRule will be used for and can be EXTERNAL, INTERNAL, or INTERNAL\_MANAGED. EXTERNAL is used for Classic Cloud VPN gateways, protocol forwarding to VMs from an external IP address, and HTTP(S), SSL Proxy, TCP Proxy, and Network TCP/UDP load balancers. INTERNAL is used for protocol forwarding to VMs from an internal IP address, and internal TCP/UDP load balancers. INTERNAL\_MANAGED is used for internal HTTP(S) load balancers. |
| | **name** string | success | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **network** dictionary | success | For internal load balancing, this field identifies the network that the load balanced IP should belong to for this Forwarding Rule. If this field is not specified, the default network will be used. This field is only used for INTERNAL load balancing. |
| | **networkTier** string | success | The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. |
| | **portRange** string | success | This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, TargetSslProxy, TargetTcpProxy, TargetVpnGateway, TargetPool, TargetInstance. Applicable only when IPProtocol is TCP, UDP, or SCTP, only packets addressed to ports in the specified range will be forwarded to target. Forwarding rules with the same [IPAddress, IPProtocol] pair must have disjoint port ranges. Some types of forwarding target have constraints on the acceptable ports: \* TargetHttpProxy: 80, 8080 \* TargetHttpsProxy: 443 \* TargetTcpProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \* TargetSslProxy: 25, 43, 110, 143, 195, 443, 465, 587, 700, 993, 995, 1883, 5222 \* TargetVpnGateway: 500, 4500 . |
| | **ports** list / elements=string | success | This field is used along with the backend\_service field for internal load balancing. When the load balancing scheme is INTERNAL, a single port or a comma separated list of ports can be configured. Only packets addressed to these ports will be forwarded to the backends configured with this forwarding rule. You may specify a maximum of up to 5 ports. |
| | **region** string | success | A reference to the region where the regional forwarding rule resides. This field is not applicable to global forwarding rules. |
| | **serviceLabel** string | success | An optional prefix to the service name for this Forwarding Rule. If specified, will be the first label of the fully qualified service name. The label must be 1-63 characters long, and comply with RFC1035. Specifically, the label must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. This field is only used for INTERNAL load balancing. |
| | **serviceName** string | success | The internal fully qualified service name for this Forwarding Rule. This field is only used for INTERNAL load balancing. |
| | **subnetwork** dictionary | success | The subnetwork that the load balanced IP should belong to for this Forwarding Rule. This field is only used for INTERNAL load balancing. If the network specified is in auto subnet mode, this field is optional. However, if the network is in custom subnet mode, a subnetwork must be specified. |
| | **target** string | success | The URL of the target resource to receive the matched traffic. The target must live in the same region as the forwarding rule. The forwarded traffic must be of a type appropriate to the target object. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_region_instance_group_manager_info β Gather info for GCP RegionInstanceGroupManager google.cloud.gcp\_compute\_region\_instance\_group\_manager\_info β Gather info for GCP RegionInstanceGroupManager
==================================================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_instance_group_manager_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP RegionInstanceGroupManager
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The region the managed instance group resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a region instance group manager
gcp_compute_region_instance_group_manager_info:
region: us-central1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **autoHealingPolicies** complex | success | The autohealing policy for this managed instance group . |
| | | **healthCheck** string | success | The URL for the health check that signals autohealing. |
| | | **initialDelaySec** integer | success | The number of seconds that the managed instance group waits before it applies autohealing policies to new instances or recently recreated instances . |
| | **baseInstanceName** string | success | The base instance name to use for instances in this group. The value must be 1-58 characters long. Instances are named by appending a hyphen and a random four-character string to the base instance name. The base instance name must comply with RFC1035. |
| | **creationTimestamp** string | success | The creation timestamp for this managed instance group in RFC3339 text format. |
| | **currentActions** complex | success | The list of instance actions and the number of instances in this managed instance group that are scheduled for each of those actions. |
| | | **abandoning** integer | success | The total number of instances in the managed instance group that are scheduled to be abandoned. Abandoning an instance removes it from the managed instance group without deleting it. |
| | | **creating** integer | success | The number of instances in the managed instance group that are scheduled to be created or are currently being created. If the group fails to create any of these instances, it tries again until it creates the instance successfully. If you have disabled creation retries, this field will not be populated; instead, the creatingWithoutRetries field will be populated. |
| | | **creatingWithoutRetries** integer | success | The number of instances that the managed instance group will attempt to create. The group attempts to create each instance only once. If the group fails to create any of these instances, it decreases the group's targetSize value accordingly. |
| | | **deleting** integer | success | The number of instances in the managed instance group that are scheduled to be deleted or are currently being deleted. |
| | | **none** integer | success | The number of instances in the managed instance group that are running and have no scheduled actions. |
| | | **recreating** integer | success | The number of instances in the managed instance group that are scheduled to be recreated or are currently being being recreated. Recreating an instance deletes the existing root persistent disk and creates a new disk from the image that is defined in the instance template. |
| | | **refreshing** integer | success | The number of instances in the managed instance group that are being reconfigured with properties that do not require a restart or a recreate action. For example, setting or removing target pools for the instance. |
| | | **restarting** integer | success | The number of instances in the managed instance group that are scheduled to be restarted or are currently being restarted. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **id** integer | success | A unique identifier for this resource. |
| | **instanceGroup** dictionary | success | The instance group being managed. |
| | **instanceTemplate** dictionary | success | The instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. |
| | **name** string | success | The name of the managed instance group. The name must be 1-63 characters long, and comply with RFC1035. |
| | **namedPorts** complex | success | Named ports configured for the Instance Groups complementary to this Instance Group Manager. |
| | | **name** string | success | The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. |
| | | **port** integer | success | The port number, which can be a value between 1 and 65535. |
| | **region** string | success | The region the managed instance group resides. |
| | **targetPools** list / elements=string | success | TargetPool resources to which instances in the instanceGroup field are added. The target pools automatically apply to all of the instances in the managed instance group. |
| | **targetSize** integer | success | The target number of running instances for this managed instance group. Deleting or abandoning instances reduces this number. Resizing the group changes this number. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_container_cluster_info β Gather info for GCP Cluster google.cloud.gcp\_container\_cluster\_info β Gather info for GCP Cluster
========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_container_cluster_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Cluster
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **location** string / required | | The location where the cluster is deployed.
aliases: region, zone |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a cluster
gcp_container_cluster_info:
location: us-central1-a
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **addonsConfig** complex | success | Configurations for the various addons available to run in the cluster. |
| | | **horizontalPodAutoscaling** complex | success | Configuration for the horizontal pod autoscaling feature, which increases or decreases the number of replica pods a replication controller has based on the resource usage of the existing pods. |
| | | | **disabled** boolean | success | Whether the Horizontal Pod Autoscaling feature is enabled in the cluster. When enabled, it ensures that a Heapster pod is running in the cluster, which is also used by the Cloud Monitoring service. |
| | | **httpLoadBalancing** complex | success | Configuration for the HTTP (L7) load balancing controller addon, which makes it easy to set up HTTP load balancers for services in a cluster. |
| | | | **disabled** boolean | success | Whether the HTTP Load Balancing controller is enabled in the cluster. When enabled, it runs a small pod in the cluster that manages the load balancers. |
| | | **networkPolicyConfig** complex | success | Configuration for NetworkPolicy. This only tracks whether the addon is enabled or not on the Master, it does not track whether network policy is enabled for the nodes. |
| | | | **disabled** boolean | success | Whether NetworkPolicy is enabled for this cluster. |
| | **binaryAuthorization** complex | success | Configuration for the BinaryAuthorization feature. |
| | | **enabled** boolean | success | If enabled, all container images will be validated by Binary Authorization. |
| | **clusterIpv4Cidr** string | success | The IP address range of the container pods in this cluster, in CIDR notation (e.g. 10.96.0.0/14). Leave blank to have one automatically chosen or specify a /14 block in 10.0.0.0/8. |
| | **conditions** complex | success | Which conditions caused the current cluster state. |
| | | **code** string | success | Machine-friendly representation of the condition. |
| | | **message** string | success | Human-friendly representation of the condition. |
| | **createTime** string | success | The time the cluster was created, in RFC3339 text format. |
| | **currentMasterVersion** string | success | The current software version of the master endpoint. |
| | **currentNodeCount** integer | success | The number of nodes currently in the cluster. |
| | **currentNodeVersion** string | success | The current version of the node software components. If they are currently at multiple versions because they're in the process of being upgraded, this reflects the minimum version of all nodes. |
| | **databaseEncryption** complex | success | Configuration of etcd encryption. |
| | | **keyName** string | success | Name of CloudKMS key to use for the encryption of secrets in etcd. Ex. `projects/my-project/locations/global/keyRings/my-ring/cryptoKeys/my-key` . |
| | | **state** string | success | Denotes the state of etcd encryption. |
| | **defaultMaxPodsConstraint** complex | success | The default constraint on the maximum number of pods that can be run simultaneously on a node in the node pool of this cluster. Only honored if cluster created with IP Alias support. |
| | | **maxPodsPerNode** string | success | Constraint enforced on the max num of pods per node. |
| | **description** string | success | An optional description of this cluster. |
| | **enableKubernetesAlpha** boolean | success | Kubernetes alpha features are enabled on this cluster. This includes alpha API groups (e.g. v1alpha1) and features that may not be production ready in the kubernetes version of the master and nodes. |
| | **enableTpu** boolean | success | (Optional) Whether to enable Cloud TPU resources in this cluster. See the official documentation - <https://cloud.google.com/tpu/docs/kubernetes-engine-setup> . |
| | **endpoint** string | success | The IP address of this cluster's master endpoint. The endpoint can be accessed from the internet at https://username:password@endpoint/ See the masterAuth property of this resource for username and password information. |
| | **expireTime** string | success | The time the cluster will be automatically deleted in RFC3339 text format. |
| | **initialClusterVersion** string | success | The software version of the master endpoint and kubelets used in the cluster when it was first created. The version can be upgraded over time. |
| | **initialNodeCount** integer | success | The number of nodes to create in this cluster. You must ensure that your Compute Engine resource quota is sufficient for this number of instances. You must also have available firewall and routes quota. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "nodeConfig") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. This field has been deprecated. Please use nodePool.initial\_node\_count instead. |
| | **ipAllocationPolicy** complex | success | Configuration for controlling how IPs are allocated in the cluster. |
| | | **clusterIpv4CidrBlock** string | success | The IP address range for the cluster pod IPs. If this field is set, then cluster.cluster\_ipv4\_cidr must be left blank. This field is only applicable when useIpAliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | | **clusterSecondaryRangeName** string | success | The name of the secondary range to be used for the cluster CIDR block. The secondary range will be used for pod IP addresses. This must be an existing secondary range associated with the cluster subnetwork . |
| | | **createSubnetwork** boolean | success | Whether a new subnetwork will be created automatically for the cluster. |
| | | **nodeIpv4CidrBlock** string | success | The IP address range of the instance IPs in this cluster. This is applicable only if createSubnetwork is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | | **servicesIpv4CidrBlock** string | success | The IP address range of the services IPs in this cluster. If blank, a range will be automatically chosen with the default size. This field is only applicable when useIpAliases is true. Set to blank to have a range chosen with the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | | **servicesSecondaryRangeName** string | success | The name of the secondary range to be used as for the services CIDR block. The secondary range will be used for service ClusterIPs. This must be an existing secondary range associated with the cluster subnetwork. |
| | | **subnetworkName** string | success | A custom subnetwork name to be used if createSubnetwork is true. If this field is empty, then an automatic name will be chosen for the new subnetwork. |
| | | **tpuIpv4CidrBlock** string | success | The IP address range of the Cloud TPUs in this cluster. If unspecified, a range will be automatically chosen with the default size. This field is only applicable when useIpAliases is true. If unspecified, the range will use the default size. Set to /netmask (e.g. /14) to have a range chosen with a specific netmask. |
| | | **useIpAliases** boolean | success | Whether alias IPs will be used for pod IPs in the cluster. |
| | **labelFingerprint** string | success | The fingerprint of the set of labels for this cluster. |
| | **legacyAbac** complex | success | Configuration for the legacy ABAC authorization mode. |
| | | **enabled** boolean | success | Whether the ABAC authorizer is enabled for this cluster. When enabled, identities in the system, including service accounts, nodes, and controllers, will have statically granted permissions beyond those provided by the RBAC configuration or IAM. |
| | **location** string | success | The location where the cluster is deployed. |
| | **locations** list / elements=string | success | The list of Google Compute Engine zones in which the cluster's nodes should be located. |
| | **loggingService** string | success | The logging service the cluster should use to write logs. Currently available options: logging.googleapis.com - the Google Cloud Logging service. none - no logs will be exported from the cluster. if left as an empty string,logging.googleapis.com will be used. |
| | **masterAuth** complex | success | The authentication information for accessing the master endpoint. |
| | | **clientCertificate** string | success | Base64-encoded public certificate used by clients to authenticate to the cluster endpoint. |
| | | **clientCertificateConfig** complex | success | Configuration for client certificate authentication on the cluster. For clusters before v1.12, if no configuration is specified, a client certificate is issued. |
| | | | **issueClientCertificate** boolean | success | Issue a client certificate. |
| | | **clientKey** string | success | Base64-encoded private key used by clients to authenticate to the cluster endpoint. |
| | | **clusterCaCertificate** string | success | Base64-encoded public certificate that is the root of trust for the cluster. |
| | | **password** string | success | The password to use for HTTP basic authentication to the master endpoint. Because the master endpoint is open to the Internet, you should create a strong password with a minimum of 16 characters. |
| | | **username** string | success | The username to use for HTTP basic authentication to the master endpoint. |
| | **masterAuthorizedNetworksConfig** complex | success | Configuration for controlling how IPs are allocated in the cluster. |
| | | **cidrBlocks** complex | success | Define up to 50 external networks that could access Kubernetes master through HTTPS. |
| | | | **cidrBlock** string | success | Block specified in CIDR notation. |
| | | | **displayName** string | success | Optional field used to identify cidr blocks. |
| | | **enabled** boolean | success | Whether or not master authorized networks is enabled. |
| | **monitoringService** string | success | The monitoring service the cluster should use to write metrics. Currently available options: monitoring.googleapis.com - the Google Cloud Monitoring service. none - no metrics will be exported from the cluster. if left as an empty string, monitoring.googleapis.com will be used. |
| | **name** string | success | The name of this cluster. The name must be unique within this project and location, and can be up to 40 characters. Must be Lowercase letters, numbers, and hyphens only. Must start with a letter. Must end with a number or a letter. |
| | **network** string | success | The name of the Google Compute Engine network to which the cluster is connected. If left unspecified, the default network will be used. |
| | **networkConfig** complex | success | Network configurations . |
| | | **defaultSnatStatus** boolean | success | Whether the cluster disables default in-node sNAT rules. In-node sNAT rules will be disabled when defaultSnatStatus is disabled. |
| | | **enableIntraNodeVisibility** boolean | success | Whether Intra-node visibility is enabled for this cluster. This makes same node pod to pod traffic visible for VPC network. |
| | | **network** string | success | The relative name of the Google Compute Engine network to which the cluster is connected. Example: projects/my-project/global/networks/my-network . |
| | | **subnetwork** string | success | The relative name of the Google Compute Engine subnetwork to which the cluster is connected. Example: projects/my-project/regions/us-central1/subnetworks/my-subnet . |
| | **networkPolicy** complex | success | Configuration options for the NetworkPolicy feature. |
| | | **enabled** boolean | success | Whether network policy is enabled on the cluster. |
| | | **provider** string | success | The selected network policy provider. |
| | **nodeConfig** complex | success | Parameters used in creating the cluster's nodes. For requests, this field should only be used in lieu of a "nodePool" object, since this configuration (along with the "initialNodeCount") will be used to create a "NodePool" object with an auto-generated name. Do not use this and a nodePool at the same time. For responses, this field will be populated with the node configuration of the first node pool. If unspecified, the defaults are used. |
| | | **accelerators** complex | success | A list of hardware accelerators to be attached to each node. See <https://cloud.google.com/compute/docs/gpus> for more information about support for GPUs. |
| | | | **acceleratorCount** string | success | The number of accelerator cards exposed to an instance. |
| | | | **acceleratorType** string | success | The accelerator type resource name. |
| | | **diskSizeGb** integer | success | Size of the disk attached to each node, specified in GB. The smallest allowed disk size is 10GB. If unspecified, the default disk size is 100GB. |
| | | **diskType** string | success | Type of the disk attached to each node (e.g. 'pd-standard' or 'pd-ssd') If unspecified, the default disk type is 'pd-standard' . |
| | | **imageType** string | success | The image type to use for this node. Note that for a given image type, the latest version of it will be used. |
| | | **labels** dictionary | success | The map of Kubernetes labels (key/value pairs) to be applied to each node. These will added in addition to any default label(s) that Kubernetes may apply to the node. In case of conflict in label keys, the applied set may differ depending on the Kubernetes version -- it's best to assume the behavior is undefined and conflicts should be avoided. For more information, including usage and the valid values, see: <http://kubernetes.io/v1.1/docs/user-guide/labels.html> An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| | | **localSsdCount** integer | success | The number of local SSD disks to be attached to the node. The limit for this value is dependant upon the maximum number of disks available on a machine per zone. See: <https://cloud.google.com/compute/docs/disks/local-ssd#local_ssd_limits> for more information. |
| | | **machineType** string | success | The name of a Google Compute Engine machine type (e.g. n1-standard-1). If unspecified, the default machine type is n1-standard-1. |
| | | **metadata** dictionary | success | The metadata key/value pairs assigned to instances in the cluster. Keys must conform to the regexp [a-zA-Z0-9-\_]+ and be less than 128 bytes in length. These are reflected as part of a URL in the metadata server. Additionally, to avoid ambiguity, keys must not conflict with any other metadata keys for the project or be one of the four reserved keys: "instance-template", "kube-env", "startup-script", and "user-data" Values are free-form strings, and only have meaning as interpreted by the image running in the instance. The only restriction placed on them is that each value's size must be less than or equal to 32 KB. The total size of all keys and values must be less than 512 KB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| | | **minCpuPlatform** string | success | Minimum CPU platform to be used by this instance. The instance may be scheduled on the specified or newer CPU platform. |
| | | **oauthScopes** list / elements=string | success | The set of Google API scopes to be made available on all of the node VMs under the "default" service account. The following scopes are recommended, but not required, and by default are not included: <https://www.googleapis.com/auth/compute> is required for mounting persistent storage on your nodes.
<https://www.googleapis.com/auth/devstorage.read_only> is required for communicating with gcr.io (the Google Container Registry). If unspecified, no scopes are added, unless Cloud Logging or Cloud Monitoring are enabled, in which case their required scopes will be added. |
| | | **preemptible** boolean | success | Whether the nodes are created as preemptible VM instances. See: <https://cloud.google.com/compute/docs/instances/preemptible> for more information about preemptible VM instances. |
| | | **serviceAccount** string | success | The Google Cloud Platform Service Account to be used by the node VMs. If no Service Account is specified, the "default" service account is used. |
| | | **shieldedInstanceConfig** complex | success | Shielded Instance options. |
| | | | **enableIntegrityMonitoring** boolean | success | Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. |
| | | | **enableSecureBoot** boolean | success | Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. |
| | | **tags** list / elements=string | success | The list of instance tags applied to all nodes. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during cluster or node pool creation. Each tag within the list must comply with RFC1035. |
| | | **taints** complex | success | List of kubernetes taints to be applied to each node. For more information, including usage and the valid values, see: <https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/> . |
| | | | **effect** string | success | Effect for taint. |
| | | | **key** string | success | Key for taint. |
| | | | **value** string | success | Value for taint. |
| | **nodeIpv4CidrSize** integer | success | The size of the address space on each node for hosting containers. This is provisioned from within the container\_ipv4\_cidr range. |
| | **nodePools** complex | success | Node pools belonging to this cluster. |
| | | **name** string | success | Name of the node pool. |
| | **privateClusterConfig** complex | success | Configuration for a private cluster. |
| | | **enablePrivateEndpoint** boolean | success | Whether the master's internal IP address is used as the cluster endpoint. |
| | | **enablePrivateNodes** boolean | success | Whether nodes have internal IP addresses only. If enabled, all nodes are given only RFC 1918 private addresses and communicate with the master via private networking. |
| | | **masterIpv4CidrBlock** string | success | The IP range in CIDR notation to use for the hosted master network. This range will be used for assigning internal IP addresses to the master or set of masters, as well as the ILB VIP. This range must not overlap with any other ranges in use within the cluster's network. |
| | | **privateEndpoint** string | success | The internal IP address of this cluster's master endpoint. |
| | | **publicEndpoint** string | success | The external IP address of this cluster's master endpoint. |
| | **releaseChannel** complex | success | ReleaseChannel indicates which release channel a cluster is subscribed to. Release channels are arranged in order of risk and frequency of updates. |
| | | **channel** string | success | Which release channel the cluster is subscribed to. |
| | **resourceLabels** dictionary | success | The resource labels for the cluster to use to annotate any related Google Compute Engine resources. |
| | **servicesIpv4Cidr** string | success | The IP address range of the Kubernetes services in this cluster, in CIDR notation (e.g. 1.2.3.4/29). Service addresses are typically put in the last /16 from the container CIDR. |
| | **shieldedNodes** complex | success | Shielded Nodes configuration. |
| | | **enabled** boolean | success | Whether Shielded Nodes features are enabled on all nodes in this cluster. |
| | **status** string | success | The current status of this cluster. |
| | **statusMessage** string | success | Additional information about the current status of this cluster, if available. |
| | **subnetwork** string | success | The name of the Google Compute Engine subnetwork to which the cluster is connected. |
| | **tpuIpv4CidrBlock** string | success | The IP address range of the Cloud TPUs in this cluster, in [CIDR](http://en.wikipedia.org/wiki/Classless\_Inter-Domain\_Routing) notation (e.g. `1.2.3.4/29`). |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_instance_group_info β Gather info for GCP InstanceGroup google.cloud.gcp\_compute\_instance\_group\_info β Gather info for GCP InstanceGroup
====================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_instance_group_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP InstanceGroup
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone** string / required | | A reference to the zone where the instance group resides. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on an instance group
gcp_compute_instance_group_info:
zone: us-central1-a
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **id** integer | success | A unique identifier for this instance group. |
| | **instances** list / elements=string | success | The list of instances associated with this InstanceGroup. All instances must be created before being added to an InstanceGroup. All instances not in this list will be removed from the InstanceGroup and will not be deleted. Only the full identifier of the instance will be returned. |
| | **name** string | success | The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035. |
| | **namedPorts** complex | success | Assigns a name to a port number. For example: {name: "http", port: 80}. This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: "http", port: 80},{name: "http", port: 8080}] Named ports apply to all instances in this instance group. |
| | | **name** string | success | The name for this named port. The name must be 1-63 characters long, and comply with RFC1035. |
| | | **port** integer | success | The port number, which can be a value between 1 and 65535. |
| | **network** dictionary | success | The network to which all instances in the instance group belong. |
| | **region** string | success | The region where the instance group is located (for regional resources). |
| | **subnetwork** dictionary | success | The subnetwork to which all instances in the instance group belong. |
| | **zone** string | success | A reference to the zone where the instance group resides. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_disk_info β Gather info for GCP Disk google.cloud.gcp\_compute\_disk\_info β Gather info for GCP Disk
================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_disk_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Disk
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **zone** string / required | | A reference to the zone where the disk resides. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a disk
gcp_compute_disk_info:
zone: us-central1-a
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **diskEncryptionKey** complex | success | Encrypts the disk using a customer-supplied encryption key. After you encrypt a disk with a customer-supplied key, you must provide the same key if you use the disk later (e.g. to create a disk snapshot or an image, or to attach the disk to a virtual machine). Customer-supplied encryption keys do not protect access to metadata of the disk. If you do not provide an encryption key when creating the disk, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later. |
| | | **kmsKeyName** string | success | The name of the encryption key that is stored in Google Cloud KMS. Your project's Compute Engine System service account (`service-{{PROJECT\_NUMBER}}@compute-system.iam.gserviceaccount.com`) must have `roles/cloudkms.cryptoKeyEncrypterDecrypter` to use this feature. |
| | | **kmsKeyServiceAccount** string | success | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | **id** integer | success | The unique identifier for the resource. |
| | **labelFingerprint** string | success | The fingerprint used for optimistic locking of this resource. Used internally during updates. |
| | **labels** dictionary | success | Labels to apply to this disk. A list of key->value pairs. |
| | **lastAttachTimestamp** string | success | Last attach timestamp in RFC3339 text format. |
| | **lastDetachTimestamp** string | success | Last detach timestamp in RFC3339 text format. |
| | **licenses** list / elements=string | success | Any applicable publicly visible licenses. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **physicalBlockSizeBytes** integer | success | Physical block size of the persistent disk, in bytes. If not present in a request, a default value is used. Currently supported sizes are 4096 and 16384, other sizes may be added in the future. If an unsupported value is requested, the error message will list the supported values for the caller's project. |
| | **sizeGb** integer | success | Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk. If you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot. |
| | **sourceImage** string | success | The source image used to create this disk. If the source image is deleted, this field will not be set. To create a disk with one of the public operating system images, specify the image by its family name. For example, specify family/debian-9 to use the latest Debian 9 image: projects/debian-cloud/global/images/family/debian-9 Alternatively, use a specific version of a public operating system image: projects/debian-cloud/global/images/debian-9-stretch-vYYYYMMDD To create a disk with a private image that you created, specify the image name in the following format: global/images/my-private-image You can also specify a private image by its image family, which returns the latest version of the image in that family. Replace the image name with family/family-name: global/images/family/my-private-family . |
| | **sourceImageEncryptionKey** complex | success | The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key. |
| | | **kmsKeyName** string | success | The name of the encryption key that is stored in Google Cloud KMS. |
| | | **kmsKeyServiceAccount** string | success | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | **sourceImageId** string | success | The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used. |
| | **sourceSnapshot** dictionary | success | The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. |
| | **sourceSnapshotEncryptionKey** complex | success | The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. |
| | | **kmsKeyName** string | success | The name of the encryption key that is stored in Google Cloud KMS. |
| | | **kmsKeyServiceAccount** string | success | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| | **sourceSnapshotId** string | success | The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used. |
| | **type** string | success | URL of the disk type resource describing which disk type to use to create the disk. Provide this when creating the disk. |
| | **users** list / elements=string | success | Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance . |
| | **zone** string | success | A reference to the zone where the disk resides. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_region_backend_service_info β Gather info for GCP RegionBackendService google.cloud.gcp\_compute\_region\_backend\_service\_info β Gather info for GCP RegionBackendService
====================================================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_region_backend_service_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP RegionBackendService
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **filters** list / elements=string | | A list of filter value pairs. Available filters are listed here <https://cloud.google.com/sdk/gcloud/reference/topic/filters>. Each additional filter in the list will act be added as an AND condition (filter1 and filter2) . |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | A reference to the region where the regional backend service resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a region backend service
gcp_compute_region_backend_service_info:
region: us-central1
filters:
- name = test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **affinityCookieTtlSec** integer | success | Lifetime of cookies in seconds if session\_affinity is GENERATED\_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used. |
| | **backends** complex | success | The set of backends that serve this RegionBackendService. |
| | | **balancingMode** string | success | Specifies the balancing mode for this backend. |
| | | **capacityScaler** string | success | A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). ~>\*\*NOTE\*\*: This field cannot be set for INTERNAL region backend services (default loadBalancingScheme), but is required for non-INTERNAL backend service. The total capacity\_scaler for all backends must be non-zero. A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0]. |
| | | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | | **failover** boolean | success | This field designates whether this is a failover backend. More than one failover backend can be configured for a given RegionBackendService. |
| | | **group** string | success | The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. When the `load\_balancing\_scheme` is INTERNAL, only instance groups are supported. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL. |
| | | **maxConnections** integer | success | The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. Cannot be set for INTERNAL backend services. For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance or maxConnectionsPerEndpoint, as appropriate for group type, must be set. |
| | | **maxConnectionsPerEndpoint** integer | success | The max number of simultaneous connections that a single backend network endpoint can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set. |
| | | **maxConnectionsPerInstance** integer | success | The max number of simultaneous connections that a single backend instance can handle. Cannot be set for INTERNAL backend services. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. |
| | | **maxRate** integer | success | The max requests per second (RPS) of the group. Cannot be set for INTERNAL backend services. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. Either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set. |
| | | **maxRatePerEndpoint** string | success | The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. Cannot be set for INTERNAL backend services. |
| | | **maxRatePerInstance** string | success | The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. Cannot be set for INTERNAL backend services. |
| | | **maxUtilization** string | success | Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. Valid range is [0.0, 1.0]. Cannot be set for INTERNAL backend services. |
| | **cdnPolicy** complex | success | Cloud CDN configuration for this BackendService. |
| | | **cacheKeyPolicy** complex | success | The CacheKeyPolicy for this CdnPolicy. |
| | | | **includeHost** boolean | success | If true requests to different hosts will be cached separately. |
| | | | **includeProtocol** boolean | success | If true, http and https requests will be cached separately. |
| | | | **includeQueryString** boolean | success | If true, include query string parameters in the cache key according to query\_string\_whitelist and query\_string\_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely. |
| | | | **queryStringBlacklist** list / elements=string | success | Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | | | **queryStringWhitelist** list / elements=string | success | Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | | **signedUrlCacheMaxAgeSec** integer | success | Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. |
| | **circuitBreakers** complex | success | Settings controlling the volume of connections to a backend service. This field is applicable only when the `load\_balancing\_scheme` is set to INTERNAL\_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. |
| | | **maxConnections** integer | success | The maximum number of connections to the backend cluster. Defaults to 1024. |
| | | **maxPendingRequests** integer | success | The maximum number of pending requests to the backend cluster. Defaults to 1024. |
| | | **maxRequests** integer | success | The maximum number of parallel requests to the backend cluster. Defaults to 1024. |
| | | **maxRequestsPerConnection** integer | success | Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. |
| | | **maxRetries** integer | success | The maximum number of parallel retries to the backend cluster. Defaults to 3. |
| | **connectionDraining** complex | success | Settings for connection draining . |
| | | **drainingTimeoutSec** integer | success | Time for which instance will be drained (not accept new connections, but still work to finish started). |
| | **consistentHash** complex | success | Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies when all of the following are true - \* `load\_balancing\_scheme` is set to INTERNAL\_MANAGED \* `protocol` is set to HTTP, HTTPS, or HTTP2 \* `locality\_lb\_policy` is set to MAGLEV or RING\_HASH . |
| | | **httpCookie** complex | success | Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP\_COOKIE. |
| | | | **name** string | success | Name of the cookie. |
| | | | **path** string | success | Path to set for the cookie. |
| | | | **ttl** complex | success | Lifetime of the cookie. |
| | | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | **httpHeaderName** string | success | The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER\_FIELD. |
| | | **minimumRingSize** integer | success | The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024. |
| | **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| | **description** string | success | An optional description of this resource. |
| | **enableCDN** boolean | success | If true, enable Cloud CDN for this RegionBackendService. |
| | **failoverPolicy** complex | success | Policy for failovers. |
| | | **disableConnectionDrainOnFailover** boolean | success | On failover or failback, this field indicates whether connection drain will be honored. Setting this to true has the following effect: connections to the old active pool are not drained. Connections to the new active pool use the timeout of 10 min (currently fixed). Setting to false has the following effect: both old and new connections will have a drain timeout of 10 min. This can be set to true only if the protocol is TCP. The default is false. |
| | | **dropTrafficIfUnhealthy** boolean | success | This option is used only when no healthy VMs are detected in the primary and backup instance groups. When set to true, traffic is dropped. When set to false, new connections are sent across all VMs in the primary group. The default is false. |
| | | **failoverRatio** string | success | The value of the field must be in [0, 1]. If the ratio of the healthy VMs in the primary backend is at or below this number, traffic arriving at the load-balanced IP will be directed to the failover backend. In case where 'failoverRatio' is not set or all the VMs in the backup backend are unhealthy, the traffic will be directed back to the primary backend in the "force" mode, where traffic will be spread to the healthy VMs with the best effort, or to all VMs when no VM is healthy. This field is only used with l4 load balancing. |
| | **fingerprint** string | success | Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. |
| | **healthChecks** list / elements=string | success | The set of URLs to HealthCheck resources for health checking this RegionBackendService. Currently at most one health check can be specified. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. |
| | **id** integer | success | The unique identifier for the resource. |
| | **loadBalancingScheme** string | success | Indicates what kind of load balancing this regional backend service will be used for. A backend service created for one type of load balancing cannot be used with the other(s). |
| | **localityLbPolicy** string | success | The load balancing algorithm used within the scope of the locality. The possible values are - \* ROUND\_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. \* LEAST\_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. \* RING\_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. \* RANDOM - The load balancer selects a random healthy host. \* ORIGINAL\_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. \* MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the `load\_balancing\_scheme` is set to INTERNAL\_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. |
| | **logConfig** complex | success | This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. |
| | | **enable** boolean | success | Whether to enable logging for the load balancer traffic served by this backend service. |
| | | **sampleRate** string | success | This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0. |
| | **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| | **network** dictionary | success | The URL of the network to which this backend service belongs. This field can only be specified when the load balancing scheme is set to INTERNAL. |
| | **outlierDetection** complex | success | Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the `load\_balancing\_scheme` is set to INTERNAL\_MANAGED and the `protocol` is set to HTTP, HTTPS, or HTTP2. |
| | | **baseEjectionTime** complex | success | The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. |
| | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | **consecutiveErrors** integer | success | Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5. |
| | | **consecutiveGatewayFailure** integer | success | The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5. |
| | | **enforcingConsecutiveErrors** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | | **enforcingConsecutiveGatewayFailure** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0. |
| | | **enforcingSuccessRate** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | | **interval** complex | success | Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. |
| | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | | **maxEjectionPercent** integer | success | Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%. |
| | | **successRateMinimumHosts** integer | success | The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5. |
| | | **successRateRequestVolume** integer | success | The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100. |
| | | **successRateStdevFactor** integer | success | This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev \* success\_rate\_stdev\_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900. |
| | **portName** string | success | A named port on a backend instance group representing the port for communication to the backend VMs in that group. Required when the loadBalancingScheme is EXTERNAL, INTERNAL\_MANAGED, or INTERNAL\_SELF\_MANAGED and the backends are instance groups. The named port must be defined on each backend instance group. This parameter has no meaning if the backends are NEGs. API sets a default of "http" if not given. Must be omitted when the loadBalancingScheme is INTERNAL (Internal TCP/UDP Load Balancing). |
| | **protocol** string | success | The protocol this RegionBackendService uses to communicate with backends. The default is HTTP. \*\*NOTE\*\*: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API. |
| | **region** string | success | A reference to the region where the regional backend service resides. |
| | **sessionAffinity** string | success | Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP. |
| | **timeoutSec** integer | success | How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400]. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_spanner_instance β Creates a GCP Instance google.cloud.gcp\_spanner\_instance β Creates a GCP Instance
============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_spanner_instance`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* An isolated set of Cloud Spanner resources on which databases can be hosted.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **config** string / required | | The name of the instance's configuration (similar but not quite the same as a region) which defines defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form `regional-europe-west1` , `us-central` etc. In order to obtain a valid list please consult the [Configuration section of the docs](<https://cloud.google.com/spanner/docs/instances>). |
| **display\_name** string / required | | The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **labels** dictionary | | An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| **name** string / required | | A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. |
| **node\_count** integer | **Default:**"1" | The number of nodes allocated to this instance. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/spanner/docs/reference/rest/v1/projects.instances>
* Official Documentation: <https://cloud.google.com/spanner/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a instance
google.cloud.gcp_spanner_instance:
name: testinstance
display_name: My Spanner Instance
node_count: 2
labels:
cost_center: ti-1700004
config: regional-us-central1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **config** string | success | The name of the instance's configuration (similar but not quite the same as a region) which defines defines the geographic placement and replication of your databases in this instance. It determines where your data is stored. Values are typically of the form `regional-europe-west1` , `us-central` etc. In order to obtain a valid list please consult the [Configuration section of the docs](<https://cloud.google.com/spanner/docs/instances>). |
| **displayName** string | success | The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length. |
| **labels** dictionary | success | An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. |
| **name** string | success | A unique identifier for the instance, which cannot be changed after the instance is created. The name must be between 6 and 30 characters in length. |
| **nodeCount** integer | success | The number of nodes allocated to this instance. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_backend_service β Creates a GCP BackendService google.cloud.gcp\_compute\_backend\_service β Creates a GCP BackendService
==========================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_backend_service`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A Backend Service defines a group of virtual machines that will serve traffic for load balancing. This resource is a global backend service, appropriate for external load balancing or self-managed internal load balancing.
* For managed internal load balancing, use a regional backend service instead.
* Currently self-managed internal load balancing is only available in beta.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **affinity\_cookie\_ttl\_sec** integer | | Lifetime of cookies in seconds if session\_affinity is GENERATED\_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used. |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **backends** list / elements=dictionary | | The set of backends that serve this BackendService. |
| | **balancing\_mode** string | **Default:**"UTILIZATION" | Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL). Some valid choices include: "UTILIZATION", "RATE", "CONNECTION" |
| | **capacity\_scaler** string | **Default:**"1.0" | A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0]. |
| | **description** string | | An optional description of this resource. Provide this property when you create the resource. |
| | **group** string / required | | The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL. |
| | **max\_connections** integer | | The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance or maxConnectionsPerEndpoint, as appropriate for group type, must be set. |
| | **max\_connections\_per\_endpoint** integer | | The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set. |
| | **max\_connections\_per\_instance** integer | | The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. |
| | **max\_rate** integer | | The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set. |
| | **max\_rate\_per\_endpoint** string | | The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. |
| | **max\_rate\_per\_instance** string | | The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. |
| | **max\_utilization** string | **Default:**"0.8" | Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0]. |
| **cdn\_policy** dictionary | | Cloud CDN configuration for this BackendService. |
| | **cache\_key\_policy** dictionary | | The CacheKeyPolicy for this CdnPolicy. |
| | | **include\_host** boolean | **Choices:*** no
* yes
| If true requests to different hosts will be cached separately. |
| | | **include\_protocol** boolean | **Choices:*** no
* yes
| If true, http and https requests will be cached separately. |
| | | **include\_query\_string** boolean | **Choices:*** no
* yes
| If true, include query string parameters in the cache key according to query\_string\_whitelist and query\_string\_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely. |
| | | **query\_string\_blacklist** list / elements=string | | Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | | **query\_string\_whitelist** list / elements=string | | Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | **signed\_url\_cache\_max\_age\_sec** integer | **Default:**"3600" | Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. |
| **circuit\_breakers** dictionary | | Settings controlling the volume of connections to a backend service. This field is applicable only when the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. |
| | **max\_connections** integer | **Default:**"1024" | The maximum number of connections to the backend cluster. Defaults to 1024. |
| | **max\_pending\_requests** integer | **Default:**"1024" | The maximum number of pending requests to the backend cluster. Defaults to 1024. |
| | **max\_requests** integer | **Default:**"1024" | The maximum number of parallel requests to the backend cluster. Defaults to 1024. |
| | **max\_requests\_per\_connection** integer | | Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. |
| | **max\_retries** integer | **Default:**"3" | The maximum number of parallel retries to the backend cluster. Defaults to 3. |
| **connection\_draining** dictionary | | Settings for connection draining . |
| | **draining\_timeout\_sec** integer | **Default:**"300" | Time for which instance will be drained (not accept new connections, but still work to finish started). |
| **consistent\_hash** dictionary | | Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies if the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. This field is only applicable when locality\_lb\_policy is set to MAGLEV or RING\_HASH. |
| | **http\_cookie** dictionary | | Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP\_COOKIE. |
| | | **name** string | | Name of the cookie. |
| | | **path** string | | Path to set for the cookie. |
| | | **ttl** dictionary | | Lifetime of the cookie. |
| | | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** integer / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **http\_header\_name** string | | The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER\_FIELD. |
| | **minimum\_ring\_size** integer | **Default:**"1024" | The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024. |
| **custom\_request\_headers** list / elements=string | | Headers that the HTTP/S load balancer should add to proxied requests. |
| **description** string | | An optional description of this resource. |
| **enable\_cdn** boolean | **Choices:*** no
* yes
| If true, enable Cloud CDN for this BackendService. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **health\_checks** list / elements=string | | The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. For internal load balancing, a URL to a HealthCheck resource must be specified instead. |
| **iap** dictionary | | Settings for enabling Cloud Identity Aware Proxy. |
| | **enabled** boolean | **Choices:*** no
* yes
| Enables IAP. |
| | **oauth2\_client\_id** string / required | | OAuth2 Client ID for IAP . |
| | **oauth2\_client\_secret** string / required | | OAuth2 Client Secret for IAP . |
| **load\_balancing\_scheme** string | **Default:**"EXTERNAL" | Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. Some valid choices include: "EXTERNAL", "INTERNAL\_SELF\_MANAGED" |
| **locality\_lb\_policy** string | | The load balancing algorithm used within the scope of the locality. The possible values are - \* ROUND\_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. \* LEAST\_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. \* RING\_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. \* RANDOM - The load balancer selects a random healthy host. \* ORIGINAL\_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. \* MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. Some valid choices include: "ROUND\_ROBIN", "LEAST\_REQUEST", "RING\_HASH", "RANDOM", "ORIGINAL\_DESTINATION", "MAGLEV" |
| **log\_config** dictionary | | This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. |
| | **enable** boolean | **Choices:*** no
* yes
| Whether to enable logging for the load balancer traffic served by this backend service. |
| | **sample\_rate** string | | This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0. |
| **name** string / required | | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **outlier\_detection** dictionary | | Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. |
| | **base\_ejection\_time** dictionary | | The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. |
| | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | **seconds** integer / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **consecutive\_errors** integer | **Default:**"5" | Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5. |
| | **consecutive\_gateway\_failure** integer | **Default:**"5" | The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5. |
| | **enforcing\_consecutive\_errors** integer | **Default:**"100" | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | **enforcing\_consecutive\_gateway\_failure** integer | | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0. |
| | **enforcing\_success\_rate** integer | **Default:**"100" | The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | **interval** dictionary | | Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. |
| | | **nanos** integer | | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | **seconds** integer / required | | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **max\_ejection\_percent** integer | **Default:**"10" | Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%. |
| | **success\_rate\_minimum\_hosts** integer | **Default:**"5" | The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5. |
| | **success\_rate\_request\_volume** integer | **Default:**"100" | The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100. |
| | **success\_rate\_stdev\_factor** integer | **Default:**"1900" | This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev \* success\_rate\_stdev\_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900. |
| **port\_name** string | | Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL. |
| **project** string | | The Google Cloud Platform project to use. |
| **protocol** string | | The protocol this BackendService uses to communicate with backends. The default is HTTP. \*\*NOTE\*\*: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API. Some valid choices include: "HTTP", "HTTPS", "HTTP2", "TCP", "SSL", "GRPC" |
| **scopes** list / elements=string | | Array of scopes to be used |
| **security\_policy** string | | The security policy associated with this backend service. |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **session\_affinity** string | | Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP. Some valid choices include: "NONE", "CLIENT\_IP", "CLIENT\_IP\_PORT\_PROTO", "CLIENT\_IP\_PROTO", "GENERATED\_COOKIE", "HEADER\_FIELD", "HTTP\_COOKIE" |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **timeout\_sec** integer | | How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400].
aliases: timeout\_seconds |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/v1/backendServices>
* Official Documentation: <https://cloud.google.com/compute/docs/load-balancing/http/backend-service>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a instance group
google.cloud.gcp_compute_instance_group:
name: instancegroup-backendservice
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: instancegroup
- name: create a HTTP health check
google.cloud.gcp_compute_http_health_check:
name: httphealthcheck-backendservice
healthy_threshold: 10
port: 8080
timeout_sec: 2
unhealthy_threshold: 5
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: healthcheck
- name: create a backend service
google.cloud.gcp_compute_backend_service:
name: test_object
backends:
- group: "{{ instancegroup.selfLink }}"
health_checks:
- "{{ healthcheck.selfLink }}"
enable_cdn: 'true'
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **affinityCookieTtlSec** integer | success | Lifetime of cookies in seconds if session\_affinity is GENERATED\_COOKIE. If set to 0, the cookie is non-persistent and lasts only until the end of the browser session (or equivalent). The maximum allowed value for TTL is one day. When the load balancing scheme is INTERNAL, this field is not used. |
| **backends** complex | success | The set of backends that serve this BackendService. |
| | **balancingMode** string | success | Specifies the balancing mode for this backend. For global HTTP(S) or TCP/SSL load balancing, the default is UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)) and CONNECTION (for TCP/SSL). |
| | **capacityScaler** string | success | A multiplier applied to the group's maximum servicing capacity (based on UTILIZATION, RATE or CONNECTION). Default value is 1, which means the group will serve up to 100% of its configured capacity (depending on balancingMode). A setting of 0 means the group is completely drained, offering 0% of its available Capacity. Valid range is [0.0,1.0]. |
| | **description** string | success | An optional description of this resource. Provide this property when you create the resource. |
| | **group** string | success | The fully-qualified URL of an Instance Group or Network Endpoint Group resource. In case of instance group this defines the list of instances that serve traffic. Member virtual machine instances from each instance group must live in the same zone as the instance group itself. No two backends in a backend service are allowed to use same Instance Group resource. For Network Endpoint Groups this defines list of endpoints. All endpoints of Network Endpoint Group must be hosted on instances located in the same zone as the Network Endpoint Group. Backend services cannot mix Instance Group and Network Endpoint Group backends. Note that you must specify an Instance Group or Network Endpoint Group resource using the fully-qualified URL, rather than a partial URL. |
| | **maxConnections** integer | success | The max number of simultaneous connections for the group. Can be used with either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or one of maxConnectionsPerInstance or maxConnectionsPerEndpoint, as appropriate for group type, must be set. |
| | **maxConnectionsPerEndpoint** integer | success | The max number of simultaneous connections that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerEndpoint must be set. |
| | **maxConnectionsPerInstance** integer | success | The max number of simultaneous connections that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either CONNECTION or UTILIZATION balancing modes. For CONNECTION mode, either maxConnections or maxConnectionsPerInstance must be set. |
| | **maxRate** integer | success | The max requests per second (RPS) of the group. Can be used with either RATE or UTILIZATION balancing modes, but required if RATE mode. For RATE mode, either maxRate or one of maxRatePerInstance or maxRatePerEndpoint, as appropriate for group type, must be set. |
| | **maxRatePerEndpoint** string | success | The max requests per second (RPS) that a single backend network endpoint can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerEndpoint must be set. |
| | **maxRatePerInstance** string | success | The max requests per second (RPS) that a single backend instance can handle. This is used to calculate the capacity of the group. Can be used in either balancing mode. For RATE mode, either maxRate or maxRatePerInstance must be set. |
| | **maxUtilization** string | success | Used when balancingMode is UTILIZATION. This ratio defines the CPU utilization target for the group. The default is 0.8. Valid range is [0.0, 1.0]. |
| **cdnPolicy** complex | success | Cloud CDN configuration for this BackendService. |
| | **cacheKeyPolicy** complex | success | The CacheKeyPolicy for this CdnPolicy. |
| | | **includeHost** boolean | success | If true requests to different hosts will be cached separately. |
| | | **includeProtocol** boolean | success | If true, http and https requests will be cached separately. |
| | | **includeQueryString** boolean | success | If true, include query string parameters in the cache key according to query\_string\_whitelist and query\_string\_blacklist. If neither is set, the entire query string will be included. If false, the query string will be excluded from the cache key entirely. |
| | | **queryStringBlacklist** list / elements=string | success | Names of query string parameters to exclude in cache keys. All other parameters will be included. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | | **queryStringWhitelist** list / elements=string | success | Names of query string parameters to include in cache keys. All other parameters will be excluded. Either specify query\_string\_whitelist or query\_string\_blacklist, not both. '&' and '=' will be percent encoded and not treated as delimiters. |
| | **signedUrlCacheMaxAgeSec** integer | success | Maximum number of seconds the response to a signed URL request will be considered fresh, defaults to 1hr (3600s). After this time period, the response will be revalidated before being served. When serving responses to signed URL requests, Cloud CDN will internally behave as though all responses from this backend had a "Cache-Control: public, max-age=[TTL]" header, regardless of any existing Cache-Control header. The actual headers served in responses will not be altered. |
| **circuitBreakers** complex | success | Settings controlling the volume of connections to a backend service. This field is applicable only when the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. |
| | **maxConnections** integer | success | The maximum number of connections to the backend cluster. Defaults to 1024. |
| | **maxPendingRequests** integer | success | The maximum number of pending requests to the backend cluster. Defaults to 1024. |
| | **maxRequests** integer | success | The maximum number of parallel requests to the backend cluster. Defaults to 1024. |
| | **maxRequestsPerConnection** integer | success | Maximum requests for a single backend connection. This parameter is respected by both the HTTP/1.1 and HTTP/2 implementations. If not specified, there is no limit. Setting this parameter to 1 will effectively disable keep alive. |
| | **maxRetries** integer | success | The maximum number of parallel retries to the backend cluster. Defaults to 3. |
| **connectionDraining** complex | success | Settings for connection draining . |
| | **drainingTimeoutSec** integer | success | Time for which instance will be drained (not accept new connections, but still work to finish started). |
| **consistentHash** complex | success | Consistent Hash-based load balancing can be used to provide soft session affinity based on HTTP headers, cookies or other properties. This load balancing policy is applicable only for HTTP connections. The affinity to a particular destination host will be lost when one or more hosts are added/removed from the destination service. This field specifies parameters that control consistent hashing. This field only applies if the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. This field is only applicable when locality\_lb\_policy is set to MAGLEV or RING\_HASH. |
| | **httpCookie** complex | success | Hash is based on HTTP Cookie. This field describes a HTTP cookie that will be used as the hash key for the consistent hash load balancer. If the cookie is not present, it will be generated. This field is applicable if the sessionAffinity is set to HTTP\_COOKIE. |
| | | **name** string | success | Name of the cookie. |
| | | **path** string | success | Path to set for the cookie. |
| | | **ttl** complex | success | Lifetime of the cookie. |
| | | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive. |
| | | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **httpHeaderName** string | success | The hash based on the value of the specified header field. This field is applicable if the sessionAffinity is set to HEADER\_FIELD. |
| | **minimumRingSize** integer | success | The minimum number of virtual nodes to use for the hash ring. Larger ring sizes result in more granular load distributions. If the number of hosts in the load balancing pool is larger than the ring size, each host will be assigned a single virtual node. Defaults to 1024. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **customRequestHeaders** list / elements=string | success | Headers that the HTTP/S load balancer should add to proxied requests. |
| **description** string | success | An optional description of this resource. |
| **enableCDN** boolean | success | If true, enable Cloud CDN for this BackendService. |
| **fingerprint** string | success | Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. |
| **healthChecks** list / elements=string | success | The set of URLs to the HttpHealthCheck or HttpsHealthCheck resource for health checking this BackendService. Currently at most one health check can be specified. A health check must be specified unless the backend service uses an internet or serverless NEG as a backend. For internal load balancing, a URL to a HealthCheck resource must be specified instead. |
| **iap** complex | success | Settings for enabling Cloud Identity Aware Proxy. |
| | **enabled** boolean | success | Enables IAP. |
| | **oauth2ClientId** string | success | OAuth2 Client ID for IAP . |
| | **oauth2ClientSecret** string | success | OAuth2 Client Secret for IAP . |
| | **oauth2ClientSecretSha256** string | success | OAuth2 Client Secret SHA-256 for IAP . |
| **id** integer | success | The unique identifier for the resource. |
| **loadBalancingScheme** string | success | Indicates whether the backend service will be used with internal or external load balancing. A backend service created for one type of load balancing cannot be used with the other. |
| **localityLbPolicy** string | success | The load balancing algorithm used within the scope of the locality. The possible values are - \* ROUND\_ROBIN - This is a simple policy in which each healthy backend is selected in round robin order. \* LEAST\_REQUEST - An O(1) algorithm which selects two random healthy hosts and picks the host which has fewer active requests. \* RING\_HASH - The ring/modulo hash load balancer implements consistent hashing to backends. The algorithm has the property that the addition/removal of a host from a set of N hosts only affects 1/N of the requests. \* RANDOM - The load balancer selects a random healthy host. \* ORIGINAL\_DESTINATION - Backend host is selected based on the client connection metadata, i.e., connections are opened to the same address as the destination address of the incoming connection before the connection was redirected to the load balancer. \* MAGLEV - used as a drop in replacement for the ring hash load balancer. Maglev is not as stable as ring hash but has faster table lookup build times and host selection times. For more information about Maglev, refer to https://ai.google/research/pubs/pub44824 This field is applicable only when the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. |
| **logConfig** complex | success | This field denotes the logging options for the load balancer traffic served by this backend service. If logging is enabled, logs will be exported to Stackdriver. |
| | **enable** boolean | success | Whether to enable logging for the load balancer traffic served by this backend service. |
| | **sampleRate** string | success | This field can only be specified if logging is enabled for this backend service. The value of the field must be in [0, 1]. This configures the sampling rate of requests to the load balancer where 1.0 means all logged requests are reported and 0.0 means no logged requests are reported. The default value is 1.0. |
| **name** string | success | Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **outlierDetection** complex | success | Settings controlling eviction of unhealthy hosts from the load balancing pool. This field is applicable only when the load\_balancing\_scheme is set to INTERNAL\_SELF\_MANAGED. |
| | **baseEjectionTime** complex | success | The base time that a host is ejected for. The real time is equal to the base time multiplied by the number of times the host has been ejected. Defaults to 30000ms or 30s. |
| | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **consecutiveErrors** integer | success | Number of errors before a host is ejected from the connection pool. When the backend host is accessed over HTTP, a 5xx return code qualifies as an error. Defaults to 5. |
| | **consecutiveGatewayFailure** integer | success | The number of consecutive gateway failures (502, 503, 504 status or connection errors that are mapped to one of those status codes) before a consecutive gateway failure ejection occurs. Defaults to 5. |
| | **enforcingConsecutiveErrors** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive 5xx. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | **enforcingConsecutiveGatewayFailure** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through consecutive gateway failures. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 0. |
| | **enforcingSuccessRate** integer | success | The percentage chance that a host will be actually ejected when an outlier status is detected through success rate statistics. This setting can be used to disable ejection or to ramp it up slowly. Defaults to 100. |
| | **interval** complex | success | Time interval between ejection sweep analysis. This can result in both new ejections as well as hosts being returned to service. Defaults to 10 seconds. |
| | | **nanos** integer | success | Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. |
| | | **seconds** integer | success | Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. |
| | **maxEjectionPercent** integer | success | Maximum percentage of hosts in the load balancing pool for the backend service that can be ejected. Defaults to 10%. |
| | **successRateMinimumHosts** integer | success | The number of hosts in a cluster that must have enough request volume to detect success rate outliers. If the number of hosts is less than this setting, outlier detection via success rate statistics is not performed for any host in the cluster. Defaults to 5. |
| | **successRateRequestVolume** integer | success | The minimum number of total requests that must be collected in one interval (as defined by the interval duration above) to include this host in success rate based outlier detection. If the volume is lower than this setting, outlier detection via success rate statistics is not performed for that host. Defaults to 100. |
| | **successRateStdevFactor** integer | success | This factor is used to determine the ejection threshold for success rate outlier ejection. The ejection threshold is the difference between the mean success rate, and the product of this factor and the standard deviation of the mean success rate: mean - (stdev \* success\_rate\_stdev\_factor). This factor is divided by a thousand to get a double. That is, if the desired factor is 1.9, the runtime value should be 1900. Defaults to 1900. |
| **portName** string | success | Name of backend port. The same name should appear in the instance groups referenced by this service. Required when the load balancing scheme is EXTERNAL. |
| **protocol** string | success | The protocol this BackendService uses to communicate with backends. The default is HTTP. \*\*NOTE\*\*: HTTP2 is only valid for beta HTTP/2 load balancer types and may result in errors if used with the GA API. |
| **securityPolicy** string | success | The security policy associated with this backend service. |
| **sessionAffinity** string | success | Type of session affinity to use. The default is NONE. Session affinity is not applicable if the protocol is UDP. |
| **timeoutSec** integer | success | How many seconds to wait for the backend before considering it a failed request. Default is 30 seconds. Valid range is [1, 86400]. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_compute_subnetwork β Creates a GCP Subnetwork google.cloud.gcp\_compute\_subnetwork β Creates a GCP Subnetwork
================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_subnetwork`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A VPC network is a virtual version of the traditional physical networks that exist within and between physical data centers. A VPC network provides connectivity for your Compute Engine virtual machine (VM) instances, Container Engine containers, App Engine Flex services, and other network-related resources.
* Each GCP project contains one or more VPC networks. Each VPC network is a global entity spanning all GCP regions. This global VPC network allows VM instances and other resources to communicate with each other via internal, private IP addresses.
* Each VPC network is subdivided into subnets, and each subnet is contained within a single region. You can have more than one subnet in a region for a given VPC network. Each subnet has a contiguous private RFC1918 IP space. You create instances, containers, and the like in these subnets.
* When you create an instance, you must create it in a subnet, and the instance draws its internal IP address from that subnet.
* Virtual machine (VM) instances in a VPC network can communicate with instances in all other subnets of the same VPC network, regardless of region, using their RFC1918 private IP addresses. You can isolate portions of the network, even entire subnets, using firewall rules.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **ip\_cidr\_range** string / required | | The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. |
| **name** string / required | | The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary / required | | The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks. This field represents a link to a Network resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_network task and then set this network field to "{{ name-of-resource }}" |
| **private\_ip\_google\_access** boolean | **Choices:*** no
* yes
| When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access. |
| **private\_ipv6\_google\_access** string | | The private IPv6 google access type for the VMs in this subnet. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | The GCP region for this subnetwork. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **secondary\_ip\_ranges** list / elements=dictionary | | An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. |
| | **ip\_cidr\_range** string / required | | The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. |
| | **range\_name** string / required | | The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork. |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks>
* Private Google Access: <https://cloud.google.com/vpc/docs/configure-private-google-access>
* Cloud Networking: <https://cloud.google.com/vpc/docs/using-vpc>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a network
google.cloud.gcp_compute_network:
name: network-subnetwork
auto_create_subnetworks: 'true'
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: network
- name: create a subnetwork
google.cloud.gcp_compute_subnetwork:
name: ansiblenet
region: us-west1
network: "{{ network }}"
ip_cidr_range: 172.16.0.0/16
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. Provide this property when you create the resource. This field can be set only at resource creation time. |
| **gatewayAddress** string | success | The gateway address for default routes to reach destination addresses outside this subnetwork. |
| **id** integer | success | The unique identifier for the resource. |
| **ipCidrRange** string | success | The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 192.168.0.0/16. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. |
| **name** string | success | The name of the resource, provided by the client when initially creating the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary | success | The network this subnet belongs to. Only networks that are in the distributed mode can have subnetworks. |
| **privateIpGoogleAccess** boolean | success | When enabled, VMs in this subnetwork without external IP addresses can access Google APIs and services by using Private Google Access. |
| **privateIpv6GoogleAccess** string | success | The private IPv6 google access type for the VMs in this subnet. |
| **region** string | success | The GCP region for this subnetwork. |
| **secondaryIpRanges** complex | success | An array of configurations for secondary IP ranges for VM instances contained in this subnetwork. The primary IP of such VM must belong to the primary ipCidrRange of the subnetwork. The alias IPs may belong to either primary or secondary ranges. |
| | **ipCidrRange** string | success | The range of IP addresses belonging to this subnetwork secondary range. Provide this property when you create the subnetwork. Ranges must be unique and non-overlapping with all primary and secondary IP ranges within a network. Only IPv4 is supported. |
| | **rangeName** string | success | The name associated with this subnetwork secondary range, used when adding an alias IP range to a VM instance. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_router β Creates a GCP Router google.cloud.gcp\_compute\_router β Creates a GCP Router
========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_router`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a Router resource.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **bgp** dictionary | | BGP information specific to this router. |
| | **advertise\_mode** string | **Default:**"DEFAULT" | User-specified flag to indicate which mode to use for advertisement. Some valid choices include: "DEFAULT", "CUSTOM" |
| | **advertised\_groups** list / elements=string | | User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL\_SUBNETS . |
| | **advertised\_ip\_ranges** list / elements=dictionary | | User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. |
| | | **description** string | | User-specified description for the IP range. |
| | | **range** string / required | | The IP range to advertise. The value must be a CIDR-formatted string. |
| | **asn** integer / required | | Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary / required | | A reference to the network to which this router belongs. This field represents a link to a Network resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_network task and then set this network field to "{{ name-of-resource }}" |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | Region where the router resides. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/routers>
* Google Cloud Router: <https://cloud.google.com/router/docs/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a network
google.cloud.gcp_compute_network:
name: network-router
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: network
- name: create a router
google.cloud.gcp_compute_router:
name: test_object
network: "{{ network }}"
bgp:
asn: 64514
advertise_mode: CUSTOM
advertised_groups:
- ALL_SUBNETS
advertised_ip_ranges:
- range: 1.2.3.4
- range: 6.7.0.0/16
region: us-central1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **bgp** complex | success | BGP information specific to this router. |
| | **advertisedGroups** list / elements=string | success | User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. This enum field has the one valid value: ALL\_SUBNETS . |
| | **advertisedIpRanges** complex | success | User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertiseMode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. |
| | | **description** string | success | User-specified description for the IP range. |
| | | **range** string | success | The IP range to advertise. The value must be a CIDR-formatted string. |
| | **advertiseMode** string | success | User-specified flag to indicate which mode to use for advertisement. |
| | **asn** integer | success | Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **id** integer | success | The unique identifier for the resource. |
| **name** string | success | Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network** dictionary | success | A reference to the network to which this router belongs. |
| **region** string | success | Region where the router resides. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_bigtable_instance β Creates a GCP Instance google.cloud.gcp\_bigtable\_instance β Creates a GCP Instance
=============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_bigtable_instance`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A collection of Bigtable Tables and the resources that serve them. All tables in an instance are served from all Clusters in the instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **clusters** list / elements=dictionary | | An array of clusters. Maximum 4. |
| | **default\_storage\_type** string | | The type of storage used by this cluster to serve its parent instance's tables, unless explicitly overridden. Some valid choices include: "STORAGE\_TYPE\_UNSPECIFIED", "SSD", "HDD" |
| | **location** string | | The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/<project>/locations/<zone>`. |
| | **name** string | | The unique name of the cluster. |
| | **serve\_nodes** integer | | The number of nodes allocated to this cluster. More nodes enable higher throughput and more consistent performance. |
| **display\_name** string | | The descriptive name for this instance as it appears in UIs. Can be changed at any time, but should be kept globally unique to avoid confusion. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **labels** dictionary | | Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. They can be used to filter resources and aggregate metrics. |
| **name** string | | The unique name of the instance. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **type** string | | The type of the instance. Defaults to `PRODUCTION`. Some valid choices include: "TYPE\_UNSPECIFIED", "PRODUCTION", "DEVELOPMENT" |
Examples
--------
```
- name: create a instance
google.cloud.gcp_bigtable_instance:
name: my-instance
display_name: My Test Cluster
clusters:
- name: mycluster
location: projects/test_project/locations/us-central1-a
serve_nodes: 1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **clusters** complex | success | An array of clusters. Maximum 4. |
| | **defaultStorageType** string | success | The type of storage used by this cluster to serve its parent instance's tables, unless explicitly overridden. |
| | **location** string | success | The location where this cluster's nodes and storage reside. For best performance, clients should be located as close as possible to this cluster. Currently only zones are supported, so values should be of the form `projects/<project>/locations/<zone>`. |
| | **name** string | success | The unique name of the cluster. |
| | **serveNodes** integer | success | The number of nodes allocated to this cluster. More nodes enable higher throughput and more consistent performance. |
| | **state** string | success | The current state of the cluster. |
| **displayName** string | success | The descriptive name for this instance as it appears in UIs. Can be changed at any time, but should be kept globally unique to avoid confusion. |
| **labels** dictionary | success | Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. They can be used to filter resources and aggregate metrics. |
| **name** string | success | The unique name of the instance. |
| **state** string | success | The current state of the instance. |
| **type** string | success | The type of the instance. Defaults to `PRODUCTION`. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_dns_resource_record_set β Creates a GCP ResourceRecordSet google.cloud.gcp\_dns\_resource\_record\_set β Creates a GCP ResourceRecordSet
==============================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_dns_resource_record_set`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A single DNS record that exists on a domain name (i.e. in a managed zone).
* This record defines the information about the domain and where the domain / subdomains direct to.
* The record will include the domain/subdomain name, a type (i.e. A, AAA, CAA, MX, CNAME, NS, etc) .
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **managed\_zone** dictionary / required | | Identifies the managed zone addressed by this request. This must be a dictionary that contains both a 'name' key and a 'dnsName' key. You can pass in the results of the gcp\_dns\_managed\_zone module, which will contain both. |
| **name** string / required | | For example, <www.example.com>. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **target** list / elements=string | | As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) . |
| **ttl** integer | | Number of seconds that this ResourceRecordSet can be cached by resolvers. |
| **type** string / required | | One of valid DNS resource types. Some valid choices include: "A", "AAAA", "CAA", "CNAME", "MX", "NAPTR", "NS", "PTR", "SOA", "SPF", "SRV", "TLSA", "TXT" |
Examples
--------
```
- name: create a managed zone
google.cloud.gcp_dns_managed_zone:
name: managedzone-rrs
dns_name: testzone-4.com.
description: test zone
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: managed_zone
- name: create a resource record set
google.cloud.gcp_dns_resource_record_set:
name: www.testzone-4.com.
managed_zone: "{{ managed_zone }}"
type: A
ttl: 600
target:
- 10.1.2.3
- 40.5.6.7
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **managed\_zone** dictionary | success | Identifies the managed zone addressed by this request. This must be a dictionary that contains both a 'name' key and a 'dnsName' key. You can pass in the results of the gcp\_dns\_managed\_zone module, which will contain both. |
| **name** string | success | For example, <www.example.com>. |
| **target** list / elements=string | success | As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) . |
| **ttl** integer | success | Number of seconds that this ResourceRecordSet can be cached by resolvers. |
| **type** string | success | One of valid DNS resource types. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_cloudscheduler_job_info β Gather info for GCP Job google.cloud.gcp\_cloudscheduler\_job\_info β Gather info for GCP Job
=====================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_cloudscheduler_job_info`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather info for GCP Job
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **project** string | | The Google Cloud Platform project to use. |
| **region** string / required | | Region where the scheduler job resides . |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
Notes
-----
Note
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: get info on a job
gcp_cloudscheduler_job_info:
region: us-central1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **resources** complex | always | List of resources |
| | **appEngineHttpTarget** complex | success | App Engine HTTP target. If the job providers a App Engine HTTP target the cron will send a request to the service instance . |
| | | **appEngineRouting** complex | success | App Engine Routing setting for the job. |
| | | | **instance** string | success | App instance. By default, the job is sent to an instance which is available when the job is attempted. |
| | | | **service** string | success | App service. By default, the job is sent to the service which is the default service when the job is attempted. |
| | | | **version** string | success | App version. By default, the job is sent to the version which is the default version when the job is attempted. |
| | | **body** string | success | HTTP request body. A request body is allowed only if the HTTP method is POST or PUT. It will result in invalid argument error to set a body on a job with an incompatible HttpMethod. A base64-encoded string. |
| | | **headers** dictionary | success | HTTP request headers. This map contains the header field names and values. Headers can be set when the job is created. |
| | | **httpMethod** string | success | Which HTTP method to use for the request. |
| | | **relativeUri** string | success | The relative URI. |
| | **attemptDeadline** string | success | The deadline for job attempts. If the request handler does not respond by this deadline then the request is cancelled and the attempt is marked as a DEADLINE\_EXCEEDED failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will retry the job according to the RetryConfig. The allowed duration for this deadline is: \* For HTTP targets, between 15 seconds and 30 minutes. \* For App Engine HTTP targets, between 15 seconds and 24 hours. \* \*\*Note\*\*: For PubSub targets, this field is ignored - setting it will introduce an unresolvable diff. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s" . |
| | **description** string | success | A human-readable description for the job. This string must not contain more than 500 characters. |
| | **httpTarget** complex | success | HTTP target. If the job providers a http\_target the cron will send a request to the targeted url . |
| | | **body** string | success | HTTP request body. A request body is allowed only if the HTTP method is POST, PUT, or PATCH. It is an error to set body on a job with an incompatible HttpMethod. A base64-encoded string. |
| | | **headers** dictionary | success | This map contains the header field names and values. Repeated headers are not supported, but a header value can contain commas. |
| | | **httpMethod** string | success | Which HTTP method to use for the request. |
| | | **oauthToken** complex | success | Contains information needed for generating an OAuth token. This type of authorization should be used when sending requests to a GCP endpoint. |
| | | | **scope** string | success | OAuth scope to be used for generating OAuth access token. If not specified, "[https://www.googleapis.com/auth/cloud-platform"](#) will be used. |
| | | | **serviceAccountEmail** string | success | Service account email to be used for generating OAuth token. The service account must be within the same project as the job. |
| | | **oidcToken** complex | success | Contains information needed for generating an OpenID Connect token. This type of authorization should be used when sending requests to third party endpoints or Cloud Run. |
| | | | **audience** string | success | Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used. |
| | | | **serviceAccountEmail** string | success | Service account email to be used for generating OAuth token. The service account must be within the same project as the job. |
| | | **uri** string | success | The full URI path that the request will be sent to. |
| | **name** string | success | The name of the job. |
| | **pubsubTarget** complex | success | Pub/Sub target If the job providers a Pub/Sub target the cron will publish a message to the provided topic . |
| | | **attributes** dictionary | success | Attributes for PubsubMessage. Pubsub message must contain either non-empty data, or at least one attribute. |
| | | **data** string | success | The message payload for PubsubMessage. Pubsub message must contain either non-empty data, or at least one attribute. A base64-encoded string. |
| | | **topicName** string | success | The full resource name for the Cloud Pub/Sub topic to which messages will be published when a job is delivered. ~>\*\*NOTE:\*\* The topic name must be in the same format as required by PubSub's PublishRequest.name, e.g. `projects/my-project/topics/my-topic`. |
| | **region** string | success | Region where the scheduler job resides . |
| | **retryConfig** complex | success | By default, if a job does not complete successfully, meaning that an acknowledgement is not received from the handler, then it will be retried with exponential backoff according to the settings . |
| | | **maxBackoffDuration** string | success | The maximum amount of time to wait before retrying a job after it fails. A duration in seconds with up to nine fractional digits, terminated by 's'. |
| | | **maxDoublings** integer | success | The time between retries will double maxDoublings times. A job's retry interval starts at minBackoffDuration, then doubles maxDoublings times, then increases linearly, and finally retries retries at intervals of maxBackoffDuration up to retryCount times. |
| | | **maxRetryDuration** string | success | The time limit for retrying a failed job, measured from time when an execution was first attempted. If specified with retryCount, the job will be retried until both limits are reached. A duration in seconds with up to nine fractional digits, terminated by 's'. |
| | | **minBackoffDuration** string | success | The minimum amount of time to wait before retrying a job after it fails. A duration in seconds with up to nine fractional digits, terminated by 's'. |
| | | **retryCount** integer | success | The number of attempts that the system will make to run a job using the exponential backoff procedure described by maxDoublings. Values greater than 5 and negative values are not allowed. |
| | **schedule** string | success | Describes the schedule on which the job will be executed. |
| | **timeZone** string | success | Specifies the time zone to be used in interpreting schedule. The value of this field must be a time zone name from the tz database. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_address β Creates a GCP Address google.cloud.gcp\_compute\_address β Creates a GCP Address
==========================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_address`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents an Address resource.
* Each virtual machine instance has an ephemeral internal IP address and, optionally, an external IP address. To communicate between instances on the same network, you can use an instanceβs internal IP address. To communicate with the Internet and instances outside of the same network, you must specify the instanceβs external IP address.
* Internal IP addresses are ephemeral and only belong to an instance for the lifetime of the instance; if the instance is deleted and recreated, the instance is assigned a new internal IP address, either by Compute Engine or by you. External IP addresses can be either ephemeral or static.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. |
| **address\_type** string | **Default:**"EXTERNAL" | The type of address to reserve. Some valid choices include: "INTERNAL", "EXTERNAL" |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **network\_tier** string | | The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. Some valid choices include: "PREMIUM", "STANDARD" |
| **project** string | | The Google Cloud Platform project to use. |
| **purpose** string | | The purpose of this resource, which can be one of the following values: \* GCE\_ENDPOINT for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. \* SHARED\_LOADBALANCER\_VIP for an address that can be used by multiple internal load balancers. \* VPC\_PEERING for addresses that are reserved for VPC peer networks. This should only be set when using an Internal address. Some valid choices include: "GCE\_ENDPOINT", "VPC\_PEERING", "SHARED\_LOADBALANCER\_VIP" |
| **region** string / required | | URL of the region where the regional address resides. This field is not applicable to global addresses. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **subnetwork** dictionary | | The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE\_ENDPOINT/DNS\_RESOLVER purposes. This field represents a link to a Subnetwork resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'selfLink' and value of your resource's selfLink Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_subnetwork task and then set this subnetwork field to "{{ name-of-resource }}" |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/beta/addresses>
* Reserving a Static External IP Address: <https://cloud.google.com/compute/docs/instances-and-network>
* Reserving a Static Internal IP Address: <https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a address
google.cloud.gcp_compute_address:
name: test-address1
region: us-west1
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **address** string | success | The static external IP address represented by this resource. Only IPv4 is supported. An address may only be specified for INTERNAL address types. The IP address must be inside the specified subnetwork, if any. |
| **addressType** string | success | The type of address to reserve. |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **id** integer | success | The unique identifier for the resource. |
| **name** string | success | Name of the resource. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **networkTier** string | success | The networking tier used for configuring this address. If this field is not specified, it is assumed to be PREMIUM. |
| **purpose** string | success | The purpose of this resource, which can be one of the following values: \* GCE\_ENDPOINT for addresses that are used by VM instances, alias IP ranges, internal load balancers, and similar resources. \* SHARED\_LOADBALANCER\_VIP for an address that can be used by multiple internal load balancers. \* VPC\_PEERING for addresses that are reserved for VPC peer networks. This should only be set when using an Internal address. |
| **region** string | success | URL of the region where the regional address resides. This field is not applicable to global addresses. |
| **status** string | success | The status of the address, which can be one of RESERVING, RESERVED, or IN\_USE. An address that is RESERVING is currently in the process of being reserved. A RESERVED address is currently reserved and available to use. An IN\_USE address is currently being used by another resource and is not available. |
| **subnetwork** dictionary | success | The URL of the subnetwork in which to reserve the address. If an IP address is specified, it must be within the subnetwork's IP range. This field can only be used with INTERNAL type with GCE\_ENDPOINT/DNS\_RESOLVER purposes. |
| **users** list / elements=string | success | The URLs of the resources that are using this address. |
### Authors
* Google Inc. (@googlecloudplatform)
| programming_docs |
ansible google.cloud.gcp_sourcerepo_repository β Creates a GCP Repository google.cloud.gcp\_sourcerepo\_repository β Creates a GCP Repository
===================================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_sourcerepo_repository`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* A repository (or repo) is a Git repository storing versioned source content.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **name** string / required | | Resource name of the repository, of the form projects/{{project}}/repos/{{repo}}. The repo name may contain slashes. eg, projects/myproject/repos/name/with/slash . |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
Notes
-----
Note
* API Reference: <https://cloud.google.com/source-repositories/docs/reference/rest/v1/projects.repos>
* Official Documentation: <https://cloud.google.com/source-repositories/>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a repository
google.cloud.gcp_sourcerepo_repository:
name: test_object
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **name** string | success | Resource name of the repository, of the form projects/{{project}}/repos/{{repo}}. The repo name may contain slashes. eg, projects/myproject/repos/name/with/slash . |
| **size** integer | success | The disk usage of the repo, in bytes. |
| **url** string | success | URL to clone the repository from Google Cloud Source Repositories. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible google.cloud.gcp_compute_snapshot β Creates a GCP Snapshot google.cloud.gcp\_compute\_snapshot β Creates a GCP Snapshot
============================================================
Note
This plugin is part of the [google.cloud collection](https://galaxy.ansible.com/google/cloud) (version 1.0.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install google.cloud`.
To use it in a playbook, specify: `google.cloud.gcp_compute_snapshot`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Represents a Persistent Disk Snapshot resource.
* Use snapshots to back up data from your persistent disks. Snapshots are different from public images and custom images, which are used primarily to create instances or configure instance templates. Snapshots are useful for periodic backup of the data on your persistent disks. You can create snapshots from persistent disks even while they are attached to running instances.
* Snapshots are incremental, so you can create regular snapshots on a persistent disk faster and at a much lower cost than if you regularly created a full image of the disk.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* requests >= 2.18.4
* google-auth >= 1.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **auth\_kind** string / required | **Choices:*** application
* machineaccount
* serviceaccount
| The type of credential used. |
| **description** string | | An optional description of this resource. |
| **env\_type** string | | Specifies which Ansible environment you're running this module within. This should not be set unless you know what you're doing. This only alters the User Agent string for any API requests. |
| **labels** dictionary | | Labels to apply to this Snapshot. |
| **name** string / required | | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **project** string | | The Google Cloud Platform project to use. |
| **scopes** list / elements=string | | Array of scopes to be used |
| **service\_account\_contents** jsonarg | | The contents of a Service Account JSON file, either in a dictionary or as a JSON string that represents it. |
| **service\_account\_email** string | | An optional service account email address if machineaccount is selected and the user does not wish to use the default email. |
| **service\_account\_file** path | | The path of a Service Account JSON file if serviceaccount is selected as type. |
| **snapshot\_encryption\_key** dictionary | | The customer-supplied encryption key of the snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. |
| | **kms\_key\_name** string | | The name of the encryption key that is stored in Google Cloud KMS. |
| | **kms\_key\_service\_account** string | | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| **source\_disk** dictionary / required | | A reference to the disk used to create this snapshot. This field represents a link to a Disk resource in GCP. It can be specified in two ways. First, you can place a dictionary with key 'name' and value of your resource's name Alternatively, you can add `register: name-of-resource` to a gcp\_compute\_disk task and then set this source\_disk field to "{{ name-of-resource }}" |
| **source\_disk\_encryption\_key** dictionary | | The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. |
| | **kms\_key\_name** string | | The name of the encryption key that is stored in Google Cloud KMS. |
| | **kms\_key\_service\_account** string | | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | **raw\_key** string | | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| **state** string | **Choices:*** **present** β
* absent
| Whether the given object should exist in GCP |
| **storage\_locations** list / elements=string | | Cloud Storage bucket storage location of the snapshot (regional or multi-regional). |
| **zone** string | | A reference to the zone where the disk is hosted. |
Notes
-----
Note
* API Reference: <https://cloud.google.com/compute/docs/reference/rest/v1/snapshots>
* Official Documentation: <https://cloud.google.com/compute/docs/disks/create-snapshots>
* for authentication, you can set service\_account\_file using the `gcp_service_account_file` env variable.
* for authentication, you can set service\_account\_contents using the `GCP_SERVICE_ACCOUNT_CONTENTS` env variable.
* For authentication, you can set service\_account\_email using the `GCP_SERVICE_ACCOUNT_EMAIL` env variable.
* For authentication, you can set auth\_kind using the `GCP_AUTH_KIND` env variable.
* For authentication, you can set scopes using the `GCP_SCOPES` env variable.
* Environment variables values will only be used if the playbook values are not set.
* The *service\_account\_email* and *service\_account\_file* options are mutually exclusive.
Examples
--------
```
- name: create a disk
google.cloud.gcp_compute_disk:
name: disk-snapshot
zone: us-central1-a
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
service_account_file: "{{ gcp_cred_file }}"
state: present
register: disk
- name: create a snapshot
google.cloud.gcp_compute_snapshot:
name: test_object
source_disk: "{{ disk }}"
zone: us-central1-a
labels:
my_label: value
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **creationTimestamp** string | success | Creation timestamp in RFC3339 text format. |
| **description** string | success | An optional description of this resource. |
| **diskSizeGb** integer | success | Size of the snapshot, specified in GB. |
| **id** integer | success | The unique identifier for the resource. |
| **labelFingerprint** string | success | The fingerprint used for optimistic locking of this resource. Used internally during updates. |
| **labels** dictionary | success | Labels to apply to this Snapshot. |
| **licenses** list / elements=string | success | A list of public visible licenses that apply to this snapshot. This can be because the original image had licenses attached (such as a Windows image). snapshotEncryptionKey nested object Encrypts the snapshot using a customer-supplied encryption key. |
| **name** string | success | Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]\*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| **snapshotEncryptionKey** complex | success | The customer-supplied encryption key of the snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. |
| | **kmsKeyName** string | success | The name of the encryption key that is stored in Google Cloud KMS. |
| | **kmsKeyServiceAccount** string | success | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| | **sha256** string | success | The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. |
| **sourceDisk** dictionary | success | A reference to the disk used to create this snapshot. |
| **sourceDiskEncryptionKey** complex | success | The customer-supplied encryption key of the source snapshot. Required if the source snapshot is protected by a customer-supplied encryption key. |
| | **kmsKeyName** string | success | The name of the encryption key that is stored in Google Cloud KMS. |
| | **kmsKeyServiceAccount** string | success | The service account used for the encryption request for the given KMS key. If absent, the Compute Engine Service Agent service account is used. |
| | **rawKey** string | success | Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource. |
| **storageBytes** integer | success | A size of the storage used by the snapshot. As snapshots share storage, this number is expected to change with snapshot creation/deletion. |
| **storageLocations** list / elements=string | success | Cloud Storage bucket storage location of the snapshot (regional or multi-regional). |
| **zone** string | success | A reference to the zone where the disk is hosted. |
### Authors
* Google Inc. (@googlecloudplatform)
ansible Collections in the Ngine_io Namespace Collections in the Ngine\_io Namespace
======================================
These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **ngine\_io** namespace.
* [ngine\_io.cloudstack](cloudstack/index#plugins-in-ngine-io-cloudstack)
* [ngine\_io.exoscale](exoscale/index#plugins-in-ngine-io-exoscale)
* [ngine\_io.vultr](vultr/index#plugins-in-ngine-io-vultr)
ansible ngine_io.exoscale.exo_dns_domain β Manages domain records on Exoscale DNS API. ngine\_io.exoscale.exo\_dns\_domain β Manages domain records on Exoscale DNS API.
=================================================================================
Note
This plugin is part of the [ngine\_io.exoscale collection](https://galaxy.ansible.com/ngine_io/exoscale) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.exoscale`.
To use it in a playbook, specify: `ngine_io.exoscale.exo_dns_domain`.
New in version 0.1.0: of ngine\_io.exoscale
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and remove domain records.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string | | API key of the Exoscale DNS API. The ENV variable `CLOUDSTACK_KEY` is used as default, when defined. |
| **api\_region** string | **Default:**"cloudstack" | Name of the ini section in the `cloustack.ini` file. The ENV variable `CLOUDSTACK_REGION` is used as default, when defined. |
| **api\_secret** string | | Secret key of the Exoscale DNS API. The ENV variable `CLOUDSTACK_SECRET` is used as default, when defined. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout to Exoscale DNS API. The ENV variable `CLOUDSTACK_TIMEOUT` is used as default, when defined. |
| **name** string / required | | Name of the record. |
| **state** string | **Choices:*** **present** β
* absent
| State of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Exoscale DNS API. |
Notes
-----
Note
* As Exoscale DNS uses the same API key and secret for all services, we reuse the config used for Exscale Compute based on CloudStack. The config is read from several locations, in the following order. The `CLOUDSTACK_KEY`, `CLOUDSTACK_SECRET` environment variables. A `CLOUDSTACK_CONFIG` environment variable pointing to an `.ini` file, A `cloudstack.ini` file in the current working directory. A `.cloudstack.ini` file in the users home directory. Optionally multiple credentials and endpoints can be specified using ini sections in `cloudstack.ini`. Use the argument `api_region` to select the section name, default section is `cloudstack`.
* This module does not support multiple A records and will complain properly if you try.
* More information Exoscale DNS can be found on <https://community.exoscale.ch/documentation/dns/>.
* This module supports check mode and diff.
Examples
--------
```
- name: Create a domain
exo_dns_domain:
name: example.com
- name: Remove a domain
exo_dns_domain:
name: example.com
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **exo\_dns\_domain** complex | success | API domain results |
| | **account\_id** integer | success | Your account ID **Sample:** 34569 |
| | **auto\_renew** boolean | success | Whether domain is auto renewed or not |
| | **created\_at** string | success | When the domain was created **Sample:** 2016-08-12T15:24:23.989Z |
| | **expires\_on** string | success | When the domain expires **Sample:** 2016-08-12T15:24:23.989Z |
| | **id** integer | success | ID of the domain **Sample:** 2016-08-12T15:24:23.989Z |
| | **lockable** boolean | success | Whether the domain is lockable or not **Sample:** True |
| | **name** string | success | Domain name **Sample:** example.com |
| | **record\_count** integer | success | Number of records related to this domain **Sample:** 5 |
| | **registrant\_id** integer | success | ID of the registrant |
| | **service\_count** integer | success | Number of services |
| | **state** string | success | State of the domain **Sample:** hosted |
| | **token** string | success | Token **Sample:** r4NzTRp6opIeFKfaFYvOd6MlhGyD07jl |
| | **unicode\_name** string | success | Domain name as unicode **Sample:** example.com |
| | **updated\_at** string | success | When the domain was updated last. **Sample:** 2016-08-12T15:24:23.989Z |
| | **user\_id** integer | success | ID of the user |
| | **whois\_protected** boolean | success | Whether the whois is protected or not |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible Ngine_Io.Exoscale Ngine\_Io.Exoscale
==================
Collection version 1.0.0
Plugin Index
------------
These are the plugins in the ngine\_io.exoscale collection
### Modules
* [exo\_dns\_domain](exo_dns_domain_module#ansible-collections-ngine-io-exoscale-exo-dns-domain-module) β Manages domain records on Exoscale DNS API.
* [exo\_dns\_record](exo_dns_record_module#ansible-collections-ngine-io-exoscale-exo-dns-record-module) β Manages DNS records on Exoscale DNS.
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible ngine_io.exoscale.exo_dns_record β Manages DNS records on Exoscale DNS. ngine\_io.exoscale.exo\_dns\_record β Manages DNS records on Exoscale DNS.
==========================================================================
Note
This plugin is part of the [ngine\_io.exoscale collection](https://galaxy.ansible.com/ngine_io/exoscale) (version 1.0.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.exoscale`.
To use it in a playbook, specify: `ngine_io.exoscale.exo_dns_record`.
New in version 0.1.0: of ngine\_io.exoscale
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and delete records.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_key** string | | API key of the Exoscale DNS API. The ENV variable `CLOUDSTACK_KEY` is used as default, when defined. |
| **api\_region** string | **Default:**"cloudstack" | Name of the ini section in the `cloustack.ini` file. The ENV variable `CLOUDSTACK_REGION` is used as default, when defined. |
| **api\_secret** string | | Secret key of the Exoscale DNS API. The ENV variable `CLOUDSTACK_SECRET` is used as default, when defined. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout to Exoscale DNS API. The ENV variable `CLOUDSTACK_TIMEOUT` is used as default, when defined. |
| **content** string | | Content of the record. Required if `state=present` or `multiple=yes`.
aliases: value, address |
| **domain** string / required | | Domain the record is related to. |
| **multiple** boolean | **Choices:*** **no** β
* yes
| Whether there are more than one records with similar *name* and *record\_type*. Only allowed for a few record types, e.g. `record_type=A`, `record_type=NS` or `record_type=MX`.
*content* will not be updated, instead it is used as a key to find existing records. |
| **name** string | **Default:**"" | Name of the record. |
| **prio** integer | | Priority of the record.
aliases: priority |
| **record\_type** string | **Choices:*** **A** β
* ALIAS
* CNAME
* MX
* SPF
* URL
* TXT
* NS
* SRV
* NAPTR
* PTR
* AAAA
* SSHFP
* HINFO
* POOL
| Type of the record.
aliases: rtype, type |
| **state** string | **Choices:*** **present** β
* absent
| State of the record. |
| **ttl** integer | **Default:**3600 | TTL of the record in seconds. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Exoscale DNS API. |
Notes
-----
Note
* As Exoscale DNS uses the same API key and secret for all services, we reuse the config used for Exscale Compute based on CloudStack. The config is read from several locations, in the following order. The `CLOUDSTACK_KEY`, `CLOUDSTACK_SECRET` environment variables. A `CLOUDSTACK_CONFIG` environment variable pointing to an `.ini` file, A `cloudstack.ini` file in the current working directory. A `.cloudstack.ini` file in the users home directory. Optionally multiple credentials and endpoints can be specified using ini sections in `cloudstack.ini`. Use the argument `api_region` to select the section name, default section is `cloudstack`.
* This module does not support multiple A records and will complain properly if you try.
* More information Exoscale DNS can be found on <https://community.exoscale.ch/documentation/dns/>.
* This module supports check mode and diff.
Examples
--------
```
- name: Create or update an A record
ngine_io.exoscale.exo_dns_record:
name: web-vm-1
domain: example.com
content: 1.2.3.4
- name: Update an existing A record with a new IP
ngine_io.exoscale.exo_dns_record:
name: web-vm-1
domain: example.com
content: 1.2.3.5
- name: Create another A record with same name
ngine_io.exoscale.exo_dns_record:
name: web-vm-1
domain: example.com
content: 1.2.3.6
multiple: yes
- name: Create or update a CNAME record
ngine_io.exoscale.exo_dns_record:
name: www
domain: example.com
record_type: CNAME
content: web-vm-1
- name: Create another MX record
ngine_io.exoscale.exo_dns_record:
domain: example.com
record_type: MX
content: mx1.example.com
prio: 10
multiple: yes
- name: Delete one MX record out of multiple
ngine_io.exoscale.exo_dns_record:
domain: example.com
record_type: MX
content: mx1.example.com
multiple: yes
state: absent
- name: Remove a single A record
ngine_io.exoscale.exo_dns_record:
name: www
domain: example.com
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **exo\_dns\_record** complex | success | API record results |
| | **content** string | success | value of the record **Sample:** 1.2.3.4 |
| | **created\_at** string | success | When the record was created **Sample:** 2016-08-12T15:24:23.989Z |
| | **domain** string | success | Name of the domain **Sample:** example.com |
| | **domain\_id** integer | success | ID of the domain **Sample:** 254324 |
| | **id** integer | success | ID of the record **Sample:** 254324 |
| | **name** string | success | name of the record **Sample:** www |
| | **parent\_id** integer | success | ID of the parent |
| | **prio** integer | success | Priority of the record **Sample:** 10 |
| | **record\_type** string | success | Priority of the record **Sample:** A |
| | **system\_record** boolean | success | Whether the record is a system record or not |
| | **ttl** integer | success | Time to live of the record **Sample:** 3600 |
| | **updated\_at** string | success | When the record was updated **Sample:** 2016-08-12T15:24:23.989Z |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_vmsnapshot β Manages VM snapshots on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_vmsnapshot β Manages VM snapshots on Apache CloudStack based clouds.
=============================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_vmsnapshot`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, remove and revert VM from snapshots.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the VM snapshot is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **description** string | | Description of the snapshot. |
| **domain** string | | Domain the VM snapshot is related to. |
| **name** string / required | | Unique Name of the snapshot. In CloudStack terms display name.
aliases: display\_name |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the VM is assigned to. |
| **snapshot\_memory** boolean | **Choices:*** **no** β
* yes
| Snapshot memory if set to true. |
| **state** string | **Choices:*** **present** β
* absent
* revert
| State of the snapshot. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. To delete all tags, set a empty list e.g. *tags: []*.
aliases: tag |
| **vm** string / required | | Name of the virtual machine. |
| **zone** string / required | | Name of the zone in which the VM is in. If not set. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a VM snapshot of disk and memory before an upgrade
ngine_io.cloudstack.cs_vmsnapshot:
name: Snapshot before upgrade
vm: web-01
zone: zone01
snapshot_memory: yes
- name: Revert a VM to a snapshot after a failed upgrade
ngine_io.cloudstack.cs_vmsnapshot:
name: Snapshot before upgrade
vm: web-01
zone: zone01
state: revert
- name: Remove a VM snapshot after successful upgrade
ngine_io.cloudstack.cs_vmsnapshot:
name: Snapshot before upgrade
vm: web-01
zone: zone01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the vm snapshot is related to. **Sample:** example account |
| **created** string | success | date of the snapshot. **Sample:** 2015-03-29T14:57:06+0200 |
| **current** boolean | success | true if the snapshot is current **Sample:** True |
| **description** string | success | description of vm snapshot **Sample:** snapshot brought to you by Ansible |
| **display\_name** string | success | Display name of the snapshot. **Sample:** snapshot before update |
| **domain** string | success | Domain the vm snapshot is related to. **Sample:** example domain |
| **id** string | success | UUID of the snapshot. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **name** string | success | Name of the snapshot. **Sample:** snapshot before update |
| **project** string | success | Name of project the vm snapshot is related to. **Sample:** Production |
| **state** string | success | state of the vm snapshot **Sample:** Allocated |
| **type** string | success | type of vm snapshot **Sample:** DiskAndMemory |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_cluster β Manages host clusters on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_cluster β Manages host clusters on Apache CloudStack based clouds.
===========================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_cluster`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove clusters.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cluster\_type** string | **Choices:*** CloudManaged
* ExternalManaged
| Type of the cluster. Required if *state=present*
|
| **guest\_vswitch\_name** string | | Name of virtual switch used for guest traffic in the cluster. This would override zone wide traffic label setting. |
| **guest\_vswitch\_type** string | **Choices:*** vmwaresvs
* vmwaredvs
| Type of virtual switch used for guest traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch) |
| **hypervisor** string | | Name the hypervisor to be used. Required if *state=present*. Possible values are `KVM`, `VMware`, `BareMetal`, `XenServer`, `LXC`, `HyperV`, `UCS`, `OVM`, `Simulator`. |
| **name** string / required | | name of the cluster. |
| **ovm3\_cluster** string | | Ovm3 native OCFS2 clustering enabled for cluster. |
| **ovm3\_pool** string | | Ovm3 native pooling enabled for cluster. |
| **ovm3\_vip** string | | Ovm3 vip to use for pool (and cluster). |
| **password** string | | Password for the cluster. |
| **pod** string | | Name of the pod in which the cluster belongs to. |
| **public\_vswitch\_name** string | | Name of virtual switch used for public traffic in the cluster. This would override zone wide traffic label setting. |
| **public\_vswitch\_type** string | **Choices:*** vmwaresvs
* vmwaredvs
| Type of virtual switch used for public traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch) |
| **state** string | **Choices:*** **present** β
* absent
* disabled
* enabled
| State of the cluster. |
| **url** string | | URL for the cluster |
| **username** string | | Username for the cluster. |
| **vms\_ip\_address** string | | IP address of the VSM associated with this cluster. |
| **vms\_password** string | | Password for the VSM associated with this cluster. |
| **vms\_username** string | | Username for the VSM associated with this cluster. |
| **zone** string / required | | Name of the zone in which the cluster belongs to. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Ensure a cluster is present
ngine_io.cloudstack.cs_cluster:
name: kvm-cluster-01
zone: ch-zrh-ix-01
hypervisor: KVM
cluster_type: CloudManaged
- name: Ensure a cluster is disabled
ngine_io.cloudstack.cs_cluster:
name: kvm-cluster-01
zone: ch-zrh-ix-01
state: disabled
- name: Ensure a cluster is enabled
ngine_io.cloudstack.cs_cluster:
name: kvm-cluster-01
zone: ch-zrh-ix-01
state: enabled
- name: Ensure a cluster is absent
ngine_io.cloudstack.cs_cluster:
name: kvm-cluster-01
zone: ch-zrh-ix-01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **allocation\_state** string | success | State of the cluster. **Sample:** Enabled |
| **cluster\_type** string | success | Type of the cluster. **Sample:** ExternalManaged |
| **cpu\_overcommit\_ratio** string | success | The CPU overcommit ratio of the cluster. **Sample:** 1.0 |
| **hypervisor** string | success | Hypervisor of the cluster **Sample:** VMware |
| **id** string | success | UUID of the cluster. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **managed\_state** string | success | Whether this cluster is managed by CloudStack. **Sample:** Managed |
| **memory\_overcommit\_ratio** string | success | The memory overcommit ratio of the cluster. **Sample:** 1.0 |
| **name** string | success | Name of the cluster. **Sample:** cluster01 |
| **ovm3\_vip** string | success | Ovm3 VIP to use for pooling and/or clustering **Sample:** 10.10.10.101 |
| **pod** string | success | Name of pod the cluster is in. **Sample:** pod01 |
| **zone** string | success | Name of zone the cluster is in. **Sample:** ch-gva-2 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_staticnat β Manages static NATs on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_staticnat β Manages static NATs on Apache CloudStack based clouds.
===========================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_staticnat`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove static NATs.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the static NAT is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the static NAT is related to. |
| **ip\_address** string / required | | Public IP address the static NAT is assigned to. |
| **network** string | | Network the IP address is related to. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the static NAT is related to. |
| **state** string | **Choices:*** **present** β
* absent
| State of the static NAT. |
| **vm** string | | Name of virtual machine which we make the static NAT for. Required if *state=present*. |
| **vm\_guest\_ip** string | | VM guest NIC secondary IP address for the static NAT. |
| **vpc** string | | VPC the network related to. |
| **zone** string / required | | Name of the zone in which the virtual machine is in. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a static NAT for IP 1.2.3.4 to web01
ngine_io.cloudstack.cs_staticnat:
ip_address: 1.2.3.4
zone: zone01
vm: web01
- name: Remove a static NAT
ngine_io.cloudstack.cs_staticnat:
ip_address: 1.2.3.4
zone: zone01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the static NAT is related to. **Sample:** example account |
| **domain** string | success | Domain the static NAT is related to. **Sample:** example domain |
| **id** string | success | UUID of the ip\_address. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **ip\_address** string | success | Public IP address. **Sample:** 1.2.3.4 |
| **project** string | success | Name of project the static NAT is related to. **Sample:** Production |
| **vm\_display\_name** string | success | Display name of the virtual machine. **Sample:** web-01 |
| **vm\_guest\_ip** string | success | IP of the virtual machine. **Sample:** 10.101.65.152 |
| **vm\_name** string | success | Name of the virtual machine. **Sample:** web-01 |
| **zone** string | success | Name of zone the static NAT is related to. **Sample:** ch-gva-2 |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.cs_instance_info β Gathering information from the API of instances from Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_instance\_info β Gathering information from the API of instances from Apache CloudStack based clouds.
==============================================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_instance_info`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gathering information from the API of an instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the instance is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the instance is related to. |
| **host** string added in 2.2.0 of ngine\_io.cloudstack | | Filter by host name. |
| **name** string | | Name or display name of the instance. If not specified, all instances are returned |
| **project** string | | Project the instance is related to. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Gather instance information
ngine_io.cloudstack.cs_instance_info:
name: web-vm-1
register: vm
- name: Show the returned results of the registered variable
debug:
msg: "{{ vm }}"
- name: Gather information from all instances
ngine_io.cloudstack.cs_instance_info:
register: vms
- name: Show information on all instances
debug:
msg: "{{ vms }}"
- name: Gather information from all instances on a host
ngine_io.cloudstack.cs_instance_info:
host: host01.example.com
register: vms
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **instances** list / elements=string | success | A list of matching instances. |
| | **account** string | success | Account the instance is related to. **Sample:** example account |
| | **affinity\_groups** list / elements=string | success | Affinity groups the instance is in. **Sample:** [ "webservers" ] |
| | **created** string | success | Date of the instance was created. **Sample:** 2014-12-01T14:57:57+0100 |
| | **default\_ip** string | success | Default IP address of the instance. **Sample:** 10.23.37.42 |
| | **display\_name** string | success | Display name of the instance. **Sample:** web-01 |
| | **domain** string | success | Domain the instance is related to. **Sample:** example domain |
| | **group** string | success | Group name of the instance is related. **Sample:** web |
| | **host** string | success and instance is running | Host the instance is running on. **Sample:** host01.example.com |
| | **hypervisor** string | success | Hypervisor related to this instance. **Sample:** KVM |
| | **id** string | success | UUID of the instance. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| | **instance\_name** string | success | Internal name of the instance (ROOT admin only). **Sample:** i-44-3992-VM |
| | **iso** string | success | Name of ISO the instance was deployed with. **Sample:** Debian-8-64bit |
| | **name** string | success | Name of the instance. **Sample:** web-01 |
| | **nic** complex | success | List of dictionaries of the instance nics. |
| | | **broadcasturi** string | success | The broadcast uri of the nic. **Sample:** vlan://2250 |
| | | **gateway** string | success | The gateway of the nic. **Sample:** 10.1.2.1 |
| | | **id** string | success | The ID of the nic. **Sample:** 5dc74fa3-2ec3-48a0-9e0d-6f43365336a9 |
| | | **ipaddress** string | success | The ip address of the nic. **Sample:** 10.1.2.3 |
| | | **isdefault** boolean | success | True if nic is default, false otherwise. **Sample:** True |
| | | **isolationuri** string | success | The isolation uri of the nic. **Sample:** vlan://2250 |
| | | **macaddress** string | success | The mac address of the nic. **Sample:** 06:a2:03:00:08:12 |
| | | **netmask** string | success | The netmask of the nic. **Sample:** 255.255.255.0 |
| | | **networkid** string | success | The ID of the corresponding network. **Sample:** 432ce27b-c2bb-4e12-a88c-a919cd3a3017 |
| | | **networkname** string | success | The name of the corresponding network. **Sample:** network1 |
| | | **traffictype** string | success | The traffic type of the nic. **Sample:** Guest |
| | | **type** string | success | The type of the network. **Sample:** Shared |
| | **password** string | success | The password of the instance if exists. **Sample:** Ge2oe7Do |
| | **password\_enabled** boolean | success | True if password setting is enabled. **Sample:** True |
| | **project** string | success | Name of project the instance is related to. **Sample:** Production |
| | **public\_ip** string | success | Public IP address with instance via static NAT rule. **Sample:** 1.2.3.4 |
| | **security\_groups** list / elements=string | success | Security groups the instance is in. **Sample:** [ "default" ] |
| | **service\_offering** string | success | Name of the service offering the instance has. **Sample:** 2cpu\_2gb |
| | **ssh\_key** string | success | Name of SSH key deployed to instance. **Sample:** key@work |
| | **state** string | success | State of the instance. **Sample:** Running |
| | **tags** list / elements=string | success | List of resource tags associated with the instance. **Sample:** [ { "key": "foo", "value": "bar" } ] |
| | **template** string | success | Name of template the instance was deployed with. **Sample:** Debian-8-64bit |
| | **volumes** list / elements=string | success | List of dictionaries of the volumes attached to the instance. **Sample:** [ { name: "ROOT-1369", type: "ROOT", size: 10737418240 }, { name: "data01, type: "DATADISK", size: 10737418240 } ] |
| | **zone** string | success | Name of zone the instance is in. **Sample:** ch-gva-2 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_physical_network β Manages physical networks on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_physical\_network β Manages physical networks on Apache CloudStack based clouds.
=========================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_physical_network`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove networks.
* Enabled and disabled Network Service Providers
* Enables Internal LoadBalancer and VPC/VirtualRouter elements as required
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **broadcast\_domain\_range** string | **Choices:*** POD
* ZONE
| broadcast domain range for the physical network[Pod or Zone]. |
| **domain** string | | Domain the network is owned by. |
| **isolation\_method** string | **Choices:*** VLAN
* VXLAN
* GRE
* L3
| Isolation method for the physical network. |
| **name** string / required | | Name of the physical network.
aliases: physical\_network |
| **network\_speed** string | **Choices:*** 1G
* 10G
| The speed for the physical network. |
| **nsps\_disabled** list / elements=string | | List of Network Service Providers to disable. |
| **nsps\_enabled** list / elements=string | | List of Network Service Providers to enable. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **state** string | **Choices:*** **present** β
* absent
* disabled
* enabled
| State of the physical network. |
| **tags** string | | A tag to identify this network. Physical networks support only one tag. To remove an existing tag pass an empty string.
aliases: tag |
| **vlan** string | | The VLAN/VNI Ranges of the physical network. |
| **zone** string / required | | Name of the zone in which the network belongs. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Ensure a network is present
ngine_io.cloudstack.cs_physical_network:
name: net01
zone: zone01
isolation_method: VLAN
broadcast_domain_range: ZONE
- name: Set a tag on a network
ngine_io.cloudstack.cs_physical_network:
name: net01
zone: zone01
tag: overlay
- name: Remove tag on a network
ngine_io.cloudstack.cs_physical_network:
name: net01
zone: zone01
tag: ""
- name: Ensure a network is enabled with specific nsps enabled
ngine_io.cloudstack.cs_physical_network:
name: net01
zone: zone01
isolation_method: VLAN
vlan: 100-200,300-400
broadcast_domain_range: ZONE
state: enabled
nsps_enabled:
- virtualrouter
- internallbvm
- vpcvirtualrouter
- name: Ensure a network is enabled with VXLAN isolation
ngine_io.cloudstack.cs_physical_network:
name: net01
zone: zone01
isolation_method: VXLAN
vlan: 42-8192
broadcast_domain_range: ZONE
state: enabled
- name: Ensure a network is disabled
ngine_io.cloudstack.cs_physical_network:
name: net01
zone: zone01
state: disabled
- name: Ensure a network is enabled
ngine_io.cloudstack.cs_physical_network:
name: net01
zone: zone01
state: enabled
- name: Ensure a network is absent
ngine_io.cloudstack.cs_physical_network:
name: net01
zone: zone01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **broadcast\_domain\_range** string | success | broadcastdomainrange of the network [POD / ZONE]. **Sample:** ZONE |
| **domain** string | success | Name of domain the network is in. **Sample:** domain1 |
| **id** string | success | UUID of the network. **Sample:** 3f8f25cd-c498-443f-9058-438cfbcbff50 |
| **isolation\_method** string | success | isolationmethod of the network [VLAN/VXLAN/GRE/L3]. **Sample:** VLAN |
| **name** string | success | Name of the network. **Sample:** net01 |
| **network\_speed** string | success | networkspeed of the network [1G/10G]. **Sample:** 1G |
| **nsps** complex | on enabling/disabling of Network Service Providers | list of enabled or disabled Network Service Providers |
| | **disabled** list / elements=string | on Network Service Provider disabling | list of Network Service Providers that were disabled **Sample:** ['internallbvm'] |
| | **enabled** list / elements=string | on Network Service Provider enabling | list of Network Service Providers that were enabled **Sample:** ['virtualrouter'] |
| **state** string | success | State of the network [Enabled/Disabled]. **Sample:** Enabled |
| **zone** string | success | Name of zone the physical network is in. **Sample:** ch-gva-2 |
### Authors
* Netservers Ltd. (@netservers)
* Patryk Cichy (@PatTheSilent)
ansible ngine_io.cloudstack.cs_storage_pool β Manages Primary Storage Pools on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_storage\_pool β Manages Primary Storage Pools on Apache CloudStack based clouds.
=========================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_storage_pool`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, put into maintenance, disable, enable and remove storage pools.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allocation\_state** string | **Choices:*** enabled
* disabled
* maintenance
| Allocation state of the storage pool. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **capacity\_bytes** integer | | Bytes CloudStack can provision from this storage pool. |
| **capacity\_iops** integer | | Bytes CloudStack can provision from this storage pool. |
| **cluster** string | | Name of the cluster. |
| **hypervisor** string | | Required when creating a zone scoped pool. Possible values are `KVM`, `VMware`, `BareMetal`, `XenServer`, `LXC`, `HyperV`, `UCS`, `OVM`, `Simulator`. |
| **managed** boolean | **Choices:*** no
* yes
| Whether the storage pool should be managed by CloudStack. Only considered on creation. |
| **name** string / required | | Name of the storage pool. |
| **pod** string | | Name of the pod. |
| **provider** string | **Default:**"DefaultPrimary" | Name of the storage provider e.g. SolidFire, SolidFireShared, DefaultPrimary, CloudByte. |
| **scope** string | **Choices:*** cluster
* zone
| The scope of the storage pool. Defaults to cluster when `cluster` is provided, otherwise zone. |
| **state** string | **Choices:*** **present** β
* absent
| State of the storage pool. |
| **storage\_tags** list / elements=string | | Tags associated with this storage pool.
aliases: storage\_tag |
| **storage\_url** string | | URL of the storage pool. Required if *state=present*. |
| **zone** string / required | | Name of the zone in which the host should be deployed. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: ensure a zone scoped storage_pool is present
ngine_io.cloudstack.cs_storage_pool:
zone: zone01
storage_url: rbd://admin:[email protected]/poolname
provider: DefaultPrimary
name: Ceph RBD
scope: zone
hypervisor: KVM
- name: ensure a cluster scoped storage_pool is disabled
ngine_io.cloudstack.cs_storage_pool:
name: Ceph RBD
zone: zone01
cluster: cluster01
pod: pod01
storage_url: rbd://admin:[email protected]/poolname
provider: DefaultPrimary
scope: cluster
allocation_state: disabled
- name: ensure a cluster scoped storage_pool is in maintenance
ngine_io.cloudstack.cs_storage_pool:
name: Ceph RBD
zone: zone01
cluster: cluster01
pod: pod01
storage_url: rbd://admin:[email protected]/poolname
provider: DefaultPrimary
scope: cluster
allocation_state: maintenance
- name: ensure a storage_pool is absent
ngine_io.cloudstack.cs_storage_pool:
name: Ceph RBD
zone: zone01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **allocation\_state** string | success | The state of the storage pool. **Sample:** enabled |
| **capacity\_iops** integer | when available | IOPS CloudStack can provision from this storage pool **Sample:** 60000 |
| **cluster** string | when scope is cluster | The name of the cluster. **Sample:** Cluster01 |
| **created** string | success | Date of the pool was created. **Sample:** 2014-12-01T14:57:57+0100 |
| **disk\_size\_allocated** integer | success | The pool's currently allocated disk space. **Sample:** 2443517624320 |
| **disk\_size\_total** integer | success | The total size of the pool. **Sample:** 3915055693824 |
| **disk\_size\_used** integer | success | The pool's currently used disk size. **Sample:** 1040862622180 |
| **hypervisor** string | when available | Hypervisor related to this storage pool. **Sample:** KVM |
| **id** string | success | UUID of the pool. **Sample:** a3fca65a-7db1-4891-b97c-48806a978a96 |
| **overprovision\_factor** string | success | The overprovision factor of the storage pool. **Sample:** 2.0 |
| **path** string | success | The storage pool path used in the storage\_url. **Sample:** poolname |
| **pod** string | when scope is cluster | The name of the pod. **Sample:** Cluster01 |
| **scope** string | success | The scope of the storage pool. **Sample:** cluster |
| **state** string | success | The state of the storage pool as returned by the API. **Sample:** Up |
| **storage\_capabilities** dictionary | success | Capabilities of the storage pool. **Sample:** {'VOLUME\_SNAPSHOT\_QUIESCEVM': 'false'} |
| **storage\_tags** list / elements=string | success | the tags for the storage pool. **Sample:** ['perf', 'ssd'] |
| **suitable\_for\_migration** boolean | success | Whether the storage pool is suitable to migrate a volume or not. |
| **zone** string | success | The name of the zone. **Sample:** Zone01 |
### Authors
* Netservers Ltd. (@netservers)
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.instance β Apache CloudStack instance inventory source ngine\_io.cloudstack.instance β Apache CloudStack instance inventory source
===========================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.instance`.
New in version 2.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Get inventory hosts from Apache CloudStack
* Allows filtering and grouping inventory hosts.
* Uses an YAML configuration file ending with either *cloudstack-instances.yml* or *cloudstack-instances.yaml* to set parameter values (also see examples).
Requirements
------------
The below requirements are needed on the local controller node that executes this inventory.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| env:CLOUDSTACK\_METHOD | HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | env:CLOUDSTACK\_KEY | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | env:CLOUDSTACK\_SECRET | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | env:CLOUDSTACK\_TIMEOUT | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | env:CLOUDSTACK\_ENDPOINT | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | env:CLOUDSTACK\_VERIFY | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **compose** dictionary | **Default:**{} | | Create vars from jinja2 expressions. |
| **filter\_by\_domain** string | | | Only return instances in the provided domain. |
| **filter\_by\_project** string | | | Only return instances in the provided project. |
| **filter\_by\_vpc** string | | | Only return instances in the provided VPC. |
| **filter\_by\_zone** string | | | Only return instances in the provided zone. |
| **groups** dictionary | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. |
| **hostname** string | **Choices:*** **v4\_default\_ip** β
* hostname
| | Field to match the hostname. Note v4\_main\_ip corresponds to the primary ipv4address of the first nic adapter of the instance. |
| **keyed\_groups** list / elements=string | **Default:**[] | | Add hosts to group based on the values of a variable. |
| **leading\_separator** boolean added in 2.11 of ansible.builtin | **Choices:*** no
* **yes** β
| | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. |
| **plugin** string / required | **Choices:*** ngine\_io.cloudstack.instance
| | Token that ensures this is a source file for the 'instance' plugin. |
| **strict** boolean | **Choices:*** **no** β
* yes
| | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. |
| **use\_extra\_vars** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [inventory\_plugins]use\_extra\_vars = no env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS | Merge extra vars into the available variables for composition (highest precedence). |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
# inventory_cloudstack.yml file in YAML format
# Example command line: ansible-inventory --list -i cloudstack-instances.yml
plugin: ngine_io.cloudstack.instance
# Use the default ip as ansible_host
hostname: v4_default_ip
# Return only instances related to the VPC vpc1 and in the zone EU
filter_by_vpc: vpc1
filter_by_zone: EU
# Group instances with a disk_offering as storage
# Create a group dmz for instances connected to the dmz network
groups:
storage: disk_offering is defined
dmz: "'dmz' in networks"
# Group the instances by network, with net_network1 as name of the groups
# Group the instanes by custom tag sla, groups like sla_value for tag sla
keyed_groups:
- prefix: net
key: networks
- prefix: sla
key: tags.sla
```
### Authors
* Rafael del Valle (@rvalle)
ansible ngine_io.cloudstack.cs_vpn_customer_gateway β Manages site-to-site VPN customer gateway configurations on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_vpn\_customer\_gateway β Manages site-to-site VPN customer gateway configurations on Apache CloudStack based clouds.
=============================================================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_vpn_customer_gateway`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove VPN customer gateways.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the VPN customer gateway is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cidrs** list / elements=string | | List of guest CIDRs behind the gateway. Required if *state=present*.
aliases: cidr |
| **domain** string | | Domain the VPN customer gateway is related to. |
| **dpd** boolean | **Choices:*** no
* yes
| Enable Dead Peer Detection. Disabled per default by the API on creation if not set. |
| **esp\_lifetime** integer | | Lifetime in seconds of phase 2 VPN connection. Defaulted to 3600 by the API on creation if not set. |
| **esp\_policy** string | | ESP policy in the format e.g. `aes256-sha1;modp1536`. Required if *state=present*. |
| **force\_encap** boolean | **Choices:*** no
* yes
| Force encapsulation for NAT traversal. Disabled per default by the API on creation if not set. |
| **gateway** string | | Public IP address of the gateway. Required if *state=present*. |
| **ike\_lifetime** integer | | Lifetime in seconds of phase 1 VPN connection. Defaulted to 86400 by the API on creation if not set. |
| **ike\_policy** string | | IKE policy in the format e.g. `aes256-sha1;modp1536`. Required if *state=present*. |
| **ipsec\_psk** string | | IPsec Preshared-Key. Cannot contain newline or double quotes. Required if *state=present*. |
| **name** string / required | | Name of the gateway. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the VPN gateway is related to. |
| **state** string | **Choices:*** **present** β
* absent
| State of the VPN customer gateway. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a vpn customer gateway
ngine_io.cloudstack.cs_vpn_customer_gateway:
name: my vpn customer gateway
cidrs:
- 192.168.123.0/24
- 192.168.124.0/24
esp_policy: aes256-sha1;modp1536
gateway: 10.10.1.1
ike_policy: aes256-sha1;modp1536
ipsec_psk: "S3cr3Tk3Y"
- name: Remove a vpn customer gateway
ngine_io.cloudstack.cs_vpn_customer_gateway:
name: my vpn customer gateway
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the VPN customer gateway is related to. **Sample:** example account |
| **cidrs** list / elements=string | success | List of CIDRs of this customer gateway. **Sample:** ['10.10.10.0/24'] |
| **domain** string | success | Domain the VPN customer gateway is related to. **Sample:** example domain |
| **dpd** boolean | success | Whether dead pear detection is enabled or not. **Sample:** True |
| **esp\_lifetime** integer | success | Lifetime in seconds of phase 2 VPN connection. **Sample:** 86400 |
| **esp\_policy** string | success | IKE policy of the VPN customer gateway. **Sample:** aes256-sha1;modp1536 |
| **force\_encap** boolean | success | Whether encapsulation for NAT traversal is enforced or not. **Sample:** True |
| **gateway** string | success | IP address of the VPN customer gateway. **Sample:** 10.100.212.10 |
| **id** string | success | UUID of the VPN customer gateway. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **ike\_lifetime** integer | success | Lifetime in seconds of phase 1 VPN connection. **Sample:** 86400 |
| **ike\_policy** string | success | ESP policy of the VPN customer gateway. **Sample:** aes256-sha1;modp1536 |
| **name** string | success | Name of this customer gateway. **Sample:** my vpn customer gateway |
| **project** string | success | Name of project the VPN customer gateway is related to. **Sample:** Production |
### Authors
* RenΓ© Moser (@resmo)
ansible Ngine_Io.Cloudstack Ngine\_Io.Cloudstack
====================
Collection version 2.2.2
Plugin Index
------------
These are the plugins in the ngine\_io.cloudstack collection
### Inventory Plugins
* [instance](instance_inventory#ansible-collections-ngine-io-cloudstack-instance-inventory) β Apache CloudStack instance inventory source
### Modules
* [cs\_account](cs_account_module#ansible-collections-ngine-io-cloudstack-cs-account-module) β Manages accounts on Apache CloudStack based clouds.
* [cs\_affinitygroup](cs_affinitygroup_module#ansible-collections-ngine-io-cloudstack-cs-affinitygroup-module) β Manages affinity groups on Apache CloudStack based clouds.
* [cs\_cluster](cs_cluster_module#ansible-collections-ngine-io-cloudstack-cs-cluster-module) β Manages host clusters on Apache CloudStack based clouds.
* [cs\_configuration](cs_configuration_module#ansible-collections-ngine-io-cloudstack-cs-configuration-module) β Manages configuration on Apache CloudStack based clouds.
* [cs\_disk\_offering](cs_disk_offering_module#ansible-collections-ngine-io-cloudstack-cs-disk-offering-module) β Manages disk offerings on Apache CloudStack based clouds.
* [cs\_domain](cs_domain_module#ansible-collections-ngine-io-cloudstack-cs-domain-module) β Manages domains on Apache CloudStack based clouds.
* [cs\_facts](cs_facts_module#ansible-collections-ngine-io-cloudstack-cs-facts-module) β Gather facts on instances of Apache CloudStack based clouds.
* [cs\_firewall](cs_firewall_module#ansible-collections-ngine-io-cloudstack-cs-firewall-module) β Manages firewall rules on Apache CloudStack based clouds.
* [cs\_host](cs_host_module#ansible-collections-ngine-io-cloudstack-cs-host-module) β Manages hosts on Apache CloudStack based clouds.
* [cs\_image\_store](cs_image_store_module#ansible-collections-ngine-io-cloudstack-cs-image-store-module) β Manages CloudStack Image Stores.
* [cs\_instance](cs_instance_module#ansible-collections-ngine-io-cloudstack-cs-instance-module) β Manages instances and virtual machines on Apache CloudStack based clouds.
* [cs\_instance\_info](cs_instance_info_module#ansible-collections-ngine-io-cloudstack-cs-instance-info-module) β Gathering information from the API of instances from Apache CloudStack based clouds.
* [cs\_instance\_nic](cs_instance_nic_module#ansible-collections-ngine-io-cloudstack-cs-instance-nic-module) β Manages NICs of an instance on Apache CloudStack based clouds.
* [cs\_instance\_nic\_secondaryip](cs_instance_nic_secondaryip_module#ansible-collections-ngine-io-cloudstack-cs-instance-nic-secondaryip-module) β Manages secondary IPs of an instance on Apache CloudStack based clouds.
* [cs\_instance\_password\_reset](cs_instance_password_reset_module#ansible-collections-ngine-io-cloudstack-cs-instance-password-reset-module) β Allows resetting VM the default passwords on Apache CloudStack based clouds.
* [cs\_instancegroup](cs_instancegroup_module#ansible-collections-ngine-io-cloudstack-cs-instancegroup-module) β Manages instance groups on Apache CloudStack based clouds.
* [cs\_ip\_address](cs_ip_address_module#ansible-collections-ngine-io-cloudstack-cs-ip-address-module) β Manages public IP address associations on Apache CloudStack based clouds.
* [cs\_iso](cs_iso_module#ansible-collections-ngine-io-cloudstack-cs-iso-module) β Manages ISO images on Apache CloudStack based clouds.
* [cs\_loadbalancer\_rule](cs_loadbalancer_rule_module#ansible-collections-ngine-io-cloudstack-cs-loadbalancer-rule-module) β Manages load balancer rules on Apache CloudStack based clouds.
* [cs\_loadbalancer\_rule\_member](cs_loadbalancer_rule_member_module#ansible-collections-ngine-io-cloudstack-cs-loadbalancer-rule-member-module) β Manages load balancer rule members on Apache CloudStack based clouds.
* [cs\_network](cs_network_module#ansible-collections-ngine-io-cloudstack-cs-network-module) β Manages networks on Apache CloudStack based clouds.
* [cs\_network\_acl](cs_network_acl_module#ansible-collections-ngine-io-cloudstack-cs-network-acl-module) β Manages network access control lists (ACL) on Apache CloudStack based clouds.
* [cs\_network\_acl\_rule](cs_network_acl_rule_module#ansible-collections-ngine-io-cloudstack-cs-network-acl-rule-module) β Manages network access control list (ACL) rules on Apache CloudStack based clouds.
* [cs\_network\_offering](cs_network_offering_module#ansible-collections-ngine-io-cloudstack-cs-network-offering-module) β Manages network offerings on Apache CloudStack based clouds.
* [cs\_physical\_network](cs_physical_network_module#ansible-collections-ngine-io-cloudstack-cs-physical-network-module) β Manages physical networks on Apache CloudStack based clouds.
* [cs\_pod](cs_pod_module#ansible-collections-ngine-io-cloudstack-cs-pod-module) β Manages pods on Apache CloudStack based clouds.
* [cs\_portforward](cs_portforward_module#ansible-collections-ngine-io-cloudstack-cs-portforward-module) β Manages port forwarding rules on Apache CloudStack based clouds.
* [cs\_project](cs_project_module#ansible-collections-ngine-io-cloudstack-cs-project-module) β Manages projects on Apache CloudStack based clouds.
* [cs\_region](cs_region_module#ansible-collections-ngine-io-cloudstack-cs-region-module) β Manages regions on Apache CloudStack based clouds.
* [cs\_resourcelimit](cs_resourcelimit_module#ansible-collections-ngine-io-cloudstack-cs-resourcelimit-module) β Manages resource limits on Apache CloudStack based clouds.
* [cs\_role](cs_role_module#ansible-collections-ngine-io-cloudstack-cs-role-module) β Manages user roles on Apache CloudStack based clouds.
* [cs\_role\_permission](cs_role_permission_module#ansible-collections-ngine-io-cloudstack-cs-role-permission-module) β Manages role permissions on Apache CloudStack based clouds.
* [cs\_router](cs_router_module#ansible-collections-ngine-io-cloudstack-cs-router-module) β Manages routers on Apache CloudStack based clouds.
* [cs\_securitygroup](cs_securitygroup_module#ansible-collections-ngine-io-cloudstack-cs-securitygroup-module) β Manages security groups on Apache CloudStack based clouds.
* [cs\_securitygroup\_rule](cs_securitygroup_rule_module#ansible-collections-ngine-io-cloudstack-cs-securitygroup-rule-module) β Manages security group rules on Apache CloudStack based clouds.
* [cs\_service\_offering](cs_service_offering_module#ansible-collections-ngine-io-cloudstack-cs-service-offering-module) β Manages service offerings on Apache CloudStack based clouds.
* [cs\_snapshot\_policy](cs_snapshot_policy_module#ansible-collections-ngine-io-cloudstack-cs-snapshot-policy-module) β Manages volume snapshot policies on Apache CloudStack based clouds.
* [cs\_sshkeypair](cs_sshkeypair_module#ansible-collections-ngine-io-cloudstack-cs-sshkeypair-module) β Manages SSH keys on Apache CloudStack based clouds.
* [cs\_staticnat](cs_staticnat_module#ansible-collections-ngine-io-cloudstack-cs-staticnat-module) β Manages static NATs on Apache CloudStack based clouds.
* [cs\_storage\_pool](cs_storage_pool_module#ansible-collections-ngine-io-cloudstack-cs-storage-pool-module) β Manages Primary Storage Pools on Apache CloudStack based clouds.
* [cs\_template](cs_template_module#ansible-collections-ngine-io-cloudstack-cs-template-module) β Manages templates on Apache CloudStack based clouds.
* [cs\_traffic\_type](cs_traffic_type_module#ansible-collections-ngine-io-cloudstack-cs-traffic-type-module) β Manages traffic types on CloudStack Physical Networks
* [cs\_user](cs_user_module#ansible-collections-ngine-io-cloudstack-cs-user-module) β Manages users on Apache CloudStack based clouds.
* [cs\_vlan\_ip\_range](cs_vlan_ip_range_module#ansible-collections-ngine-io-cloudstack-cs-vlan-ip-range-module) β Manages VLAN IP ranges on Apache CloudStack based clouds.
* [cs\_vmsnapshot](cs_vmsnapshot_module#ansible-collections-ngine-io-cloudstack-cs-vmsnapshot-module) β Manages VM snapshots on Apache CloudStack based clouds.
* [cs\_volume](cs_volume_module#ansible-collections-ngine-io-cloudstack-cs-volume-module) β Manages volumes on Apache CloudStack based clouds.
* [cs\_vpc](cs_vpc_module#ansible-collections-ngine-io-cloudstack-cs-vpc-module) β Manages VPCs on Apache CloudStack based clouds.
* [cs\_vpc\_offering](cs_vpc_offering_module#ansible-collections-ngine-io-cloudstack-cs-vpc-offering-module) β Manages vpc offerings on Apache CloudStack based clouds.
* [cs\_vpn\_connection](cs_vpn_connection_module#ansible-collections-ngine-io-cloudstack-cs-vpn-connection-module) β Manages site-to-site VPN connections on Apache CloudStack based clouds.
* [cs\_vpn\_customer\_gateway](cs_vpn_customer_gateway_module#ansible-collections-ngine-io-cloudstack-cs-vpn-customer-gateway-module) β Manages site-to-site VPN customer gateway configurations on Apache CloudStack based clouds.
* [cs\_vpn\_gateway](cs_vpn_gateway_module#ansible-collections-ngine-io-cloudstack-cs-vpn-gateway-module) β Manages site-to-site VPN gateways on Apache CloudStack based clouds.
* [cs\_zone](cs_zone_module#ansible-collections-ngine-io-cloudstack-cs-zone-module) β Manages zones on Apache CloudStack based clouds.
* [cs\_zone\_info](cs_zone_info_module#ansible-collections-ngine-io-cloudstack-cs-zone-info-module) β Gathering information about zones from Apache CloudStack based clouds.
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
| programming_docs |
ansible ngine_io.cloudstack.cs_zone β Manages zones on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_zone β Manages zones on Apache CloudStack based clouds.
================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_zone`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove zones.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **dhcp\_provider** string | | DHCP provider for the Zone. |
| **dns1** string | | First DNS for the zone. Required if *state=present*
|
| **dns1\_ipv6** string | | First DNS for IPv6 for the zone. |
| **dns2** string | | Second DNS for the zone. |
| **dns2\_ipv6** string | | Second DNS for IPv6 for the zone. |
| **domain** string | | Domain the zone is related to. Zone is a public zone if not set. |
| **guest\_cidr\_address** string | | Guest CIDR address for the zone. |
| **id** string | | uuid of the existing zone. |
| **internal\_dns1** string | | First internal DNS for the zone. If not set *dns1* will be used on *state=present*. |
| **internal\_dns2** string | | Second internal DNS for the zone. |
| **local\_storage\_enabled** boolean | **Choices:*** no
* yes
| Whether to enable local storage for the zone or not.. |
| **name** string / required | | Name of the zone. |
| **network\_domain** string | | Network domain for the zone. |
| **network\_type** string | **Choices:*** **Basic** β
* Advanced
| Network type of the zone. |
| **securitygroups\_enabled** boolean | **Choices:*** no
* yes
| Whether the zone is security group enabled or not. |
| **state** string | **Choices:*** **present** β
* enabled
* disabled
* absent
| State of the zone. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Ensure a zone is present
ngine_io.cloudstack.cs_zone:
name: ch-zrh-ix-01
dns1: 8.8.8.8
dns2: 8.8.4.4
network_type: basic
- name: Ensure a zone is disabled
ngine_io.cloudstack.cs_zone:
name: ch-zrh-ix-01
state: disabled
- name: Ensure a zone is enabled
ngine_io.cloudstack.cs_zone:
name: ch-zrh-ix-01
state: enabled
- name: Ensure a zone is absent
ngine_io.cloudstack.cs_zone:
name: ch-zrh-ix-01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **allocation\_state** string | success | State of the zone. **Sample:** Enabled |
| **dhcp\_provider** string | success | DHCP provider for the zone **Sample:** VirtualRouter |
| **dns1** string | success | First DNS for the zone. **Sample:** 8.8.8.8 |
| **dns1\_ipv6** string | success | First IPv6 DNS for the zone. **Sample:** 2001:4860:4860::8888 |
| **dns2** string | success | Second DNS for the zone. **Sample:** 8.8.4.4 |
| **dns2\_ipv6** string | success | Second IPv6 DNS for the zone. **Sample:** 2001:4860:4860::8844 |
| **domain** string | success | Domain the zone is related to. **Sample:** ROOT |
| **guest\_cidr\_address** string | success | Guest CIDR address for the zone **Sample:** 10.1.1.0/24 |
| **id** string | success | UUID of the zone. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **internal\_dns1** string | success | First internal DNS for the zone. **Sample:** 8.8.8.8 |
| **internal\_dns2** string | success | Second internal DNS for the zone. **Sample:** 8.8.4.4 |
| **local\_storage\_enabled** boolean | success | Local storage offering enabled. |
| **name** string | success | Name of the zone. **Sample:** zone01 |
| **network\_domain** string | success | Network domain for the zone. **Sample:** example.com |
| **network\_type** string | success | Network type for the zone. **Sample:** basic |
| **securitygroups\_enabled** boolean | success | Security groups support is enabled. |
| **tags** list / elements=string | success | List of resource tags associated with the zone. **Sample:** [{'key': 'foo', 'value': 'bar'}] |
| **zone\_token** string | success | Zone token **Sample:** ccb0a60c-79c8-3230-ab8b-8bdbe8c45bb7 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_vpn_gateway β Manages site-to-site VPN gateways on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_vpn\_gateway β Manages site-to-site VPN gateways on Apache CloudStack based clouds.
============================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_vpn_gateway`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Creates and removes VPN site-to-site gateways.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the VPN gateway is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the VPN gateway is related to. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the VPN gateway is related to. |
| **state** string | **Choices:*** **present** β
* absent
| State of the VPN gateway. |
| **vpc** string / required | | Name of the VPC. |
| **zone** string / required | | Name of the zone the VPC is related to. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Ensure a vpn gateway is present
ngine_io.cloudstack.cs_vpn_gateway:
vpc: my VPC
zone: zone01
- name: Ensure a vpn gateway is absent
ngine_io.cloudstack.cs_vpn_gateway:
vpc: my VPC
zone: zone01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the VPN site-to-site gateway is related to. **Sample:** example account |
| **domain** string | success | Domain the VPN site-to-site gateway is related to. **Sample:** example domain |
| **id** string | success | UUID of the VPN site-to-site gateway. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **project** string | success | Name of project the VPN site-to-site gateway is related to. **Sample:** Production |
| **public\_ip** string | success | IP address of the VPN site-to-site gateway. **Sample:** 10.100.212.10 |
| **vpc** string | success | Name of the VPC. **Sample:** My VPC |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_vpn_connection β Manages site-to-site VPN connections on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_vpn\_connection β Manages site-to-site VPN connections on Apache CloudStack based clouds.
==================================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_vpn_connection`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and remove VPN connections.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the VPN connection is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the VPN connection is related to. |
| **force** boolean | **Choices:*** **no** β
* yes
| Activate the VPN gateway if not already activated on *state=present*. Also see M(cs\_vpn\_gateway). |
| **passive** boolean | **Choices:*** **no** β
* yes
| State of the VPN connection. Only considered when *state=present*. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the VPN connection is related to. |
| **state** string | **Choices:*** **present** β
* absent
| State of the VPN connection. |
| **vpc** string / required | | Name of the VPC the VPN connection is related to. |
| **vpn\_customer\_gateway** string / required | | Name of the VPN customer gateway. |
| **zone** string / required | | Name of the zone the VPC is related to. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a VPN connection with activated VPN gateway
ngine_io.cloudstack.cs_vpn_connection:
vpn_customer_gateway: my vpn connection
vpc: my vpc
zone: zone01
- name: Create a VPN connection and force VPN gateway activation
ngine_io.cloudstack.cs_vpn_connection:
vpn_customer_gateway: my vpn connection
vpc: my vpc
zone: zone01
force: yes
- name: Remove a vpn connection
ngine_io.cloudstack.cs_vpn_connection:
vpn_customer_gateway: my vpn connection
vpc: my vpc
zone: zone01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the VPN connection is related to. **Sample:** example account |
| **cidrs** list / elements=string | success | List of CIDRs of the customer gateway. **Sample:** ['10.10.10.0/24'] |
| **created** string | success | Date the connection was created. **Sample:** 2014-12-01T14:57:57+0100 |
| **domain** string | success | Domain the VPN connection is related to. **Sample:** example domain |
| **dpd** boolean | success | Whether dead pear detection is enabled or not. **Sample:** True |
| **esp\_lifetime** integer | success | Lifetime in seconds of phase 2 VPN connection. **Sample:** 86400 |
| **esp\_policy** string | success | IKE policy of the VPN connection. **Sample:** aes256-sha1;modp1536 |
| **force\_encap** boolean | success | Whether encapsulation for NAT traversal is enforced or not. **Sample:** True |
| **gateway** string | success | IP address of the VPN customer gateway. **Sample:** 10.101.214.10 |
| **id** string | success | UUID of the VPN connection. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **ike\_lifetime** integer | success | Lifetime in seconds of phase 1 VPN connection. **Sample:** 86400 |
| **ike\_policy** string | success | ESP policy of the VPN connection. **Sample:** aes256-sha1;modp1536 |
| **passive** boolean | success | Whether the connection is passive or not. |
| **project** string | success | Name of project the VPN connection is related to. **Sample:** Production |
| **public\_ip** string | success | IP address of the VPN gateway. **Sample:** 10.100.212.10 |
| **state** string | success | State of the VPN connection. **Sample:** Connected |
| **vpn\_gateway\_id** string | success | UUID of the VPN gateway. **Sample:** 04589590-ac63-93f5-4ffc-b698b8ac38b6 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_iso β Manages ISO images on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_iso β Manages ISO images on Apache CloudStack based clouds.
====================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_iso`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Register and remove ISO images.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the ISO is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **bootable** boolean | **Choices:*** no
* yes
| Register the ISO to be bootable. Only used if *state* is present. |
| **checksum** string | | The MD5 checksum value of this ISO. If set, we search by checksum instead of name. |
| **cross\_zones** boolean | **Choices:*** **no** β
* yes
| Whether the ISO should be synced or removed across zones. Mutually exclusive with *zone*. |
| **display\_text** string | | Display text of the ISO. If not specified, *name* will be used. |
| **domain** string | | Domain the ISO is related to. |
| **is\_dynamically\_scalable** boolean | **Choices:*** no
* yes
| Register the ISO having XS/VMware tools installed inorder to support dynamic scaling of VM cpu/memory. Only used if *state* is present. |
| **is\_featured** boolean | **Choices:*** no
* yes
| Register the ISO to be featured. Only used if *state* is present. |
| **is\_public** boolean | **Choices:*** no
* yes
| Register the ISO to be publicly available to all users. Only used if *state* is present. |
| **is\_ready** boolean | **Choices:*** **no** β
* yes
| This flag is used for searching existing ISOs. If set to `yes`, it will only list ISO ready for deployment e.g. successfully downloaded and installed. Recommended to set it to `no`. |
| **iso\_filter** string | **Choices:*** featured
* **self** β
* selfexecutable
* sharedexecutable
* executable
* community
| Name of the filter used to search for the ISO. |
| **name** string / required | | Name of the ISO. |
| **os\_type** string | | Name of the OS that best represents the OS of this ISO. If the iso is bootable this parameter needs to be passed. Required if *state* is present. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the ISO to be registered in. |
| **state** string | **Choices:*** **present** β
* absent
| State of the ISO. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. To delete all tags, set a empty list e.g. *tags: []*.
aliases: tag |
| **url** string | | URL where the ISO can be downloaded from. Required if *state* is present. |
| **zone** string | | Name of the zone you wish the ISO to be registered or deleted from. Required when *cross\_zones* is `no`
|
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Register an ISO if ISO name does not already exist
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: Debian GNU/Linux 7(64-bit)
- name: Register an ISO with given name if ISO md5 checksum does not already exist
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
url: http://mirror.switch.ch/ftp/mirror/debian-cd/current/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso
os_type: Debian GNU/Linux 7(64-bit)
checksum: 0b31bccccb048d20b551f70830bb7ad0
- name: Remove an ISO by name
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
state: absent
- name: Remove an ISO by checksum
ngine_io.cloudstack.cs_iso:
name: Debian 7 64-bit
zone: zone01
checksum: 0b31bccccb048d20b551f70830bb7ad0
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the ISO is related to. **Sample:** example account |
| **bootable** boolean | success | True if the ISO is bootable. **Sample:** True |
| **checksum** string | success | MD5 checksum of the ISO. **Sample:** 0b31bccccb048d20b551f70830bb7ad0 |
| **created** string | success | Date of registering. **Sample:** 2015-03-29T14:57:06+0200 |
| **cross\_zones** boolean | success | true if the ISO is managed across all zones, false otherwise. |
| **display\_text** string | success | Text to be displayed of the ISO. **Sample:** Debian 7.7 64-bit minimal 2015-03-19 |
| **domain** string | success | Domain the ISO is related to. **Sample:** example domain |
| **format** string | success | Format of the ISO. **Sample:** ISO |
| **id** string | success | UUID of the ISO. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **is\_featured** boolean | success | True if the ISO is featured. **Sample:** True |
| **is\_public** boolean | success | True if the ISO is public. **Sample:** True |
| **is\_ready** boolean | success | True if the ISO is ready to be deployed from. **Sample:** True |
| **name** string | success | Name of the ISO. **Sample:** Debian 7 64-bit |
| **os\_type** string | success | Typo of the OS. **Sample:** CentOS 6.5 (64-bit) |
| **project** string | success | Project the ISO is related to. **Sample:** example project |
| **status** string | success | Status of the ISO. **Sample:** Successfully Installed |
| **tags** dictionary | success | List of resource tags associated with the ISO. **Sample:** [ { "key": "foo", "value": "bar" } ] |
| **zone** string | success | Name of zone the ISO is registered in. **Sample:** zuerich |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.cs_snapshot_policy β Manages volume snapshot policies on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_snapshot\_policy β Manages volume snapshot policies on Apache CloudStack based clouds.
===============================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_snapshot_policy`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and delete volume snapshot policies.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the volume is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **device\_id** integer | | ID of the device on a VM the volume is attached to. This will only be considered if VM has multiple DATADISK volumes. |
| **domain** string | | Domain the volume is related to. |
| **interval\_type** string | **Choices:*** hourly
* **daily** β
* weekly
* monthly
| Interval of the snapshot.
aliases: interval |
| **max\_snaps** integer | **Default:**8 | Max number of snapshots.
aliases: max |
| **project** string | | Name of the project the volume is related to. |
| **schedule** string | | Time the snapshot is scheduled. Required if *state=present*. Format for *interval\_type=HOURLY*: `MM`
Format for *interval\_type=DAILY*: `MM:HH`
Format for *interval\_type=WEEKLY*: `MM:HH:DD (1-7`) Format for *interval\_type=MONTHLY*: `MM:HH:DD (1-28`) |
| **state** string | **Choices:*** **present** β
* absent
| State of the snapshot policy. |
| **time\_zone** string | **Default:**"UTC" | Specifies a timezone for this command.
aliases: timezone |
| **vm** string | | Name of the instance to select the volume from. Use *volume\_type* if VM has a DATADISK and ROOT volume. In case of *volume\_type=DATADISK*, additionally use *device\_id* if VM has more than one DATADISK volume. Either *volume* or *vm* is required. |
| **volume** string | | Name of the volume. Either *volume* or *vm* is required. |
| **volume\_type** string | **Choices:*** DATADISK
* ROOT
| Type of the volume. |
| **vpc** string | | Name of the vpc the instance is deployed in. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: ensure a snapshot policy daily at 1h00 UTC
ngine_io.cloudstack.cs_snapshot_policy:
volume: ROOT-478
schedule: '00:1'
max_snaps: 3
- name: ensure a snapshot policy daily at 1h00 UTC on the second DATADISK of VM web-01
ngine_io.cloudstack.cs_snapshot_policy:
vm: web-01
volume_type: DATADISK
device_id: 2
schedule: '00:1'
max_snaps: 3
- name: ensure a snapshot policy hourly at minute 5 UTC
ngine_io.cloudstack.cs_snapshot_policy:
volume: ROOT-478
schedule: '5'
interval_type: hourly
max_snaps: 1
- name: ensure a snapshot policy weekly on Sunday at 05h00, TZ Europe/Zurich
ngine_io.cloudstack.cs_snapshot_policy:
volume: ROOT-478
schedule: '00:5:1'
interval_type: weekly
max_snaps: 1
time_zone: 'Europe/Zurich'
- name: ensure a snapshot policy is absent
ngine_io.cloudstack.cs_snapshot_policy:
volume: ROOT-478
interval_type: hourly
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the volume is related to. **Sample:** example account |
| **domain** string | success | Domain the volume is related to. **Sample:** example domain |
| **id** string | success | UUID of the snapshot policy. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **interval\_type** string | success | interval type of the snapshot policy. **Sample:** daily |
| **max\_snaps** integer | success | maximum number of snapshots retained. **Sample:** 10 |
| **project** string | success | Name of project the volume is related to. **Sample:** Production |
| **schedule** string | success | schedule of the snapshot policy. |
| **time\_zone** string | success | the time zone of the snapshot policy. **Sample:** Etc/UTC |
| **volume** string | success | the volume of the snapshot policy. **Sample:** Etc/UTC |
| **zone** string | success | Name of zone the volume is related to. **Sample:** ch-gva-2 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_domain β Manages domains on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_domain β Manages domains on Apache CloudStack based clouds.
====================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_domain`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove domains.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **clean\_up** boolean | **Choices:*** **no** β
* yes
| Clean up all domain resources like child domains and accounts. Considered on *state=absent*. |
| **network\_domain** string | | Network domain for networks in the domain. |
| **path** string / required | | Path of the domain. Prefix `ROOT/` or `/ROOT/` in path is optional. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **state** string | **Choices:*** **present** β
* absent
| State of the domain. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a domain
ngine_io.cloudstack.cs_domain:
path: ROOT/customers
network_domain: customers.example.com
- name: Create another subdomain
ngine_io.cloudstack.cs_domain:
path: ROOT/customers/xy
network_domain: xy.customers.example.com
- name: Remove a domain
ngine_io.cloudstack.cs_domain:
path: ROOT/customers/xy
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** string | success | UUID of the domain. **Sample:** 87b1e0ce-4e01-11e4-bb66-0050569e64b8 |
| **name** string | success | Name of the domain. **Sample:** customers |
| **network\_domain** string | success | Network domain of the domain. **Sample:** example.local |
| **parent\_domain** string | success | Parent domain of the domain. **Sample:** ROOT |
| **path** string | success | Domain path. **Sample:** /ROOT/customers |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_router β Manages routers on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_router β Manages routers on Apache CloudStack based clouds.
====================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_router`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Start, restart, stop and destroy routers.
* *state=present* is not able to create routers, use M(cs\_network) instead.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the router is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the router is related to. |
| **name** string / required | | Name of the router. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the router is related to. |
| **service\_offering** string | | Name or id of the service offering of the router. |
| **state** string | **Choices:*** **present** β
* absent
* started
* stopped
* restarted
| State of the router. |
| **zone** string | | Name of the zone the router is deployed in. If not set, all zones are used. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
# Ensure the router has the desired service offering, no matter if
# the router is running or not.
- name: Present router
ngine_io.cloudstack.cs_router:
name: r-40-VM
service_offering: System Offering for Software Router
- name: Ensure started
ngine_io.cloudstack.cs_router:
name: r-40-VM
state: started
# Ensure started with desired service offering.
# If the service offerings changes, router will be rebooted.
- name: Ensure started with desired service offering
ngine_io.cloudstack.cs_router:
name: r-40-VM
service_offering: System Offering for Software Router
state: started
- name: Ensure stopped
ngine_io.cloudstack.cs_router:
name: r-40-VM
state: stopped
- name: Remove a router
ngine_io.cloudstack.cs_router:
name: r-40-VM
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the router is related to. **Sample:** admin |
| **created** string | success | Date of the router was created. **Sample:** 2014-12-01T14:57:57+0100 |
| **domain** string | success | Domain the router is related to. **Sample:** ROOT |
| **id** string | success | UUID of the router. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **name** string | success | Name of the router. **Sample:** r-40-VM |
| **redundant\_state** string | success | Redundant state of the router. **Sample:** UNKNOWN |
| **requires\_upgrade** boolean | success | Whether the router needs to be upgraded to the new template. |
| **role** string | success | Role of the router. **Sample:** VIRTUAL\_ROUTER |
| **service\_offering** string | success | Name of the service offering the router has. **Sample:** System Offering For Software Router |
| **state** string | success | State of the router. **Sample:** Active |
| **template\_version** string | success | Version of the system VM template. **Sample:** 4.5.1 |
| **zone** string | success | Name of zone the router is in. **Sample:** ch-gva-2 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_volume β Manages volumes on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_volume β Manages volumes on Apache CloudStack based clouds.
====================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_volume`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, destroy, attach, detach, extract or upload volumes.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the volume is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **custom\_id** string | | Custom id to the resource. Allowed to Root Admins only. |
| **device\_id** integer | | ID of the device on a VM the volume is attached to. Only considered if *state* is `attached`. |
| **disk\_offering** string | | Name of the disk offering to be used. Required one of *disk\_offering*, *snapshot* if volume is not already *state=present*. |
| **display\_volume** boolean | **Choices:*** no
* yes
| Whether to display the volume to the end user or not. Allowed to Root Admins only. |
| **domain** string | | Name of the domain the volume to be deployed in. |
| **force** boolean | **Choices:*** **no** β
* yes
| Force removal of volume even it is attached to a VM. Considered on *state=absent* only. |
| **format** string | **Choices:*** QCOW2
* RAW
* VHD
* VHDX
* OVA
| The format for the volume. Only considered if *state=uploaded*. |
| **max\_iops** integer | | Max iops |
| **min\_iops** integer | | Min iops |
| **mode** string | **Choices:*** **http\_download** β
* ftp\_upload
| Mode for the volume extraction. Only considered if *state=extracted*. |
| **name** string / required | | Name of the volume.
*name* can only contain ASCII letters. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the volume to be deployed in. |
| **shrink\_ok** boolean | **Choices:*** **no** β
* yes
| Whether to allow to shrink the volume. |
| **size** integer | | Size of disk in GB |
| **snapshot** string | | The snapshot name for the disk volume. Required one of *disk\_offering*, *snapshot* if volume is not already *state=present*. |
| **state** string | **Choices:*** **present** β
* absent
* attached
* detached
* extracted
* uploaded
| State of the volume. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. To delete all tags, set a empty list e.g. *tags: []*.
aliases: tag |
| **url** string | | URL to which the volume would be extracted on *state=extracted*
or the URL where to download the volume on *state=uploaded*. Only considered if *state* is `extracted` or `uploaded`. |
| **vm** string | | Name of the virtual machine to attach the volume to. |
| **zone** string / required | | Name of the zone in which the volume should be deployed. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: create volume within project and zone with specified storage options
ngine_io.cloudstack.cs_volume:
name: web-vm-1-volume
project: Integration
zone: ch-zrh-ix-01
disk_offering: PerfPlus Storage
size: 20
- name: create/attach volume to instance
ngine_io.cloudstack.cs_volume:
name: web-vm-1-volume
zone: zone01
disk_offering: PerfPlus Storage
size: 20
vm: web-vm-1
state: attached
- name: detach volume
ngine_io.cloudstack.cs_volume:
name: web-vm-1-volume
zone: zone01
state: detached
- name: remove volume
ngine_io.cloudstack.cs_volume:
name: web-vm-1-volume
zone: zone01
state: absent
- name: Extract DATA volume to make it downloadable
ngine_io.cloudstack.cs_volume:
state: extracted
name: web-vm-1-volume
zone: zone01
register: data_vol_out
- name: Create new volume by downloading source volume
ngine_io.cloudstack.cs_volume:
state: uploaded
name: web-vm-1-volume-2
zone: zone01
format: VHD
url: "{{ data_vol_out.url }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **attached** string | success | Date of the volume was attached. **Sample:** 2014-12-01T14:57:57+0100 |
| **created** string | success | Date of the volume was created. **Sample:** 2014-12-01T14:57:57+0100 |
| **device\_id** integer | success | Id of the device on user vm the volume is attached to (not returned when detached) **Sample:** 1 |
| **display\_name** string | success | Display name of the volume. **Sample:** web-volume-01 |
| **domain** string | success | Domain the volume belongs to **Sample:** example domain |
| **group** string | success | Group the volume belongs to **Sample:** web |
| **id** string | success | ID of the volume. |
| **name** string | success | Name of the volume. **Sample:** web-volume-01 |
| **project** string | success | Project the volume belongs to **Sample:** Production |
| **size** integer | success | Size of disk volume. **Sample:** 20 |
| **state** string | success | State of the volume **Sample:** Attached |
| **type** string | success | Disk volume type. **Sample:** DATADISK |
| **url** string | success when *state=extracted* | The url of the uploaded volume or the download url depending extraction mode. **Sample:** http://1.12.3.4/userdata/387e2c7c-7c42-4ecc-b4ed-84e8367a1965.vhd |
| **vm** string | success | Name of the vm the volume is attached to (not returned when detached) **Sample:** web-01 |
| **zone** string | success | Name of zone the volume is in. **Sample:** ch-gva-2 |
### Authors
* Jefferson GirΓ£o (@jeffersongirao)
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.cs_facts β Gather facts on instances of Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_facts β Gather facts on instances of Apache CloudStack based clouds.
=============================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_facts`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* This module fetches data from the metadata API in CloudStack. The module must be called from within the instance itself.
Requirements
------------
The below requirements are needed on the host that executes this module.
* yaml
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **filter** string | **Choices:*** cloudstack\_service\_offering
* cloudstack\_availability\_zone
* cloudstack\_public\_hostname
* cloudstack\_public\_ipv4
* cloudstack\_local\_hostname
* cloudstack\_local\_ipv4
* cloudstack\_instance\_id
* cloudstack\_user\_data
| Filter for a specific fact. |
| **meta\_data\_host** string | | Host or IP of the meta data API service. If not set, determination by parsing the dhcp lease file. |
Examples
--------
```
# Gather all facts on instances
- name: Gather cloudstack facts
ngine_io.cloudstack.cs_facts:
# Gather specific fact on instances
- name: Gather cloudstack facts
ngine_io.cloudstack.cs_facts: filter=cloudstack_instance_id
# Gather specific fact on instances with a given meta_data_host
- name: Gather cloudstack facts
ngine_io.cloudstack.cs_facts:
filter: cloudstack_instance_id
meta_data_host: 169.254.169.254
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cloudstack\_availability\_zone** string | success | zone the instance is deployed in. **Sample:** ch-gva-2 |
| **cloudstack\_instance\_id** string | success | UUID of the instance. **Sample:** ab4e80b0-3e7e-4936-bdc5-e334ba5b0139 |
| **cloudstack\_local\_hostname** string | success | local hostname of the instance. **Sample:** VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139 |
| **cloudstack\_local\_ipv4** string | success | local IPv4 of the instance. **Sample:** 185.19.28.35 |
| **cloudstack\_public\_hostname** string | success | public IPv4 of the router. Same as *cloudstack\_public\_ipv4*. **Sample:** VM-ab4e80b0-3e7e-4936-bdc5-e334ba5b0139 |
| **cloudstack\_public\_ipv4** string | success | public IPv4 of the router. **Sample:** 185.19.28.35 |
| **cloudstack\_service\_offering** string | success | service offering of the instance. **Sample:** Micro 512mb 1cpu |
| **cloudstack\_user\_data** dictionary | success | data of the instance provided by users. **Sample:** {'bla': 'foo'} |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_instance β Manages instances and virtual machines on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_instance β Manages instances and virtual machines on Apache CloudStack based clouds.
=============================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_instance`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Deploy, start, update, scale, restart, restore, stop and destroy instances.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the instance is related to. |
| **affinity\_groups** list / elements=string | | Affinity groups names to be applied to the new instance.
aliases: affinity\_group |
| **allow\_root\_disk\_shrink** boolean | **Choices:*** **no** β
* yes
| Enables a volume shrinkage when the new size is smaller than the old one. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cpu** integer | | The number of CPUs to allocate to the instance, used with custom service offerings |
| **cpu\_speed** integer | | The clock speed/shares allocated to the instance, used with custom service offerings |
| **details** dictionary | | Map to specify custom parameters. |
| **disk\_offering** string | | Name of the disk offering to be used. |
| **disk\_size** integer | | Disk size in GByte required if deploying instance from ISO. |
| **display\_name** string | | Custom display name of the instances. Display name will be set to *name* if not specified. Either *name* or *display\_name* is required. |
| **domain** string | | Domain the instance is related to. |
| **force** boolean | **Choices:*** **no** β
* yes
| Force stop/start the instance if required to apply changes, otherwise a running instance will not be changed. |
| **group** string | | Group in where the new instance should be in. |
| **host** string | | Host on which an instance should be deployed or started on. Only considered when *state=started* or instance is running. Requires root admin privileges. |
| **hypervisor** string | | Name the hypervisor to be used for creating the new instance. Relevant when using *state=present*, but only considered if not set on ISO/template. If not set or found on ISO/template, first found hypervisor will be used. Possible values are `KVM`, `VMware`, `BareMetal`, `XenServer`, `LXC`, `HyperV`, `UCS`, `OVM`, `Simulator`. |
| **ip6\_address** string | | IPv6 address for default instance's network. |
| **ip\_address** string | | IPv4 address for default instance's network during creation. |
| **ip\_to\_networks** list / elements=dictionary | | List of mappings in the form *{'network': NetworkName, 'ip': 1.2.3.4}*
Mutually exclusive with *networks* option.
aliases: ip\_to\_network |
| **iso** string | | Name or id of the ISO to be used for creating the new instance. Required when using *state=present*. Mutually exclusive with *template* option. |
| **keyboard** string | **Choices:*** de
* de-ch
* es
* fi
* fr
* fr-be
* fr-ch
* is
* it
* jp
* nl-be
* no
* pt
* uk
* us
| Keyboard device type for the instance. |
| **memory** integer | | The memory allocated to the instance, used with custom service offerings |
| **name** string | | Host name of the instance. `name` can only contain ASCII letters. Name will be generated (UUID) by CloudStack if not specified and can not be changed afterwards. Either `name` or `display_name` is required. |
| **networks** list / elements=string | | List of networks to use for the new instance.
aliases: network |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the instance to be deployed in. |
| **root\_disk\_size** integer | | Root disk size in GByte required if deploying instance with KVM hypervisor and want resize the root disk size at startup (need CloudStack >= 4.4, cloud-initramfs-growroot installed and enabled in the template) |
| **security\_groups** list / elements=string | | List of security groups the instance to be applied to.
aliases: security\_group |
| **service\_offering** string | | Name or id of the service offering of the new instance. If not set, first found service offering is used. |
| **ssh\_key** string | | Name of the SSH key to be deployed on the new instance. |
| **state** string | **Choices:*** deployed
* started
* stopped
* restarted
* restored
* destroyed
* expunged
* **present** β
* absent
| State of the instance. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys `key` and `value`. If you want to delete all tags, set a empty list e.g. *tags: []*.
aliases: tag |
| **template** string | | Name, display text or id of the template to be used for creating the new instance. Required when using *state=present*. Mutually exclusive with *iso* option. |
| **template\_filter** string | **Choices:*** all
* featured
* self
* selfexecutable
* sharedexecutable
* **executable** β
* community
| Name of the filter used to search for the template or iso. Used for params *iso* or *template* on *state=present*. The filter `all` was added in 2.6.
aliases: iso\_filter |
| **user\_data** string | | Optional data (ASCII) that can be sent to the instance upon a successful deployment. The data will be automatically base64 encoded. Consider switching to HTTP\_POST by using *CLOUDSTACK\_METHOD=post* to increase the HTTP\_GET size limit of 2KB to 32 KB. |
| **zone** string / required | | Name of the zone in which the instance should be deployed. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
# NOTE: Names of offerings and ISOs depending on the CloudStack configuration.
- name: create a instance from an ISO
ngine_io.cloudstack.cs_instance:
name: web-vm-1
iso: Linux Debian 7 64-bit
hypervisor: VMware
project: Integration
zone: ch-zrh-ix-01
service_offering: 1cpu_1gb
disk_offering: PerfPlus Storage
disk_size: 20
networks:
- Server Integration
- Sync Integration
- Storage Integration
- name: for changing a running instance, use the 'force' parameter
ngine_io.cloudstack.cs_instance:
name: web-vm-1
zone: zone01
display_name: web-vm-01.example.com
iso: Linux Debian 7 64-bit
service_offering: 2cpu_2gb
force: yes
# NOTE: user_data can be used to kickstart the instance using cloud-init yaml config.
- name: create or update a instance on Exoscale's public cloud using display_name.
ngine_io.cloudstack.cs_instance:
display_name: web-vm-1
zone: zone01
template: Linux Debian 7 64-bit
service_offering: Tiny
ssh_key: [email protected]
tags:
- key: admin
value: john
- key: foo
value: bar
user_data: |
#cloud-config
packages:
- nginx
- name: create an instance with multiple interfaces specifying the IP addresses
ngine_io.cloudstack.cs_instance:
name: web-vm-1
zone: zone01
template: Linux Debian 7 64-bit
service_offering: Tiny
ip_to_networks:
- network: NetworkA
ip: 10.1.1.1
- network: NetworkB
ip: 192.0.2.1
- name: ensure an instance is stopped
ngine_io.cloudstack.cs_instance:
name: web-vm-1
zone: zone01
state: stopped
- name: ensure an instance is running
ngine_io.cloudstack.cs_instance:
name: web-vm-1
zone: zone01
state: started
- name: remove an instance
ngine_io.cloudstack.cs_instance:
name: web-vm-1
zone: zone01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the instance is related to. **Sample:** example account |
| **affinity\_groups** list / elements=string | success | Affinity groups the instance is in. **Sample:** [ "webservers" ] |
| **created** string | success | Date of the instance was created. **Sample:** 2014-12-01T14:57:57+0100 |
| **default\_ip** string | success | Default IP address of the instance. **Sample:** 10.23.37.42 |
| **default\_ip6** string | if available | Default IPv6 address of the instance. **Sample:** 2a04:c43:c00:a07:4b4:beff:fe00:74 |
| **display\_name** string | success | Display name of the instance. **Sample:** web-01 |
| **domain** string | success | Domain the instance is related to. **Sample:** example domain |
| **group** string | success | Group name of the instance is related. **Sample:** web |
| **host** string | success and instance is running | Hostname of hypervisor an instance is running on. **Sample:** host-01.example.com |
| **hypervisor** string | success | Hypervisor related to this instance. **Sample:** KVM |
| **id** string | success | UUID of the instance. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **instance\_name** string | success | Internal name of the instance (ROOT admin only). **Sample:** i-44-3992-VM |
| **iso** string | if available | Name of ISO the instance was deployed with. **Sample:** Debian-8-64bit |
| **name** string | success | Name of the instance. **Sample:** web-01 |
| **password** string | if available | The password of the instance if exists. **Sample:** Ge2oe7Do |
| **password\_enabled** boolean | success | True if password setting is enabled. **Sample:** True |
| **project** string | success | Name of project the instance is related to. **Sample:** Production |
| **public\_ip** string | if available | Public IP address with instance via static NAT rule. **Sample:** 1.2.3.4 |
| **security\_groups** list / elements=string | success | Security groups the instance is in. **Sample:** [ "default" ] |
| **service\_offering** string | success | Name of the service offering the instance has. **Sample:** 2cpu\_2gb |
| **ssh\_key** string | if available | Name of SSH key deployed to instance. **Sample:** key@work |
| **state** string | success | State of the instance. **Sample:** Running |
| **tags** list / elements=string | success | List of resource tags associated with the instance. **Sample:** [ { "key": "foo", "value": "bar" } ] |
| **template** string | success | Name of template the instance was deployed with. **Sample:** Linux Debian 9 64-bit |
| **template\_display\_text** string | success | Display text of template the instance was deployed with. **Sample:** Linux Debian 9 64-bit 200G Disk (2017-10-08-622866) |
| **user-data** string | success | Optional data sent to the instance. **Sample:** VXNlciBkYXRhIGV4YW1wbGUK |
| **zone** string | success | Name of zone the instance is in. **Sample:** ch-gva-2 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_instance_nic β Manages NICs of an instance on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_instance\_nic β Manages NICs of an instance on Apache CloudStack based clouds.
=======================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_instance_nic`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add and remove nic to and from network
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the instance is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the instance is related to. |
| **ip\_address** string | | IP address to be used for the nic. |
| **network** string / required | | Name of the network. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the instance is deployed in. |
| **state** string | **Choices:*** **present** β
* absent
| State of the nic. |
| **vm** string / required | | Name of instance.
aliases: name |
| **vpc** string | | Name of the VPC the *vm* is related to. |
| **zone** string / required | | Name of the zone in which the instance is deployed in. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Add a nic on another network
ngine_io.cloudstack.cs_instance_nic:
vm: privnet
network: privNetForBasicZone
zone: zone01
- name: Ensure IP address on a nic
ngine_io.cloudstack.cs_instance_nic:
vm: privnet
ip_address: 10.10.11.32
network: privNetForBasicZone
zone: zone01
- name: Remove a secondary nic
ngine_io.cloudstack.cs_instance_nic:
vm: privnet
state: absent
network: privNetForBasicZone
zone: zone01
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the VM is related to. **Sample:** example account |
| **domain** string | success | Domain the VM is related to. **Sample:** example domain |
| **id** string | success | UUID of the nic. **Sample:** 87b1e0ce-4e01-11e4-bb66-0050569e64b8 |
| **ip\_address** string | success | Primary IP of the NIC. **Sample:** 10.10.10.10 |
| **mac\_address** string | success | MAC address of the NIC. **Sample:** 02:00:33:31:00:e4 |
| **netmask** string | success | Netmask of the NIC. **Sample:** 255.255.255.0 |
| **network** string | success | Name of the network if not default. **Sample:** sync network |
| **project** string | success | Name of project the VM is related to. **Sample:** Production |
| **vm** string | success | Name of the VM. **Sample:** web-01 |
### Authors
* Marc-Aurèle Brothier (@marcaurele)
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.cs_instance_nic_secondaryip β Manages secondary IPs of an instance on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_instance\_nic\_secondaryip β Manages secondary IPs of an instance on Apache CloudStack based clouds.
=============================================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_instance_nic_secondaryip`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add and remove secondary IPs to and from a NIC of an instance.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the instance is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the instance is related to. |
| **network** string | | Name of the network. Required to find the NIC if instance has multiple networks assigned. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the instance is deployed in. |
| **state** string | **Choices:*** **present** β
* absent
| State of the ipaddress. |
| **vm** string / required | | Name of instance.
aliases: name |
| **vm\_guest\_ip** string | | Secondary IP address to be added to the instance nic. If not set, the API always returns a new IP address and idempotency is not given.
aliases: secondary\_ip |
| **vpc** string | | Name of the VPC the *vm* is related to. |
| **zone** string / required | | Name of the zone in which the instance is deployed in. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Assign a specific IP to the default NIC of the VM
ngine_io.cloudstack.cs_instance_nic_secondaryip:
vm: customer_xy
zone: zone01
vm_guest_ip: 10.10.10.10
# Note: If vm_guest_ip is not set, you will get a new IP address on every run.
- name: Assign an IP to the default NIC of the VM
ngine_io.cloudstack.cs_instance_nic_secondaryip:
vm: customer_xy
zone: zone01
- name: Remove a specific IP from the default NIC
ngine_io.cloudstack.cs_instance_nic_secondaryip:
vm: customer_xy
zone: zone01
vm_guest_ip: 10.10.10.10
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the VM is related to. **Sample:** example account |
| **domain** string | success | Domain the VM is related to. **Sample:** example domain |
| **id** string | success | UUID of the NIC. **Sample:** 87b1e0ce-4e01-11e4-bb66-0050569e64b8 |
| **ip\_address** string | success | Primary IP of the NIC. **Sample:** 10.10.10.10 |
| **mac\_address** string | success | MAC address of the NIC. **Sample:** 02:00:33:31:00:e4 |
| **netmask** string | success | Netmask of the NIC. **Sample:** 255.255.255.0 |
| **network** string | success | Name of the network if not default. **Sample:** sync network |
| **project** string | success | Name of project the VM is related to. **Sample:** Production |
| **vm** string | success | Name of the VM. **Sample:** web-01 |
| **vm\_guest\_ip** string | success | Secondary IP of the NIC. **Sample:** 10.10.10.10 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_zone_info β Gathering information about zones from Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_zone\_info β Gathering information about zones from Apache CloudStack based clouds.
============================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_zone_info`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gathering information from the API of a zone.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **zone** string | | Name of the zone. If not specified information about all zones is gathered.
aliases: name |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Gather information from a zone
ngine_io.cloudstack.cs_zone_info:
zone: ch-gva-1
register: zone
- name: Show the returned results of the registered variable
debug:
msg: "{{ zone }}"
- name: Gather information from all zones
ngine_io.cloudstack.cs_zone_info:
register: zones
- name: Show information on all zones
debug:
msg: "{{ zones }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **zones** list / elements=string | success | A list of matching zones. |
| | **allocation\_state** string | success | State of the zone. **Sample:** Enabled |
| | **dhcp\_provider** string | success | DHCP provider for the zone **Sample:** VirtualRouter |
| | **dns1** string | success | First DNS for the zone. **Sample:** 8.8.8.8 |
| | **dns1\_ipv6** string | success | First IPv6 DNS for the zone. **Sample:** 2001:4860:4860::8888 |
| | **dns2** string | success | Second DNS for the zone. **Sample:** 8.8.4.4 |
| | **dns2\_ipv6** string | success | Second IPv6 DNS for the zone. **Sample:** 2001:4860:4860::8844 |
| | **domain** string | success | Domain the zone is related to. **Sample:** ROOT |
| | **guest\_cidr\_address** string | success | Guest CIDR address for the zone **Sample:** 10.1.1.0/24 |
| | **id** string | success | UUID of the zone. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| | **internal\_dns1** string | success | First internal DNS for the zone. **Sample:** 8.8.8.8 |
| | **internal\_dns2** string | success | Second internal DNS for the zone. **Sample:** 8.8.4.4 |
| | **local\_storage\_enabled** boolean | success | Local storage offering enabled. |
| | **name** string | success | Name of the zone. **Sample:** zone01 |
| | **network\_domain** string | success | Network domain for the zone. **Sample:** example.com |
| | **network\_type** string | success | Network type for the zone. **Sample:** basic |
| | **securitygroups\_enabled** boolean | success | Security groups support is enabled. |
| | **tags** list / elements=string | success | List of resource tags associated with the zone. **Sample:** [{'key': 'foo', 'value': 'bar'}] |
| | **zone\_token** string | success | Zone token **Sample:** ccb0a60c-79c8-3230-ab8b-8bdbe8c45bb7 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_loadbalancer_rule β Manages load balancer rules on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_loadbalancer\_rule β Manages load balancer rules on Apache CloudStack based clouds.
============================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_loadbalancer_rule`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add, update and remove load balancer rules.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the rule is related to. |
| **algorithm** string | **Choices:*** **source** β
* roundrobin
* leastconn
| Load balancer algorithm Required when using *state=present*. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cidr** string | | CIDR (full notation) to be used for firewall rule if required. |
| **description** string | | The description of the load balancer rule. |
| **domain** string | | Domain the rule is related to. |
| **ip\_address** string / required | | Public IP address from where the network traffic will be load balanced from.
aliases: public\_ip |
| **name** string / required | | The name of the load balancer rule. |
| **network** string | | Name of the network. |
| **open\_firewall** boolean | **Choices:*** **no** β
* yes
| Whether the firewall rule for public port should be created, while creating the new rule. Use M(cs\_firewall) for managing firewall rules. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **private\_port** integer | | The private port of the private ip address/virtual machine where the network traffic will be load balanced to. Required when using *state=present*. Can not be changed once the rule exists due API limitation. |
| **project** string | | Name of the project the load balancer IP address is related to. |
| **protocol** string | | The protocol to be used on the load balancer |
| **public\_port** integer | | The public port from where the network traffic will be load balanced from. Required when using *state=present*. Can not be changed once the rule exists due API limitation. |
| **state** string | **Choices:*** **present** β
* absent
| State of the rule. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. To delete all tags, set a empty list e.g. *tags: []*.
aliases: tag |
| **vpc** string | | Name of the VPC. |
| **zone** string | | Name of the zone in which the rule should be created. Required when the LB provider is ElasticLoadBalancerVm |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a load balancer rule
ngine_io.cloudstack.cs_loadbalancer_rule:
name: balance_http
public_ip: 1.2.3.4
algorithm: leastconn
public_port: 80
private_port: 8080
- name: Update algorithm of an existing load balancer rule
ngine_io.cloudstack.cs_loadbalancer_rule:
name: balance_http
public_ip: 1.2.3.4
algorithm: roundrobin
public_port: 80
private_port: 8080
- name: Delete a load balancer rule
ngine_io.cloudstack.cs_loadbalancer_rule:
name: balance_http
public_ip: 1.2.3.4
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the rule is related to. **Sample:** example account |
| **algorithm** string | success | Load balancer algorithm used. **Sample:** source |
| **cidr** string | success | CIDR to forward traffic from. **Sample:** 0.0.0.0/0 |
| **description** string | success | Description of the rule. **Sample:** http load balancer rule |
| **domain** string | success | Domain the rule is related to. **Sample:** example domain |
| **id** string | success | UUID of the rule. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **name** string | success | Name of the rule. **Sample:** http-lb |
| **private\_port** integer | success | Private IP address. **Sample:** 80 |
| **project** string | success | Name of project the rule is related to. **Sample:** Production |
| **protocol** string | success | Protocol of the rule. **Sample:** tcp |
| **public\_ip** string | success | Public IP address. **Sample:** 1.2.3.4 |
| **public\_port** integer | success | Public port. **Sample:** 80 |
| **state** string | success | State of the rule. **Sample:** Add |
| **tags** list / elements=string | success | List of resource tags associated with the rule. **Sample:** [ { "key": "foo", "value": "bar" } ] |
| **zone** string | success | Name of zone the rule is related to. **Sample:** ch-gva-2 |
### Authors
* Darren Worrall (@dazworrall)
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_securitygroup_rule β Manages security group rules on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_securitygroup\_rule β Manages security group rules on Apache CloudStack based clouds.
==============================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_securitygroup_rule`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add and remove security group rules.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cidr** string | **Default:**"0.0.0.0/0" | CIDR (full notation) to be used for security group rule. |
| **end\_port** integer | | End port for this rule. Required if *protocol=tcp* or *protocol=udp*, but *start\_port* will be used if not set. |
| **icmp\_code** integer | | Error code for this icmp message. Required if *protocol=icmp*. |
| **icmp\_type** integer | | Type of the icmp message being sent. Required if *protocol=icmp*. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the security group to be created in. |
| **protocol** string | **Choices:*** **tcp** β
* udp
* icmp
* ah
* esp
* gre
| Protocol of the security group rule. |
| **security\_group** string / required | | Name of the security group the rule is related to. The security group must be existing. |
| **start\_port** integer | | Start port for this rule. Required if *protocol=tcp* or *protocol=udp*.
aliases: port |
| **state** string | **Choices:*** **present** β
* absent
| State of the security group rule. |
| **type** string | **Choices:*** **ingress** β
* egress
| Ingress or egress security group rule. |
| **user\_security\_group** string | | Security group this rule is based of. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
---
- name: allow inbound port 80/tcp from 1.2.3.4 added to security group 'default'
ngine_io.cloudstack.cs_securitygroup_rule:
security_group: default
port: 80
cidr: 1.2.3.4/32
- name: allow tcp/udp outbound added to security group 'default'
ngine_io.cloudstack.cs_securitygroup_rule:
security_group: default
type: egress
start_port: 1
end_port: 65535
protocol: '{{ item }}'
with_items:
- tcp
- udp
- name: allow inbound icmp from 0.0.0.0/0 added to security group 'default'
ngine_io.cloudstack.cs_securitygroup_rule:
security_group: default
protocol: icmp
icmp_code: -1
icmp_type: -1
- name: remove rule inbound port 80/tcp from 0.0.0.0/0 from security group 'default'
ngine_io.cloudstack.cs_securitygroup_rule:
security_group: default
port: 80
state: absent
- name: allow inbound port 80/tcp from security group web added to security group 'default'
ngine_io.cloudstack.cs_securitygroup_rule:
security_group: default
port: 80
user_security_group: web
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cidr** string | success and cidr is defined | CIDR of the rule. **Sample:** 0.0.0.0/0 |
| **end\_port** integer | success | end port of the rule. **Sample:** 80 |
| **id** string | success | UUID of the of the rule. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **protocol** string | success | protocol of the rule. **Sample:** tcp |
| **security\_group** string | success | security group of the rule. **Sample:** default |
| **start\_port** integer | success | start port of the rule. **Sample:** 80 |
| **type** string | success | type of the rule. **Sample:** ingress |
| **user\_security\_group** string | success and user\_security\_group is defined | user security group of the rule. **Sample:** default |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.cs_project β Manages projects on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_project β Manages projects on Apache CloudStack based clouds.
======================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_project`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, suspend, activate and remove projects.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the project is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **display\_text** string | | Display text of the project. If not specified, *name* will be used as *display\_text*. |
| **domain** string | | Domain the project is related to. |
| **name** string / required | | Name of the project. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **state** string | **Choices:*** **present** β
* absent
* active
* suspended
| State of the project. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. If you want to delete all tags, set a empty list e.g. *tags: []*.
aliases: tag |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a project
ngine_io.cloudstack.cs_project:
name: web
tags:
- { key: admin, value: john }
- { key: foo, value: bar }
- name: Rename a project
ngine_io.cloudstack.cs_project:
name: web
display_text: my web project
- name: Suspend an existing project
ngine_io.cloudstack.cs_project:
name: web
state: suspended
- name: Activate an existing project
ngine_io.cloudstack.cs_project:
name: web
state: active
- name: Remove a project
ngine_io.cloudstack.cs_project:
name: web
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the project is related to. **Sample:** example account |
| **display\_text** string | success | Display text of the project. **Sample:** web project |
| **domain** string | success | Domain the project is related to. **Sample:** example domain |
| **id** string | success | UUID of the project. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **name** string | success | Name of the project. **Sample:** web project |
| **state** string | success | State of the project. **Sample:** Active |
| **tags** list / elements=string | success | List of resource tags associated with the project. **Sample:** [ { "key": "foo", "value": "bar" } ] |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_loadbalancer_rule_member β Manages load balancer rule members on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_loadbalancer\_rule\_member β Manages load balancer rule members on Apache CloudStack based clouds.
===========================================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_loadbalancer_rule_member`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add and remove load balancer rule members.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the rule is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the rule is related to. |
| **ip\_address** string | | Public IP address from where the network traffic will be load balanced from. Only needed to find the rule if *name* is not unique.
aliases: public\_ip |
| **name** string / required | | The name of the load balancer rule. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the firewall rule is related to. |
| **state** string | **Choices:*** **present** β
* absent
| Should the VMs be present or absent from the rule. |
| **vms** list / elements=string / required | | List of VMs to assign to or remove from the rule.
aliases: vm |
| **zone** string | | Name of the zone in which the rule should be located. Required when the LB provider is ElasticLoadBalancerVm |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Add VMs to an existing load balancer
ngine_io.cloudstack.cs_loadbalancer_rule_member:
name: balance_http
vms:
- web01
- web02
- name: Remove a VM from an existing load balancer
ngine_io.cloudstack.cs_loadbalancer_rule_member:
name: balance_http
vms:
- web01
- web02
state: absent
# Rolling upgrade of hosts
- hosts: webservers
serial: 1
pre_tasks:
- name: Remove from load balancer
ngine_io.cloudstack.cs_loadbalancer_rule_member:
name: balance_http
vm: "{{ ansible_hostname }}"
state: absent
tasks:
# Perform update
post_tasks:
- name: Add to load balancer
ngine_io.cloudstack.cs_loadbalancer_rule_member:
name: balance_http
vm: "{{ ansible_hostname }}"
state: present
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the rule is related to. **Sample:** example account |
| **algorithm** string | success | Load balancer algorithm used. **Sample:** source |
| **cidr** string | success | CIDR to forward traffic from. **Sample:** 0.0.0.0/0 |
| **description** string | success | Description of the rule. **Sample:** http load balancer rule |
| **domain** string | success | Domain the rule is related to. **Sample:** example domain |
| **id** string | success | UUID of the rule. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **name** string | success | Name of the rule. **Sample:** http-lb |
| **private\_port** integer | success | Private IP address. **Sample:** 80 |
| **project** string | success | Name of project the rule is related to. **Sample:** Production |
| **protocol** string | success | Protocol of the rule. **Sample:** tcp |
| **public\_ip** string | success | Public IP address. **Sample:** 1.2.3.4 |
| **public\_port** integer | success | Public port. **Sample:** 80 |
| **state** string | success | State of the rule. **Sample:** Add |
| **tags** list / elements=string | success | List of resource tags associated with the rule. **Sample:** [ { "key": "foo", "value": "bar" } ] |
| **vms** list / elements=string | success | Rule members. **Sample:** [ "web01", "web02" ] |
| **zone** string | success | Name of zone the rule is related to. **Sample:** ch-gva-2 |
### Authors
* Darren Worrall (@dazworrall)
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_sshkeypair β Manages SSH keys on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_sshkeypair β Manages SSH keys on Apache CloudStack based clouds.
=========================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_sshkeypair`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, register and remove SSH keys.
* If no key was found and no public key was provided and a new SSH private/public key pair will be created and the private key will be returned.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the public key is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the public key is related to. |
| **name** string / required | | Name of public key. |
| **project** string | | Name of the project the public key to be registered in. |
| **public\_key** string | | String of the public key. |
| **state** string | **Choices:*** **present** β
* absent
| State of the public key. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: create a new private / public key pair
ngine_io.cloudstack.cs_sshkeypair:
name: [email protected]
register: key
- debug:
msg: 'Private key is {{ key.private_key }}'
- name: remove a public key by its name
ngine_io.cloudstack.cs_sshkeypair:
name: [email protected]
state: absent
- name: register your existing local public key
ngine_io.cloudstack.cs_sshkeypair:
name: [email protected]
public_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **fingerprint** string | success | Fingerprint of the SSH public key. **Sample:** 86:5e:a3:e8:bd:95:7b:07:7c:c2:5c:f7:ad:8b:09:28 |
| **id** string | success | UUID of the SSH public key. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **name** string | success | Name of the SSH public key. **Sample:** [email protected] |
| **private\_key** string | changed | Private key of generated SSH keypair. **Sample:** -----BEGIN RSA PRIVATE KEY----- MII...8tO -----END RSA PRIVATE KEY----- |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_pod β Manages pods on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_pod β Manages pods on Apache CloudStack based clouds.
==============================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_pod`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, delete pods.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **end\_ip** string | | Ending IP address for the Pod. |
| **gateway** string | | Gateway for the Pod. Required on *state=present*
|
| **id** string | | uuid of the existing pod. |
| **name** string / required | | Name of the pod. |
| **netmask** string | | Netmask for the Pod. Required on *state=present*
|
| **start\_ip** string | | Starting IP address for the Pod. Required on *state=present*
|
| **state** string | **Choices:*** **present** β
* enabled
* disabled
* absent
| State of the pod. |
| **zone** string / required | | Name of the zone in which the pod belongs to. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Ensure a pod is present
ngine_io.cloudstack.cs_pod:
name: pod1
zone: ch-zrh-ix-01
start_ip: 10.100.10.101
gateway: 10.100.10.1
netmask: 255.255.255.0
- name: Ensure a pod is disabled
ngine_io.cloudstack.cs_pod:
name: pod1
zone: ch-zrh-ix-01
state: disabled
- name: Ensure a pod is enabled
ngine_io.cloudstack.cs_pod:
name: pod1
zone: ch-zrh-ix-01
state: enabled
- name: Ensure a pod is absent
ngine_io.cloudstack.cs_pod:
name: pod1
zone: ch-zrh-ix-01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **allocation\_state** string | success | State of the pod. **Sample:** Enabled |
| **end\_ip** string | success | Ending IP of the pod. **Sample:** 10.100.1.254 |
| **gateway** string | success | Gateway of the pod. **Sample:** 10.100.1.1 |
| **id** string | success | UUID of the pod. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **name** string | success | Name of the pod. **Sample:** pod01 |
| **netmask** string | success | Netmask of the pod. **Sample:** 255.255.255.0 |
| **start\_ip** string | success | Starting IP of the pod. **Sample:** 10.100.1.101 |
| **zone** string | success | Name of zone the pod is in. **Sample:** ch-gva-2 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_affinitygroup β Manages affinity groups on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_affinitygroup β Manages affinity groups on Apache CloudStack based clouds.
===================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_affinitygroup`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and remove affinity groups.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the affinity group is related to. |
| **affinity\_type** string | | Type of the affinity group. If not specified, first found affinity type is used. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **description** string | | Description of the affinity group. |
| **domain** string | | Domain the affinity group is related to. |
| **name** string / required | | Name of the affinity group. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the affinity group is related to. |
| **state** string | **Choices:*** **present** β
* absent
| State of the affinity group. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a affinity group
ngine_io.cloudstack.cs_affinitygroup:
name: haproxy
affinity_type: host anti-affinity
- name: Remove a affinity group
ngine_io.cloudstack.cs_affinitygroup:
name: haproxy
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the affinity group is related to. **Sample:** example account |
| **affinity\_type** string | success | Type of affinity group. **Sample:** host anti-affinity |
| **description** string | success | Description of affinity group. **Sample:** application affinity group |
| **domain** string | success | Domain the affinity group is related to. **Sample:** example domain |
| **id** string | success | UUID of the affinity group. **Sample:** 87b1e0ce-4e01-11e4-bb66-0050569e64b8 |
| **name** string | success | Name of affinity group. **Sample:** app |
| **project** string | success | Name of project the affinity group is related to. **Sample:** Production |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.cs_firewall β Manages firewall rules on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_firewall β Manages firewall rules on Apache CloudStack based clouds.
=============================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_firewall`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Creates and removes firewall rules.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the firewall rule is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cidrs** list / elements=string | **Default:**"0.0.0.0/0" | List of CIDRs (full notation) to be used for firewall rule. Since version 2.5, it is a list of CIDR.
aliases: cidr |
| **domain** string | | Domain the firewall rule is related to. |
| **end\_port** integer | | End port for this rule. Considered if *protocol=tcp* or *protocol=udp*. If not specified, equal *start\_port*. |
| **icmp\_code** integer | | Error code for this icmp message. Considered if *protocol=icmp*. |
| **icmp\_type** integer | | Type of the icmp message being sent. Considered if *protocol=icmp*. |
| **ip\_address** string | | Public IP address the ingress rule is assigned to. Required if *type=ingress*. |
| **network** string | | Network the egress rule is related to. Required if *type=egress*. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the firewall rule is related to. |
| **protocol** string | **Choices:*** **tcp** β
* udp
* icmp
* all
| Protocol of the firewall rule.
`all` is only available if *type=egress*. |
| **start\_port** integer | | Start port for this rule. Considered if *protocol=tcp* or *protocol=udp*.
aliases: port |
| **state** string | **Choices:*** **present** β
* absent
| State of the firewall rule. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. To delete all tags, set an empty list e.g. *tags: []*.
aliases: tag |
| **type** string | **Choices:*** **ingress** β
* egress
| Type of the firewall rule. |
| **zone** string / required | | Name of the zone in which the virtual machine is in. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Allow inbound port 80/tcp from 1.2.3.4 to 4.3.2.1
ngine_io.cloudstack.cs_firewall:
ip_address: 4.3.2.1
zone: zone01
port: 80
cidr: 1.2.3.4/32
- name: Allow inbound tcp/udp port 53 to 4.3.2.1
ngine_io.cloudstack.cs_firewall:
ip_address: 4.3.2.1
zone: zone01
port: 53
protocol: '{{ item }}'
with_items:
- tcp
- udp
- name: Ensure firewall rule is removed
ngine_io.cloudstack.cs_firewall:
ip_address: 4.3.2.1
zone: zone01
start_port: 8000
end_port: 8888
cidr: 17.0.0.0/8
state: absent
- name: Allow all outbound traffic
ngine_io.cloudstack.cs_firewall:
network: my_network
zone: zone01
type: egress
protocol: all
- name: Allow only HTTP outbound traffic for an IP
ngine_io.cloudstack.cs_firewall:
network: my_network
zone: zone01
type: egress
port: 80
cidr: 10.101.1.20
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cidr** string | success | CIDR string of the rule. **Sample:** 0.0.0.0/0 |
| **cidrs** list / elements=string | success | CIDR list of the rule. **Sample:** ['0.0.0.0/0'] |
| **end\_port** integer | success | End port of the rule. **Sample:** 80 |
| **icmp\_code** integer | success | ICMP code of the rule. **Sample:** 1 |
| **icmp\_type** integer | success | ICMP type of the rule. **Sample:** 1 |
| **id** string | success | UUID of the rule. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **ip\_address** string | success | IP address of the rule if `type=ingress`
**Sample:** 10.100.212.10 |
| **network** string | success | Name of the network if `type=egress`
**Sample:** my\_network |
| **protocol** string | success | Protocol of the rule. **Sample:** tcp |
| **start\_port** integer | success | Start port of the rule. **Sample:** 80 |
| **type** string | success | Type of the rule. **Sample:** ingress |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_role_permission β Manages role permissions on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_role\_permission β Manages role permissions on Apache CloudStack based clouds.
=======================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_role_permission`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove CloudStack role permissions.
* Managing role permissions only supported in CloudStack >= 4.9.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **description** string | | The description of the role permission. |
| **name** string / required | | The API name of the permission. |
| **parent** string | | The parent role permission uuid. use 0 to move this rule at the top of the list. |
| **permission** string | **Choices:*** allow
* **deny** β
| The rule permission, allow or deny. Defaulted to deny. |
| **role** string / required | | Name or ID of the role. |
| **state** string | **Choices:*** **present** β
* absent
| State of the role permission. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a role permission
ngine_io.cloudstack.cs_role_permission:
role: My_Custom_role
name: createVPC
permission: allow
description: My comments
- name: Remove a role permission
ngine_io.cloudstack.cs_role_permission:
state: absent
role: My_Custom_role
name: createVPC
- name: Update a system role permission
ngine_io.cloudstack.cs_role_permission:
role: Domain Admin
name: createVPC
permission: deny
- name: Update rules order. Move the rule at the top of list
ngine_io.cloudstack.cs_role_permission:
role: Domain Admin
name: createVPC
parent: 0
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **description** string | success | The description of the role permission **Sample:** Deny createVPC for users |
| **id** string | success | The ID of the role permission. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **name** string | success | The API name of the permission. **Sample:** createVPC |
| **permission** string | success | The permission type of the api name. **Sample:** allow |
| **role\_id** string | success | The ID of the role to which the role permission belongs. **Sample:** c6f7a5fc-43f8-11e5-a151-feff819cdc7f |
### Authors
* David Passante (@dpassante)
ansible ngine_io.cloudstack.cs_user β Manages users on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_user β Manages users on Apache CloudStack based clouds.
================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_user`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, disable, lock, enable and remove users.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the user will be created under. Required on *state=present*. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | **Default:**"ROOT" | Domain the user is related to. |
| **email** string | | Email of the user. Required on *state=present*. |
| **first\_name** string | | First name of the user. Required on *state=present*. |
| **keys\_registered** boolean | **Choices:*** **no** β
* yes
| If API keys of the user should be generated. Note: Keys can not be removed by the API again. |
| **last\_name** string | | Last name of the user. Required on *state=present*. |
| **password** string | | Password of the user to be created. Required on *state=present*. Only considered on creation and will not be updated if user exists. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **state** string | **Choices:*** **present** β
* absent
* enabled
* disabled
* locked
* unlocked
| State of the user.
`unlocked` is an alias for `enabled`. |
| **timezone** string | | Timezone of the user. |
| **username** string / required | | Username of the user. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create an user in domain 'CUSTOMERS'
ngine_io.cloudstack.cs_user:
account: developers
username: johndoe
password: S3Cur3
last_name: Doe
first_name: John
email: [email protected]
domain: CUSTOMERS
- name: Lock an existing user in domain 'CUSTOMERS'
ngine_io.cloudstack.cs_user:
username: johndoe
domain: CUSTOMERS
state: locked
- name: Disable an existing user in domain 'CUSTOMERS'
ngine_io.cloudstack.cs_user:
username: johndoe
domain: CUSTOMERS
state: disabled
- name: Enable/unlock an existing user in domain 'CUSTOMERS'
ngine_io.cloudstack.cs_user:
username: johndoe
domain: CUSTOMERS
state: enabled
- name: Remove an user in domain 'CUSTOMERS'
ngine_io.cloudstack.cs_user:
name: customer_xy
domain: CUSTOMERS
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account name of the user. **Sample:** developers |
| **account\_type** string | success | Type of the account. **Sample:** user |
| **created** string | success | Date the user was created. **Sample:** Doe |
| **domain** string | success | Domain the user is related. **Sample:** ROOT |
| **email** string | success | Emailof the user. **Sample:** [email protected] |
| **fist\_name** string | success | First name of the user. **Sample:** John |
| **id** string | success | UUID of the user. **Sample:** 87b1e0ce-4e01-11e4-bb66-0050569e64b8 |
| **last\_name** string | success | Last name of the user. **Sample:** Doe |
| **state** string | success | State of the user. **Sample:** enabled |
| **timezone** string | success | Timezone of the user. **Sample:** enabled |
| **user\_api\_key** string | success | API key of the user. **Sample:** JLhcg8VWi8DoFqL2sSLZMXmGojcLnFrOBTipvBHJjySODcV4mCOo29W2duzPv5cALaZnXj5QxDx3xQfaQt3DKg |
| **user\_api\_secret** string | success | API secret of the user. **Sample:** FUELo3LB9fa1UopjTLPdqLv\_6OXQMJZv9g9N4B\_Ao3HFz8d6IGFCV9MbPFNM8mwz00wbMevja1DoUNDvI8C9-g |
| **username** string | success | Username of the user. **Sample:** johndoe |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_network_acl_rule β Manages network access control list (ACL) rules on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_network\_acl\_rule β Manages network access control list (ACL) rules on Apache CloudStack based clouds.
================================================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_network_acl_rule`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add, update and remove network ACL rules.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the VPC is related to. |
| **action\_policy** string | **Choices:*** **allow** β
* deny
| Action policy of the rule.
aliases: action |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cidrs** list / elements=string | **Default:**["0.0.0.0/0"] | CIDRs of the rule.
aliases: cidr |
| **domain** string | | Domain the VPC is related to. |
| **end\_port** integer | | End port for this rule. Considered if *protocol=tcp* or *protocol=udp*. If not specified, equal *start\_port*. |
| **icmp\_code** integer | | Error code for this icmp message. Considered if *protocol=icmp*. |
| **icmp\_type** integer | | Type of the icmp message being sent. Considered if *protocol=icmp*. |
| **network\_acl** string / required | | Name of the network ACL.
aliases: acl |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the VPC is related to. |
| **protocol** string | **Choices:*** **tcp** β
* udp
* icmp
* all
* by\_number
| Protocol of the rule |
| **protocol\_number** integer | | Protocol number from 1 to 256 required if *protocol=by\_number*. |
| **rule\_position** integer / required | | The position of the network ACL rule.
aliases: number |
| **start\_port** integer | | Start port for this rule. Considered if *protocol=tcp* or *protocol=udp*.
aliases: port |
| **state** string | **Choices:*** **present** β
* absent
| State of the network ACL rule. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. If you want to delete all tags, set a empty list e.g. *tags: []*.
aliases: tag |
| **traffic\_type** string | **Choices:*** **ingress** β
* egress
| Traffic type of the rule.
aliases: type |
| **vpc** string / required | | VPC the network ACL is related to. |
| **zone** string / required | | Name of the zone the VPC related to. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: create a network ACL rule, allow port 80 ingress
ngine_io.cloudstack.cs_network_acl_rule:
network_acl: web
rule_position: 1
vpc: my vpc
zone: zone01
traffic_type: ingress
action_policy: allow
port: 80
cidr: 0.0.0.0/0
- name: create a network ACL rule, deny port range 8000-9000 ingress for 10.20.0.0/16 and 10.22.0.0/16
ngine_io.cloudstack.cs_network_acl_rule:
network_acl: web
rule_position: 1
vpc: my vpc
zone: zone01
traffic_type: ingress
action_policy: deny
start_port: 8000
end_port: 9000
cidrs:
- 10.20.0.0/16
- 10.22.0.0/16
- name: remove a network ACL rule
ngine_io.cloudstack.cs_network_acl_rule:
network_acl: web
rule_position: 1
vpc: my vpc
zone: zone01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the network ACL rule is related to. **Sample:** example account |
| **action\_policy** string | success | Action policy of the network ACL rule. **Sample:** deny |
| **cidr** string | success | CIDR of the network ACL rule. **Sample:** 0.0.0.0/0 |
| **cidrs** list / elements=string | success | CIDRs of the network ACL rule. **Sample:** ['0.0.0.0/0'] |
| **domain** string | success | Domain the network ACL rule is related to. **Sample:** example domain |
| **end\_port** integer | success | End port of the network ACL rule. **Sample:** 80 |
| **icmp\_code** integer | success | ICMP code of the network ACL rule. **Sample:** 8 |
| **icmp\_type** integer | success | ICMP type of the network ACL rule. |
| **network\_acl** string | success | Name of the network ACL. **Sample:** customer acl |
| **project** string | success | Name of project the network ACL rule is related to. **Sample:** Production |
| **protocol** string | success | Protocol of the network ACL rule. **Sample:** tcp |
| **protocol\_number** integer | success | Protocol number in case protocol is by number. **Sample:** 8 |
| **rule\_position** integer | success | Position of the network ACL rule. **Sample:** 1 |
| **start\_port** integer | success | Start port of the network ACL rule. **Sample:** 80 |
| **state** string | success | State of the network ACL rule. **Sample:** Active |
| **tags** list / elements=string | success | List of resource tags associated with the network ACL rule. **Sample:** [ { "key": "foo", "value": "bar" } ] |
| **traffic\_type** string | success | Traffic type of the network ACL rule. **Sample:** ingress |
| **vpc** string | success | VPC of the network ACL. **Sample:** customer vpc |
| **zone** string | success | Zone the VPC is related to. **Sample:** ch-gva-2 |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.cs_image_store β Manages CloudStack Image Stores. ngine\_io.cloudstack.cs\_image\_store β Manages CloudStack Image Stores.
========================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_image_store`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Deploy, remove, recreate CloudStack Image Stores.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **force\_recreate** boolean | **Choices:*** **no** β
* yes
| Set to `yes` if you're changing an existing Image Store. This will force the recreation of the Image Store. Recreation might fail if there are snapshots present on the Image Store. Delete them before running the recreation. |
| **name** string / required | | The ID of the Image Store. Required when deleting a Image Store. |
| **provider** string | | The image store provider name. Required when creating a new Image Store |
| **state** string | **Choices:*** **present** β
* absent
| Stage of the Image Store |
| **url** string | | The URL for the Image Store. Required when *state=present*. |
| **zone** string / required | | The Zone name for the Image Store. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Add a Image Store (NFS)
ngine_io.cloudstack.cs_image_store:
zone: zone-01
name: nfs-01
provider: NFS
url: nfs://192.168.21.16/exports/secondary
# Change the NFS share URL and force a Image Store recreation
- name: Change the NFS url
ngine_io.cloudstack.cs_image_store:
zone: zone-01
name: nfs-01
provider: NFS
force_recreate: yes
url: nfs://192.168.21.10/shares/secondary
- name: delete the image store
ngine_io.cloudstack.cs_image_store:
name: nfs-01
zone: zone-01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** string | success | the ID of the image store **Sample:** feb11a84-a093-45eb-b84d-7f680313c40b |
| **name** string | success | the name of the image store **Sample:** nfs-01 |
| **protocol** string | success | the protocol of the image store **Sample:** nfs |
| **provider\_name** string | success | the provider name of the image store **Sample:** NFS |
| **scope** string | success | the scope of the image store **Sample:** ZONE |
| **url** string | success | the url of the image store **Sample:** nfs://192.168.21.16/exports/secondary |
| **zone** string | success | the Zone name of the image store **Sample:** zone-01 |
### Authors
* Patryk Cichy (@PatTheSilent)
ansible ngine_io.cloudstack.cs_network_acl β Manages network access control lists (ACL) on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_network\_acl β Manages network access control lists (ACL) on Apache CloudStack based clouds.
=====================================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_network_acl`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and remove network ACLs.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the network ACL rule is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **description** string | | Description of the network ACL. If not set, identical to *name*. |
| **domain** string | | Domain the network ACL rule is related to. |
| **name** string / required | | Name of the network ACL. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the network ACL is related to. |
| **state** string | **Choices:*** **present** β
* absent
| State of the network ACL. |
| **vpc** string / required | | VPC the network ACL is related to. |
| **zone** string / required | | Name of the zone the VPC is related to. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: create a network ACL
ngine_io.cloudstack.cs_network_acl:
name: Webserver ACL
description: a more detailed description of the ACL
vpc: customers
zone: zone01
- name: remove a network ACL
ngine_io.cloudstack.cs_network_acl:
name: Webserver ACL
vpc: customers
zone: zone01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **description** string | success | Description of the network ACL. **Sample:** Example description of a network ACL |
| **name** string | success | Name of the network ACL. **Sample:** customer acl |
| **vpc** string | success | VPC of the network ACL. **Sample:** customer vpc |
| **zone** string | success | Zone the VPC is related to. **Sample:** ch-gva-2 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_resourcelimit β Manages resource limits on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_resourcelimit β Manages resource limits on Apache CloudStack based clouds.
===================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_resourcelimit`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage limits of resources for domains, accounts and projects.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the resource is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the resource is related to. |
| **limit** integer | **Default:**-1 | Maximum number of the resource. Default is unlimited `-1`.
aliases: max |
| **project** string | | Name of the project the resource is related to. |
| **resource\_type** string / required | **Choices:*** instance
* ip\_address
* volume
* snapshot
* template
* network
* vpc
* cpu
* memory
* primary\_storage
* secondary\_storage
| Type of the resource.
aliases: type |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Update a resource limit for instances of a domain
ngine_io.cloudstack.cs_resourcelimit:
type: instance
limit: 10
domain: customers
- name: Update a resource limit for instances of an account
ngine_io.cloudstack.cs_resourcelimit:
type: instance
limit: 12
account: moserre
domain: customers
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the resource is related to. **Sample:** example account |
| **domain** string | success | Domain the resource is related to. **Sample:** example domain |
| **limit** integer | success | Maximum number of the resource. **Sample:** -1 |
| **project** string | success | Project the resource is related to. **Sample:** example project |
| **recource\_type** string | success | Type of the resource **Sample:** instance |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_ip_address β Manages public IP address associations on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_ip\_address β Manages public IP address associations on Apache CloudStack based clouds.
================================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_ip_address`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Acquires and associates a public IP to an account or project.
* Due to API limitations this is not an idempotent call, so be sure to only conditionally call this when *state=present*.
* Tagging the IP address can also make the call idempotent.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the IP address is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the IP address is related to. |
| **ip\_address** string | | Public IP address. Required if *state=absent* and *tags* is not set. |
| **network** string | | Network the IP address is related to. Mutually exclusive with *vpc*. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the IP address is related to. |
| **state** string | **Choices:*** **present** β
* absent
| State of the IP address. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. Tags can be used as an unique identifier for the IP Addresses. In this case, at least one of them must be unique to ensure idempotency.
aliases: tag |
| **vpc** string | | VPC the IP address is related to. Mutually exclusive with *network*. |
| **zone** string / required | | Name of the zone in which the IP address is in. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Associate an IP address conditionally
ngine_io.cloudstack.cs_ip_address:
network: My Network
zone: zone01
register: ip_address
when: instance.public_ip is undefined
- name: Disassociate an IP address
ngine_io.cloudstack.cs_ip_address:
ip_address: 1.2.3.4
zone: zone01
state: absent
- name: Associate an IP address with tags
ngine_io.cloudstack.cs_ip_address:
network: My Network
zone: zone01
tags:
- key: myCustomID
value: 5510c31a-416e-11e8-9013-02000a6b00bf
register: ip_address
- name: Disassociate an IP address with tags
ngine_io.cloudstack.cs_ip_address:
state: absent
zone: zone01
tags:
- key: myCustomID
value: 5510c31a-416e-11e8-9013-02000a6b00bf
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the IP address is related to. **Sample:** example account |
| **domain** string | success | Domain the IP address is related to. **Sample:** example domain |
| **id** string | success | UUID of the Public IP address. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **ip\_address** string | success | Public IP address. **Sample:** 1.2.3.4 |
| **project** string | success | Name of project the IP address is related to. **Sample:** Production |
| **tags** dictionary | success | List of resource tags associated with the IP address. **Sample:** [ { "key": "myCustomID", "value": "5510c31a-416e-11e8-9013-02000a6b00bf" } ] |
| **zone** string | success | Name of zone the IP address is related to. **Sample:** ch-gva-2 |
### Authors
* Darren Worrall (@dazworrall)
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_region β Manages regions on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_region β Manages regions on Apache CloudStack based clouds.
====================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_region`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add, update and remove regions.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **endpoint** string | | Endpoint URL of the region. Required if *state=present*
|
| **id** integer / required | | ID of the region. Must be an number (int). |
| **name** string | | Name of the region. Required if *state=present*
|
| **state** string | **Choices:*** **present** β
* absent
| State of the region. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: create a region
ngine_io.cloudstack.cs_region:
id: 2
name: geneva
endpoint: https://cloud.gva.example.com
- name: remove a region with ID 2
ngine_io.cloudstack.cs_region:
id: 2
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **endpoint** string | success | Endpoint of the region. **Sample:** http://cloud.example.com |
| **gslb\_service\_enabled** boolean | success | Whether the GSLB service is enabled or not. **Sample:** True |
| **id** integer | success | ID of the region. **Sample:** 1 |
| **name** string | success | Name of the region. **Sample:** local |
| **portable\_ip\_service\_enabled** boolean | success | Whether the portable IP service is enabled or not. **Sample:** True |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.cs_configuration β Manages configuration on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_configuration β Manages configuration on Apache CloudStack based clouds.
=================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_configuration`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manages global, zone, account, storage and cluster configurations.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Ensure the value for corresponding account. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cluster** string | | Ensure the value for corresponding cluster. |
| **domain** string | **Default:**"ROOT" | Domain the account is related to. Only considered if *account* is used. |
| **name** string / required | | Name of the configuration. |
| **storage** string | | Ensure the value for corresponding storage pool. |
| **value** string / required | | Value of the configuration. |
| **zone** string | | Ensure the value for corresponding zone. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Ensure global configuration
ngine_io.cloudstack.cs_configuration:
name: router.reboot.when.outofband.migrated
value: false
- name: Ensure zone configuration
ngine_io.cloudstack.cs_configuration:
name: router.reboot.when.outofband.migrated
zone: ch-gva-01
value: true
- name: Ensure storage configuration
ngine_io.cloudstack.cs_configuration:
name: storage.overprovisioning.factor
storage: storage01
value: 2.0
- name: Ensure account configuration
ngine_io.cloudstack.cs_configuration:
name: allow.public.user.templates
value: false
account: acme inc
domain: customers
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account of the configuration. **Sample:** admin |
| **category** string | success | Category of the configuration. **Sample:** Advanced |
| **cluster** string | success | Cluster of the configuration. **Sample:** cluster01 |
| **description** string | success | Description of the configuration. **Sample:** Setup the host to do multipath |
| **Domain** string | success | Domain of account of the configuration. **Sample:** ROOT |
| **name** string | success | Name of the configuration. **Sample:** zone.vlan.capacity.notificationthreshold |
| **scope** string | success | Scope (zone/cluster/storagepool/account) of the parameter that needs to be updated. **Sample:** storagepool |
| **storage** string | success | Storage of the configuration. **Sample:** storage01 |
| **value** string | success | Value of the configuration. **Sample:** 0.75 |
| **zone** string | success | Zone of the configuration. **Sample:** ch-gva-01 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_vpc β Manages VPCs on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_vpc β Manages VPCs on Apache CloudStack based clouds.
==============================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_vpc`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and delete VPCs.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the VPC is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cidr** string | | CIDR of the VPC, e.g. 10.1.0.0/16 All VPC guest networks' CIDRs must be within this CIDR. Required on *state=present*. |
| **clean\_up** boolean | **Choices:*** no
* yes
| Whether to redeploy a VPC router or not when *state=restarted*
|
| **display\_text** string | | Display text of the VPC. If not set, *name* will be used for creating. |
| **domain** string | | Domain the VPC is related to. |
| **name** string / required | | Name of the VPC. |
| **network\_domain** string | | Network domain for the VPC. All networks inside the VPC will belong to this domain. Only considered while creating the VPC, can not be changed. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the VPC is related to. |
| **state** string | **Choices:*** **present** β
* absent
* stopped
* restarted
| State of the VPC. The state `present` creates a started VPC. The state `stopped` is only considered while creating the VPC, added in version 2.6. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. For deleting all tags, set an empty list e.g. *tags: []*.
aliases: tag |
| **vpc\_offering** string | | Name of the VPC offering. If not set, default VPC offering is used. |
| **zone** string / required | | Name of the zone. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Ensure a VPC is present but not started after creating
ngine_io.cloudstack.cs_vpc:
name: my_vpc
zone: zone01
display_text: My example VPC
cidr: 10.10.0.0/16
state: stopped
- name: Ensure a VPC is present and started after creating
ngine_io.cloudstack.cs_vpc:
name: my_vpc
zone: zone01
display_text: My example VPC
cidr: 10.10.0.0/16
- name: Ensure a VPC is absent
ngine_io.cloudstack.cs_vpc:
name: my_vpc
zone: zone01
state: absent
- name: Ensure a VPC is restarted with clean up
ngine_io.cloudstack.cs_vpc:
name: my_vpc
zone: zone01
clean_up: yes
state: restarted
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the VPC is related to. **Sample:** example account |
| **cidr** string | success | CIDR of the VPC. **Sample:** 10.10.0.0/16 |
| **display\_text** string | success | Display text of the VPC. **Sample:** My example VPC |
| **distributed\_vpc\_router** boolean | success | Whether the VPC uses distributed router or not. **Sample:** True |
| **domain** string | success | Domain the VPC is related to. **Sample:** example domain |
| **id** string | success | UUID of the VPC. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **name** string | success | Name of the VPC. **Sample:** my\_vpc |
| **network\_domain** string | success | Network domain of the VPC. **Sample:** example.com |
| **project** string | success | Name of project the VPC is related to. **Sample:** Production |
| **redundant\_vpc\_router** boolean | success | Whether the VPC has redundant routers or not. **Sample:** True |
| **region\_level\_vpc** boolean | success | Whether the VPC is region level or not. **Sample:** True |
| **restart\_required** boolean | success | Whether the VPC router needs a restart or not. **Sample:** True |
| **state** string | success | State of the VPC. **Sample:** Enabled |
| **tags** list / elements=string | success | List of resource tags associated with the VPC. **Sample:** [ { "key": "foo", "value": "bar" } ] |
| **zone** string | success | Name of zone the VPC is in. **Sample:** ch-gva-2 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_account β Manages accounts on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_account β Manages accounts on Apache CloudStack based clouds.
======================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_account`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, disable, lock, enable and remove accounts.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account\_type** string | **Choices:*** **user** β
* root\_admin
* domain\_admin
| Type of the account. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | **Default:**"ROOT" | Domain the account is related to. |
| **email** string | | Email of the user to be created if account did not exist. Required on *state=present* if *ldap\_domain* is not set. |
| **first\_name** string | | First name of the user to be created if account did not exist. Required on *state=present* if *ldap\_domain* is not set. |
| **last\_name** string | | Last name of the user to be created if account did not exist. Required on *state=present* if *ldap\_domain* is not set. |
| **ldap\_domain** string | | Name of the LDAP group or OU to bind. If set, account will be linked to LDAP. |
| **ldap\_type** string | **Choices:*** **GROUP** β
* OU
| Type of the ldap name. GROUP or OU, defaults to GROUP. |
| **name** string / required | | Name of account. |
| **network\_domain** string | | Network domain of the account. |
| **password** string | | Password of the user to be created if account did not exist. Required on *state=present* if *ldap\_domain* is not set. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **role** string | | Creates the account under the specified role name or id. |
| **state** string | **Choices:*** **present** β
* absent
* enabled
* disabled
* locked
* unlocked
| State of the account.
`unlocked` is an alias for `enabled`. |
| **timezone** string | | Timezone of the user to be created if account did not exist. |
| **username** string | | Username of the user to be created if account did not exist. Required on *state=present*. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: create an account in domain 'CUSTOMERS'
ngine_io.cloudstack.cs_account:
name: customer_xy
username: customer_xy
password: S3Cur3
last_name: Doe
first_name: John
email: [email protected]
domain: CUSTOMERS
role: Domain Admin
- name: Lock an existing account in domain 'CUSTOMERS'
ngine_io.cloudstack.cs_account:
name: customer_xy
domain: CUSTOMERS
state: locked
- name: Disable an existing account in domain 'CUSTOMERS'
ngine_io.cloudstack.cs_account:
name: customer_xy
domain: CUSTOMERS
state: disabled
- name: Enable an existing account in domain 'CUSTOMERS'
ngine_io.cloudstack.cs_account:
name: customer_xy
domain: CUSTOMERS
state: enabled
- name: Remove an account in domain 'CUSTOMERS'
ngine_io.cloudstack.cs_account:
name: customer_xy
domain: CUSTOMERS
state: absent
- name: Create a single user LDAP account in domain 'CUSTOMERS'
ngine_io.cloudstack.cs_account:
name: customer_xy
username: customer_xy
domain: CUSTOMERS
ldap_domain: cn=customer_xy,cn=team_xy,ou=People,dc=domain,dc=local
- name: Create a LDAP account in domain 'CUSTOMERS' and bind it to a LDAP group
ngine_io.cloudstack.cs_account:
name: team_xy
username: customer_xy
domain: CUSTOMERS
ldap_domain: cn=team_xy,ou=People,dc=domain,dc=local
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account\_type** string | success | Type of the account. **Sample:** user |
| **domain** string | success | Domain the account is related. **Sample:** ROOT |
| **id** string | success | UUID of the account. **Sample:** 87b1e0ce-4e01-11e4-bb66-0050569e64b8 |
| **name** string | success | Name of the account. **Sample:** [email protected] |
| **network\_domain** string | success | Network domain of the account. **Sample:** example.local |
| **role** string | success | The role name of the account **Sample:** Domain Admin |
| **state** string | success | State of the account. **Sample:** enabled |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_network_offering β Manages network offerings on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_network\_offering β Manages network offerings on Apache CloudStack based clouds.
=========================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_network_offering`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, enable, disable and remove network offerings.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **availability** string | | The availability of network offering. Default value is Optional |
| **conserve\_mode** boolean | **Choices:*** no
* yes
| Whether the network offering has IP conserve mode enabled. |
| **details** list / elements=dictionary | | Network offering details in key/value pairs. with service provider as a value |
| **display\_text** string | | Display text of the network offerings. |
| **domains** list / elements=string added in 2.2.0 of ngine\_io.cloudstack | | List of domains the network offering is related to. Use `public` for public offerings.
aliases: domain |
| **egress\_default\_policy** string | **Choices:*** allow
* deny
| Whether the default egress policy is allow or to deny. |
| **for\_vpc** boolean | **Choices:*** no
* yes
| Whether the offering is meant to be used for VPC or not. |
| **guest\_ip\_type** string | **Choices:*** Shared
* Isolated
| Guest type of the network offering. |
| **keepalive\_enabled** boolean | **Choices:*** no
* yes
| If true keepalive will be turned on in the loadbalancer. At the time of writing this has only an effect on haproxy. the mode http and httpclose options are unset in the haproxy conf file. |
| **max\_connections** integer | | Maximum number of concurrent connections supported by the network offering. |
| **name** string / required | | The name of the network offering. |
| **network\_rate** integer | | Data transfer rate in megabits per second allowed. |
| **persistent** boolean | **Choices:*** no
* yes
| True if network offering supports persistent networks defaulted to false if not specified |
| **service\_capabilities** list / elements=string | | Desired service capabilities as part of network offering.
aliases: service\_capability |
| **service\_offering** string | | The service offering name or ID used by virtual router provider. |
| **service\_providers** list / elements=dictionary | | Provider to service mapping. If not specified, the provider for the service will be mapped to the default provider on the physical network.
aliases: service\_provider |
| **specify\_ip\_ranges** boolean | **Choices:*** no
* yes
| Whether the network offering supports specifying IP ranges. Defaulted to `no` by the API if not specified. |
| **specify\_vlan** boolean | **Choices:*** no
* yes
| Whether the network offering supports vlans or not. |
| **state** string | **Choices:*** enabled
* **present** β
* disabled
* absent
| State of the network offering. |
| **supported\_services** list / elements=string | **Choices:*** Dns
* PortForwarding
* Dhcp
* SourceNat
* UserData
* Firewall
* StaticNat
* Vpn
* Lb
| Services supported by the network offering. A list of one or more items from the choice list.
aliases: supported\_service |
| **tags** list / elements=string added in 2.2.0 of ngine\_io.cloudstack | | List of tags. Tags are a list of strings. To delete all tags, set an empty list e.g. *tags: []*.
aliases: tag |
| **traffic\_type** string | **Default:**"Guest" | The traffic type for the network offering. |
| **zones** list / elements=string added in 2.2.0 of ngine\_io.cloudstack | | List of zones the network offering is related to. Use `all` for all zones offering.
aliases: zone |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a network offering and enable it
ngine_io.cloudstack.cs_network_offering:
name: my_network_offering
display_text: network offering description
state: enabled
guest_ip_type: Isolated
supported_services: [ Dns, PortForwarding, Dhcp, SourceNat, UserData, Firewall, StaticNat, Vpn, Lb ]
service_providers:
- { service: 'dns', provider: 'virtualrouter' }
- { service: 'dhcp', provider: 'virtualrouter' }
- name: Remove a network offering
ngine_io.cloudstack.cs_network_offering:
name: my_network_offering
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **availability** string | success | The availability of network offering. **Sample:** Optional |
| **display\_text** string | success | The display text of the network offering. **Sample:** My network offering |
| **domains** list / elements=string added in 2.2.0 of ngine\_io.cloudstack | success | List of domains associated with the network offering. **Sample:** ['public'] |
| **egress\_default\_policy** string | success | Default egress policy. **Sample:** allow |
| **for\_vpc** boolean | success | Whether the offering is meant to be used for VPC or not. |
| **guest\_ip\_type** string | success | Guest type of the network offering. **Sample:** Isolated |
| **id** string | success | UUID of the network offering. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **is\_default** boolean | success | Whether network offering is the default offering or not. |
| **is\_persistent** boolean | success | Whether persistent networks are supported or not. |
| **max\_connections** integer | success | The maximum number of concurrent connections to be handled by LB. **Sample:** 300 |
| **name** string | success | The name of the network offering. **Sample:** MyCustomNetworkOffering |
| **network\_rate** integer | success | The network traffic transfer ate in Mbit/s. **Sample:** 200 |
| **service\_offering\_id** string | success | The service offering ID. **Sample:** c5f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **state** string | success | The state of the network offering. **Sample:** Enabled |
| **tags** list / elements=string added in 2.2.0 of ngine\_io.cloudstack | success | List of tags associated with the network offering. **Sample:** ['tag1', 'tag2'] |
| **traffic\_type** string | success | The traffic type. **Sample:** Guest |
| **zones** list / elements=string added in 2.2.0 of ngine\_io.cloudstack | success | List of zones associated with the network offering. **Sample:** ['all'] |
### Authors
* David Passante (@dpassante)
| programming_docs |
ansible ngine_io.cloudstack.cs_template β Manages templates on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_template β Manages templates on Apache CloudStack based clouds.
========================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_template`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Register templates from an URL.
* Create templates from a ROOT volume of a stopped VM or its snapshot.
* Update, extract and delete templates.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the template, snapshot or VM is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **bits** integer | **Choices:*** 32
* 64
**Default:**64 | 32 or 64 bits support. |
| **checksum** string | | The MD5 checksum value of this template. If set, we search by checksum instead of name. |
| **cross\_zones** boolean | **Choices:*** **no** β
* yes
| Whether the template should be synced or removed across zones. Only used if *state* is `present` or `absent`. |
| **details** string | | Template details in key/value pairs. |
| **display\_text** string | | Display text of the template. |
| **domain** string | | Domain the template, snapshot or VM is related to. |
| **format** string | **Choices:*** QCOW2
* RAW
* VHD
* OVA
| The format for the template. Only considered if *state=present*. |
| **hypervisor** string | | Name the hypervisor to be used for creating the new template. Relevant when using *state=present*. Possible values are `KVM`, `VMware`, `BareMetal`, `XenServer`, `LXC`, `HyperV`, `UCS`, `OVM`, `Simulator`. |
| **is\_dynamically\_scalable** boolean | **Choices:*** no
* yes
| Register the template having XS/VMware tools installed in order to support dynamic scaling of VM CPU/memory. Only used if *state* is `present`. |
| **is\_extractable** boolean | **Choices:*** no
* yes
| Allows the template or its derivatives to be extractable. |
| **is\_featured** boolean | **Choices:*** no
* yes
| Register the template to be featured. Only used if *state* is `present`. |
| **is\_public** boolean | **Choices:*** no
* yes
| Register the template to be publicly available to all users. Only used if *state* is `present`. |
| **is\_routing** boolean | **Choices:*** no
* yes
| Sets the template type to routing, i.e. if template is used to deploy routers. Only considered if *url* is used. |
| **mode** string | **Choices:*** **http\_download** β
* ftp\_upload
| Mode for the template extraction. Only used if *state=extracted*. |
| **name** string / required | | Name of the template. |
| **os\_type** string | | OS type that best represents the OS of this template. |
| **password\_enabled** boolean | **Choices:*** no
* yes
| Enable template password reset support. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the template to be registered in. |
| **requires\_hvm** boolean | **Choices:*** no
* yes
| Whether the template requires HVM or not. Only considered while creating the template. |
| **snapshot** string | | Name of the snapshot, created from the VM ROOT volume, the template will be created from.
*vm* is required together with this argument. |
| **sshkey\_enabled** boolean | **Choices:*** no
* yes
| True if the template supports the sshkey upload feature. Only considered if *url* is used (API limitation). |
| **state** string | **Choices:*** **present** β
* absent
* extracted
| State of the template. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. To delete all tags, set a empty list e.g. *tags: []*.
aliases: tag |
| **template\_filter** string | **Choices:*** all
* featured
* **self** β
* selfexecutable
* sharedexecutable
* executable
* community
| Name of the filter used to search for the template. The filter `all` was added in 2.7. |
| **template\_find\_options** list / elements=string | **Choices:*** display\_text
* checksum
* cross\_zones
**Default:**[] | Options to find a template uniquely. More than one allowed.
aliases: template\_find\_option |
| **template\_tag** string | | The tag for this template. |
| **url** string | | URL of where the template is hosted on *state=present*. URL to which the template would be extracted on *state=extracted*. Mutually exclusive with *vm*. |
| **vm** string | | VM name the template will be created from its volume or alternatively from a snapshot. VM must be in stopped state if created from its volume. Mutually exclusive with *url*. |
| **zone** string | | Name of the zone you wish the template to be registered or deleted from. Required when *cross\_zones* is `no`
|
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: register a systemvm template
ngine_io.cloudstack.cs_template:
name: systemvm-vmware-4.5
url: "http://packages.shapeblue.com/systemvmtemplate/4.5/systemvm64template-4.5-vmware.ova"
hypervisor: VMware
format: OVA
cross_zones: yes
os_type: Debian GNU/Linux 7(64-bit)
- name: Create a template from a stopped virtual machine's volume
ngine_io.cloudstack.cs_template:
name: Debian 9 (64-bit) 20GB ({{ ansible_date_time.date }})
vm: debian-9-base-vm
os_type: Debian GNU/Linux 9 (64-bit)
zone: tokio-ix
password_enabled: yes
is_public: yes
# Note: Use template_find_option(s) when a template name is not unique
- name: Create a template from a stopped virtual machine's volume
ngine_io.cloudstack.cs_template:
name: Debian 9 (64-bit)
display_text: Debian 9 (64-bit) 20GB ({{ ansible_date_time.date }})
template_find_option: display_text
vm: debian-9-base-vm
os_type: Debian GNU/Linux 9 (64-bit)
zone: tokio-ix
password_enabled: yes
is_public: yes
- name: create a template from a virtual machine's root volume snapshot
ngine_io.cloudstack.cs_template:
name: Debian 9 (64-bit) Snapshot ROOT-233_2015061509114
snapshot: ROOT-233_2015061509114
os_type: Debian GNU/Linux 9 (64-bit)
zone: tokio-ix
password_enabled: yes
is_public: yes
- name: Remove a template
ngine_io.cloudstack.cs_template:
name: systemvm-4.2
cross_zones: yes
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the template is related to. **Sample:** example account |
| **checksum** string | if available | MD5 checksum of the template. **Sample:** 0b31bccccb048d20b551f70830bb7ad0 |
| **created** string | success | Date of registering. **Sample:** 2015-03-29T14:57:06+0200 |
| **cross\_zones** boolean | if available | true if the template is managed across all zones, false otherwise. |
| **display\_text** string | if available | Display text of the template. **Sample:** Debian 7.7 64-bit minimal 2015-03-19 |
| **domain** string | success | Domain the template is related to. **Sample:** example domain |
| **format** string | if available | Format of the template. **Sample:** OVA |
| **hypervisor** string | if available | Hypervisor related to this template. **Sample:** VMware |
| **id** string | success | UUID of the template or extracted object. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **is\_extractable** boolean | if available | True if the template is extractable. **Sample:** True |
| **is\_featured** boolean | if available | True if the template is featured. **Sample:** True |
| **is\_public** boolean | if available | True if the template is public. **Sample:** True |
| **is\_ready** boolean | if available | True if the template is ready to be deployed from. **Sample:** True |
| **mode** string | on state=extracted | Mode of extraction **Sample:** http\_download |
| **name** string | success | Name of the template or extracted object. **Sample:** Debian 7 64-bit |
| **os\_type** string | if available | Type of the OS. **Sample:** CentOS 6.5 (64-bit) |
| **password\_enabled** boolean | if available | True if the reset password feature is enabled, false otherwise. |
| **project** string | success | Name of project the template is related to. **Sample:** Production |
| **sshkey\_enabled** boolean | if available | true if template is sshkey enabled, false otherwise. |
| **state** string | on state=extracted | State of the extracted template **Sample:** DOWNLOAD\_URL\_CREATED |
| **status** string | success | Status of the template or extracted object. **Sample:** Download Complete |
| **tags** list / elements=string | if available | List of resource tags associated with the template. **Sample:** [ { "key": "foo", "value": "bar" } ] |
| **template\_tag** string | if available | Template tag related to this template. **Sample:** special |
| **template\_type** string | if available | Type of the template. **Sample:** USER |
| **url** string | on state=extracted | Url to which the template is extracted to **Sample:** http://1.2.3.4/userdata/eb307f13-4aca-45e8-b157-a414a14e6b04.ova |
| **zone** string | success | Name of zone the template is registered in. **Sample:** zuerich |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_vlan_ip_range β Manages VLAN IP ranges on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_vlan\_ip\_range β Manages VLAN IP ranges on Apache CloudStack based clouds.
====================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_vlan_ip_range`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and delete VLAN IP range.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account who owns the VLAN. Mutually exclusive with *project*. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cidr\_ipv6** string | | The CIDR of IPv6 network, must be at least /64. |
| **domain** string | | Domain of the account owning the VLAN. |
| **end\_ip** string | | The ending IPv4 address in the VLAN IP range. If not specified, value of *start\_ip* is used. Only considered on create. |
| **end\_ipv6** string | | The ending IPv6 address in the IPv6 network range. If not specified, value of *start\_ipv6* is used. Only considered on create. |
| **for\_system\_vms** boolean | **Choices:*** **no** β
* yes
|
`yes` if IP range is set to system vms, `no` if not |
| **for\_virtual\_network** boolean added in 1.0.0 of ngine\_io.cloudstack | **Choices:*** **no** β
* yes
|
`yes` if VLAN is of Virtual type, `no` if Direct. If set to `yes` but neither *physical\_network* or *network* is set CloudStack will try to add the VLAN range to the Physical Network with a Public traffic type. |
| **gateway** string | | The gateway of the VLAN IP range. Required if *state=present*. |
| **gateway\_ipv6** string | | The gateway of the IPv6 network. Only considered on create. |
| **netmask** string | | The netmask of the VLAN IP range. Required if *state=present*. |
| **network** string | | The network name or id. Required if *for\_virtual\_network* and *physical\_network* are not set. |
| **physical\_network** string | | The physical network name or id. |
| **pod** string added in 1.0.0 of ngine\_io.cloudstack | | Name of the pod. |
| **project** string | | Project who owns the VLAN. Mutually exclusive with *account*. |
| **start\_ip** string / required | | The beginning IPv4 address in the VLAN IP range. Only considered on create. |
| **start\_ipv6** string | | The beginning IPv6 address in the IPv6 network range. Only considered on create. |
| **state** string | **Choices:*** **present** β
* absent
| State of the network ip range. |
| **vlan** string | | The ID or VID of the network. If not specified, will be defaulted to the vlan of the network. |
| **zone** string / required | | The Zone ID of the VLAN IP range. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: create a VLAN IP range for network test
ngine_io.cloudstack.cs_vlan_ip_range:
network: test
vlan: 98
start_ip: 10.2.4.10
end_ip: 10.2.4.100
gateway: 10.2.4.1
netmask: 255.255.255.0
zone: zone-02
- name: remove a VLAN IP range for network test
ngine_io.cloudstack.cs_vlan_ip_range:
state: absent
network: test
start_ip: 10.2.4.10
end_ip: 10.2.4.100
zone: zone-02
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | if available | Account who owns the network. **Sample:** example account |
| **cidr\_ipv6** string | if available | The CIDR of IPv6 network. **Sample:** 2001:db8::/64 |
| **domain** string | success | Domain name of the VLAN IP range. **Sample:** ROOT |
| **end\_ip** string | success | The end ip of the VLAN IP range. **Sample:** 10.2.4.100 |
| **end\_ipv6** string | if available | The end ipv6 of the VLAN IP range. **Sample:** 2001:db8::50 |
| **for\_systemvms** boolean | success | Whether VLAN IP range is dedicated to system vms or not. |
| **for\_virtual\_network** boolean | success | Whether VLAN IP range is of Virtual type or not. |
| **gateway** string | success | IPv4 gateway. **Sample:** 10.2.4.1 |
| **gateway\_ipv6** string | if available | IPv6 gateway. **Sample:** 2001:db8::1 |
| **id** string | success | UUID of the VLAN IP range. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **netmask** string | success | IPv4 netmask. **Sample:** 255.255.255.0 |
| **network** string | if available | The network of vlan range **Sample:** test |
| **physical\_network** string | success | The physical network VLAN IP range belongs to. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **project** string | if available | Project who owns the network. **Sample:** example project |
| **start\_ip** string | success | The start ip of the VLAN IP range. **Sample:** 10.2.4.10 |
| **start\_ipv6** string | if available | The start ipv6 of the VLAN IP range. **Sample:** 2001:db8::10 |
| **vlan** string | success | The ID or VID of the VLAN. **Sample:** vlan://98 |
| **zone** string | success | Name of zone. **Sample:** zone-02 |
### Authors
* David Passante (@dpassante)
ansible ngine_io.cloudstack.cs_service_offering β Manages service offerings on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_service\_offering β Manages service offerings on Apache CloudStack based clouds.
=========================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_service_offering`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and delete service offerings for guest and system VMs.
* Update display\_text of existing service offering.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cpu\_number** integer | | The number of CPUs of the service offering. |
| **cpu\_speed** integer | | The CPU speed of the service offering in MHz. |
| **deployment\_planner** string | | The deployment planner heuristics used to deploy a VM of this offering. If not set, the value of global config *vm.deployment.planner* is used. |
| **disk\_bytes\_read\_rate** integer | | Bytes read rate of the disk offering.
aliases: bytes\_read\_rate |
| **disk\_bytes\_write\_rate** integer | | Bytes write rate of the disk offering.
aliases: bytes\_write\_rate |
| **disk\_iops\_max** integer | | Max. iops of the compute offering. |
| **disk\_iops\_min** integer | | Min. iops of the compute offering. |
| **disk\_iops\_read\_rate** integer | | IO requests read rate of the disk offering. |
| **disk\_iops\_write\_rate** integer | | IO requests write rate of the disk offering. |
| **display\_text** string | | Display text of the service offering. If not set, *name* will be used as *display\_text* while creating. |
| **domain** string | | Domain the service offering is related to. Public for all domains and subdomains if not set. |
| **host\_tags** list / elements=string | | The host tags for this service offering.
aliases: host\_tag |
| **hypervisor\_snapshot\_reserve** integer | | Hypervisor snapshot reserve space as a percent of a volume. Only for managed storage using Xen or VMware. |
| **is\_customized** boolean | **Choices:*** no
* yes
| Whether the offering is customizable or not. |
| **is\_iops\_customized** boolean | **Choices:*** no
* yes
| Whether compute offering iops is custom or not.
aliases: disk\_iops\_customized |
| **is\_system** boolean | **Choices:*** **no** β
* yes
| Whether it is a system VM offering or not. |
| **is\_volatile** boolean | **Choices:*** no
* yes
| Whether the virtual machine needs to be volatile or not. Every reboot of VM the root disk is detached then destroyed and a fresh root disk is created and attached to VM. |
| **limit\_cpu\_usage** boolean | **Choices:*** no
* yes
| Restrict the CPU usage to committed service offering. |
| **memory** integer | | The total memory of the service offering in MB. |
| **name** string / required | | Name of the service offering. |
| **network\_rate** integer | | Data transfer rate in Mb/s allowed. Supported only for non-system offering and system offerings having *system\_vm\_type=domainrouter*. |
| **offer\_ha** boolean | **Choices:*** no
* yes
| Whether HA is set for the service offering. |
| **provisioning\_type** string | **Choices:*** thin
* sparse
* fat
| Provisioning type used to create volumes. |
| **service\_offering\_details** list / elements=dictionary | | Details for planner, used to store specific parameters. A list of dictionaries having keys `key` and `value`. |
| **state** string | **Choices:*** **present** β
* absent
| State of the service offering. |
| **storage\_tags** list / elements=string | | The storage tags for this service offering.
aliases: storage\_tag |
| **storage\_type** string | **Choices:*** local
* shared
| The storage type of the service offering. |
| **system\_vm\_type** string | **Choices:*** domainrouter
* consoleproxy
* secondarystoragevm
| The system VM type. Required if *is\_system=yes*. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a non-volatile compute service offering with local storage
ngine_io.cloudstack.cs_service_offering:
name: Micro
display_text: Micro 512mb 1cpu
cpu_number: 1
cpu_speed: 2198
memory: 512
host_tags: eco
storage_type: local
- name: Create a volatile compute service offering with shared storage
ngine_io.cloudstack.cs_service_offering:
name: Tiny
display_text: Tiny 1gb 1cpu
cpu_number: 1
cpu_speed: 2198
memory: 1024
storage_type: shared
is_volatile: yes
host_tags: eco
storage_tags: eco
- name: Create or update a volatile compute service offering with shared storage
ngine_io.cloudstack.cs_service_offering:
name: Tiny
display_text: Tiny 1gb 1cpu
cpu_number: 1
cpu_speed: 2198
memory: 1024
storage_type: shared
is_volatile: yes
host_tags: eco
storage_tags: eco
- name: Create or update a custom compute service offering
ngine_io.cloudstack.cs_service_offering:
name: custom
display_text: custom compute offer
is_customized: yes
storage_type: shared
host_tags: eco
storage_tags: eco
- name: Remove a compute service offering
ngine_io.cloudstack.cs_service_offering:
name: Tiny
state: absent
- name: Create or update a system offering for the console proxy
ngine_io.cloudstack.cs_service_offering:
name: System Offering for Console Proxy 2GB
display_text: System Offering for Console Proxy 2GB RAM
is_system: yes
system_vm_type: consoleproxy
cpu_number: 1
cpu_speed: 2198
memory: 2048
storage_type: shared
storage_tags: perf
- name: Remove a system offering
ngine_io.cloudstack.cs_service_offering:
name: System Offering for Console Proxy 2GB
is_system: yes
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **cpu\_number** integer | success | Number of CPUs in the service offering **Sample:** 4 |
| **cpu\_speed** integer | success | Speed of CPUs in MHz in the service offering **Sample:** 2198 |
| **created** string | success | Date the offering was created **Sample:** 2017-11-19T10:48:59+0000 |
| **disk\_bytes\_read\_rate** integer | success | Bytes read rate of the service offering **Sample:** 1000 |
| **disk\_bytes\_write\_rate** integer | success | Bytes write rate of the service offering **Sample:** 1000 |
| **disk\_iops\_max** integer | success | Max iops of the disk offering **Sample:** 1000 |
| **disk\_iops\_min** integer | success | Min iops of the disk offering **Sample:** 500 |
| **disk\_iops\_read\_rate** integer | success | IO requests per second read rate of the service offering **Sample:** 1000 |
| **disk\_iops\_write\_rate** integer | success | IO requests per second write rate of the service offering **Sample:** 1000 |
| **display\_text** string | success | Display text of the offering **Sample:** Micro 512mb 1cpu |
| **domain** string | success | Domain the offering is into **Sample:** ROOT |
| **host\_tags** list / elements=string | success | List of host tags **Sample:** ['eco'] |
| **id** string | success | UUID of the service offering **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **is\_customized** boolean | success | Whether the offering is customizable or not |
| **is\_iops\_customized** boolean | success | Whether the offering uses custom IOPS or not |
| **is\_system** boolean | success | Whether the offering is for system VMs or not |
| **is\_volatile** boolean | success | Whether the offering is volatile or not |
| **limit\_cpu\_usage** boolean | success | Whether the CPU usage is restricted to committed service offering |
| **memory** integer | success | Memory of the system offering **Sample:** 512 |
| **name** string | success | Name of the system offering **Sample:** Micro |
| **network\_rate** integer | success | Data transfer rate in megabits per second allowed **Sample:** 1000 |
| **offer\_ha** boolean | success | Whether HA support is enabled in the offering or not |
| **provisioning\_type** string | success | Provisioning type used to create volumes **Sample:** thin |
| **service\_offering\_details** dictionary | success | Additioanl service offering details **Sample:** {'vgpuType': 'GRID K180Q','pciDevice':'Group of NVIDIA Corporation GK107GL [GRID K1] GPUs'} |
| **storage\_tags** list / elements=string | success | List of storage tags **Sample:** ['eco'] |
| **storage\_type** string | success | Storage type used to create volumes **Sample:** shared |
| **system\_vm\_type** string | success | System VM type of this offering **Sample:** consoleproxy |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.cs_role β Manages user roles on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_role β Manages user roles on Apache CloudStack based clouds.
=====================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_role`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, delete user roles.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **description** string | | Description of the role. |
| **name** string / required | | Name of the role. |
| **role\_type** string | **Choices:*** **User** β
* DomainAdmin
* ResourceAdmin
* Admin
| Type of the role. Only considered for creation. |
| **state** string | **Choices:*** **present** β
* absent
| State of the role. |
| **uuid** string | | ID of the role. If provided, *uuid* is used as key.
aliases: id |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Ensure an user role is present
ngine_io.cloudstack.cs_role:
name: myrole_user
- name: Ensure a role having particular ID is named as myrole_user
ngine_io.cloudstack.cs_role:
name: myrole_user
id: 04589590-ac63-4ffc-93f5-b698b8ac38b6
- name: Ensure a role is absent
ngine_io.cloudstack.cs_role:
name: myrole_user
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **description** string | success | Description of the role. **Sample:** This is my role description |
| **id** string | success | UUID of the role. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **name** string | success | Name of the role. **Sample:** myrole |
| **role\_type** string | success | Type of the role. **Sample:** User |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_network β Manages networks on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_network β Manages networks on Apache CloudStack based clouds.
======================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_network`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, restart and delete networks.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the network is related to. |
| **acl** string | | The name of the access control list for the VPC network tier. |
| **acl\_type** string | **Choices:*** account
* domain
| Access control type for the network. If not specified, Cloudstack will default to `account` for isolated networks and `domain` for shared networks. Only considered on create. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cidr\_ipv6** string | | CIDR of IPv6 network, must be at least /64. Only considered on create. |
| **clean\_up** boolean | **Choices:*** **no** β
* yes
| Cleanup old network elements. Only considered on *state=restarted*. |
| **display\_text** string | | Display text of the network. If not specified, *name* will be used as *display\_text*. |
| **domain** string | | Domain the network is related to. |
| **end\_ip** string | | The ending IPv4 address of the network belongs to. If not specified, value of *start\_ip* is used. Only considered on create. |
| **end\_ipv6** string | | The ending IPv6 address of the network belongs to. If not specified, value of *start\_ipv6* is used. Only considered on create. |
| **gateway** string | | The gateway of the network. Required for shared networks and isolated networks when it belongs to a VPC. Only considered on create. |
| **gateway\_ipv6** string | | The gateway of the IPv6 network. Required for shared networks. Only considered on create. |
| **isolated\_pvlan** string | | The isolated private VLAN for this network. |
| **name** string / required | | Name (case sensitive) of the network. |
| **netmask** string | | The netmask of the network. Required for shared networks and isolated networks when it belongs to a VPC. Only considered on create. |
| **network\_domain** string | | The network domain. |
| **network\_offering** string | | Name of the offering for the network. Required if *state=present*. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the network to be deployed in. |
| **start\_ip** string | | The beginning IPv4 address of the network belongs to. Only considered on create. |
| **start\_ipv6** string | | The beginning IPv6 address of the network belongs to. Only considered on create. |
| **state** string | **Choices:*** **present** β
* absent
* restarted
| State of the network. |
| **subdomain\_access** boolean | **Choices:*** no
* yes
| Defines whether to allow subdomains to use networks dedicated to their parent domain(s). Should be used with *acl\_type=domain*. Only considered on create. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. To delete all tags, set a empty list e.g. *tags: []*.
aliases: tag |
| **vlan** string | | The ID or VID of the network. |
| **vpc** string | | Name of the VPC of the network. |
| **zone** string / required | | Name of the zone in which the network should be deployed. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a network
ngine_io.cloudstack.cs_network:
name: my network
zone: gva-01
network_offering: DefaultIsolatedNetworkOfferingWithSourceNatService
network_domain: example.com
- name: Create a network with start and end IP
ngine_io.cloudstack.cs_network:
name: Private Network
network_offering: PrivNet
start_ip: 10.12.9.10
end_ip: 10.12.9.100
netmask: 255.255.255.0
zone: gva-01
- name: Create a VPC tier
ngine_io.cloudstack.cs_network:
name: my VPC tier 1
zone: gva-01
vpc: my VPC
network_offering: DefaultIsolatedNetworkOfferingForVpcNetworks
gateway: 10.43.0.1
netmask: 255.255.255.0
acl: my web acl
- name: Update a network
ngine_io.cloudstack.cs_network:
name: my network
zone: zone01
display_text: network of domain example.local
network_domain: example.local
- name: Restart a network with clean up
ngine_io.cloudstack.cs_network:
name: my network
zone: zone01
clean_up: yes
state: restarted
- name: Remove a network
ngine_io.cloudstack.cs_network:
name: my network
zone: zone01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the network is related to. **Sample:** example account |
| **acl** string | success | Name of the access control list for the VPC network tier. **Sample:** My ACL |
| **acl\_id** string | success | ID of the access control list for the VPC network tier. **Sample:** dfafcd55-0510-4b8c-b6c5-b8cedb4cfd88 |
| **acl\_type** string | success | Access type of the network (Domain, Account). **Sample:** Account |
| **broadcast\_domain\_type** string | success | Broadcast domain type of the network. **Sample:** Vlan |
| **cidr** string | success | IPv4 network CIDR. **Sample:** 10.101.64.0/24 |
| **cidr\_ipv6** string | if available | IPv6 network CIDR. **Sample:** 2001:db8::/64 |
| **display\_text** string | success | Display text of the network. **Sample:** web project |
| **dns1** string | success | IP address of the 1st nameserver. **Sample:** 1.2.3.4 |
| **dns2** string | success | IP address of the 2nd nameserver. **Sample:** 1.2.3.4 |
| **domain** string | success | Domain the network is related to. **Sample:** ROOT |
| **gateway** string | success | IPv4 gateway. **Sample:** 10.101.64.1 |
| **gateway\_ipv6** string | if available | IPv6 gateway. **Sample:** 2001:db8::1 |
| **id** string | success | UUID of the network. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **is\_persistent** boolean | success | Whether the network is persistent or not. |
| **is\_system** boolean | success | Whether the network is system related or not. |
| **name** string | success | Name of the network. **Sample:** web project |
| **netmask** string | success | IPv4 netmask. **Sample:** 255.255.255.0 |
| **network\_domain** string | success | The network domain **Sample:** example.local |
| **network\_offering** string | success | The network offering name. **Sample:** DefaultIsolatedNetworkOfferingWithSourceNatService |
| **network\_offering\_availability** string | success | The availability of the network offering the network is created from **Sample:** Optional |
| **network\_offering\_conserve\_mode** boolean | success | Whether the network offering has IP conserve mode enabled or not. |
| **network\_offering\_display\_text** string | success | The network offering display text. **Sample:** Offering for Isolated Vpc networks with Source Nat service enabled |
| **project** string | success | Name of project. **Sample:** Production |
| **state** string | success | State of the network (Allocated, Implemented, Setup). **Sample:** Allocated |
| **tags** list / elements=string | success | List of resource tags associated with the network. **Sample:** [ { "key": "foo", "value": "bar" } ] |
| **traffic\_type** string | success | Traffic type of the network. **Sample:** Guest |
| **type** string | success | Type of the network. **Sample:** Isolated |
| **vpc** string | if available | Name of the VPC. **Sample:** My VPC |
| **zone** string | success | Name of zone. **Sample:** ch-gva-2 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_portforward β Manages port forwarding rules on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_portforward β Manages port forwarding rules on Apache CloudStack based clouds.
=======================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_portforward`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove port forwarding rules.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the *vm* is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the *vm* is related to. |
| **ip\_address** string / required | | Public IP address the rule is assigned to. |
| **network** string | | Name of the network. Required when forwarding ports in a VPC. |
| **open\_firewall** boolean | **Choices:*** **no** β
* yes
| Whether the firewall rule for public port should be created, while creating the new rule. Not supported when forwarding ports in a VPC. Use M(cs\_firewall) for managing firewall rules. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **private\_end\_port** integer | | End private port for this rule. If not specified equal *private\_port*. |
| **private\_port** integer / required | | Start private port for this rule. |
| **project** string | | Name of the project the *vm* is located in. |
| **protocol** string | **Choices:*** **tcp** β
* udp
| Protocol of the port forwarding rule. |
| **public\_end\_port** integer | | End public port for this rule. If not specified equal *public\_port*. |
| **public\_port** integer / required | | Start public port for this rule. |
| **state** string | **Choices:*** **present** β
* absent
| State of the port forwarding rule. |
| **tags** list / elements=dictionary | | List of tags. Tags are a list of dictionaries having keys *key* and *value*. To delete all tags, set a empty list e.g. *tags: []*.
aliases: tag |
| **vm** string | | Name of virtual machine which we make the port forwarding rule for. Required if *state=present*. |
| **vm\_guest\_ip** string | | VM guest NIC secondary IP address for the port forwarding rule. |
| **vpc** string | | Name of the VPC. |
| **zone** string / required | | Name of the zone in which the virtual machine is in. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: 1.2.3.4:80 -> web01:8080
ngine_io.cloudstack.cs_portforward:
ip_address: 1.2.3.4
zone: zone01
vm: web01
public_port: 80
private_port: 8080
- name: forward SSH and open firewall
ngine_io.cloudstack.cs_portforward:
ip_address: '{{ public_ip }}'
zone: zone01
vm: '{{ inventory_hostname }}'
public_port: '{{ ansible_ssh_port }}'
private_port: 22
open_firewall: true
- name: forward DNS traffic, but do not open firewall
ngine_io.cloudstack.cs_portforward:
ip_address: 1.2.3.4
zone: zone01
vm: '{{ inventory_hostname }}'
public_port: 53
private_port: 53
protocol: udp
- name: remove ssh port forwarding
ngine_io.cloudstack.cs_portforward:
ip_address: 1.2.3.4
zone: zone01
public_port: 22
private_port: 22
state: absent
- name: forward SSH in backend tier of VPC
ngine_io.cloudstack.cs_portforward:
ip_address: '{{ public_ip }}'
zone: zone01
vm: '{{ inventory_hostname }}'
public_port: '{{ ansible_ssh_port }}'
private_port: 22
vpc: myVPC
network: backend
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** string | success | UUID of the public IP address. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **ip\_address** string | success | Public IP address. **Sample:** 1.2.3.4 |
| **network** string | success | Name of the network. **Sample:** dmz |
| **private\_end\_port** integer | success | End port on the virtual machine's IP address. **Sample:** 80 |
| **private\_port** integer | success | Start port on the virtual machine's IP address. **Sample:** 80 |
| **protocol** string | success | Protocol. **Sample:** tcp |
| **public\_end\_port** integer | success | End port on the public IP address. **Sample:** 80 |
| **public\_port** integer | success | Start port on the public IP address. **Sample:** 80 |
| **tags** list / elements=string | success | Tags related to the port forwarding. |
| **vm\_display\_name** string | success | Display name of the virtual machine. **Sample:** web-01 |
| **vm\_guest\_ip** string | success | IP of the virtual machine. **Sample:** 10.101.65.152 |
| **vm\_name** string | success | Name of the virtual machine. **Sample:** web-01 |
| **vpc** string | success | Name of the VPC. **Sample:** my\_vpc |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.cs_instancegroup β Manages instance groups on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_instancegroup β Manages instance groups on Apache CloudStack based clouds.
===================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_instancegroup`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and remove instance groups.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the instance group is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Domain the instance group is related to. |
| **name** string / required | | Name of the instance group. |
| **project** string | | Project the instance group is related to. |
| **state** string | **Choices:*** **present** β
* absent
| State of the instance group. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create an instance group
ngine_io.cloudstack.cs_instancegroup:
name: loadbalancers
- name: Remove an instance group
ngine_io.cloudstack.cs_instancegroup:
name: loadbalancers
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the instance group is related to. **Sample:** example account |
| **created** string | success | Date when the instance group was created. **Sample:** 2015-05-03T15:05:51+0200 |
| **domain** string | success | Domain the instance group is related to. **Sample:** example domain |
| **id** string | success | UUID of the instance group. **Sample:** 04589590-ac63-4ffc-93f5-b698b8ac38b6 |
| **name** string | success | Name of the instance group. **Sample:** webservers |
| **project** string | success | Project the instance group is related to. **Sample:** example project |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_instance_password_reset β Allows resetting VM the default passwords on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_instance\_password\_reset β Allows resetting VM the default passwords on Apache CloudStack based clouds.
=================================================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_instance_password_reset`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Resets the default user accountβs password on an instance.
* Requires cloud-init to be installed in the virtual machine.
* The passwordenabled flag must be set on the template associated with the VM.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the virtual machine belongs to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **domain** string | | Name of the domain the virtual machine belongs to. |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **project** string | | Name of the project the virtual machine belongs to. |
| **vm** string / required | | Name of the virtual machine to reset the password on. |
| **zone** string / required | | Name of the zone in which the instance is deployed. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: stop the virtual machine before resetting the password
ngine_io.cloudstack.cs_instance:
name: myvirtualmachine
zone: zone01
state: stopped
- name: reset and get new default password
ngine_io.cloudstack.cs_instance_password_reset:
vm: myvirtualmachine
zone: zone01
register: root
- debug:
msg: "new default password is {{ root.password }}"
- name: boot the virtual machine to activate the new password
ngine_io.cloudstack.cs_instance:
name: myvirtualmachine
zone: zone01
state: started
when: root is changed
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** string | success | ID of the virtual machine. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **password** string | success | The new default password. **Sample:** ahQu5nuNge3keesh |
### Authors
* Gregor Riepl (@onitake)
ansible ngine_io.cloudstack.cs_host β Manages hosts on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_host β Manages hosts on Apache CloudStack based clouds.
================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_host`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove hosts.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allocation\_state** string | **Choices:*** enabled
* disabled
* maintenance
| Allocation state of the host. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **cluster** string | | Name of the cluster. |
| **host\_tags** list / elements=string | | Tags of the host.
aliases: host\_tag |
| **hypervisor** string | | Name of the cluster. Required if *state=present* and host does not yet exist. Possible values are `KVM`, `VMware`, `BareMetal`, `XenServer`, `LXC`, `HyperV`, `UCS`, `OVM`, `Simulator`. |
| **name** string / required | | Name of the host.
aliases: ip\_address |
| **password** string | | Password for the host. Required if *state=present* and host does not yet exist. |
| **pod** string | | Name of the pod. Required if *state=present* and host does not yet exist. |
| **state** string | **Choices:*** **present** β
* absent
| State of the host. |
| **url** string | | Url of the host used to create a host. If not provided, `http://` and param *name* is used as url. Only considered if *state=present* and host does not yet exist. |
| **username** string | | Username for the host. Required if *state=present* and host does not yet exist. |
| **zone** string / required | | Name of the zone in which the host should be deployed. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Ensure a host is present but disabled
ngine_io.cloudstack.cs_host:
name: pod01.zone01.example.com
cluster: vcenter.example.com/zone01/cluster01
pod: pod01
zone: zone01
hypervisor: VMware
allocation_state: disabled
host_tags:
- perf
- gpu
- name: Ensure an existing host is disabled
ngine_io.cloudstack.cs_host:
name: pod01.zone01.example.com
zone: zone01
allocation_state: disabled
- name: Ensure an existing host is enabled
ngine_io.cloudstack.cs_host:
name: pod01.zone01.example.com
zone: zone01
allocation_state: enabled
- name: Ensure a host is absent
ngine_io.cloudstack.cs_host:
name: pod01.zone01.example.com
zone: zone01
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **allocation\_state:** string | success | Allocation state of the host. **Sample:** enabled |
| **capabilities** string | success | Capabilities of the host. **Sample:** hvm |
| **cluster** string | success | Cluster of the host. **Sample:** vcenter.example.com/zone/cluster01 |
| **cluster\_type** string | success | Type of the cluster of the host. **Sample:** ExternalManaged |
| **cpu\_allocated** string | success | Amount in percent of the host's CPU currently allocated. **Sample:** 166.25% |
| **cpu\_number** string | success | Number of CPUs of the host. **Sample:** 24 |
| **cpu\_sockets** integer | success | Number of CPU sockets of the host. **Sample:** 2 |
| **cpu\_speed** integer | success | CPU speed in Mhz **Sample:** 1999 |
| **cpu\_used** string | success | Amount of the host's CPU currently used. **Sample:** 33.6% |
| **cpu\_with\_overprovisioning** string | success | Amount of the host's CPU after applying the cpu.overprovisioning.factor. **Sample:** 959520.0 |
| **created** string | success | Date when the host was created. **Sample:** 2015-05-03T15:05:51+0200 |
| **disconnected** string | success | Date when the host was disconnected. **Sample:** 2015-05-03T15:05:51+0200 |
| **disk\_size\_allocated** integer | success | Host's currently allocated disk size. **Sample:** 2593 |
| **disk\_size\_total** integer | success | Total disk size of the host **Sample:** 259300 |
| **events** string | success | Events available for the host **Sample:** Ping; HostDown; AgentConnected; AgentDisconnected; PingTimeout; ShutdownRequested; Remove; StartAgentRebalance; ManagementServerDown |
| **gpu\_group** list / elements=string | success | GPU cards present in the host. |
| **ha\_host** boolean | success | Whether the host is a HA host. |
| **has\_enough\_capacity** boolean | success | Whether the host has enough CPU and RAM capacity to migrate a VM to it. **Sample:** True |
| **host\_tags** string | success | Comma-separated list of tags for the host. **Sample:** perf |
| **host\_type** string | success | Type of the host. **Sample:** Routing |
| **host\_version** string | success | Version of the host. **Sample:** 4.5.2 |
| **hypervisor** string | success | Host's hypervisor. **Sample:** VMware |
| **hypervisor\_version** string | success | Hypervisor version. **Sample:** 5.1 |
| **ip\_address** string | success | IP address of the host **Sample:** 10.10.10.1 |
| **is\_local\_storage\_active** boolean | success | Whether the local storage is available or not. |
| **last\_pinged** string | success | Date and time the host was last pinged. **Sample:** 1970-01-17T17:27:32+0100 |
| **management\_server\_id** integer | success | Management server ID of the host. **Sample:** 345050593418 |
| **memory\_allocated** integer | success | Amount of the host's memory currently allocated. **Sample:** 69793218560 |
| **memory\_total** integer | success | Total of memory of the host. **Sample:** 206085263360 |
| **memory\_used** integer | success | Amount of the host's memory currently used. **Sample:** 65504776192 |
| **name** string | success | Name of the host. **Sample:** esx32.example.com |
| **network\_kbs\_read** integer | success | Incoming network traffic on the host. |
| **network\_kbs\_write** integer | success | Outgoing network traffic on the host. |
| **os\_category** string | success | OS category name of the host. **Sample:** ... |
| **out\_of\_band\_management** string | success | Host out-of-band management information. **Sample:** ... |
| **pod** string | success | Pod name of the host. **Sample:** Pod01 |
| **removed** string | success | Date and time the host was removed. **Sample:** 1970-01-17T17:27:32+0100 |
| **resource\_state** string | success | Resource state of the host. **Sample:** Enabled |
| **state** string | success | State of the host. **Sample:** Up |
| **suitable\_for\_migration** string | success | Whether this host is suitable (has enough capacity and satisfies all conditions like hosttags, max guests VM limit, etc) to migrate a VM to it or not. **Sample:** True |
| **zone** string | success | Zone of the host. **Sample:** zone01 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_securitygroup β Manages security groups on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_securitygroup β Manages security groups on Apache CloudStack based clouds.
===================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_securitygroup`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and remove security groups.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Account the security group is related to. |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **description** string | | Description of the security group. |
| **domain** string | | Domain the security group is related to. |
| **name** string / required | | Name of the security group. |
| **project** string | | Name of the project the security group to be created in. |
| **state** string | **Choices:*** **present** β
* absent
| State of the security group. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: create a security group
ngine_io.cloudstack.cs_securitygroup:
name: default
description: default security group
- name: remove a security group
ngine_io.cloudstack.cs_securitygroup:
name: default
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **account** string | success | Account the security group is related to. **Sample:** example account |
| **description** string | success | Description of security group. **Sample:** application security group |
| **domain** string | success | Domain the security group is related to. **Sample:** example domain |
| **id** string | success | UUID of the security group. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **name** string | success | Name of security group. **Sample:** app |
| **project** string | success | Name of project the security group is related to. **Sample:** Production |
| **tags** list / elements=string | success | List of resource tags associated with the security group. **Sample:** [ { "key": "foo", "value": "bar" } ] |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.cloudstack.cs_disk_offering β Manages disk offerings on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_disk\_offering β Manages disk offerings on Apache CloudStack based clouds.
===================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_disk_offering`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and delete disk offerings for guest VMs.
* Update display\_text or display\_offering of existing disk offering.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **bytes\_read\_rate** integer | | Bytes read rate of the disk offering. |
| **bytes\_write\_rate** integer | | Bytes write rate of the disk offering. |
| **customized** boolean | **Choices:*** no
* yes
| Whether disk offering iops is custom or not. |
| **disk\_size** integer | | Size of the disk offering in GB (1GB = 1,073,741,824 bytes). |
| **display\_offering** boolean | **Choices:*** no
* yes
| An optional field, whether to display the offering to the end user or not. |
| **display\_text** string | | Display text of the disk offering. If not set, `name` will be used as `display_text` while creating. |
| **domain** string | | Domain the disk offering is related to. Public for all domains and subdomains if not set. |
| **hypervisor\_snapshot\_reserve** integer | | Hypervisor snapshot reserve space as a percent of a volume. Only for managed storage using Xen or VMware. |
| **iops\_max** integer | | Max. iops of the disk offering. |
| **iops\_min** integer | | Min. iops of the disk offering. |
| **iops\_read\_rate** integer | | IO requests read rate of the disk offering. |
| **iops\_write\_rate** integer | | IO requests write rate of the disk offering. |
| **name** string / required | | Name of the disk offering. |
| **provisioning\_type** string | **Choices:*** thin
* sparse
* fat
| Provisioning type used to create volumes. |
| **state** string | **Choices:*** **present** β
* absent
| State of the disk offering. |
| **storage\_tags** list / elements=string | | The storage tags for this disk offering.
aliases: storage\_tag |
| **storage\_type** string | **Choices:*** local
* shared
| The storage type of the disk offering. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a disk offering with local storage
ngine_io.cloudstack.cs_disk_offering:
name: small
display_text: Small 10GB
disk_size: 10
storage_type: local
- name: Create or update a disk offering with shared storage
ngine_io.cloudstack.cs_disk_offering:
name: small
display_text: Small 10GB
disk_size: 10
storage_type: shared
storage_tags: SAN01
- name: Remove a disk offering
ngine_io.cloudstack.cs_disk_offering:
name: small
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **bytes\_read\_rate** integer | success | Bytes read rate of the disk offering **Sample:** 1000 |
| **bytes\_write\_rate** integer | success | Bytes write rate of the disk offering **Sample:** 1000 |
| **created** string | success | Date the offering was created **Sample:** 2017-11-19T10:48:59+0000 |
| **customized** boolean | success | Whether the offering uses custom IOPS or not |
| **disk\_size** integer | success | Size of the disk offering in GB **Sample:** 10 |
| **display\_offering** boolean | success | Whether to display the offering to the end user or not. |
| **display\_text** string | success | Display text of the offering **Sample:** Small 10GB |
| **domain** string | success | Domain the offering is into **Sample:** ROOT |
| **id** string | success | UUID of the disk offering **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **iops\_max** integer | success | Max iops of the disk offering **Sample:** 1000 |
| **iops\_min** integer | success | Min iops of the disk offering **Sample:** 500 |
| **iops\_read\_rate** integer | success | IO requests per second read rate of the disk offering **Sample:** 1000 |
| **iops\_write\_rate** integer | success | IO requests per second write rate of the disk offering **Sample:** 1000 |
| **name** string | success | Name of the system offering **Sample:** Micro |
| **provisioning\_type** string | success | Provisioning type used to create volumes **Sample:** thin |
| **storage\_tags** list / elements=string | success | List of storage tags **Sample:** ['eco'] |
| **storage\_type** string | success | Storage type used to create volumes **Sample:** shared |
### Authors
* David Passante (@dpassante)
* RenΓ© Moser (@resmo)
ansible ngine_io.cloudstack.cs_traffic_type β Manages traffic types on CloudStack Physical Networks ngine\_io.cloudstack.cs\_traffic\_type β Manages traffic types on CloudStack Physical Networks
==============================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_traffic_type`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add, remove, update Traffic Types associated with CloudStack Physical Networks.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **hyperv\_networklabel** string | | The network name label of the physical device dedicated to this traffic on a HyperV host. |
| **isolation\_method** string | **Choices:*** vlan
* vxlan
| Use if the physical network has multiple isolation types and traffic type is public. |
| **kvm\_networklabel** string | | The network name label of the physical device dedicated to this traffic on a KVM host. |
| **ovm3\_networklabel** string | | The network name of the physical device dedicated to this traffic on an OVM3 host. |
| **physical\_network** string / required | | the name of the Physical Network |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **state** string | **Choices:*** **present** β
* absent
| State of the traffic type |
| **traffic\_type** string / required | **Choices:*** Management
* Guest
* Public
* Storage
| the trafficType to be added to the physical network. |
| **vlan** string | | The VLAN id to be used for Management traffic by VMware host. |
| **vmware\_networklabel** string | | The network name label of the physical device dedicated to this traffic on a VMware host. |
| **xen\_networklabel** string | | The network name label of the physical device dedicated to this traffic on a XenServer host. |
| **zone** string / required | | Name of the zone with the physical network. |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: add a traffic type
ngine_io.cloudstack.cs_traffic_type:
physical_network: public-network
traffic_type: Guest
zone: test-zone
- name: update traffic type
ngine_io.cloudstack.cs_traffic_type:
physical_network: public-network
traffic_type: Guest
kvm_networklabel: cloudbr0
zone: test-zone
- name: remove traffic type
ngine_io.cloudstack.cs_traffic_type:
physical_network: public-network
traffic_type: Public
state: absent
zone: test-zone
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **hyperv\_networklabel** string | success | The network name label of the physical device dedicated to this traffic on a HyperV host **Sample:** HyperV Internal Switch |
| **id** string | success | ID of the network provider **Sample:** 659c1840-9374-440d-a412-55ca360c9d3c |
| **kvm\_networklabel** string | success | The network name label of the physical device dedicated to this traffic on a KVM host **Sample:** cloudbr0 |
| **ovm3\_networklabel** string | success | The network name of the physical device dedicated to this traffic on an OVM3 host **Sample:** cloudbr0 |
| **physical\_network** string | success | the physical network this belongs to **Sample:** 28ed70b7-9a1f-41bf-94c3-53a9f22da8b6 |
| **traffic\_type** string | success | the trafficType that was added to the physical network **Sample:** Public |
| **vmware\_networklabel** string | success | The network name label of the physical device dedicated to this traffic on a VMware host **Sample:** Management Network |
| **xen\_networklabel** string | success | The network name label of the physical device dedicated to this traffic on a XenServer host **Sample:** xenbr0 |
| **zone** string | success | Name of zone the physical network is in. **Sample:** ch-gva-2 |
### Authors
* Patryk Cichy (@PatTheSilent)
ansible ngine_io.cloudstack.cs_vpc_offering β Manages vpc offerings on Apache CloudStack based clouds. ngine\_io.cloudstack.cs\_vpc\_offering β Manages vpc offerings on Apache CloudStack based clouds.
=================================================================================================
Note
This plugin is part of the [ngine\_io.cloudstack collection](https://galaxy.ansible.com/ngine_io/cloudstack) (version 2.2.2).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.cloudstack`.
To use it in a playbook, specify: `ngine_io.cloudstack.cs_vpc_offering`.
New in version 0.1.0: of ngine\_io.cloudstack
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, enable, disable and remove CloudStack VPC offerings.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
* cs >= 0.9.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_http\_method** string | **Choices:*** **get** β
* post
| HTTP method used to query the API endpoint. If not given, the `CLOUDSTACK_METHOD` env variable is considered. |
| **api\_key** string / required | | API key of the CloudStack API. If not given, the `CLOUDSTACK_KEY` env variable is considered. |
| **api\_secret** string / required | | Secret key of the CloudStack API. If not set, the `CLOUDSTACK_SECRET` env variable is considered. |
| **api\_timeout** integer | **Default:**10 | HTTP timeout in seconds. If not given, the `CLOUDSTACK_TIMEOUT` env variable is considered. |
| **api\_url** string / required | | URL of the CloudStack API e.g. https://cloud.example.com/client/api. If not given, the `CLOUDSTACK_ENDPOINT` env variable is considered. |
| **api\_verify\_ssl\_cert** string | | Verify CA authority cert file. If not given, the `CLOUDSTACK_VERIFY` env variable is considered. |
| **display\_text** string | | Display text of the vpc offerings |
| **name** string / required | | The name of the vpc offering |
| **poll\_async** boolean | **Choices:*** no
* **yes** β
| Poll async jobs until job has finished. |
| **service\_capabilities** list / elements=dictionary | | Desired service capabilities as part of vpc offering.
aliases: service\_capability |
| **service\_offering** string | | The name or ID of the service offering for the VPC router appliance. |
| **service\_providers** list / elements=dictionary | | provider to service mapping. If not specified, the provider for the service will be mapped to the default provider on the physical network
aliases: service\_provider |
| **state** string | **Choices:*** enabled
* **present** β
* disabled
* absent
| State of the vpc offering. |
| **supported\_services** list / elements=string | | Services supported by the vpc offering
aliases: supported\_service |
Notes
-----
Note
* A detailed guide about cloudstack modules can be found in the [CloudStack Cloud Guide](../scenario_guides/guide_cloudstack).
* This module supports check mode.
Examples
--------
```
- name: Create a vpc offering and enable it
ngine_io.cloudstack.cs_vpc_offering:
name: my_vpc_offering
display_text: vpc offering description
state: enabled
supported_services: [ Dns, Dhcp ]
service_providers:
- {service: 'dns', provider: 'VpcVirtualRouter'}
- {service: 'dhcp', provider: 'VpcVirtualRouter'}
- name: Create a vpc offering with redundant router
ngine_io.cloudstack.cs_vpc_offering:
name: my_vpc_offering
display_text: vpc offering description
supported_services: [ Dns, Dhcp, SourceNat ]
service_providers:
- {service: 'dns', provider: 'VpcVirtualRouter'}
- {service: 'dhcp', provider: 'VpcVirtualRouter'}
- {service: 'SourceNat', provider: 'VpcVirtualRouter'}
service_capabilities:
- {service: 'SourceNat', capabilitytype: 'RedundantRouter', capabilityvalue: true}
- name: Create a region level vpc offering with distributed router
ngine_io.cloudstack.cs_vpc_offering:
name: my_vpc_offering
display_text: vpc offering description
state: present
supported_services: [ Dns, Dhcp, SourceNat ]
service_providers:
- {service: 'dns', provider: 'VpcVirtualRouter'}
- {service: 'dhcp', provider: 'VpcVirtualRouter'}
- {service: 'SourceNat', provider: 'VpcVirtualRouter'}
service_capabilities:
- {service: 'Connectivity', capabilitytype: 'DistributedRouter', capabilityvalue: true}
- {service: 'Connectivity', capabilitytype: 'RegionLevelVPC', capabilityvalue: true}
- name: Remove a vpc offering
ngine_io.cloudstack.cs_vpc_offering:
name: my_vpc_offering
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **display\_text** string | success | The display text of the vpc offering **Sample:** My vpc offering |
| **distributed** boolean | success | Indicates if the vpc offering supports distributed router for one-hop forwarding. |
| **id** string | success | UUID of the vpc offering. **Sample:** a6f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **is\_default** boolean | success | Whether VPC offering is the default offering or not. |
| **name** string | success | The name of the vpc offering **Sample:** MyCustomVPCOffering |
| **region\_level** boolean | success | Indicated if the offering can support region level vpc. |
| **service\_offering\_id** string | success | The service offering ID. **Sample:** c5f7a5fc-43f8-11e5-a151-feff819cdc9f |
| **state** string | success | The state of the vpc offering **Sample:** Enabled |
### Authors
* David Passante (@dpassante)
ansible ngine_io.vultr.vultr_os_info β Get information about the Vultr OSes available. ngine\_io.vultr.vultr\_os\_info β Get information about the Vultr OSes available.
=================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_os_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Get infos about OSes available to boot servers.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Get Vultr OSes infos
ngine_io.vultr.vultr_os_info:
register: results
- name: Print the gathered infos
debug:
var: results.vultr_os_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_os\_info** complex | available | Response from Vultr API as list |
| | **arch** string | success | OS Architecture **Sample:** x64 |
| | **family** string | success | OS family **Sample:** openbsd |
| | **name** string | success | OS name **Sample:** OpenBSD 6 x64 |
| | **windows** boolean | success | OS is a MS Windows |
### Authors
* Yanis Guenane (@Spredzy)
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.vultr.vultr_block_storage_info β Get information about the Vultr block storage volumes available. ngine\_io.vultr.vultr\_block\_storage\_info β Get information about the Vultr block storage volumes available.
==============================================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_block_storage_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Get infos about block storage volumes available in Vultr.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Get Vultr block storage infos
ngine_io.vultr.vultr_block_storage_info:
register: result
- name: Print the infos
debug:
var: result.vultr_block_storage_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_block\_storage\_info** complex | success | Response from Vultr API as list |
| | **attached\_to\_id** string | success | Block storage is attached to this server ID. |
| | **cost\_per\_month** float | success | Cost per month of the block storage. **Sample:** 1.0 |
| | **date\_created** string | success | Date created of the block storage. **Sample:** 2018-07-24 12:59:59 |
| | **id** integer | success | ID of the block storage. **Sample:** 17332323 |
| | **name** string | success | Name of the block storage. **Sample:** my volume |
| | **region** string | success | Region the block storage is located in. **Sample:** New Jersey |
| | **size** integer | success | Size in GB of the block storage. **Sample:** 10 |
| | **status** string | success | Status of the block storage. **Sample:** active |
### Authors
* Yanis Guenane (@Spredzy)
* RenΓ© Moser (@resmo)
ansible ngine_io.vultr.vultr_startup_script_info β Gather information about the Vultr startup scripts available. ngine\_io.vultr.vultr\_startup\_script\_info β Gather information about the Vultr startup scripts available.
============================================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_startup_script_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about vultr\_startup\_scripts available.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Gather Vultr startup scripts information
ngine_io.vultr.vultr_startup_script_info:
register: result
- name: Print the gathered information
debug:
var: result.vultr_startup_script_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_startup\_script\_info** complex | success | Response from Vultr API |
| | **date\_created** string | success | Date the startup script was created. **Sample:** 2017-08-26 12:47:48 |
| | **date\_modified** string | success | Date the startup script was modified. **Sample:** 2017-08-26 12:47:48 |
| | **id** string | success | ID of the startup script. **Sample:** 249395 |
| | **name** string | success | Name of the startup script. **Sample:** my startup script |
| | **script** string | success | The source code of the startup script. **Sample:** #!/bin/bash echo Hello World > /root/hello |
| | **type** string | success | The type of the startup script. **Sample:** pxe |
### Authors
* Yanis Guenane (@Spredzy)
ansible ngine_io.vultr.vultr_plan_info β Gather information about the Vultr plans available. ngine\_io.vultr.vultr\_plan\_info β Gather information about the Vultr plans available.
=======================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_plan_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about plans available to boot servers.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Gather Vultr plans information
ngine_io.vultr.vultr_plan_info:
register: result
- name: Print the gathered information
debug:
var: result.vultr_plan_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_plan\_info** complex | success | Response from Vultr API |
| | **plan** list / elements=string | success | List of the plans available. **Sample:** [{'available\_locations': [1], 'bandwidth': 40.0, 'bandwidth\_gb': 40960, 'disk': 110, 'id': 118, 'name': '32768 MB RAM,110 GB SSD,40.00 TB BW', 'plan\_type': 'DEDICATED', 'price\_per\_month': 240.0, 'ram': 32768, 'vcpu\_count': 8, 'windows': False}] |
### Authors
* Yanis Guenane (@Spredzy)
ansible ngine_io.vultr.vultr_dns_domain β Manages DNS domains on Vultr. ngine\_io.vultr.vultr\_dns\_domain β Manages DNS domains on Vultr.
==================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_dns_domain`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and remove DNS domains.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **name** string / required | | The domain name.
aliases: domain |
| **server\_ip** string | | The default server IP. Use M(vultr\_dns\_record) to change it once the domain is created. Required if `state=present`. |
| **state** string | **Choices:*** **present** β
* absent
| State of the DNS domain. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Ensure a domain exists
ngine_io.vultr.vultr_dns_domain:
name: example.com
server_ip: 10.10.10.10
- name: Ensure a domain is absent
ngine_io.vultr.vultr_dns_domain:
name: example.com
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_dns\_domain** complex | success | Response from Vultr API |
| | **date\_created** string | success | Date the DNS domain was created. **Sample:** 2017-08-26 12:47:48 |
| | **name** string | success | Name of the DNS Domain. **Sample:** example.com |
### Authors
* RenΓ© Moser (@resmo)
ansible Ngine_Io.Vultr Ngine\_Io.Vultr
===============
Collection version 1.1.0
Plugin Index
------------
These are the plugins in the ngine\_io.vultr collection
### Inventory Plugins
* [vultr](vultr_inventory#ansible-collections-ngine-io-vultr-vultr-inventory) β Vultr inventory source
### Modules
* [vultr\_account\_info](vultr_account_info_module#ansible-collections-ngine-io-vultr-vultr-account-info-module) β Get information about the Vultr account.
* [vultr\_block\_storage](vultr_block_storage_module#ansible-collections-ngine-io-vultr-vultr-block-storage-module) β Manages block storage volumes on Vultr.
* [vultr\_block\_storage\_info](vultr_block_storage_info_module#ansible-collections-ngine-io-vultr-vultr-block-storage-info-module) β Get information about the Vultr block storage volumes available.
* [vultr\_dns\_domain](vultr_dns_domain_module#ansible-collections-ngine-io-vultr-vultr-dns-domain-module) β Manages DNS domains on Vultr.
* [vultr\_dns\_domain\_info](vultr_dns_domain_info_module#ansible-collections-ngine-io-vultr-vultr-dns-domain-info-module) β Gather information about the Vultr DNS domains available.
* [vultr\_dns\_record](vultr_dns_record_module#ansible-collections-ngine-io-vultr-vultr-dns-record-module) β Manages DNS records on Vultr.
* [vultr\_firewall\_group](vultr_firewall_group_module#ansible-collections-ngine-io-vultr-vultr-firewall-group-module) β Manages firewall groups on Vultr.
* [vultr\_firewall\_group\_info](vultr_firewall_group_info_module#ansible-collections-ngine-io-vultr-vultr-firewall-group-info-module) β Gather information about the Vultr firewall groups available.
* [vultr\_firewall\_rule](vultr_firewall_rule_module#ansible-collections-ngine-io-vultr-vultr-firewall-rule-module) β Manages firewall rules on Vultr.
* [vultr\_network](vultr_network_module#ansible-collections-ngine-io-vultr-vultr-network-module) β Manages networks on Vultr.
* [vultr\_network\_info](vultr_network_info_module#ansible-collections-ngine-io-vultr-vultr-network-info-module) β Gather information about the Vultr networks available.
* [vultr\_os\_info](vultr_os_info_module#ansible-collections-ngine-io-vultr-vultr-os-info-module) β Get information about the Vultr OSes available.
* [vultr\_plan\_baremetal\_info](vultr_plan_baremetal_info_module#ansible-collections-ngine-io-vultr-vultr-plan-baremetal-info-module) β Gather information about the Vultr Bare Metal plans available.
* [vultr\_plan\_info](vultr_plan_info_module#ansible-collections-ngine-io-vultr-vultr-plan-info-module) β Gather information about the Vultr plans available.
* [vultr\_region\_info](vultr_region_info_module#ansible-collections-ngine-io-vultr-vultr-region-info-module) β Gather information about the Vultr regions available.
* [vultr\_server](vultr_server_module#ansible-collections-ngine-io-vultr-vultr-server-module) β Manages virtual servers on Vultr.
* [vultr\_server\_baremetal](vultr_server_baremetal_module#ansible-collections-ngine-io-vultr-vultr-server-baremetal-module) β Manages baremetal servers on Vultr.
* [vultr\_server\_info](vultr_server_info_module#ansible-collections-ngine-io-vultr-vultr-server-info-module) β Gather information about the Vultr servers available.
* [vultr\_ssh\_key](vultr_ssh_key_module#ansible-collections-ngine-io-vultr-vultr-ssh-key-module) β Manages ssh keys on Vultr.
* [vultr\_ssh\_key\_info](vultr_ssh_key_info_module#ansible-collections-ngine-io-vultr-vultr-ssh-key-info-module) β Get information about the Vultr SSH keys available.
* [vultr\_startup\_script](vultr_startup_script_module#ansible-collections-ngine-io-vultr-vultr-startup-script-module) β Manages startup scripts on Vultr.
* [vultr\_startup\_script\_info](vultr_startup_script_info_module#ansible-collections-ngine-io-vultr-vultr-startup-script-info-module) β Gather information about the Vultr startup scripts available.
* [vultr\_user](vultr_user_module#ansible-collections-ngine-io-vultr-vultr-user-module) β Manages users on Vultr.
* [vultr\_user\_info](vultr_user_info_module#ansible-collections-ngine-io-vultr-vultr-user-info-module) β Get information about the Vultr user available.
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
| programming_docs |
ansible ngine_io.vultr.vultr_ssh_key β Manages ssh keys on Vultr. ngine\_io.vultr.vultr\_ssh\_key β Manages ssh keys on Vultr.
============================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_ssh_key`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove ssh keys.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **name** string / required | | Name of the ssh key. |
| **ssh\_key** string | | SSH public key. Required if `state=present`. |
| **state** string | **Choices:*** **present** β
* absent
| State of the ssh key. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: ensure an SSH key is present
ngine_io.vultr.vultr_ssh_key:
name: my ssh key
ssh_key: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
- name: ensure an SSH key is absent
ngine_io.vultr.vultr_ssh_key:
name: my ssh key
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_ssh\_key** complex | success | Response from Vultr API |
| | **date\_created** string | success | Date the ssh key was created **Sample:** 2017-08-26 12:47:48 |
| | **id** string | success | ID of the ssh key **Sample:** 5904bc6ed9234 |
| | **name** string | success | Name of the ssh key **Sample:** my ssh key |
| | **ssh\_key** string | success | SSH public key **Sample:** ssh-rsa AA... [email protected] |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.vultr.vultr_startup_script β Manages startup scripts on Vultr. ngine\_io.vultr.vultr\_startup\_script β Manages startup scripts on Vultr.
==========================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_startup_script`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove startup scripts.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **name** string / required | | The script name. |
| **script** string | | The script source code. Required if *state=present*. |
| **script\_type** string | **Choices:*** **boot** β
* pxe
| The script type, can not be changed once created.
aliases: type |
| **state** string | **Choices:*** **present** β
* absent
| State of the script. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: ensure a pxe script exists, source from a file
ngine_io.vultr.vultr_startup_script:
name: my_web_script
script_type: pxe
script: "{{ lookup('file', 'path/to/script') }}"
- name: ensure a boot script exists
ngine_io.vultr.vultr_startup_script:
name: vultr_startup_script
script: "#!/bin/bash\necho Hello World > /root/hello"
- name: ensure a script is absent
ngine_io.vultr.vultr_startup_script:
name: my_web_script
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_startup\_script** complex | success | Response from Vultr API |
| | **date\_created** string | success | Date the startup script was created. **Sample:** 2017-08-26 12:47:48 |
| | **date\_modified** string | success | Date the startup script was modified. **Sample:** 2017-08-26 12:47:48 |
| | **id** string | success | ID of the startup script. **Sample:** 249395 |
| | **name** string | success | Name of the startup script. **Sample:** my startup script |
| | **script** string | success | The source code of the startup script. **Sample:** #!/bin/bash echo Hello World > /root/hello |
| | **script\_type** string | success | The type of the startup script. **Sample:** pxe |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.vultr.vultr_account_info β Get information about the Vultr account. ngine\_io.vultr.vultr\_account\_info β Get information about the Vultr account.
===============================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_account_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Get infos about account balance, charges and payments.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Get Vultr account infos
ngine_io.vultr.vultr_account_info:
register: result
- name: Print the infos
debug:
var: result.vultr_account_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_account\_info** complex | success | Response from Vultr API |
| | **balance** float | success | Your account balance. **Sample:** -214.69 |
| | **last\_payment\_amount** float | success | The amount of the last payment transaction. **Sample:** -250.0 |
| | **last\_payment\_date** string | success | Date of the last payment. **Sample:** 2017-08-26 12:47:48 |
| | **pending\_charges** float | success | Charges pending. **Sample:** 57.03 |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.vultr.vultr_plan_baremetal_info β Gather information about the Vultr Bare Metal plans available. ngine\_io.vultr.vultr\_plan\_baremetal\_info β Gather information about the Vultr Bare Metal plans available.
=============================================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_plan_baremetal_info`.
New in version 0.3.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about Bare Metal plans available to boot servers.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Gather Vultr Bare Metal plans information
ngine_io.vultr.vultr_baremetal_plan_info:
register: result
- name: Print the gathered information
debug:
var: result.vultr_baremetal_plan_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_plan\_baremetal\_info** complex | success | Response from Vultr API |
| | **plan** list / elements=string | success | List of the Bare Metal plans available. **Sample:** [{'available\_locations': [1], 'bandwidth': 40.0, 'bandwidth\_gb': 40960, 'disk': 110, 'id': 118, 'name': '32768 MB RAM,110 GB SSD,40.00 TB BW', 'plan\_type': 'DEDICATED', 'price\_per\_month': 240.0, 'ram': 32768, 'vcpu\_count': 8, 'windows': False}] |
### Authors
* Simon Baerlocher (@sbaerlocher)
ansible ngine_io.vultr.vultr_region_info β Gather information about the Vultr regions available. ngine\_io.vultr.vultr\_region\_info β Gather information about the Vultr regions available.
===========================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_region_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about regions available to boot servers.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Gather Vultr regions information
ngine_io.vultr.vultr_region_info:
register: result
- name: Print the gathered information
debug:
var: result.vultr_region_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_region\_info** list / elements=string | success | Response from Vultr API **Sample:** [{'block\_storage': False, 'continent': 'Europe', 'country': 'GB', 'ddos\_protection': True, 'id': 8, 'name': 'London', 'regioncode': 'LHR', 'state': ''}] |
### Authors
* Yanis Guenane (@Spredzy)
| programming_docs |
ansible ngine_io.vultr.vultr_ssh_key_info β Get information about the Vultr SSH keys available. ngine\_io.vultr.vultr\_ssh\_key\_info β Get information about the Vultr SSH keys available.
===========================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_ssh_key_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Get infos about SSH keys available.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Get Vultr SSH keys infos
ngine_io.vultr.vultr_ssh_key_info:
register: result
- name: Print the infos
debug:
var: result.vultr_ssh_key_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_ssh\_key\_info** complex | success | Response from Vultr API as list |
| | **date\_created** string | success | Date the ssh key was created **Sample:** 2017-08-26 12:47:48 |
| | **id** string | success | ID of the ssh key **Sample:** 5904bc6ed9234 |
| | **name** string | success | Name of the ssh key **Sample:** my ssh key |
| | **ssh\_key** string | success | SSH public key **Sample:** ssh-rsa AA... [email protected] |
### Authors
* Yanis Guenane (@Spredzy)
* RenΓ© Moser (@resmo)
ansible ngine_io.vultr.vultr_firewall_group_info β Gather information about the Vultr firewall groups available. ngine\_io.vultr.vultr\_firewall\_group\_info β Gather information about the Vultr firewall groups available.
============================================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_firewall_group_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about firewall groups available in Vultr.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Gather Vultr firewall groups information
ngine_io.vultr.vultr_firewall_group_info:
register: result
- name: Print the gathered information
debug:
var: result.vultr_firewall_group_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_firewall\_group\_info** complex | success | Response from Vultr API |
| | **date\_created** string | success | Date the firewall group was created **Sample:** 2017-08-26 12:47:48 |
| | **date\_modified** string | success | Date the firewall group was modified **Sample:** 2017-08-26 12:47:48 |
| | **description** string | success | Name of the firewall group **Sample:** my firewall group |
| | **id** string | success | ID of the firewall group **Sample:** 1234abcd |
### Authors
* Yanis Guenane (@Spredzy)
ansible ngine_io.vultr.vultr_firewall_group β Manages firewall groups on Vultr. ngine\_io.vultr.vultr\_firewall\_group β Manages firewall groups on Vultr.
==========================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_firewall_group`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and remove firewall groups.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **name** string / required | | Name of the firewall group.
aliases: description |
| **state** string | **Choices:*** **present** β
* absent
| State of the firewall group. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: ensure a firewall group is present
ngine_io.vultr.vultr_firewall_group:
name: my http firewall
- name: ensure a firewall group is absent
ngine_io.vultr.vultr_firewall_group:
name: my http firewall
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_firewall\_group** complex | success | Response from Vultr API |
| | **date\_created** string | success | Date the firewall group was created **Sample:** 2017-08-26 12:47:48 |
| | **date\_modified** string | success | Date the firewall group was modified **Sample:** 2017-08-26 12:47:48 |
| | **id** string | success | ID of the firewall group **Sample:** 1234abcd |
| | **name** string | success | Name of the firewall group **Sample:** my firewall group |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.vultr.vultr_server β Manages virtual servers on Vultr. ngine\_io.vultr.vultr\_server β Manages virtual servers on Vultr.
=================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_server`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Deploy, start, stop, update, restart, reinstall servers.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **auto\_backup\_enabled** boolean | **Choices:*** no
* yes
| Whether to enable automatic backups or not. |
| **firewall\_group** string | | The firewall group description or ID to assign this server to. |
| **force** boolean | **Choices:*** **no** β
* yes
| Force stop/start the server if required to apply changes Otherwise a running server will not be changed. |
| **hostname** string | | The hostname to assign to this server. |
| **ipv6\_enabled** boolean | **Choices:*** no
* yes
| Whether to enable IPv6 or not. |
| **name** string / required | | Name of the server.
aliases: label |
| **notify\_activate** boolean | **Choices:*** **no** β
* yes
| Whether to send an activation email when the server is ready or not. Only considered on creation. |
| **os** string | | The operating system name or ID. Required if the server does not yet exist and is not restoring from a snapshot. |
| **plan** string | | Plan name or ID to use for the server. Required if the server does not yet exist. |
| **private\_network\_enabled** boolean | **Choices:*** no
* yes
| Whether to enable private networking or not. |
| **region** string | | Region name or ID the server is deployed into. Required if the server does not yet exist. |
| **reserved\_ip\_v4** string | | IP address of the floating IP to use as the main IP of this server. Only considered on creation. |
| **snapshot** string | | Name or ID of the snapshot to restore the server from. |
| **ssh\_keys** list / elements=string | | List of SSH key names or IDs passed to the server on creation.
aliases: ssh\_key |
| **startup\_script** string | | Name or ID of the startup script to execute on boot. Only considered while creating the server. |
| **state** string | **Choices:*** **present** β
* absent
* restarted
* reinstalled
* started
* stopped
| State of the server. |
| **tag** string | | Tag for the server. |
| **user\_data** string | | User data to be passed to the server. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: create server
ngine_io.vultr.vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 7 x64
plan: 1024 MB RAM,25 GB SSD,1.00 TB BW
ssh_keys:
- my_key
- your_key
region: Amsterdam
state: present
- name: ensure a server is present and started
ngine_io.vultr.vultr_server:
name: "{{ vultr_server_name }}"
os: CentOS 7 x64
plan: 1024 MB RAM,25 GB SSD,1.00 TB BW
firewall_group: my_group
ssh_key: my_key
region: Amsterdam
state: started
- name: ensure a server is present and stopped provisioned using IDs
ngine_io.vultr.vultr_server:
name: "{{ vultr_server_name }}"
os: "167"
plan: "201"
region: "7"
state: stopped
- name: ensure an existing server is stopped
ngine_io.vultr.vultr_server:
name: "{{ vultr_server_name }}"
state: stopped
- name: ensure an existing server is started
ngine_io.vultr.vultr_server:
name: "{{ vultr_server_name }}"
state: started
- name: ensure a server is absent
ngine_io.vultr.vultr_server:
name: "{{ vultr_server_name }}"
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_server** complex | success | Response from Vultr API with a few additions/modification |
| | **allowed\_bandwidth\_gb** integer | success | Allowed bandwidth to use in GB **Sample:** 1000 |
| | **auto\_backup\_enabled** boolean | success | Whether automatic backups are enabled |
| | **cost\_per\_month** float | success | Cost per month for the server **Sample:** 5.0 |
| | **current\_bandwidth\_gb** integer | success | Current bandwidth used for the server |
| | **date\_created** string | success | Date when the server was created **Sample:** 2017-08-26 12:47:48 |
| | **default\_password** string | success | Password to login as root into the server **Sample:** !p3EWYJm$qDWYaFr |
| | **disk** string | success | Information about the disk **Sample:** Virtual 25 GB |
| | **firewall\_group** string | success and available | Firewall group the server is assigned to **Sample:** CentOS 6 x64 |
| | **id** string | success | ID of the server **Sample:** 10194376 |
| | **internal\_ip** string | success | Internal IP |
| | **kvm\_url** string | success | URL to the VNC **Sample:** https://my.vultr.com/subs/vps/novnc/api.php?data=xyz |
| | **name** string | success | Name (label) of the server **Sample:** ansible-test-vm |
| | **os** string | success | Operating system used for the server **Sample:** CentOS 6 x64 |
| | **pending\_charges** float | success | Pending charges **Sample:** 0.01 |
| | **plan** string | success | Plan used for the server **Sample:** 1024 MB RAM,25 GB SSD,1.00 TB BW |
| | **power\_status** string | success | Power status of the server **Sample:** running |
| | **ram** string | success | Information about the RAM size **Sample:** 1024 MB |
| | **region** string | success | Region the server was deployed into **Sample:** Amsterdam |
| | **server\_state** string | success | State about the server **Sample:** ok |
| | **status** string | success | Status about the deployment of the server **Sample:** active |
| | **tag** string | success | TBD |
| | **v4\_gateway** string | success | IPv4 gateway **Sample:** 45.32.232.1 |
| | **v4\_main\_ip** string | success | Main IPv4 **Sample:** 45.32.233.154 |
| | **v4\_netmask** string | success | Netmask IPv4 **Sample:** 255.255.254.0 |
| | **v6\_main\_ip** string | success | Main IPv6 |
| | **v6\_network** string | success | Network IPv6 |
| | **v6\_network\_size** string | success | Network size IPv6 |
| | **v6\_networks** list / elements=string | success | Networks IPv6 |
| | **vcpu\_count** integer | success | Virtual CPU count **Sample:** 1 |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.vultr.vultr_user β Manages users on Vultr. ngine\_io.vultr.vultr\_user β Manages users on Vultr.
=====================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_user`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove users.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **acls** list / elements=string | **Choices:*** manage\_users
* subscriptions
* provisioning
* billing
* support
* abuse
* dns
* upgrade
| List of ACLs this users should have, see <https://www.vultr.com/api/#user_user_list>. Required if `state=present`. One or more of the choices list, some depend on each other.
aliases: acl |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_enabled** boolean | **Choices:*** no
* **yes** β
| Whether the API is enabled or not. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **email** string | | Email of the user. Required if `state=present`. |
| **force** boolean | **Choices:*** **no** β
* yes
| Password will only be changed with enforcement. |
| **name** string / required | | Name of the user |
| **password** string | | Password of the user. Only considered while creating a user or when `force=yes`. |
| **state** string | **Choices:*** **present** β
* absent
| State of the user. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Ensure a user exists
ngine_io.vultr.vultr_user:
name: john
email: [email protected]
password: s3cr3t
acls:
- upgrade
- dns
- manage_users
- subscriptions
- upgrade
- name: Remove a user
ngine_io.vultr.vultr_user:
name: john
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_user** complex | success | Response from Vultr API |
| | **acls** list / elements=string | success | List of ACLs of the user. **Sample:** ['manage\_users', 'support', 'upgrade'] |
| | **api\_enabled** boolean | success | Whether the API is enabled or not. **Sample:** True |
| | **api\_key** string | only after resource was created | API key of the user. **Sample:** 567E6K567E6K567E6K567E6K567E6K |
| | **email** string | success | Email of the user. **Sample:** [email protected] |
| | **id** string | success | ID of the user. **Sample:** 5904bc6ed9234 |
| | **name** string | success | Name of the user. **Sample:** john |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.vultr.vultr_user_info β Get information about the Vultr user available. ngine\_io.vultr.vultr\_user\_info β Get information about the Vultr user available.
===================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_user_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Get infos about users available in Vultr.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Get Vultr user infos
ngine_io.vultr.vultr_user_info:
register: result
- name: Print the infos
debug:
var: result.vultr_user_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_user\_info** complex | available | Response from Vultr API as list |
| | **acls** list / elements=string | success | List of ACLs of the user. **Sample:** ['manage\_users', 'support', 'upgrade'] |
| | **api\_enabled** boolean | success | Whether the API is enabled or not. **Sample:** True |
| | **api\_key** string | only after resource was created | API key of the user. **Sample:** 567E6K567E6K567E6K567E6K567E6K |
| | **email** string | success | Email of the user. **Sample:** [email protected] |
| | **id** string | success | ID of the user. **Sample:** 5904bc6ed9234 |
| | **name** string | success | Name of the user. **Sample:** john |
### Authors
* Yanis Guenane (@Spredzy)
* RenΓ© Moser (@resmo)
ansible ngine_io.vultr.vultr_dns_record β Manages DNS records on Vultr. ngine\_io.vultr.vultr\_dns\_record β Manages DNS records on Vultr.
==================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_dns_record`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update and remove DNS records.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **data** string | | Data of the record. Required if `state=present` or `multiple=yes`. |
| **domain** string / required | | The domain the record is related to. |
| **multiple** boolean | **Choices:*** **no** β
* yes
| Whether to use more than one record with similar `name` including no name and `record_type`. Only allowed for a few record types, e.g. `record_type=A`, `record_type=NS` or `record_type=MX`.
`data` will not be updated, instead it is used as a key to find existing records. |
| **name** string | **Default:**"" | The record name (subrecord).
aliases: subrecord |
| **priority** integer | **Default:**0 | Priority of the record. |
| **record\_type** string | **Choices:*** **A** β
* AAAA
* CNAME
* MX
* SRV
* CAA
* TXT
* NS
* SSHFP
| Type of the record.
aliases: type |
| **state** string | **Choices:*** **present** β
* absent
| State of the DNS record. |
| **ttl** integer | **Default:**300 | TTL of the record. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Ensure an A record exists
ngine_io.vultr.vultr_dns_record:
name: www
domain: example.com
data: 10.10.10.10
ttl: 3600
- name: Ensure a second A record exists for round robin LB
ngine_io.vultr.vultr_dns_record:
name: www
domain: example.com
data: 10.10.10.11
ttl: 60
multiple: yes
- name: Ensure a CNAME record exists
ngine_io.vultr.vultr_dns_record:
name: web
record_type: CNAME
domain: example.com
data: www.example.com
- name: Ensure MX record exists
ngine_io.vultr.vultr_dns_record:
record_type: MX
domain: example.com
data: "{{ item.data }}"
priority: "{{ item.priority }}"
multiple: yes
with_items:
- { data: mx1.example.com, priority: 10 }
- { data: mx2.example.com, priority: 10 }
- { data: mx3.example.com, priority: 20 }
- name: Ensure a record is absent
ngine_io.vultr.vultr_dns_record:
name: www
domain: example.com
state: absent
- name: Ensure MX record is absent in case multiple exists
ngine_io.vultr.vultr_dns_record:
record_type: MX
domain: example.com
data: mx1.example.com
multiple: yes
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_dns\_record** complex | success | Response from Vultr API |
| | **data** string | success | Data of the DNS record. **Sample:** 10.10.10.10 |
| | **domain** string | success | Domain the DNS record is related to. **Sample:** example.com |
| | **id** integer | success | The ID of the DNS record. **Sample:** 1265277 |
| | **name** string | success | The name of the DNS record. **Sample:** web |
| | **priority** integer | success | Priority of the DNS record. **Sample:** 10 |
| | **record\_type** string | success | The name of the DNS record. **Sample:** web |
| | **ttl** integer | success | Time to live of the DNS record. **Sample:** 300 |
### Authors
* RenΓ© Moser (@resmo)
ansible ngine_io.vultr.vultr β Vultr inventory source ngine\_io.vultr.vultr β Vultr inventory source
==============================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Examples](#examples)
Synopsis
--------
* Get inventory hosts from Vultr public cloud.
* Uses an YAML configuration file ending with either *vultr.yml* or *vultr.yaml* to set parameter values (also see examples).
* Uses *api\_config*, *~/.vultr.ini*, *./vultr.ini* or `VULTR_API_CONFIG` pointing to a Vultr credentials INI file (see [https://docs.ansible.com/ansible/latest/scenario\_guides/guide\_vultr.html](../../../scenario_guides/guide_vultr)).
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **api\_account** string | **Default:**"default" | | Specify the account to be used. |
| **api\_config** path | | env:VULTR\_API\_CONFIG | Path to the vultr configuration file. If not specified will be taken from regular Vultr configuration. |
| **api\_key** string | | env:VULTR\_API\_KEY | Vultr API key. If not specified will be taken from regular Vultr configuration. |
| **compose** dictionary | **Default:**{} | | Create vars from jinja2 expressions. |
| **filter\_by\_tag** string | | | Only return servers filtered by this tag |
| **groups** dictionary | **Default:**{} | | Add hosts to group based on Jinja2 conditionals. |
| **hostname** string | **Choices:*** **v4\_main\_ip** β
* v6\_main\_ip
* name
| | Field to match the hostname. Note v4\_main\_ip corresponds to the main\_ip field returned from the API and name to label. |
| **keyed\_groups** list / elements=string | **Default:**[] | | Add hosts to group based on the values of a variable. |
| **leading\_separator** boolean added in 2.11 of ansible.builtin | **Choices:*** no
* **yes** β
| | Use in conjunction with keyed\_groups. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is "" and the default separator is "\_". Set this option to False to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. |
| **plugin** string / required | **Choices:*** vultr
| | Token that ensures this is a source file for the 'vultr' plugin. |
| **strict** boolean | **Choices:*** **no** β
* yes
| | If `yes` make invalid entries a fatal error, otherwise skip and continue. Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default. |
| **use\_extra\_vars** boolean added in 2.11 of ansible.builtin | **Choices:*** **no** β
* yes
| ini entries: [inventory\_plugins]use\_extra\_vars = no env:ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS | Merge extra vars into the available variables for composition (highest precedence). |
Examples
--------
```
# inventory_vultr.yml file in YAML format
# Example command line: ansible-inventory --list -i inventory_vultr.yml
# Group by a region as lower case and with prefix e.g. "vultr_region_amsterdam" and by OS without prefix e.g. "CentOS_7_x64"
plugin: vultr
keyed_groups:
- prefix: vultr_region
key: region | lower
- separator: ""
key: os
# Pass a tag filter to the API
plugin: vultr
filter_by_tag: Cache
```
### Authors
* Yanis Guenane (@Spredzy)
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.vultr.vultr_network_info β Gather information about the Vultr networks available. ngine\_io.vultr.vultr\_network\_info β Gather information about the Vultr networks available.
=============================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_network_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about networks available in Vultr.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Gather Vultr networks information
ngine_io.vultr.vultr_network_info:
register: result
- name: Print the gathered information
debug:
var: result.vultr_network_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_network\_info** complex | success | Response from Vultr API |
| | **date\_created** string | success | Date when the network was created **Sample:** 2018-08-02 08:54:52 |
| | **id** string | success | ID of the network **Sample:** net5b62c6dc63ef5 |
| | **name** string | success | Name (label) of the network **Sample:** mynetwork |
| | **region** string | success | Region the network was deployed into **Sample:** Amsterdam |
| | **v4\_subnet** string | success | IPv4 Network address **Sample:** 192.168.42.0 |
| | **v4\_subnet\_mask** integer | success | Ipv4 Network mask **Sample:** 24 |
### Authors
* Yanis Guenane (@Spredzy)
ansible ngine_io.vultr.vultr_block_storage β Manages block storage volumes on Vultr. ngine\_io.vultr.vultr\_block\_storage β Manages block storage volumes on Vultr.
===============================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_block_storage`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage block storage volumes on Vultr.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **attached\_to\_SUBID** integer | | The ID of the server the volume is attached to. Required if *state* is attached.
aliases: attached\_to\_id |
| **live\_attachment** boolean | **Choices:*** no
* **yes** β
| Whether the volume should be attached/detached, even if the server not stopped. |
| **name** string / required | | Name of the block storage volume.
aliases: description, label |
| **region** string | | Region the block storage volume is deployed into. Required if *state* is present. |
| **size** integer | | Size of the block storage volume in GB. Required if *state* is present. If it's larger than the volume's current size, the volume will be resized. |
| **state** string | **Choices:*** **present** β
* absent
* attached
* detached
| State of the block storage volume. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Ensure a block storage volume is present
ngine_io.vultr.vultr_block_storage:
name: myvolume
size: 10
region: Amsterdam
- name: Ensure a block storage volume is absent
ngine_io.vultr.vultr_block_storage:
name: myvolume
state: absent
- name: Ensure a block storage volume exists and is attached to server 114
ngine_io.vultr.vultr_block_storage:
name: myvolume
state: attached
attached_to_id: 114
size: 10
- name: Ensure a block storage volume exists and is not attached to any server
ngine_io.vultr.vultr_block_storage:
name: myvolume
state: detached
size: 10
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_block\_storage** complex | success | Response from Vultr API |
| | **attached\_to\_id** string | success | The ID of the server the volume is attached to **Sample:** 10194376 |
| | **cost\_per\_month** float | success | Cost per month for the volume **Sample:** 1.0 |
| | **date\_created** string | success | Date when the volume was created **Sample:** 2017-08-26 12:47:48 |
| | **id** string | success | ID of the block storage volume **Sample:** 1234abcd |
| | **name** string | success | Name of the volume **Sample:** ansible-test-volume |
| | **region** string | success | Region the volume was deployed into **Sample:** New Jersey |
| | **size** integer | success | Information about the volume size in GB **Sample:** 10 |
| | **status** string | success | Status about the deployment of the volume **Sample:** active |
### Authors
* Yanis Guenane (@Spredzy)
ansible ngine_io.vultr.vultr_dns_domain_info β Gather information about the Vultr DNS domains available. ngine\_io.vultr.vultr\_dns\_domain\_info β Gather information about the Vultr DNS domains available.
====================================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_dns_domain_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about DNS domains available in Vultr.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Gather Vultr DNS domains information
ngine_io.vultr.vultr_dns_domains_info:
register: result
- name: Print the gathered information
debug:
var: result.vultr_dns_domain_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_dns\_domain\_info** complex | success | Response from Vultr API |
| | **date\_created** string | success | Date the DNS domain was created. **Sample:** 2017-08-26 12:47:48 |
| | **domain** string | success | Name of the DNS Domain. **Sample:** example.com |
### Authors
* Yanis Guenane (@Spredzy)
ansible ngine_io.vultr.vultr_network β Manages networks on Vultr. ngine\_io.vultr.vultr\_network β Manages networks on Vultr.
===========================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_network`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage networks on Vultr. A network cannot be updated. It needs to be deleted and re-created.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **cidr** string | | The CIDR IPv4 network block to be used when attaching servers to this network. Required if *state=present*. |
| **name** string / required | | Name of the network.
aliases: description, label |
| **region** string | | Region the network is deployed into. Required if *state=present*. |
| **state** string | **Choices:*** **present** β
* absent
| State of the network. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Ensure a network is present
ngine_io.vultr.vultr_network:
name: mynet
cidr: 192.168.42.0/24
region: Amsterdam
- name: Ensure a network is absent
ngine_io.vultr.vultr_network:
name: mynet
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_network** complex | success | Response from Vultr API |
| | **date\_created** string | success | Date when the network was created **Sample:** 2018-08-02 08:54:52 |
| | **id** string | success | ID of the network **Sample:** net5b62c6dc63ef5 |
| | **name** string | success | Name (label) of the network **Sample:** mynetwork |
| | **region** string | success | Region the network was deployed into **Sample:** Amsterdam |
| | **v4\_subnet** string | success | IPv4 Network address **Sample:** 192.168.42.0 |
| | **v4\_subnet\_mask** integer | success | Ipv4 Network mask **Sample:** 24 |
### Authors
* Yanis Guenane (@Spredzy)
ansible ngine_io.vultr.vultr_firewall_rule β Manages firewall rules on Vultr. ngine\_io.vultr.vultr\_firewall\_rule β Manages firewall rules on Vultr.
========================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_firewall_rule`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create and remove firewall rules.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **cidr** string | | Network in CIDR format The CIDR format must match with the `ip_version` value. Required if `state=present`. Defaulted to 0.0.0.0/0 or ::/0 depending on `ip_version`. |
| **end\_port** integer | | End port for the firewall rule. Only considered if `protocol` is tcp or udp and *state=present*. |
| **group** string / required | | Name of the firewall group. |
| **ip\_version** string | **Choices:*** **v4** β
* v6
| IP address version
aliases: ip\_type |
| **protocol** string | **Choices:*** icmp
* **tcp** β
* udp
* gre
| Protocol of the firewall rule. |
| **start\_port** integer | | Start port for the firewall rule. Required if `protocol` is tcp or udp and *state=present*.
aliases: port |
| **state** string | **Choices:*** **present** β
* absent
| State of the firewall rule. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: ensure a firewall rule is present
ngine_io.vultr.vultr_firewall_rule:
group: application
protocol: tcp
start_port: 8000
end_port: 9000
cidr: 17.17.17.0/24
- name: open DNS port for all ipv4 and ipv6
ngine_io.vultr.vultr_firewall_rule:
group: dns
protocol: udp
port: 53
ip_version: "{{ item }}"
with_items: [ v4, v6 ]
- name: allow ping
ngine_io.vultr.vultr_firewall_rule:
group: web
protocol: icmp
- name: ensure a firewall rule is absent
ngine_io.vultr.vultr_firewall_rule:
group: application
protocol: tcp
start_port: 8000
end_port: 9000
cidr: 17.17.17.0/24
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_firewall\_rule** complex | success | Response from Vultr API |
| | **action** string | success | Action of the firewall rule **Sample:** accept |
| | **cidr** string | success and when port range | CIDR of the firewall rule (IPv4 or IPv6) **Sample:** 0.0.0.0/0 |
| | **end\_port** integer | success and when port range and protocol is tcp or udp | End port of the firewall rule **Sample:** 8080 |
| | **group** string | success | Firewall group the rule is into. **Sample:** web |
| | **protocol** string | success | Protocol of the firewall rule **Sample:** tcp |
| | **rule\_number** integer | success | Rule number of the firewall rule **Sample:** 2 |
| | **start\_port** integer | success and protocol is tcp or udp | Start port of the firewall rule **Sample:** 80 |
### Authors
* RenΓ© Moser (@resmo)
| programming_docs |
ansible ngine_io.vultr.vultr_server_baremetal β Manages baremetal servers on Vultr. ngine\_io.vultr.vultr\_server\_baremetal β Manages baremetal servers on Vultr.
==============================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_server_baremetal`.
New in version 0.3.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Deploy and destroy servers.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **hostname** string | | The hostname to assign to this server. |
| **ipv6\_enabled** boolean | **Choices:*** no
* yes
| Whether to enable IPv6 or not. |
| **name** string / required | | Name of the server.
aliases: label |
| **notify\_activate** boolean | **Choices:*** **no** β
* yes
| Whether to send an activation email when the server is ready or not. Only considered on creation. |
| **os** string | | The operating system name or ID. Required if the server does not yet exist and is not restoring from a snapshot. |
| **plan** string | | Plan name or ID to use for the server. Required if the server does not yet exist. |
| **region** string | | Region name or ID the server is deployed into. Required if the server does not yet exist. |
| **reserved\_ip\_v4** string | | IP address of the floating IP to use as the main IP of this server. Only considered on creation. |
| **ssh\_keys** list / elements=string | | List of SSH key names or IDs passed to the server on creation.
aliases: ssh\_key |
| **startup\_script** string | | Name or ID of the startup script to execute on boot. Only considered while creating the server. |
| **state** string | **Choices:*** **present** β
* absent
| State of the server. |
| **tag** string | | Tag for the server. |
| **user\_data** string | | User data to be passed to the server. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: create server
ngine_io.vultr.vultr_server_baremetal:
name: "{{ vultr_server_baremetal_name }}"
os: Debian 9 x64 (stretch)
plan: 32768 MB RAM,2x 240 GB SSD,5.00 TB BW
region: Amsterdam
- name: ensure a server is absent
ngine_io.vultr.vultr_server_baremetal:
name: "{{ vultr_server_baremetal_name }}"
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_server\_baremetal** complex | success | Response from Vultr API with a few additions/modification |
| | **allowed\_bandwidth\_gb** integer | success | Allowed bandwidth to use in GB **Sample:** 1000 |
| | **cost\_per\_month** float | success | Cost per month for the server **Sample:** 120.0 |
| | **current\_bandwidth\_gb** integer | success | Current bandwidth used for the server |
| | **date\_created** string | success | Date when the server was created **Sample:** 2017-04-12 18:45:41 |
| | **default\_password** string | success | Password to login as root into the server **Sample:** ab81u!ryranq |
| | **disk** string | success | Information about the disk **Sample:** SSD 250 GB |
| | **id** string | success | ID of the server **Sample:** 900000 |
| | **internal\_ip** string | success | Internal IP |
| | **name** string | success | Name (label) of the server **Sample:** ansible-test-baremetal |
| | **os** string | success | Operating system used for the server **Sample:** Debian 9 x64 |
| | **pending\_charges** float | success | Pending charges **Sample:** 0.18 |
| | **plan** string | success | Plan used for the server **Sample:** 32768 MB RAM,2x 240 GB SSD,5.00 TB BW |
| | **ram** string | success | Information about the RAM size **Sample:** 32768 MB |
| | **region** string | success | Region the server was deployed into **Sample:** Amsterdam |
| | **status** string | success | Status about the deployment of the server **Sample:** active |
| | **tag** string | success | Server tag **Sample:** my tag |
| | **v4\_gateway** string | success | IPv4 gateway **Sample:** 203.0.113.1 |
| | **v4\_main\_ip** string | success | Main IPv4 **Sample:** 203.0.113.10 |
| | **v4\_netmask** string | success | Netmask IPv4 **Sample:** 255.255.255.0 |
| | **v6\_main\_ip** string | success | Main IPv6 **Sample:** 2001:DB8:9000::100 |
| | **v6\_network** string | success | Network IPv6 **Sample:** 2001:DB8:9000:: |
| | **v6\_network\_size** integer | success | Network size IPv6 **Sample:** 64 |
| | **v6\_networks** list / elements=string | success | Networks IPv6 |
### Authors
* Nate River (@vitikc)
* Simon Baerlocher (@sbaerlocher)
ansible ngine_io.vultr.vultr_server_info β Gather information about the Vultr servers available. ngine\_io.vultr.vultr\_server\_info β Gather information about the Vultr servers available.
===========================================================================================
Note
This plugin is part of the [ngine\_io.vultr collection](https://galaxy.ansible.com/ngine_io/vultr) (version 1.1.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install ngine_io.vultr`.
To use it in a playbook, specify: `ngine_io.vultr.vultr_server_info`.
New in version 0.1.0: of ngine\_io.vultr
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Gather information about servers available.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.6
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_account** string | **Default:**"default" | Name of the ini section in the `vultr.ini` file. The ENV variable `VULTR_API_ACCOUNT` is used as default, when defined. |
| **api\_endpoint** string | | URL to API endpint (without trailing slash). The ENV variable `VULTR_API_ENDPOINT` is used as default, when defined. Fallback value is <https://api.vultr.com> if not specified. |
| **api\_key** string | | API key of the Vultr API. The ENV variable `VULTR_API_KEY` is used as default, when defined. |
| **api\_retries** integer | | Amount of retries in case of the Vultr API retuns an HTTP 503 code. The ENV variable `VULTR_API_RETRIES` is used as default, when defined. Fallback value is 5 retries if not specified. |
| **api\_retry\_max\_delay** integer | | Retry backoff delay in seconds is exponential up to this max. value, in seconds. The ENV variable `VULTR_API_RETRY_MAX_DELAY` is used as default, when defined. Fallback value is 12 seconds. |
| **api\_timeout** integer | | HTTP timeout to Vultr API. The ENV variable `VULTR_API_TIMEOUT` is used as default, when defined. Fallback value is 60 seconds if not specified. |
| **validate\_certs** boolean | **Choices:*** no
* **yes** β
| Validate SSL certs of the Vultr API. |
Notes
-----
Note
* Also see the API documentation on <https://www.vultr.com/api/>.
Examples
--------
```
- name: Gather Vultr servers information
ngine_io.vultr.vultr_server_info:
register: result
- name: Print the gathered information
debug:
var: result.vultr_server_info
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vultr\_api** complex | success | Response from Vultr API with a few additions/modification |
| | **api\_account** string | success | Account used in the ini file to select the key **Sample:** default |
| | **api\_endpoint** string | success | Endpoint used for the API requests **Sample:** https://api.vultr.com |
| | **api\_retries** integer | success | Amount of max retries for the API requests **Sample:** 5 |
| | **api\_retry\_max\_delay** integer | success | Exponential backoff delay in seconds between retries up to this max delay value. **Sample:** 12 |
| | **api\_timeout** integer | success | Timeout used for the API requests **Sample:** 60 |
| **vultr\_server\_info** complex | success | Response from Vultr API |
| | **allowed\_bandwidth\_gb** integer | success | Allowed bandwidth to use in GB **Sample:** 1000 |
| | **auto\_backup\_enabled** boolean | success | Whether automatic backups are enabled |
| | **cost\_per\_month** float | success | Cost per month for the server **Sample:** 5.0 |
| | **current\_bandwidth\_gb** integer | success | Current bandwidth used for the server |
| | **date\_created** string | success | Date when the server was created **Sample:** 2017-08-26 12:47:48 |
| | **default\_password** string | success | Password to login as root into the server **Sample:** !p3EWYJm$qDWYaFr |
| | **disk** string | success | Information about the disk **Sample:** Virtual 25 GB |
| | **firewall\_group** string | success and available | Firewall group the server is assigned to **Sample:** CentOS 6 x64 |
| | **id** string | success | ID of the server **Sample:** 10194376 |
| | **internal\_ip** string | success | Internal IP |
| | **kvm\_url** string | success | URL to the VNC **Sample:** https://my.vultr.com/subs/vps/novnc/api.php?data=xyz |
| | **name** string | success | Name (label) of the server **Sample:** ansible-test-vm |
| | **os** string | success | Operating system used for the server **Sample:** CentOS 6 x64 |
| | **pending\_charges** float | success | Pending charges **Sample:** 0.01 |
| | **plan** string | success | Plan used for the server **Sample:** 1024 MB RAM,25 GB SSD,1.00 TB BW |
| | **power\_status** string | success | Power status of the server **Sample:** running |
| | **ram** string | success | Information about the RAM size **Sample:** 1024 MB |
| | **region** string | success | Region the server was deployed into **Sample:** Amsterdam |
| | **server\_state** string | success | State about the server **Sample:** ok |
| | **status** string | success | Status about the deployment of the server **Sample:** active |
| | **tag** string | success | TBD |
| | **v4\_gateway** string | success | IPv4 gateway **Sample:** 45.32.232.1 |
| | **v4\_main\_ip** string | success | Main IPv4 **Sample:** 45.32.233.154 |
| | **v4\_netmask** string | success | Netmask IPv4 **Sample:** 255.255.254.0 |
| | **v6\_main\_ip** string | success | Main IPv6 |
| | **v6\_network** string | success | Network IPv6 |
| | **v6\_network\_size** string | success | Network size IPv6 |
| | **v6\_networks** list / elements=string | success | Networks IPv6 |
| | **vcpu\_count** integer | success | Virtual CPU count **Sample:** 1 |
### Authors
* Yanis Guenane (@Spredzy)
ansible Collections in the Awx Namespace Collections in the Awx Namespace
================================
These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **awx** namespace.
* [awx.awx](awx/index#plugins-in-awx-awx)
ansible awx.awx.execution_environment β create, update, or destroy Execution Environments in Automation Platform Controller. awx.awx.execution\_environment β create, update, or destroy Execution Environments in Automation Platform Controller.
=====================================================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.execution_environment`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Execution Environments in Automation Platform Controller. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **credential** string | | Name of the credential to use for the execution environment. |
| **description** string | | Description to use for the execution environment. |
| **image** string / required | | The fully qualified url of the container image. |
| **name** string / required | | Name to use for the execution environment. |
| **organization** string | | The organization the execution environment belongs to. |
| **pull** string | **Choices:*** always
* **missing** β
* never
| determine image pull behavior |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add EE to the controller instance
execution_environment:
name: "My EE"
image: quay.io/ansible/awx-ee
```
### Authors
* Shane McDonald (@shanemcd)
ansible awx.awx.token β create, update, or destroy Automation Platform Controller tokens. awx.awx.token β create, update, or destroy Automation Platform Controller tokens.
=================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.token`.
New in version 2.3.0: of awx.awx
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create or destroy Automation Platform Controller tokens. See <https://www.ansible.com/tower> for an overview.
* In addition, the module sets an Ansible fact which can be passed into other controller modules as the parameter controller\_oauthtoken. See examples for usage.
* Because of the sensitive nature of tokens, the created token value is only available once through the Ansible fact. (See RETURN for details)
* Due to the nature of tokens this module is not idempotent. A second will with the same parameters will create a new token.
* If you are creating a temporary token for use with modules you should delete the token when you are done with it. See the example for how to do it.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **application** string | | The application tied to this token. |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **description** string | **Default:**"" | Optional description of this access token. |
| **existing\_token** dictionary | | The data structure produced from token in create mode to be used with state absent. |
| **existing\_token\_id** string | | A token ID (number) which can be used to delete an arbitrary token with state absent. |
| **scope** string | **Choices:*** read
* **write** β
| Allowed scopes, further restricts user's permissions. Must be a simple space-separated string with allowed scopes ['read', 'write']. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- block:
- name: Create a new token using an existing token
token:
description: '{{ token_description }}'
scope: "write"
state: present
controller_oauthtoken: "{{ my_existing_token }}"
- name: Delete this token
token:
existing_token: "{{ token }}"
state: absent
- name: Create a new token using username/password
token:
description: '{{ token_description }}'
scope: "write"
state: present
controller_username: "{{ my_username }}"
controller_password: "{{ my_password }}"
- name: Use our new token to make another call
job_list:
controller_oauthtoken: "{{ token }}"
always:
- name: Delete our Token with the token we created
token:
existing_token: "{{ token }}"
state: absent
when: token is defined
- name: Delete a token by its id
token:
existing_token_id: 4
state: absent
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **controller\_token** dictionary | on successful create | An Ansible Fact variable representing a token object which can be used for auth in subsequent modules. See examples for usage. |
| | **id** string | success | The numeric ID of the token created |
| | **token** string | success | The token that was generated. This token can never be accessed again, make sure this value is noted before it is lost. |
### Authors
* John Westcott IV (@john-westcott-iv)
| programming_docs |
ansible awx.awx.application β create, update, or destroy Automation Platform Controller applications awx.awx.application β create, update, or destroy Automation Platform Controller applications
============================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.application`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller applications. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **authorization\_grant\_type** string | **Choices:*** password
* authorization-code
| The grant type the user must use for acquire tokens for this application. |
| **client\_type** string | **Choices:*** public
* confidential
| Set to public or confidential depending on how secure the client device is. |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **description** string | | Description of the application. |
| **name** string / required | | Name of the application. |
| **organization** string / required | | Name of organization for application. |
| **redirect\_uris** list / elements=string | | Allowed urls list, space separated. Required when authorization-grant-type=authorization-code |
| **skip\_authorization** boolean | **Choices:*** no
* yes
| Set True to skip authorization step for completely trusted applications. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add Foo application
application:
name: "Foo"
description: "Foo bar application"
organization: "test"
state: present
authorization_grant_type: password
client-type: public
- name: Add Foo application
application:
name: "Foo"
description: "Foo bar application"
organization: "test"
state: present
authorization_grant_type: authorization-code
client-type: confidential
redirect_uris:
- http://tower.com/api/v2/
```
### Authors
* Geoffrey Bacheot (@jffz)
ansible awx.awx.instance_group β create, update, or destroy Automation Platform Controller instance groups. awx.awx.instance\_group β create, update, or destroy Automation Platform Controller instance groups.
====================================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.instance_group`.
New in version 4.0.0: of awx.awx
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller instance groups. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **credential** string | | Credential to authenticate with Kubernetes or OpenShift. Must be of type "Kubernetes/OpenShift API Bearer Token". |
| **instances** list / elements=string | | The instances associated with this instance\_group |
| **is\_container\_group** boolean | **Choices:*** **no** β
* yes
| Signifies that this InstanceGroup should act as a ContainerGroup. If no credential is specified, the underlying Pod's ServiceAccount will be used. |
| **name** string / required | | Name of this instance group. |
| **new\_name** string | | Setting this option will change the existing name (looked up via the name field. |
| **pod\_spec\_override** string | | A custom Kubernetes or OpenShift Pod specification. |
| **policy\_instance\_list** list / elements=string | | List of exact-match Instances that will be assigned to this group |
| **policy\_instance\_minimum** integer | **Default:**"0" | Static minimum number of Instances that will be automatically assign to this group when new instances come online. |
| **policy\_instance\_percentage** integer | **Default:**"0" | Minimum percentage of all instances that will be automatically assigned to this group when new instances come online. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
### Authors
* John Westcott IV (@john-westcott-iv)
ansible awx.awx.export β export resources from Automation Platform Controller. awx.awx.export β export resources from Automation Platform Controller.
======================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.export`.
New in version 3.7.0: of awx.awx
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Export assets from Automation Platform Controller.
Requirements
------------
The below requirements are needed on the host that executes this module.
* awxkit >= 9.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **all** boolean | **Choices:*** no
* yes
**Default:**"False" | Export all assets |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **credential\_types** string | | credential type name to export |
| **credentials** string | | credential name to export |
| **execution\_environments** string | | execution environment name to export |
| **inventory** string | | inventory name to export |
| **inventory\_sources** string | | inventory soruce to export |
| **job\_templates** string | | job template name to export |
| **notification\_templates** string | | notification template name to export |
| **organizations** string | | organization name to export |
| **projects** string | | project name to export |
| **teams** string | | team name to export |
| **users** string | | user name to export |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **workflow\_job\_templates** string | | workflow name to export |
Notes
-----
Note
* Specifying a name of βallβ for any asset type will export all items of that asset type.
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Export all assets
export:
all: True
- name: Export all inventories
export:
inventory: 'all'
- name: Export a job template named "My Template" and all Credentials
export:
job_template: "My Template"
credential: 'all'
```
### Authors
* John Westcott IV (@john-westcott-iv)
ansible Awx.Awx Awx.Awx
=======
Collection version 19.4.0
Plugin Index
------------
These are the plugins in the awx.awx collection
### Inventory Plugins
* [controller](controller_inventory#ansible-collections-awx-awx-controller-inventory) β
### Lookup Plugins
* [controller\_api](controller_api_lookup#ansible-collections-awx-awx-controller-api-lookup) β
* [schedule\_rrule](schedule_rrule_lookup#ansible-collections-awx-awx-schedule-rrule-lookup) β Generate an rrule string which can be used for Schedules
### Modules
* [ad\_hoc\_command](ad_hoc_command_module#ansible-collections-awx-awx-ad-hoc-command-module) β create, update, or destroy Automation Platform Controller ad hoc commands.
* [ad\_hoc\_command\_cancel](ad_hoc_command_cancel_module#ansible-collections-awx-awx-ad-hoc-command-cancel-module) β Cancel an Ad Hoc Command.
* [ad\_hoc\_command\_wait](ad_hoc_command_wait_module#ansible-collections-awx-awx-ad-hoc-command-wait-module) β Wait for Automation Platform Controller Ad Hoc Command to finish.
* [application](application_module#ansible-collections-awx-awx-application-module) β create, update, or destroy Automation Platform Controller applications
* [controller\_meta](controller_meta_module#ansible-collections-awx-awx-controller-meta-module) β Returns metadata about the collection this module lives in.
* [credential](credential_module#ansible-collections-awx-awx-credential-module) β create, update, or destroy Automation Platform Controller credential.
* [credential\_input\_source](credential_input_source_module#ansible-collections-awx-awx-credential-input-source-module) β create, update, or destroy Automation Platform Controller credential input sources.
* [credential\_type](credential_type_module#ansible-collections-awx-awx-credential-type-module) β Create, update, or destroy custom Automation Platform Controller credential type.
* [execution\_environment](execution_environment_module#ansible-collections-awx-awx-execution-environment-module) β create, update, or destroy Execution Environments in Automation Platform Controller.
* [export](export_module#ansible-collections-awx-awx-export-module) β export resources from Automation Platform Controller.
* [group](group_module#ansible-collections-awx-awx-group-module) β create, update, or destroy Automation Platform Controller group.
* [host](host_module#ansible-collections-awx-awx-host-module) β create, update, or destroy Automation Platform Controller host.
* [import](import_module#ansible-collections-awx-awx-import-module) β import resources into Automation Platform Controller.
* [instance\_group](instance_group_module#ansible-collections-awx-awx-instance-group-module) β create, update, or destroy Automation Platform Controller instance groups.
* [inventory](inventory_module#ansible-collections-awx-awx-inventory-module) β create, update, or destroy Automation Platform Controller inventory.
* [inventory\_source](inventory_source_module#ansible-collections-awx-awx-inventory-source-module) β create, update, or destroy Automation Platform Controller inventory source.
* [inventory\_source\_update](inventory_source_update_module#ansible-collections-awx-awx-inventory-source-update-module) β Update inventory source(s).
* [job\_cancel](job_cancel_module#ansible-collections-awx-awx-job-cancel-module) β Cancel an Automation Platform Controller Job.
* [job\_launch](job_launch_module#ansible-collections-awx-awx-job-launch-module) β Launch an Ansible Job.
* [job\_list](job_list_module#ansible-collections-awx-awx-job-list-module) β List Automation Platform Controller jobs.
* [job\_template](job_template_module#ansible-collections-awx-awx-job-template-module) β create, update, or destroy Automation Platform Controller job templates.
* [job\_wait](job_wait_module#ansible-collections-awx-awx-job-wait-module) β Wait for Automation Platform Controller job to finish.
* [label](label_module#ansible-collections-awx-awx-label-module) β create, update, or destroy Automation Platform Controller labels.
* [license](license_module#ansible-collections-awx-awx-license-module) β Set the license for Automation Platform Controller
* [notification\_template](notification_template_module#ansible-collections-awx-awx-notification-template-module) β create, update, or destroy Automation Platform Controller notification.
* [organization](organization_module#ansible-collections-awx-awx-organization-module) β create, update, or destroy Automation Platform Controller organizations
* [project](project_module#ansible-collections-awx-awx-project-module) β create, update, or destroy Automation Platform Controller projects
* [project\_update](project_update_module#ansible-collections-awx-awx-project-update-module) β Update a Project in Automation Platform Controller
* [role](role_module#ansible-collections-awx-awx-role-module) β grant or revoke an Automation Platform Controller role.
* [schedule](schedule_module#ansible-collections-awx-awx-schedule-module) β create, update, or destroy Automation Platform Controller schedules.
* [settings](settings_module#ansible-collections-awx-awx-settings-module) β Modify Automation Platform Controller settings.
* [team](team_module#ansible-collections-awx-awx-team-module) β create, update, or destroy Automation Platform Controller team.
* [token](token_module#ansible-collections-awx-awx-token-module) β create, update, or destroy Automation Platform Controller tokens.
* [user](user_module#ansible-collections-awx-awx-user-module) β create, update, or destroy Automation Platform Controller users.
* [workflow\_approval](workflow_approval_module#ansible-collections-awx-awx-workflow-approval-module) β Approve an approval node in a workflow job.
* [workflow\_job\_template](workflow_job_template_module#ansible-collections-awx-awx-workflow-job-template-module) β create, update, or destroy Automation Platform Controller workflow job templates.
* [workflow\_job\_template\_node](workflow_job_template_node_module#ansible-collections-awx-awx-workflow-job-template-node-module) β create, update, or destroy Automation Platform Controller workflow job template nodes.
* [workflow\_launch](workflow_launch_module#ansible-collections-awx-awx-workflow-launch-module) β Run a workflow in Automation Platform Controller
* [workflow\_node\_wait](workflow_node_wait_module#ansible-collections-awx-awx-workflow-node-wait-module) β Approve an approval node in a workflow job.
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible awx.awx.team β create, update, or destroy Automation Platform Controller team. awx.awx.team β create, update, or destroy Automation Platform Controller team.
==============================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.team`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller teams. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **description** string | | The description to use for the team. |
| **name** string / required | | Name to use for the team. |
| **new\_name** string | | To use when changing a team's name. |
| **organization** string / required | | Organization the team should be made a member of. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Create team
team:
name: Team Name
description: Team Description
organization: test-org
state: present
controller_config_file: "~/tower_cli.cfg"
```
### Authors
* Wayne Witzel III (@wwitzel3)
| programming_docs |
ansible awx.awx.workflow_node_wait β Approve an approval node in a workflow job. awx.awx.workflow\_node\_wait β Approve an approval node in a workflow job.
==========================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.workflow_node_wait`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Approve an approval node in a workflow job. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **interval** float | **Default:**1 | The interval in sections, to request an update from the controller. |
| **name** string / required | | Name of the workflow node to wait on. |
| **timeout** integer | **Default:**10 | Maximum time in seconds to wait for a workflow job to to reach approval node. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **workflow\_job\_id** integer / required | | ID of the workflow job to monitor for node. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Launch a workflow with a timeout of 10 seconds
workflow_launch:
workflow_template: "Test Workflow"
wait: False
register: workflow
- name: Wait for a workflow node to finish
workflow_node_wait:
workflow_job_id: "{{ workflow.id }}"
name: Approval Data Step
timeout: 120
```
### Authors
* Sean Sullivan (@sean-m-sullivan)
ansible awx.awx.job_template β create, update, or destroy Automation Platform Controller job templates. awx.awx.job\_template β create, update, or destroy Automation Platform Controller job templates.
================================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.job_template`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller job templates. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_simultaneous** boolean | **Choices:*** no
* yes
| Allow simultaneous runs of the job template.
aliases: concurrent\_jobs\_enabled |
| **ask\_credential\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for credential on launch.
aliases: ask\_credential |
| **ask\_diff\_mode\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user to enable diff mode (show changes) to files when supported by modules.
aliases: ask\_diff\_mode |
| **ask\_inventory\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for inventory on launch.
aliases: ask\_inventory |
| **ask\_job\_type\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for job type on launch.
aliases: ask\_job\_type |
| **ask\_limit\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for a limit on launch.
aliases: ask\_limit |
| **ask\_scm\_branch\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for (scm branch) on launch. |
| **ask\_skip\_tags\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for job tags to skip on launch.
aliases: ask\_skip\_tags |
| **ask\_tags\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for job tags on launch.
aliases: ask\_tags |
| **ask\_variables\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for (extra\_vars) on launch.
aliases: ask\_extra\_vars |
| **ask\_verbosity\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user to choose a verbosity level on launch.
aliases: ask\_verbosity |
| **become\_enabled** boolean | **Choices:*** no
* yes
| Activate privilege escalation. |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **copy\_from** string | | Name or id to copy the job template from. This will copy an existing job template and change any parameters supplied. The new job template name will be the one provided in the name parameter. The organization parameter is not used in this, to facilitate copy from one organization to another. Provide the id or use the lookup plugin to provide the id if multiple job templates share the same name. |
| **credential** string | | Name of the credential to use for the job template. Deprecated, use 'credentials'. |
| **credentials** list / elements=string | | List of credentials to use for the job template. |
| **custom\_virtualenv** string | | Local absolute file path containing a custom Python virtualenv to use. Only compatible with older versions of AWX/Tower Deprecated, will be removed in the future |
| **description** string | | Description to use for the job template. |
| **diff\_mode** boolean | **Choices:*** no
* yes
| Enable diff mode for the job template.
aliases: diff\_mode\_enabled |
| **execution\_environment** string | | Execution Environment to use for the JT. |
| **extra\_vars** dictionary | | Specify `extra_vars` for the template. |
| **force\_handlers** boolean | **Choices:*** **no** β
* yes
| Enable forcing playbook handlers to run even if a task fails.
aliases: force\_handlers\_enabled |
| **forks** integer | | The number of parallel or simultaneous processes to use while executing the playbook. |
| **host\_config\_key** string | | Allow provisioning callbacks using this host config key. |
| **instance\_groups** list / elements=string | | list of Instance Groups for this Organization to run on. |
| **inventory** string | | Name of the inventory to use for the job template. |
| **job\_slice\_count** integer | **Default:**"1" | The number of jobs to slice into at runtime. Will cause the Job Template to launch a workflow if value is greater than 1. |
| **job\_tags** string | | Comma separated list of the tags to use for the job template. |
| **job\_type** string | **Choices:*** run
* check
| The job type to use for the job template. |
| **labels** list / elements=string | | The labels applied to this job template |
| **limit** string | | A host pattern to further constrain the list of hosts managed or affected by the playbook |
| **name** string / required | | Name to use for the job template. |
| **new\_name** string | | Setting this option will change the existing name (looed up via the name field. |
| **notification\_templates\_error** list / elements=string | | list of notifications to send on error |
| **notification\_templates\_started** list / elements=string | | list of notifications to send on start |
| **notification\_templates\_success** list / elements=string | | list of notifications to send on success |
| **organization** string | | Organization the job template exists in. Used to help lookup the object, cannot be modified using this module. The Organization is inferred from the associated project If not provided, will lookup by name only, which does not work with duplicates. Requires Automation Platform Version 3.7.0 or AWX 10.0.0 IS NOT backwards compatible with earlier versions. |
| **playbook** string | | Path to the playbook to use for the job template within the project provided. |
| **project** string | | Name of the project to use for the job template. |
| **scm\_branch** string | **Default:**"" | Branch to use in job run. Project default used if blank. Only allowed if project allow\_override field is set to true. |
| **skip\_tags** string | | Comma separated list of the tags to skip for the job template. |
| **start\_at\_task** string | | Start the playbook at the task matching this name. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **survey\_enabled** boolean | **Choices:*** no
* yes
| Enable a survey on the job template. |
| **survey\_spec** dictionary | | JSON/YAML dict formatted survey definition. |
| **timeout** integer | | Maximum time in seconds to wait for a job to finish (server-side). |
| **use\_fact\_cache** boolean | **Choices:*** no
* yes
| Enable use of fact caching for the job template.
aliases: fact\_caching\_enabled |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **vault\_credential** string | | Name of the vault credential to use for the job template. Deprecated, use 'credentials'. |
| **verbosity** integer | **Choices:*** 0
* 1
* 2
* 3
* 4
**Default:**0 | Control the output level Ansible produces as the playbook runs. 0 - Normal, 1 - Verbose, 2 - More Verbose, 3 - Debug, 4 - Connection Debug. |
| **webhook\_credential** string | | Personal Access Token for posting back the status to the service API |
| **webhook\_service** string | **Choices:*** * github
* gitlab
| Service that webhook requests will be accepted from |
Notes
-----
Note
* JSON for survey\_spec can be found in the API Documentation. See <https://docs.ansible.com/ansible-tower/latest/html/towerapi/api_ref.html#/Job_Templates/Job_Templates_job_templates_survey_spec_create> for POST operation payload example.
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Create Ping job template
job_template:
name: "Ping"
job_type: "run"
organization: "Default"
inventory: "Local"
project: "Demo"
playbook: "ping.yml"
credentials:
- "Local"
state: "present"
controller_config_file: "~/tower_cli.cfg"
survey_enabled: yes
survey_spec: "{{ lookup('file', 'my_survey.json') }}"
- name: Add start notification to Job Template
job_template:
name: "Ping"
notification_templates_started:
- Notification1
- Notification2
- name: Remove Notification1 start notification from Job Template
job_template:
name: "Ping"
notification_templates_started:
- Notification2
- name: Copy Job Template
job_template:
name: copy job template
copy_from: test job template
job_type: "run"
inventory: Copy Foo Inventory
project: test
playbook: hello_world.yml
state: "present"
```
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.ad_hoc_command_cancel β Cancel an Ad Hoc Command. awx.awx.ad\_hoc\_command\_cancel β Cancel an Ad Hoc Command.
============================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.ad_hoc_command_cancel`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Cancel ad hoc command. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **command\_id** integer / required | | ID of the command to cancel |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **fail\_if\_not\_running** boolean | **Choices:*** **no** β
* yes
| Fail loudly if the *command\_id* can not be canceled |
| **interval** float | **Default:**1 | The interval in seconds, to request an update from . |
| **timeout** integer | | Maximum time in seconds to wait for a job to finish. Not specifying means the task will wait until the controller cancels the command. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Cancel command
ad_hoc_command_cancel:
command_id: command.id
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** integer | success | command id requesting to cancel **Sample:** 94 |
### Authors
* John Westcott IV (@john-westcott-iv)
ansible awx.awx.inventory β create, update, or destroy Automation Platform Controller inventory. awx.awx.inventory β create, update, or destroy Automation Platform Controller inventory.
========================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.inventory`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller inventories. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **copy\_from** string | | Name or id to copy the inventory from. This will copy an existing inventory and change any parameters supplied. The new inventory name will be the one provided in the name parameter. The organization parameter is not used in this, to facilitate copy from one organization to another. Provide the id or use the lookup plugin to provide the id if multiple inventories share the same name. |
| **description** string | | The description to use for the inventory. |
| **host\_filter** string | | The host\_filter field. Only useful when `kind=smart`. |
| **instance\_groups** list / elements=string | | list of Instance Groups for this Organization to run on. |
| **kind** string | **Choices:*** β
* smart
| The kind field. Cannot be modified after created. |
| **name** string / required | | The name to use for the inventory. |
| **organization** string / required | | Organization the inventory belongs to. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **variables** dictionary | | Inventory variables. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add inventory
inventory:
name: "Foo Inventory"
description: "Our Foo Cloud Servers"
organization: "Bar Org"
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Copy inventory
inventory:
name: Copy Foo Inventory
copy_from: Default Inventory
description: "Our Foo Cloud Servers"
organization: Foo
state: present
```
### Authors
* Wayne Witzel III (@wwitzel3)
| programming_docs |
ansible awx.awx.workflow_job_template β create, update, or destroy Automation Platform Controller workflow job templates. awx.awx.workflow\_job\_template β create, update, or destroy Automation Platform Controller workflow job templates.
===================================================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.workflow_job_template`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller workflow job templates.
* Replaces the deprecated tower\_workflow\_template module.
* Use workflow\_job\_template\_node after this, or use the schema parameter to build the workflowβs graph
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_simultaneous** boolean | **Choices:*** no
* yes
| Allow simultaneous runs of the workflow job template. |
| **ask\_inventory\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for inventory on launch of this workflow job template |
| **ask\_limit\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for limit on launch of this workflow job template |
| **ask\_scm\_branch\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for SCM branch on launch of this workflow job template |
| **ask\_variables\_on\_launch** boolean | **Choices:*** no
* yes
| Prompt user for `extra_vars` on launch. |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **copy\_from** string | | Name or id to copy the workflow job template from. This will copy an existing workflow job template and change any parameters supplied. The new workflow job template name will be the one provided in the name parameter. The organization parameter is not used in this, to facilitate copy from one organization to another. Provide the id or use the lookup plugin to provide the id if multiple workflow job templates share the same name. |
| **description** string | | Optional description of this workflow job template. |
| **destroy\_current\_schema** boolean | **Choices:*** **no** β
* yes
| Set in order to destroy current schema on the workflow. This option is used for full schema update, if not used, nodes not described in schema will persist and keep current associations and links. |
| **extra\_vars** dictionary | | Variables which will be made available to jobs ran inside the workflow. |
| **inventory** string | | Inventory applied as a prompt, assuming job template prompts for inventory |
| **labels** list / elements=string | | The labels applied to this job template |
| **limit** string | | Limit applied as a prompt, assuming job template prompts for limit |
| **name** string / required | | Name of this workflow job template. |
| **new\_name** string | | Setting this option will change the existing name. |
| **notification\_templates\_approvals** list / elements=string | | list of notifications to send on start |
| **notification\_templates\_error** list / elements=string | | list of notifications to send on error |
| **notification\_templates\_started** list / elements=string | | list of notifications to send on start |
| **notification\_templates\_success** list / elements=string | | list of notifications to send on success |
| **organization** string | | Organization the workflow job template exists in. Used to help lookup the object, cannot be modified using this module. If not provided, will lookup by name only, which does not work with duplicates. |
| **schema** list / elements=dictionary | | A json list of nodes and their coresponding options. The following suboptions describe a single node. |
| | **all\_parents\_must\_converge** boolean | **Choices:*** no
* yes
| If enabled then the node will only run if all of the parent nodes have met the criteria to reach this node |
| | **diff\_mode** boolean | **Choices:*** no
* yes
| Run diff mode, applied as a prompt, if job template prompts for diff mode |
| | **extra\_data** dictionary | **Default:**{} | Variables to apply at launch time. Will only be accepted if job template prompts for vars or has a survey asking for those vars. |
| | **identifier** string / required | | An identifier for this node that is unique within its workflow. It is copied to workflow job nodes corresponding to this node. |
| | **inventory** string | | Inventory applied as a prompt, if job template prompts for inventory |
| | **job\_tags** string | | Job tags applied as a prompt, if job template prompts for job tags |
| | **job\_type** string | **Choices:*** run
* check
| Job type applied as a prompt, if job template prompts for job type |
| | **limit** string | | Limit to act on, applied as a prompt, if job template prompts for limit |
| | **related** dictionary | | Related items to this workflow node. Must include credentials, failure\_nodes, always\_nodes, success\_nodes, even if empty. |
| | | **always\_nodes** list / elements=string | | Nodes that will run after this node completes. List of node identifiers. |
| | | | **identifier** string | | Identifier of Node that will run after this node completes given this option. |
| | | **credentials** list / elements=string | | Credentials to be applied to job as launch-time prompts. List of credential names. Uniqueness is not handled rigorously. |
| | | | **name** string | | Name Credentials to be applied to job as launch-time prompts. |
| | | **failure\_nodes** list / elements=string | | Nodes that will run after this node on failure. List of node identifiers. |
| | | | **identifier** string | | Identifier of Node that will run after this node completes given this option. |
| | | **success\_nodes** list / elements=string | | Nodes that will run after this node on success. List of node identifiers. |
| | | | **identifier** string | | Identifier of Node that will run after this node completes given this option. |
| | **scm\_branch** string | | SCM branch applied as a prompt, if job template prompts for SCM branch |
| | **skip\_tags** string | | Tags to skip, applied as a prompt, if job tempalte prompts for job tags |
| | **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| | **unified\_job\_template** dictionary | | Name of unified job template to run in the workflow. Can be a job template, project sync, inventory source sync, etc. Omit if creating an approval node (not yet implemented). |
| | | **description** string | | Optional description of this workflow approval template. |
| | | **inventory** dictionary | | Name of key for use in model for organizational reference Only Valid and used if referencing an inventory sync This parameter is mutually exclusive with suboption `organization`. |
| | | | **organization** dictionary | | Name of key for use in model for organizational reference |
| | | | | **name** string | | The organization of the inventory the node exists in. Used for looking up the job template or project, not a direct model field. |
| | | **name** string | | Name of unified job template to run in the workflow. Can be a job template, project, inventory source, etc. |
| | | **organization** dictionary | | Name of key for use in model for organizational reference Only Valid and used if referencing a job template or project sync This parameter is mutually exclusive with suboption `inventory`. |
| | | | **name** string | | The organization of the job template or project sync the node exists in. Used for looking up the job template or project sync, not a direct model field. |
| | | **timeout** integer | **Default:**0 | The amount of time (in seconds) to wait before Approval is canceled. A value of 0 means no timeout. Only Valid and used if referencing an Approval Node |
| | | **type** string | | Name of unified job template type to run in the workflow. Can be a job\_template, project, inventory\_source, workflow\_approval. |
| | **verbosity** string | **Choices:*** 0
* 1
* 2
* 3
* 4
* 5
| Verbosity applied as a prompt, if job template prompts for verbosity |
| **scm\_branch** string | | SCM branch applied as a prompt, assuming job template prompts for SCM branch |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **survey\_enabled** boolean | **Choices:*** no
* yes
| Setting that variable will prompt the user for job type on the workflow launch. |
| **survey\_spec** dictionary | | The definition of the survey associated to the workflow.
aliases: survey |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **webhook\_credential** string | | Personal Access Token for posting back the status to the service API |
| **webhook\_service** string | **Choices:*** github
* gitlab
| Service that webhook requests will be accepted from |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Create a workflow job template
workflow_job_template:
name: example-workflow
description: created by Ansible Playbook
organization: Default
- name: Create a workflow job template with schema in template
awx.awx.workflow_job_template:
name: example-workflow
inventory: Demo Inventory
extra_vars: {'foo': 'bar', 'another-foo': {'barz': 'bar2'}}
schema:
- identifier: node101
unified_job_template:
name: example-project
inventory:
organization:
name: Default
type: inventory_source
related:
success_nodes: []
failure_nodes:
- identifier: node201
always_nodes: []
credentials: []
- identifier: node201
unified_job_template:
organization:
name: Default
name: job template 1
type: job_template
credentials: []
related:
success_nodes:
- identifier: node301
failure_nodes: []
always_nodes: []
credentials: []
- identifier: node202
unified_job_template:
organization:
name: Default
name: example-project
type: project
related:
success_nodes: []
failure_nodes: []
always_nodes: []
credentials: []
- identifier: node301
all_parents_must_converge: false
unified_job_template:
organization:
name: Default
name: job template 2
type: job_template
related:
success_nodes: []
failure_nodes: []
always_nodes: []
credentials: []
register: result
- name: Copy a workflow job template
workflow_job_template:
name: copy-workflow
copy_from: example-workflow
organization: Foo
- name: Create a workflow job template with schema in template
awx.awx.workflow_job_template:
name: example-workflow
inventory: Demo Inventory
extra_vars: {'foo': 'bar', 'another-foo': {'barz': 'bar2'}}
schema:
- identifier: node101
unified_job_template:
name: example-project
inventory:
organization:
name: Default
type: inventory_source
related:
success_nodes: []
failure_nodes:
- identifier: node201
always_nodes: []
credentials: []
- identifier: node201
unified_job_template:
organization:
name: Default
name: job template 1
type: job_template
credentials: []
related:
success_nodes:
- identifier: node301
failure_nodes: []
always_nodes: []
credentials: []
- identifier: node202
unified_job_template:
organization:
name: Default
name: example-project
type: project
related:
success_nodes: []
failure_nodes: []
always_nodes: []
credentials: []
- identifier: node301
all_parents_must_converge: false
unified_job_template:
organization:
name: Default
name: job template 2
type: job_template
related:
success_nodes: []
failure_nodes: []
always_nodes: []
credentials: []
register: result
```
### Authors
* John Westcott IV (@john-westcott-iv)
ansible awx.awx.organization β create, update, or destroy Automation Platform Controller organizations awx.awx.organization β create, update, or destroy Automation Platform Controller organizations
==============================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.organization`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller organizations. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **custom\_virtualenv** string | | Local absolute file path containing a custom Python virtualenv to use. Only compatible with older versions of AWX/Tower Deprecated, will be removed in the future |
| **default\_environment** string | | Default Execution Environment to use for jobs owned by the Organization. |
| **description** string | | The description to use for the organization. |
| **galaxy\_credentials** list / elements=string | | list of Ansible Galaxy credentials to associate to the organization |
| **instance\_groups** list / elements=string | | list of Instance Groups for this Organization to run on. |
| **max\_hosts** integer | **Default:**"0" | The max hosts allowed in this organizations |
| **name** string / required | | Name to use for the organization. |
| **notification\_templates\_approvals** list / elements=string | | list of notifications to send on start |
| **notification\_templates\_error** list / elements=string | | list of notifications to send on error |
| **notification\_templates\_started** list / elements=string | | list of notifications to send on start |
| **notification\_templates\_success** list / elements=string | | list of notifications to send on success |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Create organization
organization:
name: "Foo"
description: "Foo bar organization"
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Create organization using 'foo-venv' as default Python virtualenv
organization:
name: "Foo"
description: "Foo bar organization using foo-venv"
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Create organization that pulls content from galaxy.ansible.com
organization:
name: "Foo"
state: present
galaxy_credentials:
- Ansible Galaxy
controller_config_file: "~/tower_cli.cfg"
```
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.workflow_approval β Approve an approval node in a workflow job. awx.awx.workflow\_approval β Approve an approval node in a workflow job.
========================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.workflow_approval`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Approve an approval node in a workflow job. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **action** string | **Choices:*** **approve** β
* deny
| Type of action to take. |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **interval** float | **Default:**1 | The interval in sections, to request an update from the controller. |
| **name** string / required | | Name of the Approval node to approve or deny. |
| **timeout** integer | **Default:**10 | Maximum time in seconds to wait for a workflow job to to reach approval node. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **workflow\_job\_id** integer / required | | ID of the workflow job to monitor for approval. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Launch a workflow with a timeout of 10 seconds
workflow_launch:
workflow_template: "Test Workflow"
wait: False
register: workflow
- name: Wait for approval node to activate and approve
workflow_approval:
workflow_job_id: "{{ workflow.id }}"
name: Approve Me
interval: 10
timeout: 20
action: deny
```
### Authors
* Sean Sullivan (@sean-m-sullivan)
| programming_docs |
ansible awx.awx.job_wait β Wait for Automation Platform Controller job to finish. awx.awx.job\_wait β Wait for Automation Platform Controller job to finish.
==========================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.job_wait`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Wait for Automation Platform Controller job to finish and report success or failure. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **interval** float | **Default:**1 | The interval in sections, to request an update from the controller. For backwards compatibility if unset this will be set to the average of min and max intervals |
| **job\_id** integer / required | | ID of the job to monitor. |
| **job\_type** string | **Choices:*** project\_updates
* **jobs** β
* inventory\_updates
* workflow\_jobs
| Job type to wait for |
| **timeout** integer | | Maximum time in seconds to wait for a job to finish. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Launch a job
job_launch:
job_template: "My Job Template"
register: job
- name: Wait for job max 120s
job_wait:
job_id: "{{ job.id }}"
timeout: 120
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **elapsed** float | success | total time in seconds the job took to run **Sample:** 10.879 |
| **finished** string | success | timestamp of when the job finished running **Sample:** 2017-03-01T17:04:04.078782Z |
| **id** integer | success | job id that is being waited on **Sample:** 99 |
| **started** string | success | timestamp of when the job started running **Sample:** 2017-03-01T17:03:53.200234Z |
| **status** string | success | current status of job **Sample:** successful |
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.project β create, update, or destroy Automation Platform Controller projects awx.awx.project β create, update, or destroy Automation Platform Controller projects
====================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.project`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller projects. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **allow\_override** boolean | **Choices:*** no
* yes
| Allow changing the SCM branch or revision in a job template that uses this project.
aliases: scm\_allow\_override |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **copy\_from** string | | Name or id to copy the project from. This will copy an existing project and change any parameters supplied. The new project name will be the one provided in the name parameter. The organization parameter is not used in this, to facilitate copy from one organization to another. Provide the id or use the lookup plugin to provide the id if multiple projects share the same name. |
| **credential** string | | Name of the credential to use with this SCM resource.
aliases: scm\_credential |
| **custom\_virtualenv** string | | Local absolute file path containing a custom Python virtualenv to use. Only compatible with older versions of AWX/Tower Deprecated, will be removed in the future |
| **default\_environment** string | | Default Execution Environment to use for jobs relating to the project. |
| **description** string | | Description to use for the project. |
| **interval** float | **Default:**1 | The interval to request an update from the controller. Requires wait. |
| **local\_path** string | | The server playbook directory for manual projects. |
| **name** string / required | | Name to use for the project. |
| **notification\_templates\_error** list / elements=string | | list of notifications to send on error |
| **notification\_templates\_started** list / elements=string | | list of notifications to send on start |
| **notification\_templates\_success** list / elements=string | | list of notifications to send on success |
| **organization** string | | Name of organization for project. |
| **scm\_branch** string | **Default:**"" | The branch to use for the SCM resource. |
| **scm\_clean** boolean | **Choices:*** **no** β
* yes
| Remove local modifications before updating. |
| **scm\_delete\_on\_update** boolean | **Choices:*** **no** β
* yes
| Remove the repository completely before updating. |
| **scm\_refspec** string | **Default:**"" | The refspec to use for the SCM resource. |
| **scm\_track\_submodules** boolean | **Choices:*** **no** β
* yes
| Track submodules latest commit on specified branch. |
| **scm\_type** string | **Choices:*** **manual** β
* git
* svn
* insights
| Type of SCM resource. |
| **scm\_update\_cache\_timeout** integer | **Default:**0 | Cache Timeout to cache prior project syncs for a certain number of seconds. Only valid if scm\_update\_on\_launch is to True, otherwise ignored. |
| **scm\_update\_on\_launch** boolean | **Choices:*** **no** β
* yes
| Before an update to the local repository before launching a job with this project. |
| **scm\_url** string | | URL of SCM resource. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **timeout** integer | **Default:**0 | The amount of time (in seconds) to run before the SCM Update is canceled. A value of 0 means no timeout. If waiting for the project to update this will abort after this amount of seconds
aliases: job\_timeout |
| **update\_project** boolean | **Choices:*** **no** β
* yes
| Force project to update after changes. Used in conjunction with wait, interval, and timeout. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **wait** boolean | **Choices:*** no
* **yes** β
| Provides option (True by default) to wait for completed project sync before returning Can assure playbook files are populated so that job templates that rely on the project may be successfully created |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add project
project:
name: "Foo"
description: "Foo bar project"
organization: "test"
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Add Project with cache timeout
project:
name: "Foo"
description: "Foo bar project"
organization: "test"
scm_update_on_launch: True
scm_update_cache_timeout: 60
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Copy project
project:
name: copy
copy_from: test
description: Foo copy project
organization: Foo
state: present
```
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.license β Set the license for Automation Platform Controller awx.awx.license β Set the license for Automation Platform Controller
====================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.license`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Get or Set Automation Platform Controller license. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **force** boolean | **Choices:*** no
* yes
**Default:**"False" | By default, the license manifest will only be applied if Tower is currently unlicensed or trial licensed. When force=true, the license is always applied. |
| **manifest** string / required | | file path to a Red Hat subscription manifest (a .zip file) |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Set the license using a file
license:
manifest: "/tmp/my_manifest.zip"
```
### Authors
* John Westcott IV (@john-westcott-iv)
ansible awx.awx.label β create, update, or destroy Automation Platform Controller labels. awx.awx.label β create, update, or destroy Automation Platform Controller labels.
=================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.label`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller labels. See <https://www.ansible.com/tower> for an overview.
* Note, labels can only be created via the API, they can not be deleted. Once they are fully disassociated the API will clean them up on its own.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **name** string / required | | Name of this label. |
| **new\_name** string | | Setting this option will change the existing name (looked up via the name field). |
| **organization** string / required | | Organization this label belongs to. |
| **state** string | **Choices:*** **present** β
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add label to organization
label:
name: Custom Label
organization: My Organization
```
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.controller_api awx.awx.controller\_api
=======================
The documentation for the lookup plugin, awx.awx.controller\_api, was malformed.
The errors were:
* ```
20 validation errors for PluginDocSchema
doc -> options -> host -> env -> 1 -> deprecated -> removed_from_collection
string does not match regex "^([^.]+\.[^.]+)$" (type=value_error.str.regex; pattern=^([^.]+\.[^.]+)$)
doc -> options -> host -> env -> 1 -> deprecated -> why
field required (type=value_error.missing)
doc -> options -> host -> env -> 1 -> deprecated -> removed_in_version
extra fields not permitted (type=value_error.extra)
doc -> options -> host -> env -> 1 -> deprecated -> __root__
One of `removed_at_date` or `removed_in` must be specified (type=value_error)
doc -> options -> oauth_token -> env -> 1 -> deprecated -> removed_from_collection
string does not match regex "^([^.]+\.[^.]+)$" (type=value_error.str.regex; pattern=^([^.]+\.[^.]+)$)
doc -> options -> oauth_token -> env -> 1 -> deprecated -> why
field required (type=value_error.missing)
doc -> options -> oauth_token -> env -> 1 -> deprecated -> removed_in_version
extra fields not permitted (type=value_error.extra)
doc -> options -> oauth_token -> env -> 1 -> deprecated -> __root__
One of `removed_at_date` or `removed_in` must be specified (type=value_error)
doc -> options -> password -> env -> 1 -> deprecated -> removed_from_collection
string does not match regex "^([^.]+\.[^.]+)$" (type=value_error.str.regex; pattern=^([^.]+\.[^.]+)$)
doc -> options -> password -> env -> 1 -> deprecated -> why
field required (type=value_error.missing)
doc -> options -> password -> env -> 1 -> deprecated -> removed_in_version
extra fields not permitted (type=value_error.extra)
doc -> options -> password -> env -> 1 -> deprecated -> __root__
One of `removed_at_date` or `removed_in` must be specified (type=value_error)
doc -> options -> username -> env -> 1 -> deprecated -> removed_from_collection
string does not match regex "^([^.]+\.[^.]+)$" (type=value_error.str.regex; pattern=^([^.]+\.[^.]+)$)
doc -> options -> username -> env -> 1 -> deprecated -> why
field required (type=value_error.missing)
doc -> options -> username -> env -> 1 -> deprecated -> removed_in_version
extra fields not permitted (type=value_error.extra)
doc -> options -> username -> env -> 1 -> deprecated -> __root__
One of `removed_at_date` or `removed_in` must be specified (type=value_error)
doc -> options -> verify_ssl -> env -> 1 -> deprecated -> removed_from_collection
string does not match regex "^([^.]+\.[^.]+)$" (type=value_error.str.regex; pattern=^([^.]+\.[^.]+)$)
doc -> options -> verify_ssl -> env -> 1 -> deprecated -> why
field required (type=value_error.missing)
doc -> options -> verify_ssl -> env -> 1 -> deprecated -> removed_in_version
extra fields not permitted (type=value_error.extra)
doc -> options -> verify_ssl -> env -> 1 -> deprecated -> __root__
One of `removed_at_date` or `removed_in` must be specified (type=value_error)
```
File a bug with the [awx.awx collection](https://galaxy.ansible.com/awx/awx) in order to have it corrected.
| programming_docs |
ansible awx.awx.ad_hoc_command β create, update, or destroy Automation Platform Controller ad hoc commands. awx.awx.ad\_hoc\_command β create, update, or destroy Automation Platform Controller ad hoc commands.
=====================================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.ad_hoc_command`.
New in version 4.0.0: of awx.awx
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller ad hoc commands. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **become\_enabled** boolean | **Choices:*** no
* yes
| If the become flag should be set. |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **credential** string / required | | Credential to use for ad hoc command. |
| **diff\_mode** boolean | **Choices:*** no
* yes
| Show the changes made by Ansible tasks where supported |
| **execution\_environment** string | | Execution Environment to use for the ad hoc command. |
| **extra\_vars** dictionary | | Extra variables to use for the ad hoc command.. |
| **forks** integer | | The number of forks to use for this ad hoc execution. |
| **interval** float | **Default:**1 | The interval to request an update from the controller. |
| **inventory** string / required | | Inventory to use for the ad hoc command. |
| **job\_type** string | **Choices:*** run
* check
| Job\_type to use for the ad hoc command. |
| **limit** string | | Limit to use for the ad hoc command. |
| **module\_args** string | **Default:**"" | The arguments to pass to the module. |
| **module\_name** string / required | | The Ansible module to execute. |
| **timeout** integer | | If waiting for the command to complete this will abort after this amount of seconds |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **verbosity** integer | **Choices:*** 0
* 1
* 2
* 3
* 4
* 5
| Verbosity level for this ad hoc command run |
| **wait** boolean | **Choices:*** **no** β
* yes
| Wait for the command to complete. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** integer | success | id of the newly launched command **Sample:** 86 |
| **status** string | success | status of newly launched command **Sample:** pending |
### Authors
* John Westcott IV (@john-westcott-iv)
ansible awx.awx.project_update β Update a Project in Automation Platform Controller awx.awx.project\_update β Update a Project in Automation Platform Controller
============================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.project_update`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Update a Automation Platform Controller Project. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **interval** float | **Default:**1 | The interval to request an update from the controller. |
| **name** string / required | | The name or id of the project to update.
aliases: project |
| **organization** string | | Organization the project exists in. Used to help lookup the object, cannot be modified using this module. If not provided, will lookup by name only, which does not work with duplicates. |
| **timeout** integer | | If waiting for the project to update this will abort after this amount of seconds |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **wait** boolean | **Choices:*** no
* **yes** β
| Wait for the project to update. If scm revision has not changed module will return not changed. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Launch a project with a timeout of 10 seconds
project_update:
project: "Networking Project"
timeout: 10
- name: Launch a Project with extra_vars without waiting
project_update:
project: "Networking Project"
wait: False
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** integer | success | project id of the updated project **Sample:** 86 |
| **status** string | success | status of the updated project **Sample:** pending |
### Authors
* Sean Sullivan (@sean-m-sullivan)
ansible awx.awx.credential_type β Create, update, or destroy custom Automation Platform Controller credential type. awx.awx.credential\_type β Create, update, or destroy custom Automation Platform Controller credential type.
============================================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.credential_type`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller credential type. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **description** string | | The description of the credential type to give more detail about it. |
| **injectors** dictionary | | Enter injectors using either JSON or YAML syntax. Refer to the Automation Platform Controller documentation for example syntax. |
| **inputs** dictionary | | Enter inputs using either JSON or YAML syntax. Refer to the Automation Platform Controler documentation for example syntax. |
| **kind** string | **Choices:*** ssh
* vault
* net
* scm
* cloud
* insights
| The type of credential type being added. Note that only cloud and net can be used for creating credential types. Refer to the Ansible for more information. |
| **name** string / required | | The name of the credential type. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- credential_type:
name: Nexus
description: Credentials type for Nexus
kind: cloud
inputs: "{{ lookup('file', 'credential_inputs_nexus.json') }}"
injectors: {'extra_vars': {'nexus_credential': 'test' }}
state: present
validate_certs: false
- credential_type:
name: Nexus
state: absent
```
### Authors
* Adrien Fleury (@fleu42)
ansible awx.awx.host β create, update, or destroy Automation Platform Controller host. awx.awx.host β create, update, or destroy Automation Platform Controller host.
==============================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.host`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller hosts. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **description** string | | The description to use for the host. |
| **enabled** boolean | **Choices:*** no
* **yes** β
| If the host should be enabled. |
| **inventory** string / required | | Inventory the host should be made a member of. |
| **name** string / required | | The name to use for the host. |
| **new\_name** string | | To use when changing a hosts's name. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **variables** dictionary | | Variables to use for the host. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add host
host:
name: localhost
description: "Local Host Group"
inventory: "Local Inventory"
state: present
controller_config_file: "~/tower_cli.cfg"
variables:
example_var: 123
```
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.schedule β create, update, or destroy Automation Platform Controller schedules. awx.awx.schedule β create, update, or destroy Automation Platform Controller schedules.
=======================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.schedule`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller schedules. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **credentials** list / elements=string | | List of credentials applied as a prompt, assuming job template prompts for credentials |
| **description** string | | Optional description of this schedule. |
| **diff\_mode** boolean | **Choices:*** no
* yes
| Enable diff mode for the job template. |
| **enabled** boolean | **Choices:*** no
* yes
| Enables processing of this schedule. |
| **extra\_data** dictionary | **Default:**{} | Specify `extra_vars` for the template. |
| **inventory** string | | Inventory applied as a prompt, assuming job template prompts for inventory |
| **job\_tags** string | | Comma separated list of the tags to use for the job template. |
| **job\_type** string | **Choices:*** run
* check
| The job type to use for the job template. |
| **limit** string | | A host pattern to further constrain the list of hosts managed or affected by the playbook |
| **name** string / required | | Name of this schedule. |
| **new\_name** string | | Setting this option will change the existing name (looked up via the name field. |
| **organization** string | | The organization the unified job template exists in. Used for looking up the unified job template, not a direct model field. |
| **rrule** string | | A value representing the schedules iCal recurrence rule. See rrule plugin for help constructing this value |
| **scm\_branch** string | | Branch to use in job run. Project default used if blank. Only allowed if project allow\_override field is set to true. |
| **skip\_tags** string | | Comma separated list of the tags to skip for the job template. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **unified\_job\_template** string | | Name of unified job template to schedule. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **verbosity** integer | **Choices:*** 0
* 1
* 2
* 3
* 4
* 5
| Control the output level Ansible produces as the playbook runs. 0 - Normal, 1 - Verbose, 2 - More Verbose, 3 - Debug, 4 - Connection Debug. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Build a schedule for Demo Job Template
schedule:
name: "{{ sched1 }}"
state: present
unified_job_template: "Demo Job Template"
rrule: "DTSTART:20191219T130551Z RRULE:FREQ=WEEKLY;INTERVAL=1;COUNT=1"
register: result
- name: Build the same schedule using the rrule plugin
schedule:
name: "{{ sched1 }}"
state: present
unified_job_template: "Demo Job Template"
rrule: "{{ query('awx.awx.schedule_rrule', 'week', start_date='2019-12-19 13:05:51') }}"
register: result
```
### Authors
* John Westcott IV (@john-westcott-iv)
| programming_docs |
ansible awx.awx.role β grant or revoke an Automation Platform Controller role. awx.awx.role β grant or revoke an Automation Platform Controller role.
======================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.role`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Roles are used for access control, this module is for managing user access to server resources.
* Grant or revoke Automation Platform Controller roles to users. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **credential** string | | Credential the role acts on. Deprecated, use 'credentials'. |
| **credentials** list / elements=string | | Credential the role acts on. |
| **inventories** list / elements=string | | Inventory the role acts on. |
| **inventory** string | | Inventory the role acts on. Deprecated, use 'inventories'. |
| **job\_template** string | | The job template the role acts on. Deprecated, use 'job\_templates'. |
| **job\_templates** list / elements=string | | The job template the role acts on. |
| **lookup\_organization** string | | Organization the inventories, job templates, projects, or workflows the items exists in. Used to help lookup the object, for organization roles see organization. If not provided, will lookup by name only, which does not work with duplicates. |
| **organization** string | | Organization the role acts on. Deprecated, use 'organizations'. |
| **organizations** list / elements=string | | Organization the role acts on. |
| **project** string | | Project the role acts on. Deprecated, use 'projects'. |
| **projects** list / elements=string | | Project the role acts on. |
| **role** string / required | **Choices:*** admin
* read
* member
* execute
* adhoc
* update
* use
* approval
* auditor
* project\_admin
* inventory\_admin
* credential\_admin
* workflow\_admin
* notification\_admin
* job\_template\_admin
| The role type to grant/revoke. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state. State of present indicates the user should have the role. State of absent indicates the user should have the role taken away, if they have it. |
| **target\_team** string | | Team that the role acts on. For example, make someone a member or an admin of a team. Members of a team implicitly receive the permissions that the team has. Deprecated, use 'target\_teams'. |
| **target\_teams** list / elements=string | | Team that the role acts on. For example, make someone a member or an admin of a team. Members of a team implicitly receive the permissions that the team has. |
| **team** string | | Team that receives the permissions specified by the role. |
| **user** string | | User that receives the permissions specified by the role. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **workflow** string | | The workflow job template the role acts on. Deprecated, use 'workflows'. |
| **workflows** list / elements=string | | The workflow job template the role acts on. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add jdoe to the member role of My Team
role:
user: jdoe
target_team: "My Team"
role: member
state: present
- name: Add Joe to multiple job templates and a workflow
role:
user: joe
role: execute
workflow: test-role-workflow
job_templates:
- jt1
- jt2
state: present
```
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.group β create, update, or destroy Automation Platform Controller group. awx.awx.group β create, update, or destroy Automation Platform Controller group.
================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.group`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller groups. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **children** list / elements=string | | List of groups that should be nested inside in this group.
aliases: groups |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **description** string | | The description to use for the group. |
| **hosts** list / elements=string | | List of hosts that should be put in this group. |
| **inventory** string / required | | Inventory the group should be made a member of. |
| **name** string / required | | The name to use for the group. |
| **new\_name** string | | A new name for this group (for renaming) |
| **preserve\_existing\_children** boolean | **Choices:*** **no** β
* yes
| Provide option (False by default) to preserves existing children in an existing group.
aliases: preserve\_existing\_groups |
| **preserve\_existing\_hosts** boolean | **Choices:*** **no** β
* yes
| Provide option (False by default) to preserves existing hosts in an existing group. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **variables** dictionary | | Variables to use for the group. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add group
group:
name: localhost
description: "Local Host Group"
inventory: "Local Inventory"
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Add group
group:
name: Cities
description: "Local Host Group"
inventory: Default Inventory
hosts:
- fda
children:
- NewYork
preserve_existing_hosts: True
preserve_existing_children: True
```
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.controller awx.awx.controller
==================
The documentation for the inventory plugin, awx.awx.controller, was malformed.
The errors were:
* ```
20 validation errors for PluginDocSchema
doc -> options -> host -> env -> 1 -> deprecated -> removed_from_collection
string does not match regex "^([^.]+\.[^.]+)$" (type=value_error.str.regex; pattern=^([^.]+\.[^.]+)$)
doc -> options -> host -> env -> 1 -> deprecated -> why
field required (type=value_error.missing)
doc -> options -> host -> env -> 1 -> deprecated -> removed_in_version
extra fields not permitted (type=value_error.extra)
doc -> options -> host -> env -> 1 -> deprecated -> __root__
One of `removed_at_date` or `removed_in` must be specified (type=value_error)
doc -> options -> oauth_token -> env -> 1 -> deprecated -> removed_from_collection
string does not match regex "^([^.]+\.[^.]+)$" (type=value_error.str.regex; pattern=^([^.]+\.[^.]+)$)
doc -> options -> oauth_token -> env -> 1 -> deprecated -> why
field required (type=value_error.missing)
doc -> options -> oauth_token -> env -> 1 -> deprecated -> removed_in_version
extra fields not permitted (type=value_error.extra)
doc -> options -> oauth_token -> env -> 1 -> deprecated -> __root__
One of `removed_at_date` or `removed_in` must be specified (type=value_error)
doc -> options -> password -> env -> 1 -> deprecated -> removed_from_collection
string does not match regex "^([^.]+\.[^.]+)$" (type=value_error.str.regex; pattern=^([^.]+\.[^.]+)$)
doc -> options -> password -> env -> 1 -> deprecated -> why
field required (type=value_error.missing)
doc -> options -> password -> env -> 1 -> deprecated -> removed_in_version
extra fields not permitted (type=value_error.extra)
doc -> options -> password -> env -> 1 -> deprecated -> __root__
One of `removed_at_date` or `removed_in` must be specified (type=value_error)
doc -> options -> username -> env -> 1 -> deprecated -> removed_from_collection
string does not match regex "^([^.]+\.[^.]+)$" (type=value_error.str.regex; pattern=^([^.]+\.[^.]+)$)
doc -> options -> username -> env -> 1 -> deprecated -> why
field required (type=value_error.missing)
doc -> options -> username -> env -> 1 -> deprecated -> removed_in_version
extra fields not permitted (type=value_error.extra)
doc -> options -> username -> env -> 1 -> deprecated -> __root__
One of `removed_at_date` or `removed_in` must be specified (type=value_error)
doc -> options -> verify_ssl -> env -> 1 -> deprecated -> removed_from_collection
string does not match regex "^([^.]+\.[^.]+)$" (type=value_error.str.regex; pattern=^([^.]+\.[^.]+)$)
doc -> options -> verify_ssl -> env -> 1 -> deprecated -> why
field required (type=value_error.missing)
doc -> options -> verify_ssl -> env -> 1 -> deprecated -> removed_in_version
extra fields not permitted (type=value_error.extra)
doc -> options -> verify_ssl -> env -> 1 -> deprecated -> __root__
One of `removed_at_date` or `removed_in` must be specified (type=value_error)
```
File a bug with the [awx.awx collection](https://galaxy.ansible.com/awx/awx) in order to have it corrected.
ansible awx.awx.inventory_source β create, update, or destroy Automation Platform Controller inventory source. awx.awx.inventory\_source β create, update, or destroy Automation Platform Controller inventory source.
=======================================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.inventory_source`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller inventory source. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **credential** string | | Credential to use for the source. |
| **custom\_virtualenv** string | | Local absolute file path containing a custom Python virtualenv to use. Only compatible with older versions of AWX/Controller Deprecated, will be removed in the future |
| **description** string | | The description to use for the inventory source. |
| **enabled\_value** string | | Value when the host is considered enabled, e.g., "powered\_on" |
| **enabled\_var** string | | The variable to use to determine enabled state e.g., "status.power\_state" |
| **execution\_environment** string | | Execution Environment to use for the source. |
| **host\_filter** string | | If specified, AWX will only import hosts that match this regular expression. |
| **inventory** string / required | | Inventory the group should be made a member of. |
| **name** string / required | | The name to use for the inventory source. |
| **new\_name** string | | A new name for this assets (will rename the asset) |
| **notification\_templates\_error** list / elements=string | | list of notifications to send on error |
| **notification\_templates\_started** list / elements=string | | list of notifications to send on start |
| **notification\_templates\_success** list / elements=string | | list of notifications to send on success |
| **organization** string | | Name of the inventory source's inventory's organization. |
| **overwrite** boolean | **Choices:*** no
* yes
| Delete child groups and hosts not found in source. |
| **overwrite\_vars** boolean | **Choices:*** no
* yes
| Override vars in child groups and hosts with those from external source. |
| **source** string | **Choices:*** scm
* ec2
* gce
* azure\_rm
* vmware
* satellite6
* openstack
* rhv
* controller
* insights
| The source to use for this group. |
| **source\_path** string | | For an SCM based inventory source, the source path points to the file within the repo to use as an inventory. |
| **source\_project** string | | Project to use as source with scm option |
| **source\_vars** dictionary | | The variables or environment fields to apply to this source type. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **timeout** integer | | The amount of time (in seconds) to run before the task is canceled. |
| **update\_cache\_timeout** integer | | Time in seconds to consider an inventory sync to be current. |
| **update\_on\_launch** boolean | **Choices:*** no
* yes
| Refresh inventory data from its source each time a job is run. |
| **update\_on\_project\_update** boolean | **Choices:*** no
* yes
| Update this source when the related project updates if source is `scm`
|
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **verbosity** integer | **Choices:*** 0
* 1
* 2
| The verbosity level to run this inventory source under. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add an inventory source
inventory_source:
name: "source-inventory"
description: Source for inventory
inventory: previously-created-inventory
credential: previously-created-credential
overwrite: True
update_on_launch: True
organization: Default
source_vars:
private: false
```
### Authors
* Adrien Fleury (@fleu42)
ansible awx.awx.ad_hoc_command_wait β Wait for Automation Platform Controller Ad Hoc Command to finish. awx.awx.ad\_hoc\_command\_wait β Wait for Automation Platform Controller Ad Hoc Command to finish.
==================================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.ad_hoc_command_wait`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Wait for Automation Platform Controller ad hoc command to finish and report success or failure. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **command\_id** integer / required | | ID of the ad hoc command to monitor. |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **interval** float | **Default:**1 | The interval in sections, to request an update from the controller. |
| **timeout** integer | | Maximum time in seconds to wait for a ad hoc command to finish. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Launch an ad hoc command
ad_hoc_command:
inventory: "Demo Inventory"
credential: "Demo Credential"
wait: false
register: command
- name: Wait for ad joc command max 120s
ad_hoc_command_wait:
command_id: "{{ command.id }}"
timeout: 120
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **elapsed** float | success | total time in seconds the command took to run **Sample:** 10.879 |
| **finished** string | success | timestamp of when the command finished running **Sample:** 2017-03-01T17:04:04.078782Z |
| **id** integer | success | Ad hoc command id that is being waited on **Sample:** 99 |
| **started** string | success | timestamp of when the command started running **Sample:** 2017-03-01T17:03:53.200234Z |
| **status** string | success | current status of command **Sample:** successful |
### Authors
* John Westcott IV (@john-westcott-iv)
| programming_docs |
ansible awx.awx.workflow_launch β Run a workflow in Automation Platform Controller awx.awx.workflow\_launch β Run a workflow in Automation Platform Controller
===========================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.workflow_launch`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Launch an Automation Platform Controller workflows. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **extra\_vars** dictionary | | Any extra vars required to launch the job. |
| **interval** float | **Default:**1 | The interval to request an update from the controller. |
| **inventory** string | | Inventory to use for the job ran with this workflow, only used if prompt for inventory is set. |
| **limit** string | | Limit to use for the *job\_template*. |
| **name** string / required | | The name of the workflow template to run.
aliases: workflow\_template |
| **organization** string | | Organization the workflow job template exists in. Used to help lookup the object, cannot be modified using this module. If not provided, will lookup by name only, which does not work with duplicates. |
| **scm\_branch** string | | A specific branch of the SCM project to run the template on. This is only applicable if your project allows for branch override. |
| **timeout** integer | | If waiting for the workflow to complete this will abort after this amount of seconds |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **wait** boolean | **Choices:*** no
* **yes** β
| Wait for the workflow to complete. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Launch a workflow with a timeout of 10 seconds
workflow_launch:
workflow_template: "Test Workflow"
timeout: 10
- name: Launch a Workflow with extra_vars without waiting
workflow_launch:
workflow_template: "Test workflow"
extra_vars:
var1: My First Variable
var2: My Second Variable
wait: False
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **job\_info** dictionary | If workflow launched | dictionary containing information about the workflow executed |
### Authors
* John Westcott IV (@john-westcott-iv)
ansible awx.awx.controller_meta β Returns metadata about the collection this module lives in. awx.awx.controller\_meta β Returns metadata about the collection this module lives in.
======================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.controller_meta`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Allows a user to find out what collection this module exists in.
* This takes common module parameters, but does nothing with them.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- controller_meta:
register: result
- name: Show details about the collection
debug: var=result
- name: Load the UI setting without hard-coding the collection name
debug:
msg: "{{ lookup(result.prefix + '.controller_api', 'settings/ui') }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **name** string | success | Collection name **Sample:** awx |
| **namespace** string | success | Collection namespace **Sample:** awx |
| **prefix** string | success | Collection namespace and name in the namespace.name format **Sample:** awx.awx |
| **version** string | success | Version of the collection **Sample:** 0.0.1-devel |
### Authors
* Alan Rominger (@alancoding)
ansible awx.awx.credential_input_source β create, update, or destroy Automation Platform Controller credential input sources. awx.awx.credential\_input\_source β create, update, or destroy Automation Platform Controller credential input sources.
=======================================================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.credential_input_source`.
New in version 2.3.0: of awx.awx
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller credential input sources. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **description** string | | The description to use for the credential input source. |
| **input\_field\_name** string / required | | The input field the credential source will be used for |
| **metadata** dictionary | | A JSON or YAML string |
| **source\_credential** string | | The credential which is the source of the credential lookup |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **target\_credential** string / required | | The credential which will have its input defined by this source |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Use CyberArk Lookup credential as password source
credential_input_source:
input_field_name: password
target_credential: new_cred
source_credential: cyberark_lookup
metadata:
object_query: "Safe=MY_SAFE;Object=awxuser"
object_query_format: "Exact"
state: present
```
### Authors
* Tom Page (@Tompage1994)
ansible awx.awx.notification_template β create, update, or destroy Automation Platform Controller notification. awx.awx.notification\_template β create, update, or destroy Automation Platform Controller notification.
========================================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.notification_template`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller notifications. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **copy\_from** string | | Name or id to copy the notification from. This will copy an existing notification and change any parameters supplied. The new notification name will be the one provided in the name parameter. The organization parameter is not used in this, to facilitate copy from one organization to another. Provide the id or use the lookup plugin to provide the id if multiple notifications share the same name. |
| **description** string | | The description of the notification. |
| **messages** dictionary | | Optional custom messages for notification template. |
| **name** string / required | | The name of the notification. |
| **new\_name** string | | Setting this option will change the existing name (looked up via the name field. |
| **notification\_configuration** dictionary | | The notification configuration file. Note providing this field would disable all notification-configuration-related fields. username (the mail server username) sender (the sender email address) recipients (the recipients email addresses) use\_tls (the TLS trigger) host (the mail server host) use\_ssl (the SSL trigger) password (the mail server password) port (the mail server port) channels (the destination Slack channels) token (the access token) account\_token (the Twillio account token) from\_number (the source phone number) to\_numbers (the destination phone numbers) account\_sid (the Twillio account SID) subdomain (the PagerDuty subdomain) service\_key (the PagerDuty service/integration API key) client\_name (the PagerDuty client identifier) message\_from (the label to be shown with the notification) color (the notification color) notify (the notify channel trigger) url (the target URL) headers (the HTTP headers as JSON string) server (the IRC server address) nickname (the IRC nickname) targets (the destination channels or users) |
| **notification\_type** string | **Choices:*** email
* grafana
* irc
* mattermost
* pagerduty
* rocketchat
* slack
* twilio
* webhook
| The type of notification to be sent. |
| **organization** string | | The organization the notification belongs to. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add Slack notification with custom messages
notification_template:
name: slack notification
organization: Default
notification_type: slack
notification_configuration:
channels:
- general
token: cefda9e2be1f21d11cdd9452f5b7f97fda977f42
messages:
started:
message: "{{ '{{ job_friendly_name }}{{ job.id }} started' }}"
success:
message: "{{ '{{ job_friendly_name }} completed in {{ job.elapsed }} seconds' }}"
error:
message: "{{ '{{ job_friendly_name }} FAILED! Please look at {{ job.url }}' }}"
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Add webhook notification
notification_template:
name: webhook notification
notification_type: webhook
notification_configuration:
url: http://www.example.com/hook
headers:
X-Custom-Header: value123
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Add email notification
notification_template:
name: email notification
notification_type: email
notification_configuration:
username: user
password: s3cr3t
sender: [email protected]
recipients:
- [email protected]
host: smtp.example.com
port: 25
use_tls: no
use_ssl: no
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Add twilio notification
notification_template:
name: twilio notification
notification_type: twilio
notification_configuration:
account_token: a_token
account_sid: a_sid
from_number: '+15551112222'
to_numbers:
- '+15553334444'
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Add PagerDuty notification
notification_template:
name: pagerduty notification
notification_type: pagerduty
notification_configuration:
token: a_token
subdomain: sub
client_name: client
service_key: a_key
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Add IRC notification
notification_template:
name: irc notification
notification_type: irc
notification_configuration:
nickname: controller
password: s3cr3t
targets:
- user1
port: 8080
server: irc.example.com
use_ssl: no
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Delete notification
notification_template:
name: old notification
state: absent
controller_config_file: "~/tower_cli.cfg"
- name: Copy webhook notification
notification_template:
name: foo notification
copy_from: email notification
organization: Foo
```
### Authors
* Samuel Carpentier (@samcarpentier)
| programming_docs |
ansible awx.awx.import β import resources into Automation Platform Controller. awx.awx.import β import resources into Automation Platform Controller.
======================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.import`.
New in version 3.7.0: of awx.awx
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Import assets into Automation Platform Controller. See <https://www.ansible.com/tower> for an overview.
Requirements
------------
The below requirements are needed on the host that executes this module.
* awxkit >= 9.3.0
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **assets** dictionary / required | | The assets to import. This can be the output of the export module or loaded from a file |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Export all assets
export:
all: True
register: export_output
- name: Import all assets from our export
import:
assets: "{{ export_output.assets }}"
- name: Load data from a json file created by a command like awx export --organization Default
import:
assets: "{{ lookup('file', 'org.json') | from_json() }}"
```
### Authors
* John Westcott (@john-westcott-iv)
ansible awx.awx.job_cancel β Cancel an Automation Platform Controller Job. awx.awx.job\_cancel β Cancel an Automation Platform Controller Job.
===================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.job_cancel`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Cancel Automation Platform Controller jobs. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **fail\_if\_not\_running** boolean | **Choices:*** **no** β
* yes
| Fail loudly if the *job\_id* can not be canceled |
| **job\_id** integer / required | | ID of the job to cancel |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Cancel job
job_cancel:
job_id: job.id
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** integer | success | job id requesting to cancel **Sample:** 94 |
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.job_list β List Automation Platform Controller jobs. awx.awx.job\_list β List Automation Platform Controller jobs.
=============================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.job_list`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* List Automation Platform Controller jobs. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **all\_pages** boolean | **Choices:*** **no** β
* yes
| Fetch all the pages and return a single result. |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **page** integer | | Page number of the results to fetch. |
| **query** dictionary | | Query used to further filter the list of jobs. `{"foo":"bar"}` will be passed at `?foo=bar`
|
| **status** string | **Choices:*** pending
* waiting
* running
* error
* failed
* canceled
* successful
| Only list jobs with this status. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: List running jobs for the testing.yml playbook
job_list:
status: running
query: {"playbook": "testing.yml"}
controller_config_file: "~/tower_cli.cfg"
register: testing_jobs
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **count** integer | success | Total count of objects return **Sample:** 51 |
| **next** integer | success | next page available for the listing **Sample:** 3 |
| **previous** integer | success | previous page available for the listing **Sample:** 1 |
| **results** list / elements=string | success | a list of job objects represented as dictionaries **Sample:** [{'allow\_simultaneous': False, 'artifacts': {}, 'ask\_credential\_on\_launch': False, 'ask\_inventory\_on\_launch': False, 'ask\_job\_type\_on\_launch': False, 'failed': False, 'finished': '2017-02-22T15:09:05.633942Z', 'force\_handlers': False, 'forks': 0, 'id': 2, 'inventory': 1, 'job\_explanation': '', 'job\_tags': '', 'job\_template': 5, 'job\_type': 'run'}, '...'] |
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.inventory_source_update β Update inventory source(s). awx.awx.inventory\_source\_update β Update inventory source(s).
===============================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.inventory_source_update`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Update Automation Platform Controller inventory source(s). See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **interval** float | **Default:**1 | The interval to request an update from the controller. |
| **inventory** string / required | | Name or id of the inventory that contains the inventory source(s) to update. |
| **name** string / required | | The name or id of the inventory source to update.
aliases: inventory\_source |
| **organization** string | | Name of the inventory source's inventory's organization. |
| **timeout** integer | | If waiting for the job to complete this will abort after this amount of seconds |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **wait** boolean | **Choices:*** **no** β
* yes
| Wait for the job to complete. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Update a single inventory source
inventory_source_update:
name: "Example Inventory Source"
inventory: "My Inventory"
organization: Default
- name: Update all inventory sources
inventory_source_update:
name: "{{ item }}"
inventory: "My Other Inventory"
loop: "{{ query('awx.awx.controller_api', 'inventory_sources', query_params={ 'inventory': 30 }, return_ids=True ) }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** integer | success | id of the inventory update **Sample:** 86 |
| **status** string | success | status of the inventory update **Sample:** pending |
### Authors
* Bianca Henderson (@beeankha)
ansible awx.awx.schedule_rrule β Generate an rrule string which can be used for Schedules awx.awx.schedule\_rrule β Generate an rrule string which can be used for Schedules
==================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.schedule_rrule`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Returns a string based on criteria which represents an rrule
Requirements
------------
The below requirements are needed on the local controller node that executes this lookup.
* pytz
* python-dateutil >= 2.7.0
Parameters
----------
| Parameter | Choices/Defaults | Configuration | Comments |
| --- | --- | --- | --- |
| **\_terms** string / required | **Choices:*** none
* minute
* hour
* day
* week
* month
| | The frequency of the schedule none - Run this schedule once minute - Run this schedule every x minutes hour - Run this schedule every x hours day - Run this schedule every x days week - Run this schedule weekly month - Run this schedule monthly |
| **end\_on** string | | | How to end this schedule If this is not defined, this schedule will never end If this is a positive integer, this schedule will end after this number of occurences If this is a date in the format YYYY-MM-DD [HH:MM:SS], this schedule ends after this date Used for all types except none |
| **every** integer | | | The repetition in months, weeks, days hours or minutes Used for all types except none |
| **month\_day\_number** integer | | | The day of the month this schedule will run on (0-31) Used for month type schedules Cannot be used with on\_the parameter |
| **on\_days** string | | | The days to run this schedule on A comma-separated list which can contain values sunday, monday, tuesday, wednesday, thursday, friday Used for week type schedules |
| **on\_the** string | | | A description on when this schedule will run Two strings separated by a space First string is one of first, second, third, fourth, last Second string is one of sunday, monday, tuesday, wednesday, thursday, friday Used for month type schedules Cannot be used with month\_day\_number parameters |
| **start\_date** string | | | The date to start the rule Used for all frequencies Format should be YYYY-MM-DD [HH:MM:SS] |
| **timezone** string | | | The timezone to use for this rule Used for all frequencies Format should be as US/Eastern Defaults to America/New\_York |
Examples
--------
```
- name: Create a string for a schedule
debug:
msg: "{{ query('awx.awx.schedule_rrule', 'none', start_date='1979-09-13 03:45:07') }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this lookup:
| Key | Returned | Description |
| --- | --- | --- |
| **\_raw** string | success | String in the rrule format |
### Authors
* John Westcott IV (@john-westcott-iv)
ansible awx.awx.user β create, update, or destroy Automation Platform Controller users. awx.awx.user β create, update, or destroy Automation Platform Controller users.
===============================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.user`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller users. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **email** string | | Email address of the user. |
| **first\_name** string | | First name of the user. |
| **is\_superuser** boolean | **Choices:*** **no** β
* yes
| Designates that this user has all permissions without explicitly assigning them.
aliases: superuser |
| **is\_system\_auditor** boolean | **Choices:*** **no** β
* yes
| User is a system wide auditor.
aliases: auditor |
| **last\_name** string | | Last name of the user. |
| **password** string | | Write-only field used to change the password. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **update\_secrets** boolean | **Choices:*** no
* **yes** β
|
`true` will always change password if user specifies password, even if API gives $encrypted$ for password.
`false` will only set the password if other values change too. |
| **username** string / required | | Required. 150 characters or fewer. Letters, digits and @/./+/-/\_ only. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add user
user:
username: jdoe
password: foobarbaz
email: [email protected]
first_name: John
last_name: Doe
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Add user as a system administrator
user:
username: jdoe
password: foobarbaz
email: [email protected]
superuser: yes
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Add user as a system auditor
user:
username: jdoe
password: foobarbaz
email: [email protected]
auditor: yes
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Delete user
user:
username: jdoe
email: [email protected]
state: absent
controller_config_file: "~/tower_cli.cfg"
```
### Authors
* John Westcott IV (@john-westcott-iv)
| programming_docs |
ansible awx.awx.settings β Modify Automation Platform Controller settings. awx.awx.settings β Modify Automation Platform Controller settings.
==================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.settings`.
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Modify Automation Platform Controller settings. See <https://www.ansible.com/tower> for an overview.
Requirements
------------
The below requirements are needed on the host that executes this module.
* pyyaml
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **name** string | | Name of setting to modify |
| **settings** dictionary | | A data structure to be sent into the settings endpoint |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **value** string | | Value to be modified for given setting. If given a non-string type, will make best effort to cast it to type API expects. For better control over types, use the `settings` param instead. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Set the value of AWX_ISOLATION_BASE_PATH
settings:
name: AWX_ISOLATION_BASE_PATH
value: "/tmp"
register: testing_settings
- name: Set the value of AWX_ISOLATION_SHOW_PATHS
settings:
name: "AWX_ISOLATION_SHOW_PATHS"
value: "'/var/lib/awx/projects/', '/tmp'"
register: testing_settings
- name: Set the LDAP Auth Bind Password
settings:
name: "AUTH_LDAP_BIND_PASSWORD"
value: "Password"
no_log: true
- name: Set all the LDAP Auth Bind Params
settings:
settings:
AUTH_LDAP_BIND_PASSWORD: "password"
AUTH_LDAP_USER_ATTR_MAP:
email: "mail"
first_name: "givenName"
last_name: "surname"
```
### Authors
* Nikhil Jain (@jainnikhil30)
ansible awx.awx.credential β create, update, or destroy Automation Platform Controller credential. awx.awx.credential β create, update, or destroy Automation Platform Controller credential.
==========================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.credential`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller credentials. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **copy\_from** string | | Name or id to copy the credential from. This will copy an existing credential and change any parameters supplied. The new credential name will be the one provided in the name parameter. The organization parameter is not used in this, to facilitate copy from one organization to another. Provide the id or use the lookup plugin to provide the id if multiple credentials share the same name. |
| **credential\_type** string | | The credential type being created. Can be a built-in credential type such as "Machine", or a custom credential type such as "My Credential Type" Choices include Amazon Web Services, Ansible Galaxy/Automation Hub API Token, Centrify Vault Credential Provider Lookup, Container Registry, CyberArk AIM Central Credential Provider Lookup, CyberArk Conjur Secret Lookup, Google Compute Engine, GitHub Personal Access Token, GitLab Personal Access Token, HashiCorp Vault Secret Lookup, HashiCorp Vault Signed SSH, Insights, Machine, Microsoft Azure Key Vault, Microsoft Azure Resource Manager, Network, OpenShift or Kubernetes API Bearer Token, OpenStack, Red Hat Ansible Automation Platform, Red Hat Satellite 6, Red Hat Virtualization, Source Control, Thycotic DevOps Secrets Vault, Thycotic Secret Server, Vault, VMware vCenter, or a custom credential type |
| **description** string | | The description to use for the credential. |
| **inputs** dictionary | | Credential inputs where the keys are var names used in templating. Refer to the Automation Platform Controller documentation for example syntax. authorize (use this for net type) authorize\_password (password for net credentials that require authorize) client (client or application ID for azure\_rm type) security\_token (STS token for aws type) secret (secret token for azure\_rm type) tenant (tenant ID for azure\_rm type) subscription (subscription ID for azure\_rm type) domain (domain for openstack type) become\_method (become method to use for privilege escalation; some examples are "None", "sudo", "su", "pbrun") become\_username (become username; use "ASK" and launch job to be prompted) become\_password (become password; use "ASK" and launch job to be prompted) vault\_password (the vault password; use "ASK" and launch job to be prompted) project (project that should use this credential for GCP) host (the host for this credential) username (the username for this credential; ``access\_key`` for AWS) password (the password for this credential; ``secret\_key`` for AWS, ``api\_key`` for RAX) ssh\_key\_data (SSH private key content; to extract the content from a file path, use the lookup function (see examples)) vault\_id (the vault identifier; this parameter is only valid if `kind` is specified as `vault`.) ssh\_key\_unlock (unlock password for ssh\_key; use "ASK" and launch job to be prompted) |
| **name** string / required | | The name to use for the credential. |
| **new\_name** string | | Setting this option will change the existing name (looked up via the name field. |
| **organization** string | | Organization that should own the credential. |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **team** string | | Team that should own this credential. |
| **update\_secrets** boolean | **Choices:*** no
* **yes** β
|
`true` will always update encrypted values.
`false` will only updated encrypted values if a change is absolutely known to be needed. |
| **user** string | | User that should own this credential. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
Notes
-----
Note
* Values `inputs` and the other deprecated fields (such as `tenant`) are replacements of existing values. See the last 4 examples for details.
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Add machine credential
credential:
name: Team Name
description: Team Description
organization: test-org
credential_type: Machine
state: present
controller_config_file: "~/tower_cli.cfg"
- name: Create a valid SCM credential from a private_key file
credential:
name: SCM Credential
organization: Default
state: present
credential_type: Source Control
inputs:
username: joe
password: secret
ssh_key_data: "{{ lookup('file', '/tmp/id_rsa') }}"
ssh_key_unlock: "passphrase"
- name: Fetch private key
slurp:
src: '$HOME/.ssh/aws-private.pem'
register: aws_ssh_key
- name: Add Credential
credential:
name: Workshop Credential
credential_type: Machine
organization: Default
inputs:
ssh_key_data: "{{ aws_ssh_key['content'] | b64decode }}"
run_once: true
delegate_to: localhost
- name: Add Credential with Custom Credential Type
credential:
name: Workshop Credential
credential_type: MyCloudCredential
organization: Default
controller_username: admin
controller_password: ansible
controller_host: https://localhost
- name: Create a Vaiult credential (example for notes)
credential:
name: Example password
credential_type: Vault
organization: Default
inputs:
vault_password: 'hello'
vault_id: 'My ID'
- name: Bad password update (will replace vault_id)
credential:
name: Example password
credential_type: Vault
organization: Default
inputs:
vault_password: 'new_password'
- name: Another bad password update (will replace vault_id)
credential:
name: Example password
credential_type: Vault
organization: Default
vault_password: 'new_password'
- name: A safe way to update a password and keep vault_id
credential:
name: Example password
credential_type: Vault
organization: Default
inputs:
vault_password: 'new_password'
vault_id: 'My ID'
- name: Copy Credential
credential:
name: Copy password
copy_from: Example password
credential_type: Vault
organization: Foo
```
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.job_launch β Launch an Ansible Job. awx.awx.job\_launch β Launch an Ansible Job.
============================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.job_launch`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Launch an Automation Platform Controller jobs. See <https://www.ansible.com/tower> for an overview.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **credential\_passwords** dictionary | | Passwords for credentials which are set to prompt on launch |
| **credentials** list / elements=string | | Credential to use for job, only used if prompt for credential is set.
aliases: credential |
| **diff\_mode** boolean | **Choices:*** no
* yes
| Show the changes made by Ansible tasks where supported |
| **extra\_vars** dictionary | | extra\_vars to use for the Job Template. ask\_extra\_vars needs to be set to True via job\_template module when creating the Job Template. |
| **interval** float | **Default:**1 | The interval to request an update from the controller. |
| **inventory** string | | Inventory to use for the job, only used if prompt for inventory is set. |
| **job\_type** string | **Choices:*** run
* check
| Job\_type to use for the job, only used if prompt for job\_type is set. |
| **limit** string | | Limit to use for the *job\_template*. |
| **name** string / required | | Name of the job template to use.
aliases: job\_template |
| **organization** string | | Organization the job template exists in. Used to help lookup the object, cannot be modified using this module. If not provided, will lookup by name only, which does not work with duplicates. |
| **scm\_branch** string | | A specific of the SCM project to run the template on. This is only applicable if your project allows for branch override. |
| **skip\_tags** list / elements=string | | Specific tags to skip from the playbook. |
| **tags** list / elements=string | | Specific tags to use for from playbook. |
| **timeout** integer | | If waiting for the job to complete this will abort after this amount of seconds |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **verbosity** integer | **Choices:*** 0
* 1
* 2
* 3
* 4
* 5
| Verbosity level for this job run |
| **wait** boolean | **Choices:*** **no** β
* yes
| Wait for the job to complete. |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Launch a job
job_launch:
job_template: "My Job Template"
register: job
- name: Launch a job template with extra_vars on remote controller instance
job_launch:
job_template: "My Job Template"
extra_vars:
var1: "My First Variable"
var2: "My Second Variable"
var3: "My Third Variable"
job_type: run
- name: Launch a job with inventory and credential
job_launch:
job_template: "My Job Template"
inventory: "My Inventory"
credential: "My Credential"
register: job
- name: Wait for job max 120s
job_wait:
job_id: "{{ job.id }}"
timeout: 120
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **id** integer | success | job id of the newly launched job **Sample:** 86 |
| **status** string | success | status of newly launched job **Sample:** pending |
### Authors
* Wayne Witzel III (@wwitzel3)
ansible awx.awx.workflow_job_template_node β create, update, or destroy Automation Platform Controller workflow job template nodes. awx.awx.workflow\_job\_template\_node β create, update, or destroy Automation Platform Controller workflow job template nodes.
==============================================================================================================================
Note
This plugin is part of the [awx.awx collection](https://galaxy.ansible.com/awx/awx) (version 19.4.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install awx.awx`.
To use it in a playbook, specify: `awx.awx.workflow_job_template_node`.
* [Synopsis](#synopsis)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, update, or destroy Automation Platform Controller workflow job template nodes.
* Use this to build a graph for a workflow, which dictates what the workflow runs.
* Replaces the deprecated tower\_workflow\_template module schema command.
* You can create nodes first, and link them afterwards, and not worry about ordering. For failsafe referencing of a node, specify identifier, WFJT, and organization. With those specified, you can choose to modify or not modify any other parameter.
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **all\_parents\_must\_converge** boolean | **Choices:*** no
* yes
| If enabled then the node will only run if all of the parent nodes have met the criteria to reach this node |
| **always\_nodes** list / elements=string | | Nodes that will run after this node completes. List of node identifiers. |
| **approval\_node** dictionary | | A dictionary of Name, description, and timeout values for the approval node. This parameter is mutually exclusive with `unified_job_template`. |
| | **description** string | | Optional description of this workflow approval template. |
| | **name** string / required | | Name of this workflow approval template. |
| | **timeout** integer | | The amount of time (in seconds) before the approval node expires and fails. |
| **controller\_config\_file** path | | Path to the controller config file. If provided, the other locations for config files will not be considered.
aliases: tower\_config\_file |
| **controller\_host** string | | URL to your Automation Platform Controller instance. If value not set, will try environment variable `CONTROLLER_HOST` and then config files If value not specified by any means, the value of `127.0.0.1` will be used
aliases: tower\_host |
| **controller\_oauthtoken** raw added in 3.7.0 of awx.awx | | The OAuth token to use. This value can be in one of two formats. A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX) A dictionary structure as returned by the token module. If value not set, will try environment variable `CONTROLLER_OAUTH_TOKEN` and then config files
aliases: tower\_oauthtoken |
| **controller\_password** string | | Password for your controller instance. If value not set, will try environment variable `CONTROLLER_PASSWORD` and then config files
aliases: tower\_password |
| **controller\_username** string | | Username for your controller instance. If value not set, will try environment variable `CONTROLLER_USERNAME` and then config files
aliases: tower\_username |
| **credentials** list / elements=string | | Credentials to be applied to job as launch-time prompts. List of credential names. Uniqueness is not handled rigorously. |
| **diff\_mode** boolean | **Choices:*** no
* yes
| Run diff mode, applied as a prompt, if job template prompts for diff mode |
| **extra\_data** dictionary | **Default:**{} | Variables to apply at launch time. Will only be accepted if job template prompts for vars or has a survey asking for those vars. |
| **failure\_nodes** list / elements=string | | Nodes that will run after this node on failure. List of node identifiers. |
| **identifier** string / required | | An identifier for this node that is unique within its workflow. It is copied to workflow job nodes corresponding to this node. |
| **inventory** string | | Inventory applied as a prompt, if job template prompts for inventory |
| **job\_tags** string | | Job tags applied as a prompt, if job template prompts for job tags |
| **job\_type** string | **Choices:*** run
* check
| Job type applied as a prompt, if job template prompts for job type |
| **limit** string | | Limit to act on, applied as a prompt, if job template prompts for limit |
| **lookup\_organization** string | | Organization the inventories, job template, project, inventory source the unified\_job\_template exists in. If not provided, will lookup by name only, which does not work with duplicates. |
| **organization** string | | The organization of the workflow job template the node exists in. Used for looking up the workflow, not a direct model field. |
| **scm\_branch** string | | SCM branch applied as a prompt, if job template prompts for SCM branch |
| **skip\_tags** string | | Tags to skip, applied as a prompt, if job tempalte prompts for job tags |
| **state** string | **Choices:*** **present** β
* absent
| Desired state of the resource. |
| **success\_nodes** list / elements=string | | Nodes that will run after this node on success. List of node identifiers. |
| **unified\_job\_template** string | | Name of unified job template to run in the workflow. Can be a job template, project, inventory source, etc. Omit if creating an approval node. This parameter is mutually exclusive with `approval_node`. |
| **validate\_certs** boolean | **Choices:*** no
* yes
| Whether to allow insecure connections to AWX. If `no`, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. If value not set, will try environment variable `CONTROLLER_VERIFY_SSL` and then config files
aliases: tower\_verify\_ssl |
| **verbosity** string | **Choices:*** 0
* 1
* 2
* 3
* 4
* 5
| Verbosity applied as a prompt, if job template prompts for verbosity |
| **workflow\_job\_template** string / required | | The workflow job template the node exists in. Used for looking up the node, cannot be modified after creation.
aliases: workflow |
Notes
-----
Note
* If no *config\_file* is provided we will attempt to use the tower-cli library defaults to find your host information.
* *config\_file* should be in the following format host=hostname username=username password=password
Examples
--------
```
- name: Create a node, follows workflow_job_template example
workflow_job_template_node:
identifier: my-first-node
workflow: example-workflow
unified_job_template: jt-for-node-use
organization: Default # organization of workflow job template
extra_data:
foo_key: bar_value
- name: Create parent node for prior node
workflow_job_template_node:
identifier: my-root-node
workflow: example-workflow
unified_job_template: jt-for-node-use
organization: Default
success_nodes:
- my-first-node
- name: Create workflow with 2 Job Templates and an approval node in between
block:
- name: Create a workflow job template
tower_workflow_job_template:
name: my-workflow-job-template
ask_scm_branch_on_launch: true
organization: Default
- name: Create 1st node
tower_workflow_job_template_node:
identifier: my-first-node
workflow_job_template: my-workflow-job-template
unified_job_template: some_job_template
organization: Default
- name: Create 2nd approval node
tower_workflow_job_template_node:
identifier: my-second-approval-node
workflow_job_template: my-workflow-job-template
organization: Default
approval_node:
description: "Do this?"
name: my-second-approval-node
timeout: 3600
- name: Create 3rd node
tower_workflow_job_template_node:
identifier: my-third-node
workflow_job_template: my-workflow-job-template
unified_job_template: some_other_job_template
organization: Default
- name: Link 1st node to 2nd Approval node
tower_workflow_job_template_node:
identifier: my-first-node
workflow_job_template: my-workflow-job-template
organization: Default
success_nodes:
- my-second-approval-node
- name: Link 2nd Approval Node 3rd node
tower_workflow_job_template_node:
identifier: my-second-approval-node
workflow_job_template: my-workflow-job-template
organization: Default
success_nodes:
- my-third-node
```
### Authors
* John Westcott IV (@john-westcott-iv)
| programming_docs |
ansible Collections in the Purestorage Namespace Collections in the Purestorage Namespace
========================================
These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **purestorage** namespace.
* [purestorage.flasharray](flasharray/index#plugins-in-purestorage-flasharray)
* [purestorage.flashblade](flashblade/index#plugins-in-purestorage-flashblade)
ansible purestorage.flasharray.purefa_fs β Manage FlashArray File Systems purestorage.flasharray.purefa\_fs β Manage FlashArray File Systems
==================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_fs`.
New in version 1.5.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create/Delete FlashArray File Systems
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the file system on delete or leave in trash. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **name** string / required | | Name of the file system |
| **rename** string | | Value to rename the specified file system to |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the file system should exist or not. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create file system foo
purefa_fs:
name: foo
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete and eradicate file system foo
purefa_fs:
name: foo
eradicate: true
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Rename file system foo to bar
purefa_fs:
name: foo
rename: bar
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#daaaafa8bff7bbb4a9b3b8b6bff7aebfbbb7fcf9e9ede1fcf9efe8e1fcf9eee2e1aaafa8bfa9aeb5a8bbbdbffcf9eeece1b9b5b7)>
ansible purestorage.flasharray.purefa_inventory β Collect information from Pure Storage FlashArray purestorage.flasharray.purefa\_inventory β Collect information from Pure Storage FlashArray
===========================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_inventory`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collect hardware inventory information from a Pure Storage Flasharray
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: collect FlashArray invenroty
purefa_inventory:
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: show inventory information
debug:
msg: "{{ array_info['purefa_info'] }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **purefa\_inventory** complex | always | Returns the inventory information for the FlashArray **Sample:** {'controllers': {'CT0': {'model': None, 'serial': None, 'status': 'ok'}, 'CT1': {'model': 'FA-405', 'serial': 'FHVBT52', 'status': 'ok'}}, 'drives': {'SH0.BAY0': {'capacity': 2147483648, 'protocol': 'SAS', 'serial': 'S18NNEAFA01416', 'status': 'healthy', 'type': 'NVRAM'}, 'SH0.BAY1': {'capacity': 511587647488, 'protocol': 'SAS', 'serial': 'S0WZNEACC00517', 'status': 'healthy', 'type': 'SSD'}, 'SH0.BAY10': {'capacity': 511587647488, 'protocol': 'SAS', 'serial': 'S0WZNEACB00266', 'status': 'healthy', 'type': 'SSD'}}, 'fans': {'CT0.FAN0': {'status': 'ok'}, 'CT0.FAN1': {'status': 'ok'}, 'CT0.FAN10': {'status': 'ok'}}, 'interfaces': {'CT0.ETH0': {'speed': 1000000000, 'status': 'ok'}, 'CT0.ETH1': {'speed': 0, 'status': 'ok'}, 'CT0.FC0': {'speed': 8000000000, 'status': 'ok'}, 'CT1.IB1': {'speed': 56000000000, 'status': 'ok'}, 'CT1.SAS0': {'speed': 24000000000, 'status': 'ok'}}, 'power': {'CT0.PWR0': {'model': None, 'serial': None, 'status': 'ok', 'voltage': None}, 'CT0.PWR1': {'model': None, 'serial': None, 'status': 'ok', 'voltage': None}}, 'temps': {'CT0.TMP0': {'status': 'ok', 'temperature': 18}, 'CT0.TMP1': {'status': 'ok', 'temperature': 32}}} |
### Authors
* Pure Storage ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#cababfb8afe7aba4b9a3a8a6afe7beafaba7ece9f9fdf1ece9fff8f1ece9fef2f1babfb8afb9bea5b8abadafece9fefcf1a9a5a7)>
ansible purestorage.flasharray.purefa_directory β Manage FlashArray File System Directories purestorage.flasharray.purefa\_directory β Manage FlashArray File System Directories
====================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_directory`.
New in version 1.5.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create/Delete FlashArray File Systems
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **filesystem** string / required | | Name of the filesystem the directory links to. |
| **name** string / required | | Name of the directory |
| **path** string | | Path of the managed directory in the file system If not provided will default to *name*
|
| **rename** string | | Value to rename the specified directory to |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the directory should exist or not. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create direcotry foo in filesysten bar with path zeta
purefa_directory:
name: foo
filesystem: bar
path: zeta
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Rename directory foo to fin in filesystem bar
purefa_directory:
name: foo
rename: fin
filesystem: bar
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete diectory foo in filesystem bar
purefa_directory:
name: foo
filesystem: bar
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#66161314034b0708150f040a034b1203070b404555515d404553545d4045525e5d1613140315120914070103404552505d05090b)>
ansible purestorage.flasharray.purefa_pod β Manage AC pods in Pure Storage FlashArrays purestorage.flasharray.purefa\_pod β Manage AC pods in Pure Storage FlashArrays
===============================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_pod`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage AC pods in a Pure Storage FlashArray.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the pod on delete or leave in trash. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **failover** list / elements=string | | The name of the array given priority to stay online if arrays loose contact with eachother. Oprions are either array in the cluster, or *auto*
|
| **mediator** string | **Default:**"purestorage" | Name of the mediator to use for a pod |
| **name** string / required | | The name of the pod. |
| **promote** boolean | **Choices:*** no
* yes
| Promote/demote any pod not in a stretched relationship. . Demoting a pod will render it read-only. |
| **quiesce** boolean | **Choices:*** no
* yes
| Quiesce/Skip quiesce when *promote* is false and demoting an ActiveDR pod. Quiesce will ensure all local data has been replicated before demotion. Skipping quiesce looses all pending data to be replicated to the remote pod. Can only demote the pod if it is in a Acrive DR replica link relationship. This will default to True |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the pod should exist or not. |
| **stretch** string | | The name of the array to stretch to/unstretch from. Must be synchromously replicated. To unstretch an array use state *absent*
You can only specify a remote array, ie you cannot unstretch a pod from the current array and then restretch back to the current array. To restretch a pod you must perform this from the remaining array the pod resides on. |
| **target** string | | Name of clone target pod. |
| **undo** boolean | **Choices:*** no
* yes
| Use the *undo-remote* pod when *promote* is true and promoting an ActiveDR pod. This will default to True |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new pod named foo
purefa_pod:
name: foo
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Delete and eradicate pod named foo
purefa_pod:
name: foo
eradicate: yes
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Set failover array for pod named foo
purefa_pod:
name: foo
failover:
- array1
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set mediator for pod named foo
purefa_pod:
name: foo
mediator: bar
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Stretch a pod named foo to array2
purefa_pod:
name: foo
stretch: array2
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Unstretch a pod named foo from array2
purefa_pod:
name: foo
stretch: array2
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create clone of pod foo named bar
purefa_pod:
name: foo
target: bar
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#b4c4c1c6d199d5dac7ddd6d8d199c0d1d5d9929787838f929781868f9297808c8fc4c1c6d1c7c0dbc6d5d3d1929780828fd7dbd9)>
ansible purestorage.flasharray.purefa_smtp β Configure FlashArray SMTP settings purestorage.flasharray.purefa\_smtp β Configure FlashArray SMTP settings
========================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_smtp`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Set or erase configuration for the SMTP settings.
* If username/password are set this will always force a change as there is no way to see if the password is differnet from the current SMTP configuration.
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#bfcfcacdda92ded1ccd6ddd3da92cbdaded2999c8c8884999c8a8d84999c8b8784cfcacddacccbd0cdded8da999c8b8984dcd0d2)>
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **password** string | | The SMTP password. |
| **relay\_host** string | | IPv4 or IPv6 address or FQDN. A port number may be appended. |
| **sender\_domain** string | | Domain name. |
| **state** string | **Choices:*** absent
* **present** β
| Set or delete SMTP configuration |
| **user** string | | The SMTP username. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng SMTP settings
purefa_smtp:
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set SMTP settings
purefa_smtp:
sender_domain: purestorage.com
password: account_password
user: smtp_account
relay_host: 10.2.56.78:2345
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#b0c0c5c2d59dd1dec3d9d2dcd59dc4d5d1dd969383878b969385828b969384888bc0c5c2d5c3c4dfc2d1d7d5969384868bd3dfdd)>
ansible purestorage.flasharray.purefa_vnc β Enable or Disable VNC port for installed apps purestorage.flasharray.purefa\_vnc β Enable or Disable VNC port for installed apps
==================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_vnc`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Enablke or Disable VNC access for installed apps
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **name** string / required | | Name od app |
| **state** string | **Choices:*** **present** β
* absent
| Define state of VNC |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Enable VNC for application test
purefa_vnc:
name: test
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disable VNC for application test
purefa_vnc:
name: test
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **vnc** dictionary | success | VNC port information for application |
| | **index** integer | success | Application index number |
| | **name** string | success | Application name |
| | **status** string | success | Status of application **Sample:** healthy |
| | **version** string | success | Application version installed **Sample:** 5.2.1 |
| | **vnc** dictionary | success | IP address and port number for VNC connection **Sample:** ['10.21.200.34:5900'] |
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#deaeabacbbf3bfb0adb7bcb2bbf3aabbbfb3f8fdede9e5f8fdebece5f8fdeae6e5aeabacbbadaab1acbfb9bbf8fdeae8e5bdb1b3)>
| programming_docs |
ansible purestorage.flasharray.purefa_offload β Create, modify and delete NFS, S3 or Azure offload targets purestorage.flasharray.purefa\_offload β Create, modify and delete NFS, S3 or Azure offload targets
===================================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_offload`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, modify and delete NFS, S3 or Azure offload targets.
* Only supported on Purity v5.2.0 or higher.
* You must have a correctly configured offload network for offload to work.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_key** string | | Access Key ID of the offload target |
| **account** string | | Name of the Azure blob storage account |
| **address** string | | The IP or FQDN address of the NFS server |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **bucket** string | | Name of the bucket for the S3 or GCP target |
| **container** string | **Default:**"offload" | Name of the blob container of the Azure target |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **initialize** boolean | **Choices:*** no
* **yes** β
| Define whether to initialize the offload bucket |
| **name** string / required | | The name of the offload target |
| **options** string | **Default:**"" | Additonal mount options for the NFS share Supported mount options include *port*, *rsize*, *wsize*, *nfsvers*, and *tcp* or *udp*
|
| **placement** string | **Choices:*** **retention-based** β
* aws-standard-class
| AWS S3 placement strategy |
| **protocol** string | **Choices:*** **nfs** β
* s3
* azure
* gcp
| Define which protocol the offload engine uses |
| **secret** string | | Secret Access Key for the offload target |
| **share** string | | NFS export on the NFS server |
| **state** string | **Choices:*** absent
* **present** β
| Define state of offload |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create NFS offload target
purefa_offload:
name: nfs-offload
protocol: nfs
address: 10.21.200.4
share: "/offload_target"
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create S3 offload target
purefa_offload:
name: s3-offload
protocol: s3
access_key: "3794fb12c6204e19195f"
bucket: offload-bucket
secret: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
placement: aws-standard-class
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create Azure offload target
purefa_offload:
name: azure-offload
protocol: azure
secret: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
container: offload-container
account: user1
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete offload target
purefa_offload:
name: nfs-offload
protocol: nfs
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#146461667139757a677d7678713960717579323727232f323721262f3237202c2f6461667167607b66757371323720222f777b79)>
ansible purestorage.flasharray.purefa_snmp β Configure FlashArray SNMP Managers purestorage.flasharray.purefa\_snmp β Configure FlashArray SNMP Managers
========================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_snmp`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage SNMP managers on a Pure Storage FlashArray.
* Changing of a named SNMP managers version is not supported.
* This module is not idempotent and will always modify an existing SNMP manager due to hidden parameters that cannot be compared to the play parameters.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **auth\_passphrase** string | | SNMPv3 only. Passphrase of 8 - 32 characters. |
| **auth\_protocol** string | **Choices:*** MD5
* SHA
| SNMP v3 only. Hash algorithm to use |
| **community** string | | SNMP v2c only. Manager community ID. Between 1 and 32 characters long. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **host** string | | IPv4 or IPv6 address or FQDN to send trap messages to. |
| **name** string / required | | Name of SNMP Manager |
| **notification** string | **Choices:*** inform
* **trap** β
| Action to perform on event. |
| **privacy\_passphrase** string | | SNMPv3 only. Passphrase to encrypt SNMP messages. Must be between 8 and 63 non-space ASCII characters. |
| **privacy\_protocol** string | **Choices:*** AES
* DES
| SNMP v3 only. Encryption protocol to use |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete SNMP manager |
| **user** string | | SNMP v3 only. User ID recognized by the specified SNMP manager. Must be between 1 and 32 characters. |
| **version** string | **Choices:*** **v2c** β
* v3
| Version of SNMP protocol to use for the manager. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng SNMP manager
purefa_snmp:
name: manager1
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create v2c SNMP manager
purefa_snmp:
name: manager1
community: public
host: 10.21.22.23
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create v3 SNMP manager
purefa_snmp:
name: manager2
version: v3
auth_protocol: MD5
auth_passphrase: password
host: 10.21.22.23
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Update existing SNMP manager
purefa_snmp:
name: manager1
community: private
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#18686d6a7d3579766b717a747d356c7d79753e3b2b2f233e3b2d2a233e3b2c2023686d6a7d6b6c776a797f7d3e3b2c2e237b7775)>
ansible purestorage.flasharray.purefa_console β Enable or Disable Pure Storage FlashArray Console Lock purestorage.flasharray.purefa\_console β Enable or Disable Pure Storage FlashArray Console Lock
===============================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_console`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Enablke or Disable root lockout from the array at the physical console for a Pure Storage FlashArray.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **state** string | **Choices:*** enable
* **disable** β
| Define state of console lockout When set to *enable* the console port is locked from root login. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Enable Console Lockout
purefa_console:
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disable Console Lockout
purefa_console:
state: disable
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#81f1f4f3e4ace0eff2e8e3ede4acf5e4e0eca7a2b2b6baa7a2b4b3baa7a2b5b9baf1f4f3e4f2f5eef3e0e6e4a7a2b5b7bae2eeec)>
ansible Purestorage.Flasharray Purestorage.Flasharray
======================
Collection version 1.11.0
Plugin Index
------------
These are the plugins in the purestorage.flasharray collection
### Modules
* [purefa\_ad](purefa_ad_module#ansible-collections-purestorage-flasharray-purefa-ad-module) β Manage FlashArray Active Directory Account
* [purefa\_alert](purefa_alert_module#ansible-collections-purestorage-flasharray-purefa-alert-module) β Configure Pure Storage FlashArray alert email settings
* [purefa\_apiclient](purefa_apiclient_module#ansible-collections-purestorage-flasharray-purefa-apiclient-module) β Manage FlashArray API Clients
* [purefa\_arrayname](purefa_arrayname_module#ansible-collections-purestorage-flasharray-purefa-arrayname-module) β Configure Pure Storage FlashArray array name
* [purefa\_banner](purefa_banner_module#ansible-collections-purestorage-flasharray-purefa-banner-module) β Configure Pure Storage FlashArray GUI and SSH MOTD message
* [purefa\_certs](purefa_certs_module#ansible-collections-purestorage-flasharray-purefa-certs-module) β Manage FlashArray SSL Certificates
* [purefa\_connect](purefa_connect_module#ansible-collections-purestorage-flasharray-purefa-connect-module) β Manage replication connections between two FlashArrays
* [purefa\_console](purefa_console_module#ansible-collections-purestorage-flasharray-purefa-console-module) β Enable or Disable Pure Storage FlashArray Console Lock
* [purefa\_directory](purefa_directory_module#ansible-collections-purestorage-flasharray-purefa-directory-module) β Manage FlashArray File System Directories
* [purefa\_dirsnap](purefa_dirsnap_module#ansible-collections-purestorage-flasharray-purefa-dirsnap-module) β Manage FlashArray File System Directory Snapshots
* [purefa\_dns](purefa_dns_module#ansible-collections-purestorage-flasharray-purefa-dns-module) β Configure FlashArray DNS settings
* [purefa\_ds](purefa_ds_module#ansible-collections-purestorage-flasharray-purefa-ds-module) β Configure FlashArray Directory Service
* [purefa\_dsrole](purefa_dsrole_module#ansible-collections-purestorage-flasharray-purefa-dsrole-module) β Configure FlashArray Directory Service Roles
* [purefa\_endpoint](purefa_endpoint_module#ansible-collections-purestorage-flasharray-purefa-endpoint-module) β Manage VMware protocol-endpoints on Pure Storage FlashArrays
* [purefa\_eradication](purefa_eradication_module#ansible-collections-purestorage-flasharray-purefa-eradication-module) β Configure Pure Storage FlashArray Eradication Timer
* [purefa\_eula](purefa_eula_module#ansible-collections-purestorage-flasharray-purefa-eula-module) β Sign Pure Storage FlashArray EULA
* [purefa\_export](purefa_export_module#ansible-collections-purestorage-flasharray-purefa-export-module) β Manage FlashArray File System Exports
* [purefa\_fs](purefa_fs_module#ansible-collections-purestorage-flasharray-purefa-fs-module) β Manage FlashArray File Systems
* [purefa\_hg](purefa_hg_module#ansible-collections-purestorage-flasharray-purefa-hg-module) β Manage hostgroups on Pure Storage FlashArrays
* [purefa\_host](purefa_host_module#ansible-collections-purestorage-flasharray-purefa-host-module) β Manage hosts on Pure Storage FlashArrays
* [purefa\_info](purefa_info_module#ansible-collections-purestorage-flasharray-purefa-info-module) β Collect information from Pure Storage FlashArray
* [purefa\_inventory](purefa_inventory_module#ansible-collections-purestorage-flasharray-purefa-inventory-module) β Collect information from Pure Storage FlashArray
* [purefa\_kmip](purefa_kmip_module#ansible-collections-purestorage-flasharray-purefa-kmip-module) β Manage FlashArray KMIP server objects
* [purefa\_maintenance](purefa_maintenance_module#ansible-collections-purestorage-flasharray-purefa-maintenance-module) β Configure Pure Storage FlashArray Maintence Windows
* [purefa\_network](purefa_network_module#ansible-collections-purestorage-flasharray-purefa-network-module) β Manage network interfaces in a Pure Storage FlashArray
* [purefa\_ntp](purefa_ntp_module#ansible-collections-purestorage-flasharray-purefa-ntp-module) β Configure Pure Storage FlashArray NTP settings
* [purefa\_offload](purefa_offload_module#ansible-collections-purestorage-flasharray-purefa-offload-module) β Create, modify and delete NFS, S3 or Azure offload targets
* [purefa\_pg](purefa_pg_module#ansible-collections-purestorage-flasharray-purefa-pg-module) β Manage protection groups on Pure Storage FlashArrays
* [purefa\_pgsched](purefa_pgsched_module#ansible-collections-purestorage-flasharray-purefa-pgsched-module) β Manage protection groups replication schedules on Pure Storage FlashArrays
* [purefa\_pgsnap](purefa_pgsnap_module#ansible-collections-purestorage-flasharray-purefa-pgsnap-module) β Manage protection group snapshots on Pure Storage FlashArrays
* [purefa\_phonehome](purefa_phonehome_module#ansible-collections-purestorage-flasharray-purefa-phonehome-module) β Enable or Disable Pure Storage FlashArray Phonehome
* [purefa\_pod](purefa_pod_module#ansible-collections-purestorage-flasharray-purefa-pod-module) β Manage AC pods in Pure Storage FlashArrays
* [purefa\_pod\_replica](purefa_pod_replica_module#ansible-collections-purestorage-flasharray-purefa-pod-replica-module) β Manage ActiveDR pod replica links between Pure Storage FlashArrays
* [purefa\_policy](purefa_policy_module#ansible-collections-purestorage-flasharray-purefa-policy-module) β Manage FlashArray File System Policies
* [purefa\_proxy](purefa_proxy_module#ansible-collections-purestorage-flasharray-purefa-proxy-module) β Configure FlashArray phonehome HTTPs proxy settings
* [purefa\_ra](purefa_ra_module#ansible-collections-purestorage-flasharray-purefa-ra-module) β Enable or Disable Pure Storage FlashArray Remote Assist
* [purefa\_smis](purefa_smis_module#ansible-collections-purestorage-flasharray-purefa-smis-module) β Enable or disable FlashArray SMI-S features
* [purefa\_smtp](purefa_smtp_module#ansible-collections-purestorage-flasharray-purefa-smtp-module) β Configure FlashArray SMTP settings
* [purefa\_snap](purefa_snap_module#ansible-collections-purestorage-flasharray-purefa-snap-module) β Manage volume snapshots on Pure Storage FlashArrays
* [purefa\_snmp](purefa_snmp_module#ansible-collections-purestorage-flasharray-purefa-snmp-module) β Configure FlashArray SNMP Managers
* [purefa\_sso](purefa_sso_module#ansible-collections-purestorage-flasharray-purefa-sso-module) β Configure Pure Storage FlashArray Single Sign-On
* [purefa\_subnet](purefa_subnet_module#ansible-collections-purestorage-flasharray-purefa-subnet-module) β Manage network subnets in a Pure Storage FlashArray
* [purefa\_syslog](purefa_syslog_module#ansible-collections-purestorage-flasharray-purefa-syslog-module) β Configure Pure Storage FlashArray syslog settings
* [purefa\_syslog\_settings](purefa_syslog_settings_module#ansible-collections-purestorage-flasharray-purefa-syslog-settings-module) β Manage FlashArray syslog servers settings
* [purefa\_timeout](purefa_timeout_module#ansible-collections-purestorage-flasharray-purefa-timeout-module) β Configure Pure Storage FlashArray GUI idle timeout
* [purefa\_user](purefa_user_module#ansible-collections-purestorage-flasharray-purefa-user-module) β Create, modify or delete FlashArray local user account
* [purefa\_vg](purefa_vg_module#ansible-collections-purestorage-flasharray-purefa-vg-module) β Manage volume groups on Pure Storage FlashArrays
* [purefa\_vlan](purefa_vlan_module#ansible-collections-purestorage-flasharray-purefa-vlan-module) β Manage network VLAN interfaces in a Pure Storage FlashArray
* [purefa\_vnc](purefa_vnc_module#ansible-collections-purestorage-flasharray-purefa-vnc-module) β Enable or Disable VNC port for installed apps
* [purefa\_volume](purefa_volume_module#ansible-collections-purestorage-flasharray-purefa-volume-module) β Manage volumes on Pure Storage FlashArrays
* [purefa\_volume\_tags](purefa_volume_tags_module#ansible-collections-purestorage-flasharray-purefa-volume-tags-module) β Manage volume tags on Pure Storage FlashArrays
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible purestorage.flasharray.purefa_network β Manage network interfaces in a Pure Storage FlashArray purestorage.flasharray.purefa\_network β Manage network interfaces in a Pure Storage FlashArray
===============================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_network`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module manages the physical and virtual network interfaces on a Pure Storage FlashArray.
* To manage VLAN interfaces use the *purefa\_vlan* module.
* To manage network subnets use the *purefa\_subnet* module.
* To remove an IP address from a non-management port use 0.0.0.0/0
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | IPv4 or IPv6 address of interface in CIDR notation. To remove an IP address from a non-management port use 0.0.0.0/0 |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **gateway** string | | IPv4 or IPv6 address of interface gateway. |
| **mtu** integer | **Default:**1500 | MTU size of the interface. Range is 1280 to 9216. |
| **name** string / required | | Interface name (physical or virtual). |
| **state** string | **Choices:*** **present** β
* absent
| State of existing interface (on/off). |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Configure and enable network interface ct0.eth8
purefa_network:
name: ct0.eth8
gateway: 10.21.200.1
address: "10.21.200.18/24"
mtu: 9000
state: present
fa_url: 10.10.10.2
api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
- name: Disable physical interface ct1.eth2
purefa_network:
name: ct1.eth2
state: absent
fa_url: 10.10.10.2
api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
- name: Enable virtual network interface vir0
purefa_network:
name: vir0
state: present
fa_url: 10.10.10.2
api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
- name: Remove an IP address from iSCSI interface ct0.eth4
purefa_network:
name: ct0.eth4
address: 0.0.0.0/0
gateway: 0.0.0.0
fa_url: 10.10.10.2
api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#76060304135b1718051f141a135b0213171b505545414d505543444d5055424e4d0603041305021904171113505542404d15191b)>
| programming_docs |
ansible purestorage.flasharray.purefa_sso β Configure Pure Storage FlashArray Single Sign-On purestorage.flasharray.purefa\_sso β Configure Pure Storage FlashArray Single Sign-On
=====================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_sso`.
New in version 1.9.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Enable or disable Single Sign-On (SSO) to give LDAP users the ability to navigate seamlessly from Pure1 Manage to the current array through a single login.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **state** string | **Choices:*** **present** β
* absent
| Enable or disable the array Signle Sign-On from Pure1 Manage |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Enable SSO
purefa_sso:
state: present
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disable SSO
purefa_sso:
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#bacacfc8df97dbd4c9d3d8d6df97cedfdbd79c99898d819c998f88819c998e8281cacfc8dfc9ced5c8dbdddf9c998e8c81d9d5d7)>
ansible purestorage.flasharray.purefa_export β Manage FlashArray File System Exports purestorage.flasharray.purefa\_export β Manage FlashArray File System Exports
=============================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_export`.
New in version 1.5.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create/Delete FlashArray File Systems Exports
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **directory** string / required | | Name of the managed directory in the file system the export applies to |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **filesystem** string / required | | Name of the filesystem the export applies to |
| **name** string / required | | Name of the export |
| **nfs\_policy** string | | Name of NFS Policy to apply to the export |
| **smb\_policy** string | | Name of SMB Policy to apply to the export |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the export should exist or not. You must specify an NFS or SMB policy, or both on creation and deletion. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create NFS and SMB exports for directory foo in filesysten bar
purefa_export:
name: export1
filesystem: bar
directory: foo
nfs_policy: nfs-example
smb_polict: smb-example
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete NFS export for directory foo in filesystem bar
purefa_export:
name: export1
filesystem: bar
directory: foo
nfs_policy: nfs-example
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#90e0e5e2f5bdf1fee3f9f2fcf5bde4f5f1fdb6b3a3a7abb6b3a5a2abb6b3a4a8abe0e5e2f5e3e4ffe2f1f7f5b6b3a4a6abf3fffd)>
ansible purestorage.flasharray.purefa_certs β Manage FlashArray SSL Certificates purestorage.flasharray.purefa\_certs β Manage FlashArray SSL Certificates
=========================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_certs`.
New in version 1.8.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, delete, import and export FlashArray SSL Certificates
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **certificate** string | | Required for *import*
A valid signed certicate in PEM format (Base64 encoded) Includes the "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" lines Does not exceed 3000 characters in length |
| **common\_name** string | | The fully qualified domain name (FQDN) of the current array For example, the common name for https://purearray.example.com is purearray.example.com, or \*.example.com for a wildcard certificate This can also be the management IP address of the array or the shortname of the current array. Maximum of 64 characters If not provided this will default to the shortname of the array |
| **country** string | | The two-letter ISO code for the country where your organization is located |
| **days** integer | **Default:**3650 | The number of valid days for the self-signed certificate being generated If not specified, the self-signed certificate expires after 3650 days. |
| **email** string | | The email address used to contact your organization |
| **export\_file** string | | Name of file to contain Certificate Signing Request when `status sign` Name of file to export the current SSL Certificate when `status export` File will be overwritten if it already exists |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **generate** boolean | **Choices:*** **no** β
* yes
| Generate a new private key. If not selected, the certificate will use the existing key |
| **intermeadiate\_cert** string | | Intermeadiate certificate provided by the CA |
| **key** string | | If the Certificate Signed Request (CSR) was not constructed on the array or the private key has changed since construction the CSR, provide a new private key here |
| **key\_size** integer | **Choices:*** 1024
* 2048
* 4096
**Default:**2048 | The key size in bits if you generate a new private key |
| **locality** string | | The full name of the city where your organization is located |
| **name** string | **Default:**"management" | Name of the SSL Certificate |
| **org\_unit** string | | The department within your organization that is managing the certificate |
| **organization** string | | The full and exact legal name of your organization. The organization name should not be abbreviated and should include suffixes such as Inc, Corp, or LLC. |
| **passphrase** string | | Passphrase if the private key is encrypted |
| **province** string | | The full name of the state or province where your organization is located |
| **state** string | **Choices:*** absent
* **present** β
* import
* export
* sign
| Action for the module to perform
*present* will create or re-create an SSL certificate
*absent* will delete an existing SSL certificate
*sign* will construct a Certificate Signing request (CSR)
*export* will export the exisitng SSL certificate
*import* will import a CA provided certificate |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create SSL certifcate foo
purefa_certs:
name: foo
key_size: 4096
country: US
province: FL
locality: Miami
organization: "Acme Inc"
org_unit: "DevOps"
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete SSL certificate foo
purefa_certs:
name: foo
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Request CSR
purefa_certs:
state: sign
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Regenerate key for SSL foo
purefa_certs:
generate: true
name: foo
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Import SSL Cert foo and Private Key
purefa_certs:
state: import
name: foo
certificate: "{{lookup('file', 'example.crt') }}"
key: "{{lookup('file', 'example.key') }}"
passphrase: password
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#d8a8adaabdf5b9b6abb1bab4bdf5acbdb9b5fefbebefe3fefbedeae3fefbece0e3a8adaabdabacb7aab9bfbdfefbeceee3bbb7b5)>
ansible purestorage.flasharray.purefa_eradication β Configure Pure Storage FlashArray Eradication Timer purestorage.flasharray.purefa\_eradication β Configure Pure Storage FlashArray Eradication Timer
================================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_eradication`.
New in version 1.9.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure the eradication timer for destroyed items on a FlashArray.
* Valid values are integer days from 1 to 30. Default is 1.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **timer** integer | **Default:**1 | Set the eradication timer for the FlashArray Allowed values are integers from 1 to 30. Default is 1 |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Set eradication timer to 30 days
purefa_eradication:
timer: 30
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set eradication timer to 1 day
purefa_eradication:
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f282878097df939c819b909e97df8697939fd4d1c1c5c9d4d1c7c0c9d4d1c6cac98287809781869d80939597d4d1c6c4c9919d9f)>
ansible purestorage.flasharray.purefa_arrayname β Configure Pure Storage FlashArray array name purestorage.flasharray.purefa\_arrayname β Configure Pure Storage FlashArray array name
=======================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_arrayname`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure name of array for Pure Storage FlashArrays.
* Ideal for Day 0 initial configuration.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **name** string / required | | Name of the array. Must conform to correct naming schema. |
| **state** string | **Choices:*** **present** β
| Set the array name |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Set new array name
purefa_arrayname:
name: new-array-name
state: present
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f282878097df939c819b909e97df8697939fd4d1c1c5c9d4d1c7c0c9d4d1c6cac98287809781869d80939597d4d1c6c4c9919d9f)>
ansible purestorage.flasharray.purefa_eula β Sign Pure Storage FlashArray EULA purestorage.flasharray.purefa\_eula β Sign Pure Storage FlashArray EULA
=======================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_eula`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Sign the FlashArray EULA for Day 0 config, or change signatory.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **company** string / required | | Full legal name of the entity. The value must be between 1 and 64 characters in length. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **name** string / required | | Full legal name of the individual at the company who has the authority to accept the terms of the agreement. The value must be between 1 and 64 characters in length. |
| **title** string / required | | Individual's job title at the company. The value must be between 1 and 64 characters in length. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Sign EULA for FlashArray
purefa_eula:
company: "ACME Storage, Inc."
name: "Fred Bloggs"
title: "Storage Manager"
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#5e2e2b2c3b733f302d373c323b732a3b3f33787d6d6965787d6b6c65787d6a66652e2b2c3b2d2a312c3f393b787d6a68653d3133)>
ansible purestorage.flasharray.purefa_vlan β Manage network VLAN interfaces in a Pure Storage FlashArray purestorage.flasharray.purefa\_vlan β Manage network VLAN interfaces in a Pure Storage FlashArray
=================================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_vlan`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module manages the VLAN network interfaces on a Pure Storage FlashArray.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | IPv4 or IPv6 address of interface. |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **enabled** boolean | **Choices:*** no
* **yes** β
| Define if VLAN interface is enabled or not. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **name** string / required | | Interface name, including controller indentifier. VLANs are only supported on iSCSI physical interfaces |
| **state** string | **Choices:*** **present** β
* absent
| State of existing interface (on/off). |
| **subnet** string / required | | Name of subnet interface associated with. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Configure and enable VLAN interface ct0.eth8 for subnet test
purefa_vlan:
name: ct0.eth8
subnet: test
address: 10.21.200.18
state: present
fa_url: 10.10.10.2
api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
- name: Disable VLAN interface for subnet test on ct1.eth2
purefa_vlan:
name: ct1.eth2
subnet: test
enabled: false
fa_url: 10.10.10.2
api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
- name: Delete VLAN inteface for subnet test on ct0.eth4
purefa_vlan:
name: ct0.eth4
subnet: test
state: absent
fa_url: 10.10.10.2
api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f686838493db9798859f949a93db8293979bd0d5c5c1cdd0d5c3c4cdd0d5c2cecd8683849385829984979193d0d5c2c0cd95999b)>
| programming_docs |
ansible purestorage.flasharray.purefa_proxy β Configure FlashArray phonehome HTTPs proxy settings purestorage.flasharray.purefa\_proxy β Configure FlashArray phonehome HTTPs proxy settings
==========================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_proxy`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Set or erase configuration for the HTTPS phonehome proxy settings.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **host** string | | The proxy host name. |
| **port** integer | | The proxy TCP/IP port number. |
| **state** string | **Choices:*** absent
* **present** β
| Set or delete proxy configuration |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng proxy settings
purefa_proxy:
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set proxy settings
purefa_proxy:
host: purestorage.com
port: 8080
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#2a5a5f584f074b44594348464f075e4f4b470c09191d110c091f18110c091e12115a5f584f595e45584b4d4f0c091e1c11494547)>
ansible purestorage.flasharray.purefa_kmip β Manage FlashArray KMIP server objects purestorage.flasharray.purefa\_kmip β Manage FlashArray KMIP server objects
===========================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_kmip`.
New in version 1.10.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage FlashArray KMIP Server objects
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **ca\_certificate** string | | The text of the CA certificate for the KMIP server. Includes the "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" lines Does not exceed 3000 characters in length |
| **certificate** string | | Name of existing certifcate used to verify FlashArray authenticity to the KMIP server. Use the *purefa\_certs* module to create certificates. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **name** string / required | | Name of the KMIP server object |
| **state** string | **Choices:*** absent
* **present** β
| Action for the module to perform |
| **uris** list / elements=string | | A list of URIs for the configured KMIP servers. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create KMIP obejct
purefa_kmip:
name: foo
certificate: bar
ca_certificate: "{{lookup('file', 'example.crt') }}"
uris:
- 1.1.1.1:8888
- 2.3.3.3:9999
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete KMIP object
purefa_kmip:
name: foo
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Update KMIP object
purefa_kmip:
name: foo
ca_certificate: "{{lookup('file', 'example2.crt') }}"
uris:
- 3.3.3.3:8888
- 4.4.4.4:9999
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ef9f9a9d8ac28e819c868d838ac29b8a8e82c9ccdcd8d4c9ccdaddd4c9ccdbd7d49f9a9d8a9c9b809d8e888ac9ccdbd9d48c8082)>
ansible purestorage.flasharray.purefa_snap β Manage volume snapshots on Pure Storage FlashArrays purestorage.flasharray.purefa\_snap β Manage volume snapshots on Pure Storage FlashArrays
=========================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_snap`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create or delete volumes and volume snapshots on Pure Storage FlashArray.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the snapshot on delete or leave in trash. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **ignore\_repl** boolean | **Choices:*** **no** β
* yes
| Only valid for Purity//FA 6.1 or higher If set to true, allow destruction/eradication of snapshots in use by replication. If set to false, allow destruction/eradication of snapshots not in use by replication |
| **name** string / required | | The name of the source volume. |
| **offload** string | | Only valid for Purity//FA 6.1 or higher Name of offload target for the snapshot. Target can be either another FlashArray or an Offload Target This is only applicable for creation, deletion and eradication of snapshots
*state* of *copy* is not supported.
*suffix* is not supported for offload snapshots. |
| **overwrite** boolean | **Choices:*** **no** β
* yes
| Define whether to overwrite existing volume when creating from snapshot. |
| **state** string | **Choices:*** absent
* copy
* **present** β
* rename
| Define whether the volume snapshot should exist or not. |
| **suffix** string | | Suffix of snapshot name. Not used during creation if *offload* is provided. |
| **target** string | | Name of target volume if creating from snapshot. Name of new snapshot suffix if renaming a snapshot |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create snapshot foo.ansible
purefa_snap:
name: foo
suffix: ansible
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Create R/W clone foo_clone from snapshot foo.snap
purefa_snap:
name: foo
suffix: snap
target: foo_clone
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: copy
- name: Create R/W clone foo_clone from remote mnapshot arrayB:foo.snap
purefa_snap:
name: arrayB:foo
suffix: snap
target: foo_clone
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: copy
- name: Overwrite existing volume foo_clone with snapshot foo.snap
purefa_snap:
name: foo
suffix: snap
target: foo_clone
overwrite: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: copy
- name: Delete and eradicate snapshot named foo.snap
purefa_snap:
name: foo
suffix: snap
eradicate: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Rename snapshot foo.fred to foo.dave
purefa_snap:
name: foo
suffix: fred
target: dave
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: rename
- name: Create a remote volume snapshot on offload device arrayB
purefa_snap:
name: foo
offload: arrayB
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete and eradicate a volume snapshot foo.1 on offload device arrayB
purefa_snap:
name: foo
suffix: 1
offload: arrayB
eradicate: true
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#146461667139757a677d7678713960717579323727232f323721262f3237202c2f6461667167607b66757371323720222f777b79)>
ansible purestorage.flasharray.purefa_dsrole β Configure FlashArray Directory Service Roles purestorage.flasharray.purefa\_dsrole β Configure FlashArray Directory Service Roles
====================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_dsrole`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Set or erase directory services role configurations.
* Only available for FlashArray running Purity 5.2.0 or higher
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **group** string | | Sets the common Name (CN) of the configured directory service group containing users for the FlashBlade. This name should be just the Common Name of the group without the CN= specifier. Common Names should not exceed 64 characters in length. |
| **group\_base** string | | Specifies where the configured group is located in the directory tree. This field consists of Organizational Units (OUs) that combine with the base DN attribute and the configured group CNs to complete the full Distinguished Name of the groups. The group base should specify OU= for each OU and multiple OUs should be separated by commas. The order of OUs is important and should get larger in scope from left to right. Each OU should not exceed 64 characters in length. |
| **role** string / required | **Choices:*** array\_admin
* ops\_admin
* readonly
* storage\_admin
| The directory service role to work on |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete directory service role |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng array_admin directory service role
purefa_dsrole:
role: array_admin
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create array_admin directory service role
purefa_dsrole:
role: array_admin
group_base: "OU=PureGroups,OU=SANManagers"
group: pureadmins
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Update ops_admin directory service role
purefa_dsrole:
role: ops_admin
group_base: "OU=PureGroups"
group: opsgroup
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#02727770672f636c716b606e672f7667636f242131353924213730392421363a397277706771766d706365672421363439616d6f)>
ansible purestorage.flasharray.purefa_apiclient β Manage FlashArray API Clients purestorage.flasharray.purefa\_apiclient β Manage FlashArray API Clients
========================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_apiclient`.
New in version 1.5.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Enable or disable FlashArray API Clients
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **enabled** boolean | **Choices:*** no
* **yes** β
| State of the API Client Key |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **issuer** string | | The name of the identity provider that will be issuing ID Tokens for this API client If not specified, defaults to the API client name, *name*. |
| **name** string / required | | Name of the API Client |
| **public\_key** string | | The API clients PEM formatted (Base64 encoded) RSA public key. Include the *ββBEGIN PUBLIC KEYββ* and *ββEND PUBLIC KEYββ* lines |
| **role** string | **Choices:*** readonly
* ops\_admin
* storage\_admin
* array\_admin
| The maximum role allowed for ID Tokens issued by this API client |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the API client should exist or not. |
| **token\_ttl** integer | **Default:**86400 | Time To Live length in seconds for the exchanged access token Range is 1 second to 1 day (86400 seconds) |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create API token ansible-token
purefa_apiclient:
name: ansible-token
issuer: "Pure Storage"
ttl: 3000
role: array_admin
public_key: "{{lookup('file', 'public_pem_file') }}"
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disable API CLient
purefa_apiclient:
name: ansible-token
enabled: false
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Enable API CLient
purefa_apiclient:
name: ansible-token
enabled: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete API Client
purefa_apiclient:
state: absent
name: ansible-token
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#29595c5b4c0448475a404b454c045d4c48440f0a1a1e120f0a1c1b120f0a1d1112595c5b4c5a5d465b484e4c0f0a1d1f124a4644)>
ansible purestorage.flasharray.purefa_vg β Manage volume groups on Pure Storage FlashArrays purestorage.flasharray.purefa\_vg β Manage volume groups on Pure Storage FlashArrays
====================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_vg`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, delete or modify volume groups on Pure Storage FlashArrays.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **bw\_qos** string | | Bandwidth limit for vgroup in M or G units. M will set MB/s G will set GB/s To clear an existing QoS setting use 0 (zero) |
| **count** integer | | Number of volume groups to be created in a multiple volume group creation Only supported from Purity//FA v6.0.0 and higher |
| **digits** integer | **Default:**1 | Number of digits to use for multiple volume group count. This will pad the index number with zeros where necessary Only supported from Purity//FA v6.0.0 and higher Range is between 1 and 10 |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the volume group on delete and leave in trash. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **iops\_qos** string | | IOPs limit for vgroup - use value or K or M K will mean 1000 M will mean 1000000 To clear an existing IOPs setting use 0 (zero) |
| **name** string / required | | The name of the volume group. Multi-volume-group support available from Purity//FA 6.0.0 **\*\*\*NOTE\*\*\*** Manual deletion or eradication of individual volume groups created using multi-volume-group will cause idempotency to fail Multi-volume-group support only exists for volume group creation |
| **start** integer | **Default:**0 | Number at which to start the multiple volume group creation index Only supported from Purity//FA v6.0.0 and higher |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the volume group should exist or not. |
| **suffix** string | | Suffix string, if required, for multiple volume group create Volume group names will be formed as *<name>#I<suffix>*, where *#* is a placeholder for the volume index See associated descriptions Only supported from Purity//FA v6.0.0 and higher |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new volune group
purefa_vg:
name: foo
bw_qos: 50M
iops_qos: 100
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create 10 volune groups of pattern foo#bar with QoS
purefa_vg:
name: foo
suffix: bar
count: 10
start: 10
digits: 3
bw_qos: 50M
iops_qos: 100
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Update volune group QoS limits
purefa_vg:
name: foo
bw_qos: 0
iops_qos: 5555
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Destroy volume group
purefa_vg:
name: foo
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Recover deleted volune group
purefa_vg:
name: foo
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Destroy and Eradicate volume group
purefa_vg:
name: foo
eradicate: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#08787d7a6d2569667b616a646d257c6d69652e2b3b3f332e2b3d3a332e2b3c3033787d7a6d7b7c677a696f6d2e2b3c3e336b6765)>
| programming_docs |
ansible purestorage.flasharray.purefa_hg β Manage hostgroups on Pure Storage FlashArrays purestorage.flasharray.purefa\_hg β Manage hostgroups on Pure Storage FlashArrays
=================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_hg`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, delete or modifiy hostgroups on Pure Storage FlashArrays.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **host** list / elements=string | | List of existing hosts to add to hostgroup. Note that hostnames are case-sensitive however FlashArray hostnames are unique and ignore case - you cannot have *hosta* and *hostA*
|
| **hostgroup** string / required | | The name of the hostgroup. |
| **lun** integer | | LUN ID to assign to volume for hostgroup. Must be unique. Only applicable when only one volume is specified for connection. If not provided the ID will be automatically assigned. Range for LUN ID is 1 to 4095. |
| **rename** string added in 1.10.0 of purestorage.flasharray | | New name of hostgroup |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the hostgroup should exist or not. |
| **volume** list / elements=string | | List of existing volumes to add to hostgroup. Note that volumes are case-sensitive however FlashArray volume names are unique and ignore case - you cannot have *volumea* and *volumeA*
|
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create empty hostgroup
purefa_hg:
hostgroup: foo
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Add hosts and volumes to existing or new hostgroup
purefa_hg:
hostgroup: foo
host:
- host1
- host2
volume:
- vol1
- vol2
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete hosts and volumes from hostgroup
purefa_hg:
hostgroup: foo
host:
- host1
- host2
volume:
- vol1
- vol2
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
# This will disconnect all hosts and volumes in the hostgroup
- name: Delete hostgroup
purefa_hg:
hostgroup: foo
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Rename hostgroup
purefa_hg:
hostgroup: foo
rename: bar
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create host group with hosts and volumes
purefa_hg:
hostgroup: bar
host:
- host1
- host2
volume:
- vol1
- vol2
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#552520273078343b263c3739307821303438737666626e737660676e7376616d6e2520273026213a27343230737661636e363a38)>
ansible purestorage.flasharray.purefa_dns β Configure FlashArray DNS settings purestorage.flasharray.purefa\_dns β Configure FlashArray DNS settings
======================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_dns`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Set or erase configuration for the DNS settings.
* Nameservers provided will overwrite any existing nameservers.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **domain** string | | Domain suffix to be appended when perofrming DNS lookups. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **nameservers** list / elements=string | | List of up to 3 unique DNS server IP addresses. These can be IPv4 or IPv6 - No validation is done of the addresses is performed. |
| **state** string | **Choices:*** absent
* **present** β
| Set or delete directory service configuration |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng DNS settings
purefa_dns:
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set DNS settings
purefa_dns:
domain: purestorage.com
nameservers:
- 8.8.8.8
- 8.8.4.4
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e090959285cd818e9389828c85cd9485818dc6c3d3d7dbc6c3d5d2dbc6c3d4d8db9095928593948f92818785c6c3d4d6db838f8d)>
ansible purestorage.flasharray.purefa_pod_replica β Manage ActiveDR pod replica links between Pure Storage FlashArrays purestorage.flasharray.purefa\_pod\_replica β Manage ActiveDR pod replica links between Pure Storage FlashArrays
================================================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_pod_replica`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module manages ActiveDR pod replica links between Pure Storage FlashArrays.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **name** string / required | | ActiveDR source pod name |
| **pause** boolean | **Choices:*** no
* yes
| Pause/unpause a pod replica link |
| **state** string | **Choices:*** **present** β
* absent
| Creates or modifies a pod replica link |
| **target\_array** string | | Remote array name to create replica on. |
| **target\_pod** string | | Name of target pod Must not be the same as the local pod. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new pod replica link from foo to bar on arrayB
purefa_pod_replica:
name: foo
target_array: arrayB
target_pod: bar
state: present
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Pause an pod replica link
purefa_pod_replica:
name: foo
pause: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete and eradicate pod replica link
purefa_pod_replica:
name: foo
state: absent
eradicate: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#2c5c595e49014d425f454e40490158494d410a0f1f1b170a0f191e170a0f1814175c595e495f58435e4d4b490a0f181a174f4341)>
ansible purestorage.flasharray.purefa_dirsnap β Manage FlashArray File System Directory Snapshots purestorage.flasharray.purefa\_dirsnap β Manage FlashArray File System Directory Snapshots
==========================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_dirsnap`.
New in version 1.9.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create/Delete FlashArray File System directory snapshots
* A full snapshot name is constructed in the form of DIR.CLIENT\_NAME.SUFFIX where DIR is the managed directory name, CLIENT\_NAME is the client name, and SUFFIX is the suffix.
* The client visible snapshot name is CLIENT\_NAME.SUFFIX.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **client** string / required | | The client name portion of the client visible snapshot name |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the snapshot on delete or leave in trash |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **filesystem** string / required | | Name of the filesystem the directory links to. |
| **keep\_for** integer | **Default:**0 | Retention period, after which snapshots will be eradicated Specify in seconds. Range 300 - 31536000 (5 minutes to 1 year) Set to 0 for no retention period. If not specified on create will default to 0 (no retention period) |
| **name** string / required | | Name of the directory to snapshot |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the directory snapshot should exist or not. |
| **suffix** string | | Snapshot suffix to use |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create a snapshot direcotry foo in filesysten bar for client test with suffix test
purefa_dirsnap:
name: foo
filesystem: bar
client: test
suffix: test
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Update retention time for a snapshot foo:bar.client.test
purefa_dirsnap:
name: foo
filesystem: bar
client: client
suffix: test
keep_for: 300 # 5 minutes
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete snapshot foo:bar.client.test
purefa_dirsnap:
name: foo
filesystem: bar
client: client
suffix: test
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Recover deleted snapshot foo:bar.client.test
purefa_dirsnap:
name: foo
filesystem: bar
client: client
suffix: test
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete and eradicate snapshot foo:bar.client.test
purefa_dirsnap:
name: foo
filesystem: bar
client: client
suffix: test
state: absent
eradicate: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Eradicate deleted snapshot foo:bar.client.test
purefa_dirsnap:
name: foo
filesystem: bar
client: client
suffix: test
eradicate: true
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#53232621367e323d203a313f367e2736323e757060646875706661687570676b682326213620273c213234367570676568303c3e)>
ansible purestorage.flasharray.purefa_phonehome β Enable or Disable Pure Storage FlashArray Phonehome purestorage.flasharray.purefa\_phonehome β Enable or Disable Pure Storage FlashArray Phonehome
==============================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_phonehome`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Enablke or Disable Phonehome for a Pure Storage FlashArray.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **state** string | **Choices:*** **present** β
* absent
| Define state of phonehome |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Enable Phonehome
purefa_phonehome:
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disable Phonehome
purefa_phonehome:
state: disable
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#62121710074f030c110b000e074f1607030f444151555944415750594441565a591217100711160d100305074441565459010d0f)>
ansible purestorage.flasharray.purefa_pg β Manage protection groups on Pure Storage FlashArrays purestorage.flasharray.purefa\_pg β Manage protection groups on Pure Storage FlashArrays
========================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_pg`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, delete or modify protection groups on Pure Storage FlashArrays.
* If a protection group exists and you try to add non-valid types, eg. a host to a volume protection group the module will ignore the invalid types.
* Protection Groups on Offload targets are supported.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **enabled** boolean | **Choices:*** no
* **yes** β
| Define whether to enabled snapshots for the protection group. |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the protection group on delete and leave in trash. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **host** list / elements=string | | List of existing hosts to add to protection group. Note that hostnames are case-sensitive however FlashArray hostnames are unique and ignore case - you cannot have *hosta* and *hostA*
|
| **hostgroup** list / elements=string | | List of existing hostgroups to add to protection group. Note that hostgroups are case-sensitive however FlashArray hostgroup names are unique and ignore case - you cannot have *groupa* and *groupA*
|
| **pgroup** string / required | | The name of the protection group. |
| **rename** string | | Rename a protection group If the source protection group is in a Pod or Volume Group 'container' you only need to provide the new protection group name in the same 'container' |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the protection group should exist or not. |
| **target** list / elements=string | | List of remote arrays or offload target for replication protection group to connect to. Note that all replicated protection groups are asynchronous. Target arrays or offload targets must already be connected to the source array. Maximum number of targets per Portection Group is 4, assuming your configuration suppors this. |
| **volume** list / elements=string | | List of existing volumes to add to protection group. Note that volume are case-sensitive however FlashArray volume names are unique and ignore case - you cannot have *volumea* and *volumeA*
|
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new local protection group
purefa_pg:
pgroup: foo
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create new protection group called bar in pod called foo
purefa_pg:
pgroup: "foo::bar"
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create new replicated protection group
purefa_pg:
pgroup: foo
target:
- arrayb
- arrayc
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create new replicated protection group to offload target and remote array
purefa_pg:
pgroup: foo
target:
- offload
- arrayc
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create new protection group with snapshots disabled
purefa_pg:
pgroup: foo
enabled: false
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete protection group
purefa_pg:
pgroup: foo
eradicate: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Eradicate protection group foo on offload target where source array is arrayA
purefa_pg:
pgroup: "arrayA:foo"
target: offload
eradicate: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Rename protection group foo in pod arrayA to bar
purefa_pg:
pgroup: "arrayA::foo"
rename: bar
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create protection group for hostgroups
purefa_pg:
pgroup: bar
hostgroup:
- hg1
- hg2
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create protection group for hosts
purefa_pg:
pgroup: bar
host:
- host1
- host2
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create replicated protection group for volumes
purefa_pg:
pgroup: bar
volume:
- vol1
- vol2
target: arrayb
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#354540475018545b465c5759501841505458131606020e131600070e1316010d0e4540475046415a47545250131601030e565a58)>
| programming_docs |
ansible purestorage.flasharray.purefa_syslog β Configure Pure Storage FlashArray syslog settings purestorage.flasharray.purefa\_syslog β Configure Pure Storage FlashArray syslog settings
=========================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_syslog`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure syslog configuration for Pure Storage FlashArrays.
* Add or delete an individual syslog server to the existing list of serves.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string / required | | Syslog server address. This field supports IPv4, IPv6 or FQDN. An invalid IP addresses will cause the module to fail. No validation is performed for FQDNs. |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **name** string | | A user-specified name. The name must be locally unique and cannot be changed. Only applicable with FlashArrays running Purity//FA 6.0 or higher. |
| **port** string | | Port at which the server is listening. If no port is specified the system will use 514 |
| **protocol** string / required | **Choices:*** tcp
* tls
* udp
| Protocol which server uses |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete syslog servers configuration |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng syslog server entries
purefa_syslog:
address: syslog1.com
protocol: tcp
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set array syslog servers
purefa_syslog:
state: present
address: syslog1.com
protocol: udp
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#255550574008444b564c4749400851404448030616121e030610171e0306111d1e5550574056514a57444240030611131e464a48)>
ansible purestorage.flasharray.purefa_volume_tags β Manage volume tags on Pure Storage FlashArrays purestorage.flasharray.purefa\_volume\_tags β Manage volume tags on Pure Storage FlashArrays
============================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_volume_tags`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage volume tags for volumes on Pure Storage FlashArray.
* Requires a minimum of Purity 6.0.0
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **copyable** boolean | **Choices:*** no
* **yes** β
| Define whether the volume tags are inherited on volume copies. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **kvp** list / elements=string / required | | List of key value pairs to assign to the volume. Seperate the key from the value using a colon (:) only. All items in list will use *namespace* and *copyable* settings. Maximum of 5 tags per volume See examples for exact formatting requirements |
| **name** string / required | | The name of the volume. |
| **namespace** string | **Default:**"default" | The name of tag namespace |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the volume tag(s) should exist or not. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new tags in namespace test for volume foo
purefa_volume_tags:
name: foo
namespace: test
copyable: false
kvp:
- 'key1:value1'
- 'key2:value2'
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Remove an existing tag in namespace test for volume foo
purefa_volume_tags:
name: foo
namespace: test
kvp:
- 'key1:value1'
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Update an existing tag in namespace test for volume foo
purefa_volume_tags:
name: foo
namespace: test
kvp:
- 'key1:value2'
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#740401061159151a071d1618115900111519525747434f525741464f5257404c4f0401061107001b06151311525740424f171b19)>
ansible purestorage.flasharray.purefa_syslog_settings β Manage FlashArray syslog servers settings purestorage.flasharray.purefa\_syslog\_settings β Manage FlashArray syslog servers settings
===========================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_syslog_settings`.
New in version 1.10.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage FlashArray syslog servers settings
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **ca\_certificate** string | | The text of the CA certificate for condifured syslog servers. Includes the "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" lines Does not exceed 3000 characters in length To delete the existing CA certifcate use the special string `DELETE` |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **severity** string | **Choices:*** debug
* **info** β
* notice
| Logging severity threshold for which events will be forwarded to the configured syslog servers. |
| **tls\_audit** boolean | **Choices:*** no
* **yes** β
| If messages that are necessary in order to audit TLS negotiations performed by the array are forwared to the syslog servers. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Change syslog servers settings
purefa_syslog_servers:
tls_audit: false
severity: debug
ca_certificate: "{{lookup('file', 'example.crt') }}"
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete existing CA certifcate for syslog servers settings
purefa_syslog_servers:
ca_certificate: DELETE
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e9999c9b8cc488879a808b858cc49d8c8884cfcadaded2cfcadcdbd2cfcaddd1d2999c9b8c9a9d869b888e8ccfcadddfd28a8684)>
ansible purestorage.flasharray.purefa_timeout β Configure Pure Storage FlashArray GUI idle timeout purestorage.flasharray.purefa\_timeout β Configure Pure Storage FlashArray GUI idle timeout
===========================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_timeout`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure GUI idle timeout for Pure Storage FlashArrays.
* This does not affect existing GUI sessions.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **state** string | **Choices:*** **present** β
* absent
| Set or disable the GUI idle timeout |
| **timeout** integer | **Default:**30 | Minutes for idle timeout. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Set GUI idle timeout to 25 minutes
purefa_timeout:
timeout: 25
state: present
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disable idle timeout
purefa_timeout:
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#51212423347c303f2238333d347c2534303c777262666a777264636a777265696a2124233422253e23303634777265676a323e3c)>
ansible purestorage.flasharray.purefa_volume β Manage volumes on Pure Storage FlashArrays purestorage.flasharray.purefa\_volume β Manage volumes on Pure Storage FlashArrays
==================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_volume`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, delete or extend the capacity of a volume on Pure Storage FlashArray.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **bw\_qos** string | | Bandwidth limit for volume in M or G units. M will set MB/s G will set GB/s To clear an existing QoS setting use 0 (zero)
aliases: qos |
| **count** integer | | Number of volumes to be created in a multiple volume creation Only supported from Purity//FA v6.0.0 and higher |
| **digits** integer | **Default:**1 | Number of digits to use for multiple volume count. This will pad the index number with zeros where necessary Only supported from Purity//FA v6.0.0 and higher Range is between 1 and 10 |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the volume on delete or leave in trash. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **iops\_qos** string | | IOPs limit for volume - use value or K or M K will mean 1000 M will mean 1000000 To clear an existing IOPs setting use 0 (zero) |
| **move** string | | Move a volume in and out of a pod or vgroup Provide the name of pod or vgroup to move the volume to Pod and Vgroup names must be unique in the array To move to the local array, specify `local`
This is not idempotent - use `ignore_errors` in the play |
| **name** string / required | | The name of the volume. Volume could be created in a POD with this syntax POD\_NAME::VOLUME\_NAME. Volume could be created in a volume group with this syntax VG\_NAME/VOLUME\_NAME. Multi-volume support available from Purity//FA 6.0.0 **\*\*\*NOTE\*\*\*** Manual deletion or eradication of individual volumes created using multi-volume will cause idempotency to fail Multi-volume support only exists for volume creation |
| **overwrite** boolean | **Choices:*** **no** β
* yes
| Define whether to overwrite a target volume if it already exisits. |
| **pgroup** string added in 1.8.0 of purestorage.flasharray | | Name of exisitng, not deleted, protection group to add volume to Only application for volume(s) creation |
| **rename** string | | Value to rename the specified volume to. Rename only applies to the container the current volumes is in. There is no requirement to specify the pod or vgroup name as this is implied. |
| **size** string | | Volume size in M, G, T or P units. |
| **start** integer | **Default:**0 | Number at which to start the multiple volume creation index Only supported from Purity//FA v6.0.0 and higher |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the volume should exist or not. |
| **suffix** string | | Suffix string, if required, for multiple volume create Volume names will be formed as *<name>#I<suffix>*, where *#* is a placeholder for the volume index See associated descriptions Only supported from Purity//FA v6.0.0 and higher |
| **target** string | | The name of the target volume, if copying. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new volume named foo with a QoS limit
purefa_volume:
name: foo
size: 1T
bw_qos: 58M
iops_qos: 23K
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Create new volume named foo in pod bar in protection group pg1
purefa_volume:
name: bar::foo
prgoup: pg1
size: 1T
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Create 10 volumes with index starting at 10 but padded with 3 digits
purefa_volume:
name: foo
size: 1T
suffix: bar
count: 10
start: 10
digits: 3
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Extend the size of an existing volume named foo
purefa_volume:
name: foo
size: 2T
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Delete and eradicate volume named foo
purefa_volume:
name: foo
eradicate: yes
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Create clone of volume bar named foo
purefa_volume:
name: foo
target: bar
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Overwrite volume bar with volume foo
purefa_volume:
name: foo
target: bar
overwrite: yes
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Clear volume QoS from volume foo
purefa_volume:
name: foo
bw_qos: 0
iops_qos: 0
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Move local volume foo from local array to pod bar
purefa_volume:
name: foo
move: bar
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Move volume foo in pod bar to local array
purefa_volume:
name: bar::foo
move: local
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Move volume foo in pod bar to vgroup fin
purefa_volume:
name: bar::foo
move: fin
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **volume** dictionary | success | A dictionary describing the changed volume. Only some attributes below will be returned with various actions. |
| | **bandwidth\_limit** integer | success | Volume bandwidth limit in bytes/sec |
| | **created** string | success | Volume creation time **Sample:** 2019-03-13T22:49:24Z |
| | **iops\_limit** integer | success | Volume IOPs limit |
| | **name** string | success | Volume name |
| | **nvme\_nguid** string | success | Volume NVMe namespace globally unique identifier **Sample:** eui.00cd6b99ef25864724a937c5000be684 |
| | **page83\_naa** string | success | Volume NAA canonical name **Sample:** naa.624a9370361019ecace43db3000120a4 |
| | **serial** string | success | Volume serial number **Sample:** 361019ECACE43D83000120A4 |
| | **size** integer | success | Volume size in bytes |
| | **source** string | success | Volume name of source volume used for volume copy |
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#85f5f0f7e0a8e4ebf6ece7e9e0a8f1e0e4e8a3a6b6b2bea3a6b0b7bea3a6b1bdbef5f0f7e0f6f1eaf7e4e2e0a3a6b1b3bee6eae8)>
| programming_docs |
ansible purestorage.flasharray.purefa_info β Collect information from Pure Storage FlashArray purestorage.flasharray.purefa\_info β Collect information from Pure Storage FlashArray
======================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_info`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collect information from a Pure Storage Flasharray running the Purity//FA operating system. By default, the module will collect basic information including hosts, host groups, protection groups and volume counts. Additional information can be collected based on the configured set of arguements.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **gather\_subset** list / elements=string | **Default:**"minimum" | When supplied, this argument will define the information to be collected. Possible values for this include all, minimum, config, performance, capacity, network, subnet, interfaces, hgroups, pgroups, hosts, admins, volumes, snapshots, pods, replication, vgroups, offload, apps, arrays, certs, kmip, clients, policies, dir\_snaps and filesystems. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: collect default set of information
purefa_info:
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
register: array_info
- name: show default information
debug:
msg: "{{ array_info['purefa_info']['default'] }}"
- name: collect configuration and capacity information
purefa_info:
gather_subset:
- config
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
register: array_info
- name: show configuration information
debug:
msg: "{{ array_info['purefa_info']['config'] }}"
- name: collect all information
purefa_info:
gather_subset:
- all
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: show all information
debug:
msg: "{{ array_info['purefa_info'] }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **purefa\_info** complex | always | Returns the information collected from the FlashArray **Sample:** {'admins': {'pureuser': {'role': 'array\_admin', 'type': 'local'}}, 'apps': {'offload': {'description': 'Snapshot offload to NFS or Amazon S3', 'status': 'healthy', 'version': '5.2.1'}}, 'arrays': {}, 'capacity': {'data\_reduction': 11.664774599686346, 'free\_space': 6995782867042, 'provisioned\_space': 442391871488, 'shared\_space': 3070918120, 'snapshot\_space': 284597118, 'system\_space': 0, 'thin\_provisioning': 0.8201773449669771, 'total\_capacity': 7002920315199, 'total\_reduction': 64.86821472825108, 'volume\_space': 3781932919}, 'config': {'directory\_service': {'data': {'base\_dn': 'dc=example,dc=lab', 'bind\_user': 'CN=user,OU=Users,OU=Example Lab,DC=example,DC=lab', 'enabled': True, 'services': ['data'], 'uris': ['ldap://1.2.3.11']}, 'management': {'base\_dn': 'DC=example,DC=lab', 'bind\_user': 'svc.ldap', 'enabled': True, 'services': ['management'], 'uris': ['ldap://1.2.3.10', 'ldap://1.2.3.11']}}, 'directory\_service\_roles': {'array\_admin': {'group': None, 'group\_base': None}, 'ops\_admin': {'group': None, 'group\_base': None}, 'readonly': {'group': None, 'group\_base': None}, 'storage\_admin': {'group': None, 'group\_base': None}}, 'dns': {'domain': 'acme.com', 'nameservers': ['8.8.4.4']}, 'global\_admin': {'lockout\_duration': None, 'max\_login\_attempts': None, 'min\_password\_length': 1, 'single\_sign\_on\_enabled': False}, 'idle\_timeout': 0, 'ntp': ['prod-ntp1.puretec.purestorage.com'], 'phonehome': 'enabled', 'proxy': '', 'relayhost': 'smtp.puretec.purestorage.com', 'scsi\_timeout': 60, 'senderdomain': 'purestorage.com', 'smtp': [{'enabled': True, 'name': '[email protected]'}], 'snmp': [{'auth\_passphrase': None, 'auth\_protocol': None, 'community': '', 'host': '10.21.23.34', 'name': 'manager1', 'notification': 'trap', 'privacy\_passphrase': None, 'privacy\_protocol': None, 'user': None, 'version': 'v2c'}], 'syslog': ['udp://prod-ntp2.puretec.purestorage.com:333']}, 'default': {'admins': 1, 'array\_model': 'FA-405', 'array\_name': 'array', 'connected\_arrays': 0, 'connection\_key': 'c6033033-fe69-2515-a9e8-966bb7fe4b40', 'hostgroups': 0, 'hosts': 15, 'pods': 1, 'protection\_groups': 1, 'purity\_version': '5.2.1', 'snapshots': 2, 'volume\_groups': 1}, 'hgroups': {}, 'hosts': {'@offload': {'hgroup': None, 'iqn': [], 'nqn': [], 'personality': None, 'preferred\_array': [], 'target\_port': [], 'wwn': []}, 'docker-host': {'hgroup': None, 'iqn': ['iqn.1994-05.com.redhat:d97adf78472'], 'nqn': [], 'personality': None, 'preferred\_array': [], 'target\_port': ['CT0.ETH4', 'CT1.ETH4'], 'wwn': []}}, 'interfaces': {'CT0.ETH4': 'iqn.2010-06.com.purestorage:flasharray.2111b767484e4682', 'CT1.ETH4': 'iqn.2010-06.com.purestorage:flasharray.2111b767484e4682'}, 'network': {'@offload.data0': {'address': '10.21.200.222', 'gateway': '10.21.200.1', 'hwaddr': '52:54:30:02:b9:4e', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['app'], 'speed': 10000000000}, 'ct0.eth0': {'address': '10.21.200.211', 'gateway': '10.21.200.1', 'hwaddr': 'ec:f4:bb:c8:8a:04', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['management'], 'speed': 1000000000}, 'ct0.eth2': {'address': '10.21.200.218', 'gateway': None, 'hwaddr': 'ec:f4:bb:c8:8a:00', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['replication'], 'speed': 10000000000}, 'ct0.eth4': {'address': '10.21.200.214', 'gateway': None, 'hwaddr': '90:e2:ba:83:79:0c', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['iscsi'], 'speed': 10000000000}, 'ct1.eth0': {'address': '10.21.200.212', 'gateway': '10.21.200.1', 'hwaddr': 'ec:f4:bb:e4:c6:3c', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['management'], 'speed': 1000000000}, 'ct1.eth2': {'address': '10.21.200.220', 'gateway': None, 'hwaddr': 'ec:f4:bb:e4:c6:38', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['replication'], 'speed': 10000000000}, 'ct1.eth4': {'address': '10.21.200.216', 'gateway': None, 'hwaddr': '90:e2:ba:8b:b1:8c', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['iscsi'], 'speed': 10000000000}, 'vir0': {'address': '10.21.200.210', 'gateway': '10.21.200.1', 'hwaddr': 'fe:ba:e9:e7:6b:0f', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['management'], 'speed': 1000000000}}, 'nfs\_offload': {}, 'performance': {'input\_per\_sec': 0, 'local\_queue\_usec\_per\_op': 0, 'output\_per\_sec': 0, 'qos\_rate\_limit\_usec\_per\_read\_op': 0, 'qos\_rate\_limit\_usec\_per\_write\_op': 0, 'queue\_depth': 0, 'queue\_usec\_per\_read\_op': 0, 'queue\_usec\_per\_write\_op': 0, 'reads\_per\_sec': 0, 'san\_usec\_per\_read\_op': 0, 'san\_usec\_per\_write\_op': 0, 'time': '2019-08-14T21:33:51Z', 'usec\_per\_read\_op': 0, 'usec\_per\_write\_op': 0, 'writes\_per\_sec': 0}, 'pgroups': {'test\_pg': {'hgroups': None, 'hosts': None, 'source': 'docker-host', 'targets': None, 'volumes': None}}, 'pods': {'test': {'arrays': [{'array\_id': '043be47c-1233-4399-b9d6-8fe38727dd9d', 'mediator\_status': 'online', 'name': 'array2', 'status': 'online'}], 'source': None}}, 's3\_offload': {'s3-offload': {'access\_key\_id': 'AKIAILNVEPWZTV4FGWZQ', 'bucket': 'offload-bucket', 'protocol': 's3', 'status': 'connected'}}, 'snapshots': {'@offload\_boot.1': {'created': '2019-03-14T15:29:20Z', 'size': 68719476736, 'source': '@offload\_boot'}}, 'subnet': {}, 'vgroups': {'test': {'volumes': ['test/test', 'test/test1']}}, 'volumes': {'@offload\_boot': {'bandwidth': None, 'hosts': [['@offload', 1]], 'nvme\_guid': 'eui.0043BE47C123343924a9379B00013959', 'page83\_naa': 'naa.624a937043BE47C12334399B00013959', 'serial': '43BE47C12334399B00013959', 'size': 68719476736, 'source': None}, 'docker-store': {'bandwidth': None, 'hosts': [['docker-host', 1]], 'nvme\_guid': 'eui.0043BE47C14a93724a9379B00013959', 'page83\_naa': 'naa.624a937043BE47C12334399B00011418', 'serial': '43BE47C12334399B00011418', 'size': 21474836480, 'source': None}}} |
### Authors
* Pure Storage ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#a9d9dcdbcc84c8c7dac0cbc5cc84ddccc8c48f8a9a9e928f8a9c9b928f8a9d9192d9dcdbccdaddc6dbc8cecc8f8a9d9f92cac6c4)>
ansible purestorage.flasharray.purefa_smis β Enable or disable FlashArray SMI-S features purestorage.flasharray.purefa\_smis β Enable or disable FlashArray SMI-S features
=================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_smis`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Enable or disable FlashArray SMI-S Provider and/or SLP
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **slp** boolean | **Choices:*** no
* **yes** β
| Enable/Disable Service Locator Protocol Ports used are TCP 427 and UDP 427 |
| **smis** boolean | **Choices:*** no
* **yes** β
| Enable/Disable SMI-S Provider Port used is TCP 5989 |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Enable SMI-S and SLP
purefa_smis:
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disable SMI-S and SLP
purefa_smis:
smis: false
slp: false
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f9898c8b9cd498978a909b959cd48d9c9894dfdacacec2dfdacccbc2dfdacdc1c2898c8b9c8a8d968b989e9cdfdacdcfc29a9694)>
ansible purestorage.flasharray.purefa_ntp β Configure Pure Storage FlashArray NTP settings purestorage.flasharray.purefa\_ntp β Configure Pure Storage FlashArray NTP settings
===================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_ntp`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Set or erase NTP configuration for Pure Storage FlashArrays.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **ntp\_servers** list / elements=string | | A list of up to 4 alternate NTP servers. These may include IPv4, IPv6 or FQDNs. Invalid IP addresses will cause the module to fail. No validation is performed for FQDNs. If more than 4 servers are provided, only the first 4 unique nameservers will be used. if no servers are given a default of *0.pool.ntp.org* will be used. |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete NTP servers configuration |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng NTP server entries
purefa_ntp:
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set array NTP servers
purefa_ntp:
state: present
ntp_servers:
- "0.pool.ntp.org"
- "1.pool.ntp.org"
- "2.pool.ntp.org"
- "3.pool.ntp.org"
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#11616463743c707f6278737d743c6574707c373222262a373224232a373225292a6164637462657e63707674373225272a727e7c)>
ansible purestorage.flasharray.purefa_pgsched β Manage protection groups replication schedules on Pure Storage FlashArrays purestorage.flasharray.purefa\_pgsched β Manage protection groups replication schedules on Pure Storage FlashArrays
===================================================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_pgsched`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Modify or delete protection groups replication schedules on Pure Storage FlashArrays.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **all\_for** integer | | Specifies the length of time, in seconds, to keep the snapshots on the source array before they are eradicated. Range available 1 - 34560000. |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **blackout\_end** string | | Specifies the time at which to restart replication. Provide a time in 12-hour AM/PM format, eg. 5PM |
| **blackout\_start** string | | Specifies the time at which to suspend replication. Provide a time in 12-hour AM/PM format, eg. 11AM |
| **days** integer | | Specifies the number of days to keep the *per\_day* snapshots beyond the *all\_for* period before they are eradicated Max retention period is 4000 days |
| **enabled** boolean | **Choices:*** no
* **yes** β
| Enable the schedule being configured. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **name** string / required | | The name of the protection group. |
| **per\_day** integer | | Specifies the number of *per\_day* snapshots to keep beyond the *all\_for* period. Maximum number is 1440 |
| **replicate\_at** integer | | Specifies the preferred time as HH:MM:SS, using 24-hour clock, at which to generate snapshots. |
| **replicate\_frequency** integer | | Specifies the replication frequency in seconds. Range 900 - 34560000 (FA-405, //M10, //X10i and Cloud Block Store). Range 300 - 34560000 (all other arrays). |
| **schedule** string / required | **Choices:*** replication
* snapshot
| Which schedule to change. |
| **snap\_at** integer | | Specifies the preferred time as HH:MM:SS, using 24-hour clock, at which to generate snapshots. Only valid if *snap\_frequency* is an exact multiple of 86400, ie 1 day. |
| **snap\_frequency** integer | | Specifies the snapshot frequency in seconds. Range available 300 - 34560000. |
| **state** string | **Choices:*** absent
* **present** β
| Define whether to set or delete the protection group schedule. |
| **target\_all\_for** integer | | Specifies the length of time, in seconds, to keep the replicated snapshots on the targets. Range is 1 - 34560000 seconds. |
| **target\_days** integer | | Specifies the number of days to keep the *target\_per\_day* replicated snapshots beyond the *target\_all\_for* period before they are eradicated. Max retention period is 4000 days |
| **target\_per\_day** integer | | Specifies the number of *per\_day* replicated snapshots to keep beyond the *target\_all\_for* period. Maximum number is 1440 |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Update protection group snapshot schedule
purefa_pgsched:
name: foo
schedule: snapshot
enabled: true
snap_frequency: 86400
snap_at: 15:30:00
per_day: 5
all_for: 5
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Update protection group replication schedule
purefa_pgsched:
name: foo
schedule: replication
enabled: true
replicate_frequency: 86400
replicate_at: 15:30:00
target_per_day: 5
target_all_for: 5
blackout_start: 2AM
blackout_end: 5AM
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete protection group snapshot schedule
purefa_pgsched:
name: foo
scheduke: snapshot
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete protection group replication schedule
purefa_pgsched:
name: foo
scheduke: replication
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#443431362169252a372d2628216930212529626777737f626771767f6267707c7f3431362137302b36252321626770727f272b29)>
| programming_docs |
ansible purestorage.flasharray.purefa_host β Manage hosts on Pure Storage FlashArrays purestorage.flasharray.purefa\_host β Manage hosts on Pure Storage FlashArrays
==============================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_host`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, delete or modify hosts on Pure Storage FlashArrays.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **count** integer | | Number of hosts to be created in a multiple host creation Only supported from Purity//FA v6.0.0 and higher |
| **digits** integer | **Default:**1 | Number of digits to use for multiple host count. This will pad the index number with zeros where necessary Only supported from Purity//FA v6.0.0 and higher Range is between 1 and 10 |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **host\_password** string | | Sets the host password for CHAP authentication Password length between 12 and 255 characters To clear the username/password pair use *clear* as the password SETTING A PASSWORD IS NON-IDEMPOTENT |
| **host\_user** string | | Sets the host user name for CHAP authentication Required with *host\_password*
To clear the username/password pair use *clear* as the password |
| **iqn** list / elements=string | | List of IQNs of the host. |
| **lun** integer | | LUN ID to assign to volume for host. Must be unique. If not provided the ID will be automatically assigned. Range for LUN ID is 1 to 4095. |
| **name** string / required | | The name of the host. Note that hostnames are case-sensitive however FlashArray hostnames are unique and ignore case - you cannot have *hosta* and *hostA*
Multi-host support available from Purity//FA 6.0.0 **\*\*\*NOTE\*\*\*** Manual deletion of individual hosts created using multi-host will cause idempotency to fail Multi-host support only exists for host creation
aliases: host |
| **nqn** list / elements=string | | List of NQNs of the host. |
| **personality** string | **Choices:*** hpux
* vms
* aix
* esxi
* solaris
* hitachi-vsp
* oracle-vm-server
* delete
* β
| Define which operating system the host is. Recommended for ActiveCluster integration. |
| **preferred\_array** list / elements=string | | List of preferred arrays in an ActiveCluster environment. To remove existing preferred arrays from the host, specify *delete*. |
| **protocol** string | **Choices:*** fc
* iscsi
* nvme
* mixed
| Defines the host connection protocol for volumes. DEPRECATED No longer a necessary parameter |
| **rename** string | | The name to rename to. Note that hostnames are case-sensitive however FlashArray hostnames are unique and ignore case - you cannot have *hosta* and *hostA*
|
| **start** integer | **Default:**0 | Number at which to start the multiple host creation index Only supported from Purity//FA v6.0.0 and higher |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the host should exist or not. When removing host all connected volumes will be disconnected. |
| **suffix** string | | Suffix string, if required, for multiple host create Host names will be formed as *<name>#I<suffix>*, where *#* is a placeholder for the host index See associated descriptions Only supported from Purity//FA v6.0.0 and higher |
| **target\_password** string | | Sets the target password for CHAP authentication Password length between 12 and 255 characters To clear the username/password pair use *clear* as the password SETTING A PASSWORD IS NON-IDEMPOTENT |
| **target\_user** string | | Sets the target user name for CHAP authentication Required with *target\_password*
To clear the username/password pair use *clear* as the password |
| **volume** string | | Volume name to map to the host. |
| **wwns** list / elements=string | | List of wwns of the host. |
Notes
-----
Note
* If specifying `lun` option ensure host support requested value
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new AIX host
purefa_host:
name: foo
personality: aix
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create 10 hosts with index starting at 10 but padded with 3 digits
purefa_host:
name: foo
personality: vms
suffix: bar
count: 10
start: 10
digits: 3
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Rename host foo to bar
purefa_host:
name: foo
rename: bar
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete host
purefa_host:
name: foo
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Make host bar with wwn ports
purefa_host:
name: bar
wwns:
- 00:00:00:00:00:00:00
- 11:11:11:11:11:11:11
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Make host bar with iSCSI ports
purefa_host:
name: bar
iqn:
- iqn.1994-05.com.redhat:7d366003913
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Make host bar with NVMe ports
purefa_host:
name: bar
nqn:
- nqn.2014-08.com.vendor:nvme:nvm-subsystem-sn-d78432
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Make mixed protocol host
purefa_host:
name: bar
nqn:
- nqn.2014-08.com.vendor:nvme:nvm-subsystem-sn-d78432
iqn:
- iqn.1994-05.com.redhat:7d366003914
wwns:
- 00:00:00:00:00:00:01
- 11:11:11:11:11:11:12
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Map host foo to volume bar as LUN ID 12
purefa_host:
name: foo
volume: bar
lun: 12
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disconnect volume bar from host foo
purefa_host:
name: foo
volume: bar
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Add preferred arrays to host foo
purefa_host:
name: foo
preferred_array:
- array1
- array2
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete preferred arrays from host foo
purefa_host:
name: foo
preferred_array: delete
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete exisitng WWNs from host foo (does not delete host object)
purefa_host:
name: foo
wwns: ""
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set CHAP target and host username/password pairs
purefa_host:
name: foo
target_user: user1
target_password: passwrodpassword
host_user: user2
host_password: passwrodpassword
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete CHAP target and host username/password pairs
purefa_host:
name: foo
target_user: user
target_password: clear
host_user: user
host_password: clear
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#32424740571f535c415b505e571f4657535f141101050914110700091411060a094247405741465d405355571411060409515d5f)>
ansible purestorage.flasharray.purefa_ad β Manage FlashArray Active Directory Account purestorage.flasharray.purefa\_ad β Manage FlashArray Active Directory Account
==============================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_ad`.
New in version 1.9.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Add or delete FlashArray Active Directory Account
* FlashArray allows the creation of one AD computer account, or joining of an existing AD computer account.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **computer** string | | The common name of the computer account to be created in the Active Directory domain. If not specified, defaults to the name of the Active Directory configuration. |
| **directory\_servers** list / elements=string | | A list of directory servers that will be used for lookups related to user authorization Accepted server formats are IP address and DNS name All specified servers must be registered to the domain appropriately in the array configured DNS and are only communicated with over the secure LDAP (LDAPS) protocol. If not specified, servers are resolved for the domain in DNS The specified list can have a maximum length of 1, or 3 for Purity 6.1.6 or higher. If more are provided only the first allowed count used. |
| **domain** string | | The Active Directory domain to join |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **join\_ou** string added in 1.10.0 of purestorage.flasharray | | Distinguished name of organization unit in which the computer account should be created when joining the domain. e.g. OU=Arrays,OU=Storage. The **DC=...** components can be omitted. If left empty, defaults to **CN=Computers**. Requires Purity//FA 6.1.8 or higher |
| **kerberos\_servers** list / elements=string | | A list of key distribution servers to use for Kerberos protocol Accepted server formats are IP address and DNS name All specified servers must be registered to the domain appropriately in the array configured DNS and are only communicated with over the secure LDAP (LDAPS) protocol. If not specified, servers are resolved for the domain in DNS. The specified list can have a maximum length of 1, or 3 for Purity 6.1.6 or higher. If more are provided only the first allowed count used. |
| **local\_only** boolean | **Choices:*** **no** β
* yes
| Do a local-only delete of an active directory account |
| **name** string / required | | Name of the AD account |
| **password** string | | Password string for *username*
|
| **state** string | **Choices:*** absent
* **present** β
| Define whether the AD sccount is deleted or not |
| **username** string | | A user capable of creating a computer account within the domain |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new AD account
purefa_ad:
name: ad_account
computer: FLASHARRAY
domain: acme.com
join_ou: "OU=Acme,OU=Dev"
username: Administrator
password: Password
kerberos_servers:
- kdc.acme.com
directory_servers:
- ldap.acme.com
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete AD account locally
purefa_ad:
name: ad_account
local_only: True
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Fully delete AD account. Note that correct AD permissions are required
purefa_ad:
name: ad_account
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e191949384cc808f9288838d84cc9584808cc7c2d2d6dac7c2d4d3dac7c2d5d9da9194938492958e93808684c7c2d5d7da828e8c)>
ansible purestorage.flasharray.purefa_policy β Manage FlashArray File System Policies purestorage.flasharray.purefa\_policy β Manage FlashArray File System Policies
==============================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_policy`.
New in version 1.5.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage FlashArray file system policies for NFS, SMB and snapshot
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **client** string | | Specifies which SMB or NFS clients are given access Accepted notation, IP, IP mask, or hostname |
| **directory** list / elements=string added in 1.9.0 of purestorage.flasharray | | Directories to have the quota rule applied to. |
| **enabled** boolean | **Choices:*** no
* **yes** β
| Define if policy is enabled or not |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **ignore\_usage** boolean added in 1.9.0 of purestorage.flasharray | **Choices:*** **no** β
* yes
| Flag used to override checks for quota management operations. If set to true, directory usage is not checked against the quota\_limits that are set. If set to false, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. |
| **name** string / required | | Name of the policy |
| **nfs\_access** string | **Choices:*** root-squash
* **no-root-squash** β
| Specifies access control for the export |
| **nfs\_permission** string | **Choices:*** ro
* **rw** β
| Specifies which read-write client access permissions are allowed for the export |
| **policy** string / required | **Choices:*** nfs
* smb
* snapshot
* quota
| The type of policy to use |
| **quota\_enforced** boolean | **Choices:*** no
* **yes** β
| Defines if the directory quota is enforced. |
| **quota\_limit** string added in 1.9.0 of purestorage.flasharray | | Logical space limit of the share in M, G, T or P units. See examples. If size is not set at filesystem creation time the filesystem size becomes unlimited. This value cannot be set to 0. |
| **quota\_notifications** list / elements=string added in 1.9.0 of purestorage.flasharray | **Choices:*** user
* group
| Targets to notify when usage approaches the quota limit. The list of notification targets is a comma-separated string If not specified, notification targets are not assigned. |
| **rename** string | | New name of policy |
| **smb\_anon\_allowed** boolean | **Choices:*** **no** β
* yes
| Specifies whether access to information is allowed for anonymous users |
| **smb\_encrypt** boolean | **Choices:*** **no** β
* yes
| Specifies whether the remote client is required to use SMB encryption |
| **snap\_at** string | | Specifies the number of hours since midnight at which to take a snapshot or the hour including AM/PM Can only be set on the rule with the smallest *snap\_every* value. Cannot be set if the *snap\_every* value is not measured in days. Can only be set for at most one rule in the same policy. |
| **snap\_client\_name** string | | The customizable portion of the client visible snapshot name. |
| **snap\_every** integer | | Specifies the interval between snapshots, in minutes. The value for all rules must be multiples of one another. Must be unique for each rule in the same policy. Value must be between 5 and 525600. |
| **snap\_keep\_for** integer | | Specifies the period that snapshots are retained before they are eradicated, in minutes. Cannot be less than the *snap\_every* value of the rule. Value must be unique for each rule in the same policy. Value must be between 5 and 525600. |
| **snap\_suffix** string added in 1.10.0 of purestorage.flasharray | | The snapshot suffix name The suffix value can only be set for one rule in the same policy The suffix value can only be set on a rule with the same ``keep\_for`` value and ``every`` value The suffix value can only be set on the rule with the largest ``keep\_for`` value If not specified, defaults to a monotonically increasing number generated by the system. |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the policy should exist or not. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create an NFS policy with initial rule
purefa_policy:
name: export1
policy: nfs
nfs_access: root-squash
nfs_permission: ro
client: client1
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create an empty NFS policy with no rules
purefa_policy:
name: export1
policy: nfs
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create an empty snapshot policy with no rules
purefa_policy:
name: snap1
policy: snapshot
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disable a policy
purefa_policy:
name: export1
policy: nfs
enabled: false
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Add rule to existing NFS export policy
purefa_policy:
name: export1
policy: nfs
nfs_access: root-squash
nfs_permission: ro
client: client2
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Add rule to existing SMB export policy
purefa_policy:
name: export1
policy: smb
smb_encrypt: yes
smb_anon_allowed: no
client: client1
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Add non-suffix rule to existing snapshot export policy
purefa_policy:
name: snap1
policy: snapshot
snap_client_name: foo
snap_every: 15
snap_keep_for: 1440
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Add suffix rule to existing snapshot export policy
purefa_policy:
name: snap1
policy: snapshot
snap_client_name: foo
snap_suffix: bar
snap_every: 1440
snap_keep_for: 1440
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete policy rule for a client
purefa_policy:
name: export1
policy: nfs
client: client2
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete policy
purefa_policy:
name: export1
policy: nfs
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create directory quota policy for directory bar
purefa_policy:
name: foo
directory:
- "foo:root"
- "bar:bin"
policy: quota
quota_limit: 10G
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete directory quota policy foo
purefa_policy:
name: foo
policy: quota
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create empty directory quota policy foo
purefa_policy:
name: foo
policy: quota
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Detach directory "foo:bar" from quota policy quota1
purefa_policy:
name: quota1
directory:
- "foo:bar"
state: absent
policy: quota
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Remove quota rule from quota policy foo
purefa_policy:
name: foo
policy: quota
quota_limit: 10G
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#d3a3a6a1b6feb2bda0bab1bfb6fea7b6b2bef5f0e0e4e8f5f0e6e1e8f5f0e7ebe8a3a6a1b6a0a7bca1b2b4b6f5f0e7e5e8b0bcbe)>
| programming_docs |
ansible purestorage.flasharray.purefa_maintenance β Configure Pure Storage FlashArray Maintence Windows purestorage.flasharray.purefa\_maintenance β Configure Pure Storage FlashArray Maintence Windows
================================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_maintenance`.
New in version 1.7.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configuration for Pure Storage FlashArray Maintenance Windows.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete maintennance window |
| **timeout** integer | **Default:**3600 | Maintenance window period, specified in seconds. Range allowed is 1 minute (60 seconds) to 24 hours (86400 seconds) Default setting is 1 hour (3600 seconds) |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng maintenance window
purefa_maintenance:
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set maintnence window to default of 1 hour
purefa_maintenance:
state: present
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Update existing maintnence window
purefa_maintenance:
state: present
timeout: 86400
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#9dede8eff8b0fcf3eef4fff1f8b0e9f8fcf0bbbeaeaaa6bbbea8afa6bbbea9a5a6ede8eff8eee9f2effcfaf8bbbea9aba6fef2f0)>
ansible purestorage.flasharray.purefa_endpoint β Manage VMware protocol-endpoints on Pure Storage FlashArrays purestorage.flasharray.purefa\_endpoint β Manage VMware protocol-endpoints on Pure Storage FlashArrays
======================================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_endpoint`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Create, delete or eradicate the an endpoint on a Pure Storage FlashArray.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the endpoint on delete or leave in trash. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **hgroup** string | | name of hostgroup to attach endpoint to |
| **host** string | | name of host to attach endpoint to |
| **name** string / required | | The name of the endpoint. |
| **rename** string | | Value to rename the specified endpoint to. Rename only applies to the container the current endpoint is in. |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the endpoint should exist or not. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new endpoint named foo
purefa_endpoint:
name: test-endpoint
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Delete and eradicate endpoint named foo
purefa_endpoint:
name: foo
eradicate: yes
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Rename endpoint foor to bar
purefa_endpoint:
name: foo
rename: bar
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **volume** dictionary | success | A dictionary describing the changed volume. Only some attributes below will be returned with various actions. |
| | **created** string | success | Volume creation time **Sample:** 2019-03-13T22:49:24Z |
| | **name** string | success | Volume name |
| | **serial** string | success | Volume serial number **Sample:** 361019ECACE43D83000120A4 |
| | **source** string | success | Volume name of source volume used for volume copy |
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#8afafff8efa7ebe4f9e3e8e6efa7feefebe7aca9b9bdb1aca9bfb8b1aca9beb2b1fafff8eff9fee5f8ebedefaca9bebcb1e9e5e7)>
ansible purestorage.flasharray.purefa_alert β Configure Pure Storage FlashArray alert email settings purestorage.flasharray.purefa\_alert β Configure Pure Storage FlashArray alert email settings
=============================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_alert`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure alert email configuration for Pure Storage FlashArrays.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string / required | | Email address (valid format required) |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **enabled** boolean | **Choices:*** no
* **yes** β
| Set specified email address to be enabled or disabled |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete alert email |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Add new email recipient and enable, or enable existing email
purefa_alert:
address: "[email protected]"
enabled: true
state: present
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete existing email recipient
purefa_alert:
state: absent
address: "[email protected]"
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#b6c6c3c4d39bd7d8c5dfd4dad39bc2d3d7db909585818d909583848d9095828e8dc6c3c4d3c5c2d9c4d7d1d3909582808dd5d9db)>
ansible purestorage.flasharray.purefa_user β Create, modify or delete FlashArray local user account purestorage.flasharray.purefa\_user β Create, modify or delete FlashArray local user account
============================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_user`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, modify or delete local users on a Pure Stoage FlashArray.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api** boolean | **Choices:*** **no** β
* yes
| Define whether to create an API token for this user Token can be exposed using the *debug* module |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **name** string / required | | The name of the local user account |
| **old\_password** string | | If changing an existing password, you must provide the old password for security |
| **password** string | | Password for the local user. |
| **role** string | **Choices:*** readonly
* storage\_admin
* array\_admin
| Sets the local user's access level to the array |
| **state** string | **Choices:*** absent
* **present** β
| Create, delete or update local user account |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new user ansible with API token
purefa_user:
name: ansible
password: apassword
role: storage_admin
api: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
register: result
debug:
msg: "API Token: {{ result['user_info']['user_api'] }}"
- name: Change role type for existing user
purefa_user:
name: ansible
role: array_admin
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Change password type for existing user (NOT IDEMPOTENT)
purefa_user:
name: ansible
password: anewpassword
old_password: apassword
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Change API token for existing user
purefa_user:
name: ansible
api: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
register: result
debug:
msg: "API Token: {{ result['user_info']['user_api'] }}"
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#09797c7b6c2468677a606b656c247d6c68642f2a3a3e322f2a3c3b322f2a3d3132797c7b6c7a7d667b686e6c2f2a3d3f326a6664)>
ansible purestorage.flasharray.purefa_banner β Configure Pure Storage FlashArray GUI and SSH MOTD message purestorage.flasharray.purefa\_banner β Configure Pure Storage FlashArray GUI and SSH MOTD message
==================================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_banner`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure MOTD for Pure Storage FlashArrays.
* This will be shown during an SSH or GUI login to the array.
* Multiple line messages can be achieved using \n.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **banner** string | **Default:**"Welcome to the machine..." | Banner text, or MOTD, to use |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **state** string | **Choices:*** **present** β
* absent
| Set ot delete the MOTD |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Set new banner text
purefa_banner:
banner: "Banner over\ntwo lines"
state: present
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete banner text
purefa_banner:
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#641411160149050a170d0608014910010509424757535f424751565f4247505c5f1411160117100b16050301424750525f070b09)>
ansible purestorage.flasharray.purefa_subnet β Manage network subnets in a Pure Storage FlashArray purestorage.flasharray.purefa\_subnet β Manage network subnets in a Pure Storage FlashArray
===========================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_subnet`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module manages the network subnets on a Pure Storage FlashArray.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **enabled** boolean | **Choices:*** no
* **yes** β
| whether the subnet should be enabled or not |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **gateway** string | | IPv4 or IPv6 address of subnet gateway. |
| **mtu** integer | **Default:**1500 | MTU size of the subnet. Range is 568 to 9000. |
| **name** string / required | | Subnet name. |
| **prefix** string | | Set the IPv4 or IPv6 address to be associated with the subnet. |
| **state** string | **Choices:*** **present** β
* absent
| Create or delete subnet. |
| **vlan** integer | | VLAN ID. Range is 0 to 4094. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create subnet subnet100
purefa_subnet:
name: subnet100
vlan: 100
gateway: 10.21.200.1
prefix: "10.21.200.0/24"
mtu: 9000
state: present
fa_url: 10.10.10.2
api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
- name: Disable subnet subnet100
purefa_subnet:
name: subnet100
enabled: false
fa_url: 10.10.10.2
api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
- name: Delete subnet subnet100
purefa_subnet:
name: subnet100
state: absent
fa_url: 10.10.10.2
api_token: c6033033-fe69-2515-a9e8-966bb7fe4b40
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#b7c7c2c5d29ad6d9c4ded5dbd29ac3d2d6da919484808c919482858c9194838f8cc7c2c5d2c4c3d8c5d6d0d2919483818cd4d8da)>
ansible purestorage.flasharray.purefa_ra β Enable or Disable Pure Storage FlashArray Remote Assist purestorage.flasharray.purefa\_ra β Enable or Disable Pure Storage FlashArray Remote Assist
===========================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_ra`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Enablke or Disable Remote Assist for a Pure Storage FlashArray.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **state** string | **Choices:*** **enable** β
* disable
| Define state of remote assist When set to *enable* the RA port can be exposed using the *debug* module. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Enable Remote Assist port
purefa_ra:
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
register: result
debug:
msg: "Remote Assist: {{ result['ra_facts'] }}"
- name: Disable Remote Assist port
purefa_ra:
state: disable
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#bfcfcacdda92ded1ccd6ddd3da92cbdaded2999c8c8884999c8a8d84999c8b8784cfcacddacccbd0cdded8da999c8b8984dcd0d2)>
| programming_docs |
ansible purestorage.flasharray.purefa_ds β Configure FlashArray Directory Service purestorage.flasharray.purefa\_ds β Configure FlashArray Directory Service
==========================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_ds`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Set or erase configuration for the directory service. There is no facility to SSL certificates at this time. Use the FlashArray GUI for this additional configuration work.
* To modify an existing directory service configuration you must first delete an exisitng configuration and then recreate with new settings.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **aa\_group** string | | Sets the common Name (CN) of the directory service group containing administrators with full privileges when managing the FlashArray. The name should be just the Common Name of the group without the CN= specifier. Common Names should not exceed 64 characters in length. Not Supported from Purity 5.2.0 or higher. Use *purefa\_dsrole* module. |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **base\_dn** string | | Sets the base of the Distinguished Name (DN) of the directory service groups. The base should consist of only Domain Components (DCs). The base\_dn will populate with a default value when a URI is entered by parsing domain components from the URI. The base DN should specify DC= for each domain component and multiple DCs should be separated by commas. |
| **bind\_password** string | | Sets the password of the bind\_user user name account. |
| **bind\_user** string | | Sets the user name that can be used to bind to and query the directory. For Active Directory, enter the username - often referred to as sAMAccountName or User Logon Name - of the account that is used to perform directory lookups. For OpenLDAP, enter the full DN of the user. |
| **dstype** string | **Choices:*** **management** β
* data
| The type of directory service to work on |
| **enable** boolean | **Choices:*** **no** β
* yes
| Whether to enable or disable directory service support. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **group\_base** string | | Specifies where the configured groups are located in the directory tree. This field consists of Organizational Units (OUs) that combine with the base DN attribute and the configured group CNs to complete the full Distinguished Name of the groups. The group base should specify OU= for each OU and multiple OUs should be separated by commas. The order of OUs is important and should get larger in scope from left to right. Each OU should not exceed 64 characters in length. Not Supported from Purity 5.2.0 or higher. Use *purefa\_dsrole* module. |
| **ro\_group** string | | Sets the common Name (CN) of the configured directory service group containing users with read-only privileges on the FlashArray. This name should be just the Common Name of the group without the CN= specifier. Common Names should not exceed 64 characters in length. Not Supported from Purity 5.2.0 or higher. Use *purefa\_dsrole* module. |
| **sa\_group** string | | Sets the common Name (CN) of the configured directory service group containing administrators with storage-related privileges on the FlashArray. This name should be just the Common Name of the group without the CN= specifier. Common Names should not exceed 64 characters in length. Not Supported from Purity 5.2.0 or higher. Use *purefa\_dsrole* module. |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete directory service configuration |
| **uri** list / elements=string | | A list of up to 30 URIs of the directory servers. Each URI must include the scheme ldap:// or ldaps:// (for LDAP over SSL), a hostname, and a domain name or IP address. For example, ldap://ad.company.com configures the directory service with the hostname "ad" in the domain "company.com" while specifying the unencrypted LDAP protocol. |
| **user\_login** string | | User login attribute in the structure of the configured LDAP servers. Typically the attribute field that holds the users unique login name. Default value is *sAMAccountName* for Active Directory or *uid* for all other directory services Supported from Purity 6.0 or higher. |
| **user\_object** string | | Value of the object class for a management LDAP user. Defaults to *User* for Active Directory servers, *posixAccount* or *shadowAccount* for OpenLDAP servers dependent on the group type of the server, or person for all other directory servers. Supported from Purity 6.0 or higher. |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete existing directory service
purefa_ds:
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create directory service (disabled) - Pre-5.2.0
purefa_ds:
uri: "ldap://lab.purestorage.com"
base_dn: "DC=lab,DC=purestorage,DC=com"
bind_user: Administrator
bind_password: password
group_base: "OU=Pure-Admin"
ro_group: PureReadOnly
sa_group: PureStorage
aa_group: PureAdmin
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create directory service (disabled) - 5.2.0 or higher
purefa_ds:
dstype: management
uri: "ldap://lab.purestorage.com"
base_dn: "DC=lab,DC=purestorage,DC=com"
bind_user: Administrator
bind_password: password
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Enable existing directory service
purefa_ds:
enable: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disable existing directory service
purefa_ds:
enable: false
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create directory service (enabled) - Pre-5.2.0
purefa_ds:
enable: true
uri: "ldap://lab.purestorage.com"
base_dn: "DC=lab,DC=purestorage,DC=com"
bind_user: Administrator
bind_password: password
group_base: "OU=Pure-Admin"
ro_group: PureReadOnly
sa_group: PureStorage
aa_group: PureAdmin
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create directory service (enabled) - 5.2.0 or higher
purefa_ds:
enable: true
dstype: management
uri: "ldap://lab.purestorage.com"
base_dn: "DC=lab,DC=purestorage,DC=com"
bind_user: Administrator
bind_password: password
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#2c5c595e49014d425f454e40490158494d410a0f1f1b170a0f191e170a0f1814175c595e495f58435e4d4b490a0f181a174f4341)>
ansible purestorage.flasharray.purefa_connect β Manage replication connections between two FlashArrays purestorage.flasharray.purefa\_connect β Manage replication connections between two FlashArrays
===============================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_connect`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage array connections to specified target array
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **connection** string | **Choices:*** sync
* **async** β
| Type of connection between arrays. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete array connection |
| **target\_api** string | | API token for target array |
| **target\_url** string / required | | Management IP address of remote array. |
| **transport** string | **Choices:*** **ip** β
* fc
| Type of transport protocol to use for replication |
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create an async connection to remote array
purefa_connect:
target_url: 10.10.10.20
target_api: 9c0b56bc-f941-f7a6-9f85-dcc3e9a8f7d6
connection: async
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete connection to remote array
purefa_connect:
state: absent
target_url: 10.10.10.20
target_api: 9c0b56bc-f941-f7a6-9f85-dcc3e9a8f7d6
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#98e8edeafdb5f9f6ebf1faf4fdb5ecfdf9f5bebbabafa3bebbadaaa3bebbaca0a3e8edeafdebecf7eaf9fffdbebbacaea3fbf7f5)>
ansible purestorage.flasharray.purefa_pgsnap β Manage protection group snapshots on Pure Storage FlashArrays purestorage.flasharray.purefa\_pgsnap β Manage protection group snapshots on Pure Storage FlashArrays
=====================================================================================================
Note
This plugin is part of the [purestorage.flasharray collection](https://galaxy.ansible.com/purestorage/flasharray) (version 1.11.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flasharray`.
To use it in a playbook, specify: `purestorage.flasharray.purefa_pgsnap`.
New in version 1.0.0: of purestorage.flasharray
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create or delete protection group snapshots on Pure Storage FlashArray.
* Recovery of replicated snapshots on the replica target array is enabled.
* Support for ActiveCluster and Volume Group protection groups is supported.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purestorage >= 1.19
* py-pure-client >= 1.6.0
* netaddr
* requests
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashArray API token for admin privileged user. |
| **apply\_retention** boolean | **Choices:*** **no** β
* yes
| Apply retention schedule settings to the snapshot |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the snapshot on delete or leave in trash. |
| **fa\_url** string | | FlashArray management IPv4 address or Hostname. |
| **name** string / required | | The name of the source protection group. |
| **now** boolean | **Choices:*** **no** β
* yes
| Whether to initiate a snapshot of the protection group immeadiately |
| **offload** string | | Name of offload target on which the snapshot exists. This is only applicable for deletion and erasure of snapshots |
| **overwrite** boolean | **Choices:*** **no** β
* yes
| Define whether to overwrite the target volume if it already exists. |
| **remote** boolean | **Choices:*** **no** β
* yes
| Force immeadiate snapshot to remote targets |
| **restore** string | | Restore a specific volume from a protection group snapshot. The protection group name is not required. Only provide the name of the volume to be restored. |
| **state** string | **Choices:*** absent
* **present** β
* copy
| Define whether the protection group snapshot should exist or not. Copy (added in 2.7) will create a full read/write clone of the snapshot. |
| **suffix** string | | Suffix of snapshot name. Special case. If *latest* the module will select the latest snapshot created in the group |
| **target** string | | Volume to restore a specified volume to. If not supplied this will default to the volume defined in *restore*
|
Notes
-----
Note
* This module requires the `purestorage` and `py-pure-client` Python libraries
* Additional Python librarues may be required for specific modules.
* You must set `PUREFA_URL` and `PUREFA_API` environment variables if *fa\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create protection group snapshot foo.ansible
purefa_pgsnap:
name: foo
suffix: ansible
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Delete and eradicate protection group snapshot named foo.snap
purefa_pgsnap:
name: foo
suffix: snap
eradicate: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Restore volume data from local protection group snapshot named foo.snap to volume data2
purefa_pgsnap:
name: foo
suffix: snap
restore: data
target: data2
overwrite: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: copy
- name: Restore remote protection group snapshot arrayA:pgname.snap.data to local copy
purefa_pgsnap:
name: arrayA:pgname
suffix: snap
restore: data
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: copy
- name: Restore AC pod protection group snapshot pod1::pgname.snap.data to pdo1::data2
purefa_pgsnap:
name: pod1::pgname
suffix: snap
restore: data
target: pod1::data2
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: copy
- name: Create snapshot of existing pgroup foo with suffix and force immeadiate copy to remote targets
purefa_pgsnap:
name: pgname
suffix: force
now: True
apply_retention: True
remote: True
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete and eradicate snapshot named foo.snap on offload target bar from arrayA
purefa_pgsnap:
name: "arrayA:foo"
suffix: snap
offload: bar
eradicate: true
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#2a5a5f584f074b44594348464f075e4f4b470c09191d110c091f18110c091e12115a5f584f595e45584b4d4f0c091e1c11494547)>
ansible purestorage.flashblade.purefb_user β Modify FlashBlade local user account password purestorage.flashblade.purefb\_user β Modify FlashBlade local user account password
===================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_user`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Modify local userβs password on a Pure Stoage FlashBlade.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string | **Default:**"pureuser" | The name of the local user account |
| **old\_password** string / required | | If changing an existing password, you must provide the old password for security |
| **password** string / required | | Password for the local user. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Change password for local user (NOT IDEMPOTENT)
purefb_user:
password: anewpassword
old_password: apassword
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#0b7b7e796e266a65786269676e267f6e6a662d28383c302d283e39302d283f33307b7e796e787f64796a6c6e2d283f3d30686466)>
ansible purestorage.flashblade.purefb_virtualhost β Manage FlashBlade Object Store Virtual Hosts purestorage.flashblade.purefb\_virtualhost β Manage FlashBlade Object Store Virtual Hosts
=========================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_virtualhost`.
New in version 1.6.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Add or delete FlashBlade Object Store Virtual Hosts
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | Name of the Object Store Virtual Host A hostname or domain by which the array can be addressed for virtual hosted-style S3 requests. |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the Object Store Virtual Host should be added or deleted |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Add Object Store Virtual Host
purefb_virtualhost:
name: "s3.acme.com"
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
- name: Delete Object Store Virtual Host
purefb_virtualhost:
name: "nohost.acme.com"
state: absent
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e090959285cd818e9389828c85cd9485818dc6c3d3d7dbc6c3d5d2dbc6c3d4d8db9095928593948f92818785c6c3d4d6db838f8d)>
| programming_docs |
ansible purestorage.flashblade.purefb_lag β Manage FlashBlade Link Aggregation Groups purestorage.flashblade.purefb\_lag β Manage FlashBlade Link Aggregation Groups
==============================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_lag`.
New in version 1.7.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Maintain FlashBlade Link Aggregation Groups
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string | **Default:**"uplink" | Name of the Link Aggregation Group |
| **ports** list / elements=string | | Name of network ports assigned to the LAG Format should be CHx.ETHy, where CHx is the chassis number and ETHy is the ethernet port number. Matched port pairs from each Fabric Module in the Chassis will be used. To modify required ports for a LAG specify only the ports required by the LAG. Any ports currently used by the LAG not specified will be disconnected from the LAG. |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the LAG should be added or deleted |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Add LAG
purefb_lag:
name: lag2
ports:
- ch1.eth2
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
- name: Upate LAG
purefb_lag:
name: lag2
ports:
- ch1.eth2
- ch1.eth4
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
- name: Delete LAG
purefb_lag:
name: lag2
state: absent
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **lag** dictionary | success | A dictionary describing the LAG. |
| | **lag\_speed** string | success | Combined speed of all ports in the LAG in Gb/s |
| | **mac\_address** string | success | Unique MAC address assigned to the LAG |
| | **port\_speed** string | success | Configured speed of each port in the LAG in Gb/s |
| | **status** string | success | Health status of the LAG. |
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#a3d3d6d1c68ec2cdd0cac1cfc68ed7c6c2ce858090949885809691988580979b98d3d6d1c6d0d7ccd1c2c4c68580979598c0ccce)>
ansible purestorage.flashblade.purefb_proxy β Configure FlashBlade phonehome HTTPs proxy settings purestorage.flashblade.purefb\_proxy β Configure FlashBlade phonehome HTTPs proxy settings
==========================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_proxy`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Set or erase configuration for the HTTPS phonehome proxy settings.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **host** string | | The proxy host name. |
| **port** integer | | The proxy TCP/IP port number. |
| **state** string | **Choices:*** absent
* **present** β
| Set or delete proxy configuration |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng proxy settings
purefb_proxy:
state: absent
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set proxy settings
purefb_proxy:
host: purestorage.com
port: 8080
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#59292c2b3c7438372a303b353c742d3c38347f7a6a6e627f7a6c6b627f7a6d6162292c2b3c2a2d362b383e3c7f7a6d6f623a3634)>
ansible Purestorage.Flashblade Purestorage.Flashblade
======================
Collection version 1.7.0
Plugin Index
------------
These are the plugins in the purestorage.flashblade collection
### Modules
* [purefb\_ad](purefb_ad_module#ansible-collections-purestorage-flashblade-purefb-ad-module) β Manage FlashBlade Active Directory Account
* [purefb\_alert](purefb_alert_module#ansible-collections-purestorage-flashblade-purefb-alert-module) β Configure Pure Storage FlashBlade alert email settings
* [purefb\_apiclient](purefb_apiclient_module#ansible-collections-purestorage-flashblade-purefb-apiclient-module) β Manage FlashBlade API Clients
* [purefb\_banner](purefb_banner_module#ansible-collections-purestorage-flashblade-purefb-banner-module) β Configure Pure Storage FlashBlade GUI and SSH MOTD message
* [purefb\_bladename](purefb_bladename_module#ansible-collections-purestorage-flashblade-purefb-bladename-module) β Configure Pure Storage FlashBlade name
* [purefb\_bucket](purefb_bucket_module#ansible-collections-purestorage-flashblade-purefb-bucket-module) β Manage Object Store Buckets on a Pure Storage FlashBlade.
* [purefb\_bucket\_replica](purefb_bucket_replica_module#ansible-collections-purestorage-flashblade-purefb-bucket-replica-module) β Manage bucket replica links between Pure Storage FlashBlades
* [purefb\_certgrp](purefb_certgrp_module#ansible-collections-purestorage-flashblade-purefb-certgrp-module) β Manage FlashBlade Certifcate Groups
* [purefb\_certs](purefb_certs_module#ansible-collections-purestorage-flashblade-purefb-certs-module) β Manage FlashBlade SSL Certifcates
* [purefb\_connect](purefb_connect_module#ansible-collections-purestorage-flashblade-purefb-connect-module) β Manage replication connections between two FlashBlades
* [purefb\_dns](purefb_dns_module#ansible-collections-purestorage-flashblade-purefb-dns-module) β Configure Pure Storage FlashBlade DNS settings
* [purefb\_ds](purefb_ds_module#ansible-collections-purestorage-flashblade-purefb-ds-module) β Configure FlashBlade Directory Service
* [purefb\_dsrole](purefb_dsrole_module#ansible-collections-purestorage-flashblade-purefb-dsrole-module) β Configure FlashBlade Management Directory Service Roles
* [purefb\_eula](purefb_eula_module#ansible-collections-purestorage-flashblade-purefb-eula-module) β Sign Pure Storage FlashBlade EULA
* [purefb\_fs](purefb_fs_module#ansible-collections-purestorage-flashblade-purefb-fs-module) β Manage filesystemon Pure Storage FlashBlade`
* [purefb\_fs\_replica](purefb_fs_replica_module#ansible-collections-purestorage-flashblade-purefb-fs-replica-module) β Manage filesystem replica links between Pure Storage FlashBlades
* [purefb\_groupquota](purefb_groupquota_module#ansible-collections-purestorage-flashblade-purefb-groupquota-module) β Manage filesystem group quotas
* [purefb\_info](purefb_info_module#ansible-collections-purestorage-flashblade-purefb-info-module) β Collect information from Pure Storage FlashBlade
* [purefb\_inventory](purefb_inventory_module#ansible-collections-purestorage-flashblade-purefb-inventory-module) β Collect information from Pure Storage FlashBlade
* [purefb\_keytabs](purefb_keytabs_module#ansible-collections-purestorage-flashblade-purefb-keytabs-module) β Manage FlashBlade Kerberos Keytabs
* [purefb\_lag](purefb_lag_module#ansible-collections-purestorage-flashblade-purefb-lag-module) β Manage FlashBlade Link Aggregation Groups
* [purefb\_lifecycle](purefb_lifecycle_module#ansible-collections-purestorage-flashblade-purefb-lifecycle-module) β Manage FlashBlade object lifecycles
* [purefb\_network](purefb_network_module#ansible-collections-purestorage-flashblade-purefb-network-module) β Manage network interfaces in a Pure Storage FlashBlade
* [purefb\_ntp](purefb_ntp_module#ansible-collections-purestorage-flashblade-purefb-ntp-module) β Configure Pure Storage FlashBlade NTP settings
* [purefb\_phonehome](purefb_phonehome_module#ansible-collections-purestorage-flashblade-purefb-phonehome-module) β Enable or Disable Pure Storage FlashBlade Phone Home
* [purefb\_policy](purefb_policy_module#ansible-collections-purestorage-flashblade-purefb-policy-module) β Manage FlashBlade policies
* [purefb\_proxy](purefb_proxy_module#ansible-collections-purestorage-flashblade-purefb-proxy-module) β Configure FlashBlade phonehome HTTPs proxy settings
* [purefb\_ra](purefb_ra_module#ansible-collections-purestorage-flashblade-purefb-ra-module) β Enable or Disable Pure Storage FlashBlade Remote Assist
* [purefb\_remote\_cred](purefb_remote_cred_module#ansible-collections-purestorage-flashblade-purefb-remote-cred-module) β Create, modify and delete FlashBlade object store remote credentials
* [purefb\_s3acc](purefb_s3acc_module#ansible-collections-purestorage-flashblade-purefb-s3acc-module) β Create or delete FlashBlade Object Store accounts
* [purefb\_s3user](purefb_s3user_module#ansible-collections-purestorage-flashblade-purefb-s3user-module) β Create or delete FlashBlade Object Store account users
* [purefb\_smtp](purefb_smtp_module#ansible-collections-purestorage-flashblade-purefb-smtp-module) β Configure SMTP for Pure Storage FlashBlade
* [purefb\_snap](purefb_snap_module#ansible-collections-purestorage-flashblade-purefb-snap-module) β Manage filesystem snapshots on Pure Storage FlashBlades
* [purefb\_snmp\_agent](purefb_snmp_agent_module#ansible-collections-purestorage-flashblade-purefb-snmp-agent-module) β Configure the FlashBlade SNMP Agent
* [purefb\_snmp\_mgr](purefb_snmp_mgr_module#ansible-collections-purestorage-flashblade-purefb-snmp-mgr-module) β Configure FlashBlade SNMP Managers
* [purefb\_subnet](purefb_subnet_module#ansible-collections-purestorage-flashblade-purefb-subnet-module) β Manage network subnets in a Pure Storage FlashBlade
* [purefb\_syslog](purefb_syslog_module#ansible-collections-purestorage-flashblade-purefb-syslog-module) β Configure Pure Storage FlashBlade syslog settings
* [purefb\_target](purefb_target_module#ansible-collections-purestorage-flashblade-purefb-target-module) β Manage remote S3-capable targets for a FlashBlade
* [purefb\_timeout](purefb_timeout_module#ansible-collections-purestorage-flashblade-purefb-timeout-module) β Configure Pure Storage FlashBlade GUI idle timeout
* [purefb\_user](purefb_user_module#ansible-collections-purestorage-flashblade-purefb-user-module) β Modify FlashBlade local user account password
* [purefb\_userpolicy](purefb_userpolicy_module#ansible-collections-purestorage-flashblade-purefb-userpolicy-module) β Manage FlashBlade Object Store User Access Policies
* [purefb\_userquota](purefb_userquota_module#ansible-collections-purestorage-flashblade-purefb-userquota-module) β Manage filesystem user quotas
* [purefb\_virtualhost](purefb_virtualhost_module#ansible-collections-purestorage-flashblade-purefb-virtualhost-module) β Manage FlashBlade Object Store Virtual Hosts
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible purestorage.flashblade.purefb_remote_cred β Create, modify and delete FlashBlade object store remote credentials purestorage.flashblade.purefb\_remote\_cred β Create, modify and delete FlashBlade object store remote credentials
==================================================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_remote_cred`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, modify and delete object store remote credentials
* You must have a correctly configured remote array or target
* This module is **not** idempotent when updating existing remote credentials
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_key** string | | Access Key ID of the S3 target |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | The name of the credential |
| **secret** string | | Secret Access Key for the S3 or Azure target |
| **state** string | **Choices:*** absent
* **present** β
| Define state of remote credential |
| **target** string / required | | Define whether to initialize the S3 bucket |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create remote credential
purefb_remote_cred:
name: cred1
access_key: "3794fb12c6204e19195f"
secret: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
target: target1
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete remote credential
purefb_remote_cred:
name: cred1
target: target1
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#4d3d383f28602c233e242f21286039282c206b6e7e7a766b6e787f766b6e7975763d383f283e39223f2c2a286b6e797b762e2220)>
ansible purestorage.flashblade.purefb_s3acc β Create or delete FlashBlade Object Store accounts purestorage.flashblade.purefb\_s3acc β Create or delete FlashBlade Object Store accounts
========================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_s3acc`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create or delete object store accounts on a Pure Stoage FlashBlade.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | The name of object store account |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete object store account |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Crrate object store account foo
purefb_s3acc:
name: foo
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete object store account foo
purefb_s3acc:
name: foo
state: absent
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#81f1f4f3e4ace0eff2e8e3ede4acf5e4e0eca7a2b2b6baa7a2b4b3baa7a2b5b9baf1f4f3e4f2f5eef3e0e6e4a7a2b5b7bae2eeec)>
ansible purestorage.flashblade.purefb_ntp β Configure Pure Storage FlashBlade NTP settings purestorage.flashblade.purefb\_ntp β Configure Pure Storage FlashBlade NTP settings
===================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_ntp`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Set or erase NTP configuration for Pure Storage FlashBlades.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **ntp\_servers** list / elements=string | | A list of up to 4 alternate NTP servers. These may include IPv4, IPv6 or FQDNs. Invalid IP addresses will cause the module to fail. No validation is performed for FQDNs. If more than 4 servers are provided, only the first 4 unique nameservers will be used. if no servers are given a default of *0.pool.ntp.org* will be used. |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete NTP servers configuration |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng NTP server entries
purefb_ntp:
state: absent
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Set array NTP servers
purefb_ntp:
state: present
ntp_servers:
- "0.pool.ntp.org"
- "1.pool.ntp.org"
- "2.pool.ntp.org"
- "3.pool.ntp.org"
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#42323730276f232c312b202e276f3627232f646171757964617770796461767a793237302731362d302325276461767479212d2f)>
| programming_docs |
ansible purestorage.flashblade.purefb_network β Manage network interfaces in a Pure Storage FlashBlade purestorage.flashblade.purefb\_network β Manage network interfaces in a Pure Storage FlashBlade
===============================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_network`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module manages network interfaces on Pure Storage FlashBlade.
* When creating a network interface a subnet must already exist with a network prefix that covers the IP address of the interface being created.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | IP address of interface. |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **itype** string | **Choices:*** **vip** β
| Type of interface. |
| **name** string / required | | Interface Name. |
| **services** string | **Choices:*** **data** β
* replication
| Define which services are configured for the interfaces. |
| **state** string | **Choices:*** **present** β
* absent
| Create, delete or modifies a network interface. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new network interface named foo
purefb_network:
name: foo
address: 10.21.200.23
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Change IP address of network interface named foo
purefb_network:
name: foo
state: present
address: 10.21.200.123
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete network interface named foo
purefb_network:
name: foo
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#cdbdb8bfa8e0aca3bea4afa1a8e0b9a8aca0ebeefefaf6ebeef8fff6ebeef9f5f6bdb8bfa8beb9a2bfacaaa8ebeef9fbf6aea2a0)>
ansible purestorage.flashblade.purefb_fs β Manage filesystemon Pure Storage FlashBlade` purestorage.flashblade.purefb\_fs β Manage filesystemon Pure Storage FlashBlade`
================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_fs`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module manages filesystems on Pure Storage FlashBlade.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_control** string | **Choices:*** nfs
* smb
* **shared** β
* independent
* mode-bits
| The access control style that is utilized for client actions such as setting file and directory ACLs. Only available from Purity//FB 3.1.1 |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **delete\_link** boolean | **Choices:*** **no** β
* yes
| Define if the filesystem can be deleted even if it has a replica link |
| **discard\_snaps** boolean | **Choices:*** **no** β
* yes
| Allow a filesystem to be demoted. |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the filesystem on delete or leave in trash. |
| **fastremove** boolean | **Choices:*** **no** β
* yes
| Define whether the fast remove directory is enabled for the filesystem. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **group\_quota** string | | Default quota in M, G, T or P units for a group under this file system. |
| **hard\_limit** boolean | **Choices:*** **no** β
* yes
| Define whether the capacity for a filesystem is a hard limit. CAUTION This will cause the filesystem to go Read-Only if the capacity has already exceeded the logical size of the filesystem. |
| **http** boolean | **Choices:*** **no** β
* yes
| Define whether to HTTP/HTTPS protocol is enabled for the filesystem. |
| **name** string / required | | Filesystem Name. |
| **nfs\_rules** string | | Define the NFS rules in operation. If not set at filesystem creation time it defaults to *\*(rw,no\_root\_squash*) Supported binary options are ro/rw, secure/insecure, fileid\_32bit/no\_fileid\_32bit, root\_squash/no\_root\_squash, all\_squash/no\_all\_squash and atime/noatime Supported non-binary options are anonuid=#, anongid=#, sec=(sys|krb5) |
| **nfsv3** boolean | **Choices:*** no
* **yes** β
| Define whether to NFSv3 protocol is enabled for the filesystem. |
| **nfsv4** boolean | **Choices:*** no
* **yes** β
| Define whether to NFSv4.1 protocol is enabled for the filesystem. |
| **policy** string | | Filesystem policy to assign to or remove from a filesystem. |
| **policy\_state** string | **Choices:*** absent
* **present** β
| Add or delete a policy from a filesystem |
| **promote** boolean | **Choices:*** no
* yes
| Promote/demote a filesystem. Can only demote the file-system if it is in a replica-link relationship. |
| **safeguard\_acls** boolean | **Choices:*** no
* **yes** β
| Safeguards ACLs on a filesystem. Performs different roles depending on the filesystem protocol enabled. See Purity//FB documentation for detailed description. Only available from Purity//FB 3.1.1 |
| **size** string | | Volume size in M, G, T or P units. See examples. If size is not set at filesystem creation time the filesystem size becomes unlimited. |
| **smb** boolean | **Choices:*** **no** β
* yes
| Define whether to SMB protocol is enabled for the filesystem. |
| **smb\_aclmode** string | **Choices:*** **shared** β
* native
| Specify the ACL mode for the SMB protocol. Deprecated from Purity//FB 3.1.1. Use *access\_control* instead. |
| **snapshot** boolean | **Choices:*** **no** β
* yes
| Define whether a snapshot directory is enabled for the filesystem. |
| **state** string | **Choices:*** **present** β
* absent
| Create, delete or modifies a filesystem. |
| **user\_quota** string | | Default quota in M, G, T or P units for a user under this file system. |
| **writable** boolean | **Choices:*** no
* yes
| Define if a filesystem is writeable. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new filesystem named foo
purefb_fs:
name: foo
size: 1T
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete filesystem named foo
purefb_fs:
name: foo
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Recover filesystem named foo
purefb_fs:
name: foo
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Eradicate filesystem named foo
purefb_fs:
name: foo
state: absent
eradicate: true
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Promote filesystem named foo ready for failover
purefb_fs:
name: foo
promote: true
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Demote filesystem named foo after failover
purefb_fs:
name: foo
promote: false
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Modify attributes of an existing filesystem named foo
purefb_fs:
name: foo
size: 2T
nfsv3 : false
nfsv4 : true
user_quota: 10K
group_quota: 25M
nfs_rules: '10.21.200.0/24(ro)'
snapshot: true
fastremove: true
hard_limit: true
smb: true
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e090959285cd818e9389828c85cd9485818dc6c3d3d7dbc6c3d5d2dbc6c3d4d8db9095928593948f92818785c6c3d4d6db838f8d)>
ansible purestorage.flashblade.purefb_info β Collect information from Pure Storage FlashBlade purestorage.flashblade.purefb\_info β Collect information from Pure Storage FlashBlade
======================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_info`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collect information from a Pure Storage FlashBlade running the Purity//FB operating system. By default, the module will collect basic information including hosts, host groups, protection groups and volume counts. Additional information can be collected based on the configured set of arguements.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **gather\_subset** list / elements=string | **Default:**"minimum" | When supplied, this argument will define the information to be collected. Possible values for this include all, minimum, config, performance, capacity, network, subnets, lags, filesystems, snapshots, buckets, replication, policies, arrays, accounts, admins, ad and kerberos. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: collect default set of info
purefb_info:
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
register: blade_info
- name: show default information
debug:
msg: "{{ blade_info['purefb_info']['default'] }}"
- name: collect configuration and capacity info
purefb_info:
gather_subset:
- config
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
register: blade_info
- name: show config information
debug:
msg: "{{ blade_info['purefb_info']['config'] }}"
- name: collect all info
purefb_info:
gather_subset:
- all
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
register: blade_info
- name: show all information
debug:
msg: "{{ blade_info['purefb_info'] }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **purefb\_info** complex | always | Returns the information collected from the FlashBlade **Sample:** {'admins': {'another\_user': {'api\_token\_timeout': None, 'local': False, 'public\_key': None}, 'pureuser': {'api\_token\_timeout': None, 'local': True, 'public\_key': None}}, 'capacity': {'aggregate': {'data\_reduction': 1.1179228, 'snapshots': 0, 'total\_physical': 17519748439, 'unique': 17519748439, 'virtual': 19585726464}, 'file-system': {'data\_reduction': 1.3642412, 'snapshots': 0, 'total\_physical': 4748219708, 'unique': 4748219708, 'virtual': 6477716992}, 'object-store': {'data\_reduction': 1.0263462, 'snapshots': 0, 'total\_physical': 12771528731, 'unique': 12771528731, 'virtual': 6477716992}, 'total': 83359896948925}, 'config': {'alert\_watchers': {'enabled': True, 'name': '[email protected]'}, 'array\_management': {'base\_dn': None, 'bind\_password': None, 'bind\_user': None, 'enabled': False, 'name': 'management', 'services': ['management'], 'uris': []}, 'directory\_service\_roles': {'array\_admin': {'group': None, 'group\_base': None}, 'ops\_admin': {'group': None, 'group\_base': None}, 'readonly': {'group': None, 'group\_base': None}, 'storage\_admin': {'group': None, 'group\_base': None}}, 'dns': {'domain': 'demo.acmestorage.com', 'name': 'demo-fb-1', 'nameservers': ['8.8.8.8'], 'search': ['demo.acmestorage.com']}, 'nfs\_directory\_service': {'base\_dn': None, 'bind\_password': None, 'bind\_user': None, 'enabled': False, 'name': 'nfs', 'services': ['nfs'], 'uris': []}, 'ntp': ['0.ntp.pool.org'], 'smb\_directory\_service': {'base\_dn': None, 'bind\_password': None, 'bind\_user': None, 'enabled': False, 'name': 'smb', 'services': ['smb'], 'uris': []}, 'smtp': {'name': 'demo-fb-1', 'relay\_host': None, 'sender\_domain': 'acmestorage.com'}, 'ssl\_certs': {'certificate': '-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----', 'common\_name': 'Acme Storage', 'country': 'US', 'email': None, 'intermediate\_certificate': None, 'issued\_by': 'Acme Storage', 'issued\_to': 'Acme Storage', 'key\_size': 4096, 'locality': None, 'name': 'global', 'organization': 'Acme Storage', 'organizational\_unit': 'Acme Storage', 'passphrase': None, 'private\_key': None, 'state': None, 'status': 'self-signed', 'valid\_from': '1508433967000', 'valid\_to': '2458833967000'}}, 'default': {'blades': 15, 'buckets': 7, 'filesystems': 2, 'flashblade\_name': 'demo-fb-1', 'object\_store\_accounts': 1, 'object\_store\_users': 1, 'purity\_version': '2.2.0', 'snapshots': 1, 'total\_capacity': 83359896948925}, 'filesystems': {'k8s-pvc-d24b1357-579e-11e8-811f-ecf4bbc88f54': {'destroyed': False, 'fast\_remove': False, 'hard\_limit': True, 'nfs\_rules': '10.21.255.0/24(rw,no\_root\_squash)', 'provisioned': 21474836480, 'snapshot\_enabled': False}, 'z': {'destroyed': False, 'fast\_remove': False, 'hard\_limit': False, 'provisioned': 1073741824, 'snapshot\_enabled': False}}, 'lag': {'uplink': {'lag\_speed': 0, 'port\_speed': 40000000000, 'ports': [{'name': 'CH1.FM1.ETH1.1'}, {'name': 'CH1.FM1.ETH1.2'}], 'status': 'healthy'}}, 'network': {'fm1.admin0': {'address': '10.10.100.6', 'gateway': '10.10.100.1', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['support'], 'type': 'vip', 'vlan': 2200}, 'fm2.admin0': {'address': '10.10.100.7', 'gateway': '10.10.100.1', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['support'], 'type': 'vip', 'vlan': 2200}, 'nfs1': {'address': '10.10.100.4', 'gateway': '10.10.100.1', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['data'], 'type': 'vip', 'vlan': 2200}, 'vir0': {'address': '10.10.100.5', 'gateway': '10.10.100.1', 'mtu': 1500, 'netmask': '255.255.255.0', 'services': ['management'], 'type': 'vip', 'vlan': 2200}}, 'performance': {'aggregate': {'bytes\_per\_op': 0, 'bytes\_per\_read': 0, 'bytes\_per\_write': 0, 'read\_bytes\_per\_sec': 0, 'reads\_per\_sec': 0, 'usec\_per\_other\_op': 0, 'usec\_per\_read\_op': 0, 'usec\_per\_write\_op': 0, 'write\_bytes\_per\_sec': 0, 'writes\_per\_sec': 0}, 'http': {'bytes\_per\_op': 0, 'bytes\_per\_read': 0, 'bytes\_per\_write': 0, 'read\_bytes\_per\_sec': 0, 'reads\_per\_sec': 0, 'usec\_per\_other\_op': 0, 'usec\_per\_read\_op': 0, 'usec\_per\_write\_op': 0, 'write\_bytes\_per\_sec': 0, 'writes\_per\_sec': 0}, 'nfs': {'bytes\_per\_op': 0, 'bytes\_per\_read': 0, 'bytes\_per\_write': 0, 'read\_bytes\_per\_sec': 0, 'reads\_per\_sec': 0, 'usec\_per\_other\_op': 0, 'usec\_per\_read\_op': 0, 'usec\_per\_write\_op': 0, 'write\_bytes\_per\_sec': 0, 'writes\_per\_sec': 0}, 's3': {'bytes\_per\_op': 0, 'bytes\_per\_read': 0, 'bytes\_per\_write': 0, 'read\_bytes\_per\_sec': 0, 'reads\_per\_sec': 0, 'usec\_per\_other\_op': 0, 'usec\_per\_read\_op': 0, 'usec\_per\_write\_op': 0, 'write\_bytes\_per\_sec': 0, 'writes\_per\_sec': 0}}, 'snapshots': {'z.188': {'destroyed': False, 'source': 'z', 'source\_destroyed': False, 'suffix': '188'}}, 'subnet': {'new-mgmt': {'gateway': '10.10.100.1', 'interfaces': [{'name': 'fm1.admin0'}, {'name': 'fm2.admin0'}, {'name': 'nfs1'}, {'name': 'vir0'}], 'lag': 'uplink', 'mtu': 1500, 'prefix': '10.10.100.0/24', 'services': ['data', 'management', 'support'], 'vlan': 2200}}} |
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#750500071058141b061c1719105801101418535646424e535640474e5356414d4e0500071006011a07141210535641434e161a18)>
ansible purestorage.flashblade.purefb_bucket β Manage Object Store Buckets on a Pure Storage FlashBlade. purestorage.flashblade.purefb\_bucket β Manage Object Store Buckets on a Pure Storage FlashBlade.
=================================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_bucket`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module managess object store (s3) buckets on Pure Storage FlashBlade.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string / required | | Object Store Account for Bucket. |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the bucket on delete or leave in trash. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | Bucket Name. |
| **state** string | **Choices:*** **present** β
* absent
| Create, delete or modifies a bucket. |
| **versioning** string | **Choices:*** enabled
* suspended
* **absent** β
| State of S3 bucket versioning |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new bucket named foo in account bar
purefb_bucket:
name: foo
account: bar
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete bucket named foo in account bar
purefb_bucket:
name: foo
account: bar
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Change bucket versioning state
purefb_bucket:
name: foo
account: bar
versioning: enabled
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Recover deleted bucket named foo in account bar
purefb_bucket:
name: foo
account: bar
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Eradicate bucket named foo in account bar
purefb_bucket:
name: foo
account: bar
state: absent
eradicate: true
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#4e3e3b3c2b632f203d272c222b633a2b2f23686d7d7975686d7b7c75686d7a76753e3b3c2b3d3a213c2f292b686d7a78752d2123)>
| programming_docs |
ansible purestorage.flashblade.purefb_syslog β Configure Pure Storage FlashBlade syslog settings purestorage.flashblade.purefb\_syslog β Configure Pure Storage FlashBlade syslog settings
=========================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_syslog`.
New in version 1.4.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure syslog configuration for Pure Storage FlashBlades.
* Add or delete an individual syslog server to the existing list of serves.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | Syslog server address. This field supports IPv4 or FQDN. An invalid IP addresses will cause the module to fail. No validation is performed for FQDNs. |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | Unique identifier for the syslog server address |
| **port** string | | Port at which the server is listening. If no port is specified the system will use 514 |
| **protocol** string | **Choices:*** tcp
* tls
* udp
| Protocol which server uses |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete syslog servers configuration |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng syslog server entries
purefb_syslog:
name: syslog1
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Set array syslog servers
purefb_syslog:
state: present
name: syslog1
address: syslog1.com
protocol: udp
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f484818691d9959a879d969891d980919599d2d7c7c3cfd2d7c1c6cfd2d7c0cccf8481869187809b86959391d2d7c0c2cf979b99)>
ansible purestorage.flashblade.purefb_certs β Manage FlashBlade SSL Certifcates purestorage.flashblade.purefb\_certs β Manage FlashBlade SSL Certifcates
========================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_certs`.
New in version 1.4.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage SSL certifcates for FlashBlades
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **contents** string | | SSL certifcate text |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string | | Name of the certificate |
| **passphrase** string | | Passphrase for the private\_key |
| **private\_key** string | | SSL certificate private key test |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete certifcate |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create a SSL certifcate
purefb_certs:
name: test_cert
contents: "{{lookup('file', 'certicate_file_name') }}"
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Delete a SSL certifcate
purefb_certs:
name: test_cert
state: absent
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Update SSL certificate
purefb_certs:
name: global
contents: "{{ lookup('file', 'certificate_file_name') }}"
private_key: "{{ lookup('file', 'certificate_key_file_name') }}"
passphrase: 'mypassword'
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#48383d3a2d6529263b212a242d653c2d29256e6b7b7f736e6b7d7a736e6b7c7073383d3a2d3b3c273a292f2d6e6b7c7e732b2725)>
ansible purestorage.flashblade.purefb_userquota β Manage filesystem user quotas purestorage.flashblade.purefb\_userquota β Manage filesystem user quotas
========================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_userquota`.
New in version 1.7.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module manages user quotas for filesystems on Pure Storage FlashBlade.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | Filesystem Name. |
| **quota** string | | User quota in M, G, T or P units. This cannot be 0. This value will override the file system's default user quota. |
| **state** string | **Choices:*** **present** β
* absent
| Create, delete or modifies a quota. |
| **uid** integer | | The user id on which the quota is enforced. Cannot be combined with *uname*
|
| **uname** string | | The user name on which the quota is enforced. Cannot be combined with *uid*
|
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new user (using UID) quota for filesystem named foo
purefb_userquota:
name: foo
quota: 1T
uid: 1234
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Create new user (using username) quota for filesystem named foo
purefb_userquota:
name: foo
quota: 1T
uname: bar
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete user quota on filesystem foo for user by UID
purefb_userquota:
name: foo
uid: 1234
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete user quota on filesystem foo for user by username
purefb_userquota:
name: foo
uname: bar
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Update user quota on filesystem foo for user by username
purefb_userquota:
name: foo
quota: 20G
uname: bar
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Update user quota on filesystem foo for user by UID
purefb_userquota:
name: foo
quota: 20G
uid: bar
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#8bfbfef9eea6eae5f8e2e9e7eea6ffeeeae6ada8b8bcb0ada8beb9b0ada8bfb3b0fbfef9eef8ffe4f9eaeceeada8bfbdb0e8e4e6)>
ansible purestorage.flashblade.purefb_snmp_mgr β Configure FlashBlade SNMP Managers purestorage.flashblade.purefb\_snmp\_mgr β Configure FlashBlade SNMP Managers
=============================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_snmp_mgr`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage SNMP managers on a Pure Storage FlashBlade.
* This module is not idempotent and will always modify an existing SNMP manager due to hidden parameters that cannot be compared to the play parameters.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **auth\_passphrase** string | | SNMPv3 only. Passphrase of 8 - 32 characters. |
| **auth\_protocol** string | **Choices:*** MD5
* SHA
| SNMP v3 only. Hash algorithm to use |
| **community** string | | SNMP v2c only. Manager community ID. Between 1 and 32 characters long. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **host** string | | IPv4 or IPv6 address or FQDN to send trap messages to. |
| **name** string / required | | Name of SNMP Manager |
| **notification** string | **Choices:*** inform
* **trap** β
| Action to perform on event. |
| **privacy\_passphrase** string | | SNMPv3 only. Passphrase to encrypt SNMP messages. Must be between 8 and 63 non-space ASCII characters. |
| **privacy\_protocol** string | **Choices:*** AES
* DES
| SNMP v3 only. Encryption protocol to use |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete SNMP manager |
| **user** string | | SNMP v3 only. User ID recognized by the specified SNMP manager. Must be between 1 and 32 characters. |
| **version** string | **Choices:*** v2c
* v3
| Version of SNMP protocol to use for the manager. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng SNMP manager
purefb_snmp_mgr:
name: manager1
state: absent
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Create v2c SNMP manager
purefb_snmp_mgr:
name: manager1
community: public
host: 10.21.22.23
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Create v3 SNMP manager
purefb_snmp_mgr:
name: manager2
version: v3
auth_protocol: MD5
auth_passphrase: password
host: 10.21.22.23
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Update existing SNMP manager
purefb_snmp_mgr:
name: manager1
community: private
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#46363334236b2728352f242a236b3223272b606575717d606573747d6065727e7d3633342335322934272123606572707d25292b)>
ansible purestorage.flashblade.purefb_dsrole β Configure FlashBlade Management Directory Service Roles purestorage.flashblade.purefb\_dsrole β Configure FlashBlade Management Directory Service Roles
===============================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_dsrole`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Set or erase directory services role configurations.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **group** string | | Sets the common Name (CN) of the configured directory service group containing users for the FlashBlade. This name should be just the Common Name of the group without the CN= specifier. Common Names should not exceed 64 characters in length. |
| **group\_base** string | | Specifies where the configured group is located in the directory tree. This field consists of Organizational Units (OUs) that combine with the base DN attribute and the configured group CNs to complete the full Distinguished Name of the groups. The group base should specify OU= for each OU and multiple OUs should be separated by commas. The order of OUs is important and should get larger in scope from left to right. Each OU should not exceed 64 characters in length. |
| **role** string / required | **Choices:*** array\_admin
* ops\_admin
* readonly
* storage\_admin
| The directory service role to work on |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete directory service role |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete existing array_admin directory service role
purefb_dsrole:
role: array_admin
state: absent
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create array_admin directory service role
purefb_dsrole:
role: array_admin
group_base: "OU=PureGroups,OU=SANManagers"
group: pureadmins
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Update ops_admin directory service role
purefb_dsrole:
role: ops_admin
group_base: "OU=PureGroups"
group: opsgroup
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#d5a5a0a7b0f8b4bba6bcb7b9b0f8a1b0b4b8f3f6e6e2eef3f6e0e7eef3f6e1edeea5a0a7b0a6a1baa7b4b2b0f3f6e1e3eeb6bab8)>
ansible purestorage.flashblade.purefb_groupquota β Manage filesystem group quotas purestorage.flashblade.purefb\_groupquota β Manage filesystem group quotas
==========================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_groupquota`.
New in version 1.7.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module manages group quotas for filesystems on Pure Storage FlashBlade.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **gid** integer | | The group id on which the quota is enforced. Cannot be combined with *gname*
|
| **gname** string | | The group name on which the quota is enforced. Cannot be combined with *gid*
|
| **name** string / required | | Filesystem Name. |
| **quota** string | | Group quota in M, G, T or P units. This cannot be 0. This value will override the file system's default group quota. |
| **state** string | **Choices:*** **present** β
* absent
| Create, delete or modifies a quota. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new group (using GID) quota for filesystem named foo
purefb_groupquota:
name: foo
quota: 1T
gid: 1234
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Create new group (using groupname) quota for filesystem named foo
purefb_groupquota:
name: foo
quota: 1T
gname: bar
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete group quota on filesystem foo for group by GID
purefb_groupquota:
name: foo
gid: 1234
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete group quota on filesystem foo for group by groupname
purefb_groupquota:
name: foo
gname: bar
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Update group quota on filesystem foo for group by groupname
purefb_groupquota:
name: foo
quota: 20G
gname: bar
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Update group quota on filesystem foo for group by GID
purefb_groupquota:
name: foo
quota: 20G
gid: bar
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#6f1f1a1d0a420e011c060d030a421b0a0e02494c5c5854494c5a5d54494c5b57541f1a1d0a1c1b001d0e080a494c5b59540c0002)>
| programming_docs |
ansible purestorage.flashblade.purefb_target β Manage remote S3-capable targets for a FlashBlade purestorage.flashblade.purefb\_target β Manage remote S3-capable targets for a FlashBlade
=========================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_target`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage remote S3-capable targets for a FlashBlade system
* Use this for non-FlashBlade targets.
* Use *purefb\_connect* for FlashBlade targets.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string | | Address of S3-capable target (IP or FQDN) |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | Name of S3-capable target (IP or FQDN) |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete remote target |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create a connection to remote S3-capable target
purefb_target:
name: target_1
address: 10.10.10.20
fb_url: 10.10.10.2
api_token: T-89faa581-c668-483d-b77d-23c5d88ba35c
- name: Delete connection to remote S3-capable system
purefb_target:
state: absent
name: target_1
target_api: 9c0b56bc-f941-f7a6-9f85-dcc3e9a8f7d6
fb_url: 10.10.10.2
api_token: T-89faa581-c668-483d-b77d-23c5d88ba35c
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e494919681c9858a978d868881c990818589c2c7d7d3dfc2c7d1d6dfc2c7d0dcdf9491968197908b96858381c2c7d0d2df878b89)>
ansible purestorage.flashblade.purefb_fs_replica β Manage filesystem replica links between Pure Storage FlashBlades purestorage.flashblade.purefb\_fs\_replica β Manage filesystem replica links between Pure Storage FlashBlades
=============================================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_fs_replica`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module manages filesystem replica links between Pure Storage FlashBlades.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | Local Filesystem Name. |
| **policy** string | | Name of filesystem snapshot policy to apply to the replica link. |
| **state** string | **Choices:*** **present** β
* absent
| Creates or modifies a filesystem replica link |
| **target\_array** string | | Remote array name to create replica on. |
| **target\_fs** string | | Name of target filesystem name If not supplied, will default to *name*. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new filesystem replica from foo to bar on arrayB
purefb_fs_replica:
name: foo
target_array: arrayB
target_fs: bar
policy: daily
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Add new snapshot policy to exisitng filesystem replica link
purefb_fs_replica:
name: foo
policy: weekly
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete snapshot policy from filesystem replica foo
purefb_fs_replica:
name: foo
policy: weekly
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#ddada8afb8f0bcb3aeb4bfb1b8f0a9b8bcb0fbfeeeeae6fbfee8efe6fbfee9e5e6ada8afb8aea9b2afbcbab8fbfee9ebe6beb2b0)>
ansible purestorage.flashblade.purefb_policy β Manage FlashBlade policies purestorage.flashblade.purefb\_policy β Manage FlashBlade policies
==================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_policy`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage policies for filesystem and file replica links
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **at** string | | Provide a time in 12-hour AM/PM format, eg. 11AM |
| **enabled** boolean | **Choices:*** no
* **yes** β
| State of policy |
| **every** integer | | Interval between snapshots in seconds Range available 300 - 31536000 (equates to 5m to 365d) |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **filesystem** list / elements=string | | List of filesystems to add to a policy on creation To amend policy members use the *purefb\_fs* module |
| **keep\_for** integer | | How long to keep snapshots for Range available 300 - 31536000 (equates to 5m to 365d) Must not be set less than *every*
|
| **name** string | | Name of the policy |
| **replica\_link** list / elements=string | | List of filesystem replica links to add to a policy on creation To amend policy members use the *purefb\_fs\_replica* module |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete policy |
| **timezone** string | | Time Zone used for the *at* parameter If not provided, the module will attempt to get the current local timezone from the server |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create a simple policy with no rules
purefb_policy:
name: test_policy
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Create a policy and connect to existing filesystems and filesystem replica links
purefb_policy:
name: test_policy_with_members
filesystem:
- fs1
- fs2
replica_link:
- rl1
- rl2
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Create a policy with rules
purefb_policy:
name: test_policy2
at: 11AM
keep_for: 86400
every: 86400
timezone: Asia/Shanghai
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Delete a policy
purefb_policy:
name: test_policy
state: absent
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#42323730276f232c312b202e276f3627232f646171757964617770796461767a793237302731362d302325276461767479212d2f)>
ansible purestorage.flashblade.purefb_ra β Enable or Disable Pure Storage FlashBlade Remote Assist purestorage.flashblade.purefb\_ra β Enable or Disable Pure Storage FlashBlade Remote Assist
===========================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_ra`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Enablke or Disable Remote Assist for a Pure Storage FlashBlade.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **state** string | **Choices:*** **present** β
* absent
| Define state of remote assist When set to *enable* the RA port can be exposed using the *debug* module. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Enable Remote Assist port
purefb_ra:
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Disable Remote Assist port
purefb_ra:
state: absent
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#88f8fdfaeda5e9e6fbe1eae4eda5fcede9e5aeabbbbfb3aeabbdbab3aeabbcb0b3f8fdfaedfbfce7fae9efedaeabbcbeb3ebe7e5)>
ansible purestorage.flashblade.purefb_snap β Manage filesystem snapshots on Pure Storage FlashBlades purestorage.flashblade.purefb\_snap β Manage filesystem snapshots on Pure Storage FlashBlades
=============================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_snap`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create or delete volumes and filesystem snapshots on Pure Storage FlashBlades.
* Restoring a filesystem from a snapshot is only supported using the latest snapshot.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **eradicate** boolean | **Choices:*** **no** β
* yes
| Define whether to eradicate the snapshot on delete or leave in trash. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | The name of the source filesystem. |
| **now** boolean added in 1.7.0 of purestorage.flashblade | **Choices:*** **no** β
* yes
| Whether to initiate a snapshot replication immeadiately |
| **state** string | **Choices:*** absent
* **present** β
* restore
| Define whether the filesystem snapshot should exist or not. |
| **suffix** string | | Suffix of snapshot name. |
| **targets** list / elements=string added in 1.7.0 of purestorage.flashblade | | Name of target to replicate snapshot to. This is only applicable when *now* is **True**
|
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create snapshot foo.ansible
purefb_snap:
name: foo
suffix: ansible
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Create immeadiate snapshot foo.ansible to connected FB bar
purefb_snap:
name: foo
suffix: ansible
now: True
targets:
- bar
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Delete snapshot named foo.snap
purefb_snap:
name: foo
suffix: snap
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Recover deleted snapshot foo.ansible
purefb_snap:
name: foo
suffix: ansible
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Restore filesystem foo (uses latest snapshot)
purefb_snap:
name: foo
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: restore
- name: Eradicate snapshot named foo.snap
purefb_snap:
name: foo
suffix: snap
eradicate: true
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#8bfbfef9eea6eae5f8e2e9e7eea6ffeeeae6ada8b8bcb0ada8beb9b0ada8bfb3b0fbfef9eef8ffe4f9eaeceeada8bfbdb0e8e4e6)>
ansible purestorage.flashblade.purefb_timeout β Configure Pure Storage FlashBlade GUI idle timeout purestorage.flashblade.purefb\_timeout β Configure Pure Storage FlashBlade GUI idle timeout
===========================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_timeout`.
New in version 1.6.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure GUI idle timeout for Pure Storage FlashBlade.
* This does not affect existing GUI sessions.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **state** string | **Choices:*** **present** β
* absent
| Set or disable the GUI idle timeout |
| **timeout** integer | **Default:**30 | Minutes for idle timeout. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Set GUI idle timeout to 25 minutes
purefb_timeout:
timeout: 25
state: present
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
- name: Disable idle timeout
purefb_timeout:
state: absent
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#a1d1d4d3c48cc0cfd2c8c3cdc48cd5c4c0cc878292969a878294939a878295999ad1d4d3c4d2d5ced3c0c6c4878295979ac2cecc)>
ansible purestorage.flashblade.purefb_ds β Configure FlashBlade Directory Service purestorage.flashblade.purefb\_ds β Configure FlashBlade Directory Service
==========================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_ds`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create, modify or erase directory services configurations. There is no facility to SSL certificates at this time. Use the FlashBlade GUI for this additional configuration work.
* If updating a directory service and i(bind\_password) is provided this will always cause a change, even if the password given isnβt different from the current. This makes this part of the module non-idempotent..
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **base\_dn** string | | Sets the base of the Distinguished Name (DN) of the directory service groups. The base should consist of only Domain Components (DCs). The base\_dn will populate with a default value when a URI is entered by parsing domain components from the URI. The base DN should specify DC= for each domain component and multiple DCs should be separated by commas. |
| **bind\_password** string | | Sets the password of the bind\_user user name account. |
| **bind\_user** string | | Sets the user name that can be used to bind to and query the directory. For Active Directory, enter the username - often referred to as sAMAccountName or User Logon Name - of the account that is used to perform directory lookups. For OpenLDAP, enter the full DN of the user. |
| **dstype** string / required | **Choices:*** management
* nfs
* smb
| The type of directory service to work on |
| **enable** boolean | **Choices:*** **no** β
* yes
| Whether to enable or disable directory service support. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **join\_ou** string | | The optional organizational unit (OU) where the machine account for the directory service will be created. |
| **nis\_domain** string | | The NIS domain to search This cannot be used in conjunction with LDAP configurations. |
| **nis\_servers** list / elements=string | | A list of up to 30 IP addresses or FQDNs for NIS servers. This cannot be used in conjunction with LDAP configurations. |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete directory service configuration |
| **uri** list / elements=string | | A list of up to 30 URIs of the directory servers. Each URI must include the scheme ldap:// or ldaps:// (for LDAP over SSL), a hostname, and a domain name or IP address. For example, ldap://ad.company.com configures the directory service with the hostname "ad" in the domain "company.com" while specifying the unencrypted LDAP protocol. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete existing management directory service
purefb_ds:
dstype: management
state: absent
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create NFS directory service (disabled)
purefb_ds:
dstype: nfs
uri: "ldaps://lab.purestorage.com"
base_dn: "DC=lab,DC=purestorage,DC=com"
bind_user: Administrator
bind_password: password
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Enable existing SMB directory service
purefb_ds:
dstypr: smb
enable: true
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disable existing management directory service
purefb_ds:
dstype: management
enable: false
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create NFS directory service (enabled)
purefb_ds:
dstype: nfs
enable: true
uri: "ldaps://lab.purestorage.com"
base_dn: "DC=lab,DC=purestorage,DC=com"
bind_user: Administrator
bind_password: password
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#dbabaea9bef6bab5a8b2b9b7bef6afbebab6fdf8e8ece0fdf8eee9e0fdf8efe3e0abaea9bea8afb4a9babcbefdf8efede0b8b4b6)>
| programming_docs |
ansible purestorage.flashblade.purefb_bucket_replica β Manage bucket replica links between Pure Storage FlashBlades purestorage.flashblade.purefb\_bucket\_replica β Manage bucket replica links between Pure Storage FlashBlades
=============================================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_bucket_replica`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module manages bucket replica links between Pure Storage FlashBlades.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **credential** string | | Name of remote credential name to use. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | Local Bucket Name. |
| **paused** boolean | **Choices:*** **no** β
* yes
| State of the bucket replica link |
| **state** string | **Choices:*** **present** β
* absent
| Creates or modifies a bucket replica link |
| **target** string | | Remote array or target name to create replica on. |
| **target\_bucket** string | | Name of target bucket name If not supplied, will default to *name*. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new bucket replica from foo to bar on arrayB
purefb_bucket_replica:
name: foo
target: arrayB
target_bucket: bar
credentials: cred_1
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Pause exisitng bucket replica link
purefb_bucket_replica:
name: foo
paused: true
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete bucket replica link foo
purefb_fs_replica:
name: foo
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#78080d0a1d5519160b111a141d550c1d19155e5b4b4f435e5b4d4a435e5b4c4043080d0a1d0b0c170a191f1d5e5b4c4e431b1715)>
ansible purestorage.flashblade.purefb_inventory β Collect information from Pure Storage FlashBlade purestorage.flashblade.purefb\_inventory β Collect information from Pure Storage FlashBlade
===========================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_inventory`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Collect information from a Pure Storage FlashBlade running the Purity//FB operating system. By default, the module will collect basic information including hosts, host groups, protection groups and volume counts. Additional information can be collected based on the configured set of arguements.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: collect FlashBlade invenroty
purefa_inventory:
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: show default information
debug:
msg: "{{ array_info['purefb_info'] }}"
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **purefb\_inventory** complex | always | Returns the inventory information for the FlashArray **Sample:** {'admins': {'pureuser': {'role': 'array\_admin', 'type': 'local'}}, 'apps': {'offload': {'description': 'Snapshot offload to NFS or Amazon S3', 'status': 'healthy', 'version': '5.2.1'}}} |
### Authors
* Pure Storage ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e595909780c8848b968c878980c891808488c3c6d6d2dec3c6d0d7dec3c6d1ddde9590978096918a97848280c3c6d1d3de868a88)>
ansible purestorage.flashblade.purefb_alert β Configure Pure Storage FlashBlade alert email settings purestorage.flashblade.purefb\_alert β Configure Pure Storage FlashBlade alert email settings
=============================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_alert`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure alert email configuration for Pure Storage FlashArrays.
* Add or delete an individual syslog server to the existing list of serves.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **address** string / required | | Email address (valid format required) |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **enabled** boolean | **Choices:*** no
* **yes** β
| Set specified email address to be enabled or disabled |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **severity** string | **Choices:*** **info** β
* warning
* critical
| The minimum severity that an alert must have in order for emails to be sent to the array's alert watchers |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete alert email |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Add new email recipient and enable, or enable existing email
purefb_alert:
address: "[email protected]"
enabled: true
state: present
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete existing email recipient
purefb_alert:
state: absent
address: "[email protected]"
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#38484d4a5d1559564b515a545d154c5d59551e1b0b0f031e1b0d0a031e1b0c0003484d4a5d4b4c574a595f5d1e1b0c0e035b5755)>
ansible purestorage.flashblade.purefb_keytabs β Manage FlashBlade Kerberos Keytabs purestorage.flashblade.purefb\_keytabs β Manage FlashBlade Kerberos Keytabs
===========================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_keytabs`.
New in version 1.6.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Manage Kerberos Keytabs for FlashBlades
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **filetype** string | **Choices:*** binary
* base64
| Format of the keytab file |
| **keytab\_file** string | | Name of file holding Keytab |
| **name** string | | Name of the Keytab Must include prefix and suffix |
| **prefix** string | | Only required for *import* or *rotate*
Prefix to use for naming the files slots Specifying a file entry prefix is required because a single keytab file can contain multiple keytab entries in multiple slots. If not provided for *import* the current AD Account name will be used. |
| **state** string | **Choices:*** absent
* **import** β
* export
* rotate
| Manage Kerberos Keytabs |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Import a binary keytab
purefb_keytabs:
state: import
prefix: example
keytab_file: pure_krb.keytab
filetype: binary
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Import a base64 keytab
purefb_keytabs:
state: import
prefix: example
keytab_file: pure_krb.keytab.mime
filetype: base64
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Export a keytab
purefb_keytabs:
state: export
name: example.3
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
register: download_file
- name: Delete a keytab
purefb_keytabs:
state: absent
name: example.3
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Rotate current AD account keytabs
purefb_keytabs:
state: rotate
fb_url: 10.10.10.2
- name: Rotate AD account keytabs by creating new series
purefb_keytabs:
state: rotate
name: next_prefix
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **download\_file** string | When using *export* option | Name of file containing exported keytab **Sample:** /tmp/pure\_krb8939478070214877726.keytab |
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#9aeaefe8ffb7fbf4e9f3f8f6ffb7eefffbf7bcb9a9ada1bcb9afa8a1bcb9aea2a1eaefe8ffe9eef5e8fbfdffbcb9aeaca1f9f5f7)>
ansible purestorage.flashblade.purefb_bladename β Configure Pure Storage FlashBlade name purestorage.flashblade.purefb\_bladename β Configure Pure Storage FlashBlade name
=================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_bladename`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure name of Pure Storage FlashBlades.
* Ideal for Day 0 initial configuration.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | Name of the FlashBlade. Must conform to correct naming schema. |
| **state** string | **Choices:*** **present** β
| Set the FlashBlade name |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Set new FlashBlade name
purefb_bladename:
name: new-flashblade-name
state: present
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#41313433246c202f3228232d246c3524202c676272767a676274737a676275797a3134332432352e33202624676275777a222e2c)>
ansible purestorage.flashblade.purefb_dns β Configure Pure Storage FlashBlade DNS settings purestorage.flashblade.purefb\_dns β Configure Pure Storage FlashBlade DNS settings
===================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_dns`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Set or erase DNS configuration for Pure Storage FlashBlades.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **domain** string | | Domain suffix to be appended when perofrming DNS lookups. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **nameservers** list / elements=string | | List of up to 3 unique DNS server IP addresses. These can be IPv4 or IPv6 - No validation is done of the addresses is performed. |
| **search** list / elements=string | | Ordered list of domain names to search Deprecated option. Will be removed in Collection v1.6.0, There is no replacement for this. |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete DNS servers configuration |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Delete exisitng DNS settings
purefb_dns:
state: absent
fa_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Set DNS settings
purefb_dns:
domain: purestorage.com
nameservers:
- 8.8.8.8
- 8.8.4.4
search:
- purestorage.com
- acme.com
fa_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#641411160149050a170d0608014910010509424757535f424751565f4247505c5f1411160117100b16050301424750525f070b09)>
ansible purestorage.flashblade.purefb_smtp β Configure SMTP for Pure Storage FlashBlade purestorage.flashblade.purefb\_smtp β Configure SMTP for Pure Storage FlashBlade
================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_smtp`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure SMTP for a Pure Storage FlashBlade.
* Whilst there can be no relay host, a sender domain must be configured.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **domain** string / required | | Domain name for alert messages |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **host** string | | Relay server name |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Configure SMTP settings
purefb_smtp:
host: hostname
domain: xyz.com
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#79090c0b1c5418170a101b151c540d1c18145f5a4a4e425f5a4c4b425f5a4d4142090c0b1c0a0d160b181e1c5f5a4d4f421a1614)>
| programming_docs |
ansible purestorage.flashblade.purefb_certgrp β Manage FlashBlade Certifcate Groups purestorage.flashblade.purefb\_certgrp β Manage FlashBlade Certifcate Groups
============================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_certgrp`.
New in version 1.4.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage certifcate groups for FlashBlades
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **certificates** list / elements=string | | List of certifcates to add to a policy on creation |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string | | Name of the certificate group |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete certifcate group |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create a certifcate group
purefb_certgrp:
name: test_grp
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Create a cerifcate group and add existing certificates
purefb_certgrp:
name: test_grp
certifcates:
- cert1
- cert2
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Delete a certifcate from a group
purefb_certgrp:
name: test_grp
certificates:
- cert2
state: absent
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Delete a certifcate group
purefb_certgrp:
name: test_grp
state: absent
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#83f3f6f1e6aee2edf0eae1efe6aef7e6e2eea5a0b0b4b8a5a0b6b1b8a5a0b7bbb8f3f6f1e6f0f7ecf1e2e4e6a5a0b7b5b8e0ecee)>
ansible purestorage.flashblade.purefb_s3user β Create or delete FlashBlade Object Store account users purestorage.flashblade.purefb\_s3user β Create or delete FlashBlade Object Store account users
==============================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_s3user`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Create or delete object store account users on a Pure Stoage FlashBlade.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_key** boolean | **Choices:*** **no** β
* yes
| Create secret access key. Key can be exposed using the *debug* module If enabled this will override *imported\_key*
|
| **account** string / required | | The name of object store account associated with user |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **imported\_key** string added in 1.4.0 of purestorage.flashblade | | Access key of imported credentials |
| **imported\_secret** string added in 1.4.0 of purestorage.flashblade | | Access key secret for access key to import |
| **name** string / required | | The name of object store user |
| **policy** list / elements=string added in 1.6.0 of purestorage.flashblade | | User Access Policies to be assigned to user on creation To amend policies use the *purefb\_userpolicy* module If not specified, *pure\:policy/full-access* will be added |
| **remove\_key** string added in 1.5.0 of purestorage.flashblade | | Access key to be removed from user |
| **state** string | **Choices:*** absent
* **present** β
* remove\_key
| Create or delete object store account user Remove a specified access key for a user |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create object store user (with access ID and key) foo in account bar
purefb_s3user:
name: foo
account: bar
access_key: true
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
register: result
- debug:
msg: "S3 User: {{ result['s3user_info'] }}"
- name: Create object store user (with access ID and key) foo in account bar with access policy (Purity 3.2 and higher)
purefb_s3user:
name: foo
account: bar
access_key: true
policy:
- pure:policy/safemode-configure
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create object store user foo using imported key/secret in account bar
purefb_s3user:
name: foo
account: bar
imported_key: "PSABSSZRHPMEDKHMAAJPJBONPJGGDDAOFABDGLBJLHO"
imported_secret: "BAG61F63105e0d3669/e066+5C5DFBE2c127d395LBGG"
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete object store user foo in account bar
purefb_s3user:
name: foo
account: bar
state: absent
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#156560677038747b667c7779703861707478333626222e333620272e3336212d2e6560677066617a67747270333621232e767a78)>
ansible purestorage.flashblade.purefb_snmp_agent β Configure the FlashBlade SNMP Agent purestorage.flashblade.purefb\_snmp\_agent β Configure the FlashBlade SNMP Agent
================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_snmp_agent`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure the management SNMP Agent on a Pure Storage FlashBlade.
* This module is not idempotent and will always modify the existing management SNMP agent due to hidden parameters that cannot be compared to the play parameters.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **auth\_passphrase** string | | SNMPv3 only. Passphrase of 8 - 32 characters. |
| **auth\_protocol** string | **Choices:*** MD5
* SHA
| SNMP v3 only. Hash algorithm to use |
| **community** string | | SNMP v2c only. Manager community ID. Between 1 and 32 characters long. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **privacy\_passphrase** string | | SNMPv3 only. Passphrase to encrypt SNMP messages. Must be between 8 and 63 non-space ASCII characters. |
| **privacy\_protocol** string | **Choices:*** AES
* DES
| SNMP v3 only. Encryption protocol to use |
| **user** string | | SNMP v3 only. User ID recognized by the specified SNMP agent. Must be between 1 and 32 characters. |
| **version** string | **Choices:*** v2c
* v3
| Version of SNMP protocol to use for the agent. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Update v2c SNMP agent
purefb_snmp_agent:
community: public
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Update v3 SNMP agent
purefb_snmp_agent:
version: v3
auth_protocol: MD5
auth_passphrase: password
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#40303532256d212e3329222c256d3425212d666373777b666375727b666374787b3035322533342f32212725666374767b232f2d)>
ansible purestorage.flashblade.purefb_phonehome β Enable or Disable Pure Storage FlashBlade Phone Home purestorage.flashblade.purefb\_phonehome β Enable or Disable Pure Storage FlashBlade Phone Home
===============================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_phonehome`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Enablke or Disable Remote Phone Home for a Pure Storage FlashBlade.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **state** string | **Choices:*** **present** β
* absent
| Define state of phone home |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Enable Remote Phone Home
purefb_phonehome:
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Disable Remote Phone Home
purefb_phonehome:
state: absent
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#78080d0a1d5519160b111a141d550c1d19155e5b4b4f435e5b4d4a435e5b4c4043080d0a1d0b0c170a191f1d5e5b4c4e431b1715)>
ansible purestorage.flashblade.purefb_userpolicy β Manage FlashBlade Object Store User Access Policies purestorage.flashblade.purefb\_userpolicy β Manage FlashBlade Object Store User Access Policies
===============================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_userpolicy`.
New in version 1.6.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
* [Return Values](#return-values)
Synopsis
--------
* Add or Remove FlashBlade Object Store Access Policies for Account User
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **account** string | | Name of the Object Store Account associated with the user |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string | | Name of the Object Store User The user to have the policy request applied to |
| **policy** list / elements=string | | Policies to added or deleted from the Object Store User Only valid policies can be used use *list* to see available policies |
| **state** string | **Choices:*** absent
* **present** β
* show
| Define whether the Access Policy should be added or deleted Option to list all available policies |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: List existng ruser access policies for a specific user
purefb_userpolicy:
state: show
account: foo
name: bar
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
register: policy_list
- name: List all available user access policies
purefb_userpolicy:
state: show
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
register: policy_list
- name: Add user access policies to account user foo/bar
purefb_userpolicy:
name: bar
account: foo
policy:
- pure:policy/bucket-create
- pure:policy/bucket-delete
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
- name: Delete user access policies to account user foo/bar
purefb_userpolicy:
name: bar
account: foo
policy:
- pure:policy/bucket-create
- pure:policy/bucket-delete
state: absent
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
```
Return Values
-------------
Common return values are documented [here](../../../reference_appendices/common_return_values#common-return-values), the following are the fields unique to this module:
| Key | Returned | Description |
| --- | --- | --- |
| **policy\_list** list / elements=string | always | Returns the list of access policies for a user If no user specified returns all available access policies **Sample:** ['pure:policy/object-list', 'pure:policy/bucket-list', 'pure:policy/object-read', 'pure:policy/bucket-delete', 'pure:policy/full-access'] |
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#e393969186ce828d908a818f86ce9786828ec5c0d0d4d8c5c0d6d1d8c5c0d7dbd89396918690978c91828486c5c0d7d5d8808c8e)>
ansible purestorage.flashblade.purefb_ad β Manage FlashBlade Active Directory Account purestorage.flashblade.purefb\_ad β Manage FlashBlade Active Directory Account
==============================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_ad`.
New in version 1.6.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Add or delete FlashBlade Active Directory Account
* FlashBlade allows the creation of one AD computer account, or joining of an existing AD computer account.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **computer** string | | The common name of the computer account to be created in the Active Directory domain. If not specified, defaults to the name of the Active Directory configuration. |
| **directory\_servers** list / elements=string | | A list of directory servers that will be used for lookups related to user authorization Accepted server formats are IP address and DNS name All specified servers must be registered to the domain appropriately in the array configured DNS and will only be communicated with over the secure LDAP (LDAPS) protocol. If not specified, servers are resolved for the domain in DNS The specified list can have a maximum length of 5. If more are provided only the first 5 are used. |
| **domain** string | | The Active Directory domain to join |
| **encryption** list / elements=string | **Choices:*** **aes256-sha1** β
* aes128-sha1
* arcfour-hmac
| The encryption types that will be supported for use by clients for Kerberos authentication |
| **existing** boolean | **Choices:*** **no** β
* yes
| Does the account *name* already exist in the AD environment |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **join\_ou** string | | Location where the Computer account will be created. e.g. OU=Arrays,OU=Storage. If left empty, defaults to **CN=Computers**. |
| **kerberos\_servers** list / elements=string | | A list of key distribution servers to use for Kerberos protocol Accepted server formats are IP address and DNS name All specified servers must be registered to the domain appropriately in the array configured DNS. If not specified, servers are resolved for the domain in DNS. The specified list can have a maximum length of 5. If more are provided only the first 5 are used. |
| **local\_only** boolean | **Choices:*** **no** β
* yes
| Do a local-only delete of an active directory account |
| **name** string / required | | Name of the AD account |
| **password** string | | Password string for *username*
|
| **service** string | **Choices:*** **nfs** β
* cifs
* HOST
| Service protocol for Active Directory principals Refer to FlashBlade User Guide for more details |
| **service\_principals** list / elements=string | | A list of either FQDNs or SPNs for registering services with the domain. If not specified **Computer Name.Domain** is used |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the AD sccount is deleted or not |
| **username** string | | A user capable of creating a computer account within the domain |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new AD account
purefb_ad:
name: ad_account
computer: FLASHBLADE
domain: acme.com
username: Administrator
password: Password
join_ou: "CN=FakeOU"
encryption:
- aes128-cts-hmac-sha1-96
- aes256-cts-hmac-sha1-96
kerberos_servers:
- kdc.acme.com
directory_servers:
- ldap.acme.com
service_principals:
- vip1.flashblade.acme.com
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Connect to existing AD account
purefb_ad:
name: ad_account
computer: FLASHBLADE
domain: acme.com
username: Administrator
password: Password
existing: True
kerberos_servers:
- kdc.acme.com
directory_servers:
- ldap.acme.com
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Update existing AD account
purefb_ad:
name: ad_account
encryption:
- aes256-cts-hmac-sha1-96
kerberos_servers:
- kdc.acme.com
directory_servers:
- ldap.acme.com
service_principals:
- vip1.flashblade.acme.com
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete local AD account
purefb_ad:
name: ad_account
local_only: True
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Fully delete AD account
purefb_ad:
name: ad_account
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#f8888d8a9dd599968b919a949dd58c9d9995dedbcbcfc3dedbcdcac3dedbccc0c3888d8a9d8b8c978a999f9ddedbcccec39b9795)>
| programming_docs |
ansible purestorage.flashblade.purefb_lifecycle β Manage FlashBlade object lifecycles purestorage.flashblade.purefb\_lifecycle β Manage FlashBlade object lifecycles
==============================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_lifecycle`.
New in version 1.4.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage lifecycles for object buckets
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **bucket** string / required | | Bucket the lifecycle rule applies to |
| **enabled** boolean | **Choices:*** no
* **yes** β
| State of lifecycle rule |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **keep\_for** string | | Time after which previous versions will be marked expired. Enter as days (d) or weeks (w). Range is 1 - 2147483647 days. |
| **name** string / required | | Name of the lifecycle rule |
| **prefix** string | | Object key prefix identifying one or more objects in the bucket |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete lifecycle rule |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create a lifecycle rule called bar for bucket foo
purefb_lifecycle:
name: bar
bucket: foo
keep_for: 2d
prefix: test
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
- name: Delete lifecycle rule foo from bucket foo
purefb_lifecycle:
name: foo
bucket: bar
state: absent
fb_url: 10.10.10.2
api_token: T-9f276a18-50ab-446e-8a0c-666a3529a1b6
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#fa8a8f889fd79b94899398969fd78e9f9b97dcd9c9cdc1dcd9cfc8c1dcd9cec2c18a8f889f898e95889b9d9fdcd9ceccc1999597)>
ansible purestorage.flashblade.purefb_subnet β Manage network subnets in a Pure Storage FlashBlade purestorage.flashblade.purefb\_subnet β Manage network subnets in a Pure Storage FlashBlade
===========================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_subnet`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* This module manages network subnets on Pure Storage FlashBlade.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **gateway** string | | IPv4 or IPv6 address of subnet gateway. |
| **lag** string added in 1.7.0 of purestorage.flashblade | **Default:**"uplink" | Name of the Link Aggreation Group to use for the subnet. |
| **mtu** integer | **Default:**1500 | MTU size of the subnet. Range is 1280 to 9216. |
| **name** string / required | | Subnet Name. |
| **prefix** string | | IPv4 or IPv6 address associated with the subnet. Supply the prefix length (CIDR) as well as the IP address. Required for subnet creation. |
| **state** string | **Choices:*** **present** β
* absent
| Create, delete or modifies a subnet. |
| **vlan** integer | **Default:**0 | VLAN ID of the subnet. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create new network subnet named foo
purefb_subnet:
name: foo
prefix: "10.21.200.3/24"
gateway: 10.21.200.1
mtu: 9000
vlan: 2200
lag: bar
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Change configuration of existing subnet foo
purefb_network:
name: foo
state: present
prefix: "10.21.100.3/24"
gateway: 10.21.100.1
mtu: 1500
address: 10.21.200.123
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete network subnet named foo
purefb_subnet:
name: foo
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#0f7f7a7d6a226e617c666d636a227b6a6e62292c3c3834292c3a3d34292c3b37347f7a7d6a7c7b607d6e686a292c3b39346c6062)>
ansible purestorage.flashblade.purefb_banner β Configure Pure Storage FlashBlade GUI and SSH MOTD message purestorage.flashblade.purefb\_banner β Configure Pure Storage FlashBlade GUI and SSH MOTD message
==================================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_banner`.
New in version 1.4.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Configure MOTD for Pure Storage FlashBlades.
* This will be shown during an SSH or GUI login to the system.
* Multiple line messages can be achieved using \n.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **banner** string | **Default:**"Welcome to the machine..." | Banner text, or MOTD, to use |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **state** string | **Choices:*** **present** β
* absent
| Set ot delete the MOTD |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Set new banner text
purefb_banner:
banner: "Banner over\ntwo lines"
state: present
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Delete banner text
purefb_banner:
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#82f2f7f0e7afe3ecf1ebe0eee7aff6e7e3efa4a1b1b5b9a4a1b7b0b9a4a1b6bab9f2f7f0e7f1f6edf0e3e5e7a4a1b6b4b9e1edef)>
ansible purestorage.flashblade.purefb_eula β Sign Pure Storage FlashBlade EULA purestorage.flashblade.purefb\_eula β Sign Pure Storage FlashBlade EULA
=======================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_eula`.
New in version 1.6.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Sign the FlashBlade EULA for Day 0 config, or change signatory.
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **company** string / required | | Full legal name of the entity. The value must be between 1 and 64 characters in length. |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **name** string / required | | Full legal name of the individual at the company who has the authority to accept the terms of the agreement. The value must be between 1 and 64 characters in length. |
| **title** string / required | | Individual's job title at the company. The value must be between 1 and 64 characters in length. |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Sign EULA for FlashBlade
purefb_eula:
company: "ACME Storage, Inc."
name: "Fred Bloggs"
title: "Storage Manager"
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#dbabaea9bef6bab5a8b2b9b7bef6afbebab6fdf8e8ece0fdf8eee9e0fdf8efe3e0abaea9bea8afb4a9babcbefdf8efede0b8b4b6)>
ansible purestorage.flashblade.purefb_apiclient β Manage FlashBlade API Clients purestorage.flashblade.purefb\_apiclient β Manage FlashBlade API Clients
========================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_apiclient`.
New in version 1.6.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Enable or disable FlashBlade API Clients
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **enabled** boolean | **Choices:*** no
* **yes** β
| State of the API Client Key |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **issuer** string | | The name of the identity provider that will be issuing ID Tokens for this API client If not specified, defaults to the API client name, *name*. |
| **name** string / required | | Name of the API Client |
| **public\_key** string | | The API clients PEM formatted (Base64 encoded) RSA public key. Include the *ββBEGIN PUBLIC KEYββ* and *ββEND PUBLIC KEYββ* lines |
| **role** string | **Choices:*** readonly
* ops\_admin
* storage\_admin
* array\_admin
| The maximum role allowed for ID Tokens issued by this API client |
| **state** string | **Choices:*** absent
* **present** β
| Define whether the API client should exist or not. |
| **token\_ttl** integer | **Default:**86400 | Time To Live length in seconds for the exchanged access token Range is 1 second to 1 day (86400 seconds) |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create API token ansible-token
purefb_apiclient:
name: ansible_token
issuer: "Pure_Storage"
token_ttl: 3000
role: array_admin
public_key: "{{lookup('file', 'public_pem_file') }}"
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
- name: Disable API CLient
purefb_apiclient:
name: ansible_token
enabled: false
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
- name: Enable API CLient
purefb_apiclient:
name: ansible_token
enabled: true
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
- name: Delete API Client
purefb_apiclient:
state: absent
name: ansible_token
fb_url: 10.10.10.2
api_token: T-68618f31-0c9e-4e57-aa44-5306a2cf10e3
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#0f7f7a7d6a226e617c666d636a227b6a6e62292c3c3834292c3a3d34292c3b37347f7a7d6a7c7b607d6e686a292c3b39346c6062)>
ansible purestorage.flashblade.purefb_connect β Manage replication connections between two FlashBlades purestorage.flashblade.purefb\_connect β Manage replication connections between two FlashBlades
===============================================================================================
Note
This plugin is part of the [purestorage.flashblade collection](https://galaxy.ansible.com/purestorage/flashblade) (version 1.7.0).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install purestorage.flashblade`.
To use it in a playbook, specify: `purestorage.flashblade.purefb_connect`.
New in version 1.0.0: of purestorage.flashblade
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage replication connections to specified remote FlashBlade system
Requirements
------------
The below requirements are needed on the host that executes this module.
* python >= 2.7
* purity\_fb >= 1.9
* netaddr
* pytz
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **api\_token** string | | FlashBlade API token for admin privileged user. |
| **encrypted** boolean | **Choices:*** **no** β
* yes
| Define if replication connection is encrypted |
| **fb\_url** string | | FlashBlade management IP address or Hostname. |
| **state** string | **Choices:*** absent
* **present** β
| Create or delete replication connection |
| **target\_api** string | | API token for target FlashBlade system |
| **target\_url** string / required | | Management IP address of target FlashBlade system |
Notes
-----
Note
* This module requires the `purity_fb` Python library
* You must set `PUREFB_URL` and `PUREFB_API` environment variables if *fb\_url* and *api\_token* arguments are not passed to the module directly
Examples
--------
```
- name: Create a connection to remote FlashBlade system
purefb_connect:
target_url: 10.10.10.20
target_api: 9c0b56bc-f941-f7a6-9f85-dcc3e9a8f7d6
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete connection to target FlashBlade system
purefb_connect:
state: absent
target_url: 10.10.10.20
target_api: 9c0b56bc-f941-f7a6-9f85-dcc3e9a8f7d6
fb_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
```
### Authors
* Pure Storage Ansible Team (@sdodsley) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#33434641561e525d405a515f561e4756525e151000040815100601081510070b084346415640475c415254561510070508505c5e)>
ansible Collections in the Hpe Namespace Collections in the Hpe Namespace
================================
These are the collections with docs hosted on [docs.ansible.com](https://docs.ansible.com/) in the **hpe** namespace.
* [hpe.nimble](nimble/index#plugins-in-hpe-nimble)
ansible hpe.nimble.hpe_nimble_initiator_group β Manage the HPE Nimble Storage initiator groups hpe.nimble.hpe\_nimble\_initiator\_group β Manage the HPE Nimble Storage initiator groups
=========================================================================================
Note
This plugin is part of the [hpe.nimble collection](https://galaxy.ansible.com/hpe/nimble) (version 1.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install hpe.nimble`.
To use it in a playbook, specify: `hpe.nimble.hpe_nimble_initiator_group`.
New in version 1.0.0: of hpe.nimble
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage the HPE Nimble Storage initiator groups.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Ansible 2.9 or later
* Python 3.6 or later
* HPE Nimble Storage SDK for Python
* HPE Nimble Storage arrays running NimbleOS 5.0 or later
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **access\_protocol** string | **Choices:*** iscsi
* fc
| Initiator group access protocol. |
| **app\_uuid** string | | Application identifier of initiator group. String of up to 255 alphanumeric characters, hyphen, colon, dot and underscore are allowed. |
| **change\_name** string | | Change name of the existing initiator group. |
| **description** string | | Text description of initiator group. |
| **fc\_initiators** list / elements=dictionary | | List of FC initiators. When create/update fc\_initiators, WWPN is required. |
| **fc\_tdz\_ports** list / elements=integer | | List of target fibre channel ports with target driven zoning configured on this initiator group. |
| **host** string / required | | HPE Nimble Storage IP address. |
| **host\_type** string | | Initiator group host type. Available options are auto and hpux. The default option is auto. This attribute will be applied to all the initiators in the initiator group. Initiators with different host OSes should not be kept in the same initiator group having a non-default host type attribute. |
| **iscsi\_initiators** list / elements=dictionary | | List of iSCSI initiators. When create/update iscsi\_initiators, either iqn or ip\_address is always required with label. |
| **metadata** dictionary | | Key-value pairs that augment an initiator group's attributes. List of key-value pairs. Keys must be unique and non-empty. |
| **name** string / required | | Name of the initiator group. |
| **password** string / required | | HPE Nimble Storage password. |
| **state** string / required | **Choices:*** present
* absent
* create
| The initiator group operation. |
| **target\_subnets** list / elements=dictionary | | List of target subnet labels. If specified, discovery and access to volumes will be restricted to the specified subnets. |
| **username** string / required | | HPE Nimble Storage user name. |
Notes
-----
Note
* This module does not support `check_mode`.
Examples
--------
```
# if state is create, then create ig. Fails if already present.
# if state is present, then create ig if not present. Succeeds if it already exists.
- name: Create an igroup
hpe.nimble.hpe_nimble_initiator_group:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
access_protocol: "{{ access_protocol | default('iscsi')}}"
name: "{{ name }}"
iscsi_initiators: "{{ iscsi_initiators | default([])}}" # list of dictionaries. Each entry in the dictionary has one initiator details.
description: "{{ description | default(None) }}"
state: "{{ state | default('present') }}"
- name: Delete igroup
hpe.nimble.hpe_nimble_initiator_group:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
access_protocol: "{{ access_protocol | default('iscsi')}}"
name: "{{ name }}"
state: absent
```
### Authors
* HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#c1afa8aca3ada4eca5a2b2ecb2b5aeb3a0a6a4eca0b4b5aeaca0b5a8aeafeca4afa6e7e2f2f6fae7e2f4f3fae7e2f5f9faa9b1a4e7e2f5f7faa2aeac)>
| programming_docs |
ansible hpe.nimble.hpe_nimble_volume_collection β Manage the HPE Nimble Storage volume collections hpe.nimble.hpe\_nimble\_volume\_collection β Manage the HPE Nimble Storage volume collections
=============================================================================================
Note
This plugin is part of the [hpe.nimble collection](https://galaxy.ansible.com/hpe/nimble) (version 1.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install hpe.nimble`.
To use it in a playbook, specify: `hpe.nimble.hpe_nimble_volume_collection`.
New in version 1.0.0: of hpe.nimble
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage the volume collections on an HPE Nimble Storage group.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Ansible 2.9 or later
* Python 3.6 or later
* HPE Nimble Storage SDK for Python
* HPE Nimble Storage arrays running NimbleOS 5.0 or later
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **abort\_handover** boolean | **Choices:*** no
* yes
| Abort in-progress handover. If for some reason a previously invoked handover request is unable to complete, this action can be used to cancel it. This operation is not supported for synchronous replication volume collections. |
| **agent\_hostname** string | | Generic backup agent hostname. |
| **agent\_password** string | | Generic backup agent password. |
| **agent\_username** string | | Generic backup agent username. |
| **app\_cluster** string | | If the application is running within a Windows cluster environment, this is the cluster name. |
| **app\_id** string | **Choices:*** inval
* exchange
* exchange\_dag
* hyperv
* sql2005
* sql2008
* sql2012
* sql2014
* sql2016
* sql2017
| Application ID running on the server. |
| **app\_server** string | | Application server hostname. |
| **app\_service** string | | If the application is running within a windows cluster environment then this is the instance name of the service running within the cluster environment. |
| **app\_sync** string | **Choices:*** none
* vss
* vmware
* generic
| Application synchronization. |
| **change\_name** string | | Change name of the existing volume collection. |
| **demote** boolean | **Choices:*** no
* yes
| Release ownership of the specified volume collection. The volumes associated with the volume collection will be set to offline and a snapshot will be created, then full control over the volume collection will be transferred to the new owner. This option can be used following a promote to revert the volume collection back to its prior configured state. This operation does not alter the configuration on the new owner itself, but does require the new owner to be running in order to obtain its identity information. This operation is not supported for synchronous replication volume collections. |
| **description** string | | Text description of volume collection. |
| **handover** boolean | **Choices:*** no
* yes
| Gracefully transfer ownership of the specified volume collection. This action can be used to pass control of the volume collection to the downstream replication partner. Ownership and full control over the volume collection will be given to the downstream replication partner. The volumes associated with the volume collection will be set to offline prior to the final snapshot being taken and replicated, thus ensuring full data synchronization as part of the transfer. By default, the new owner will automatically begin replicating the volume collection back to this node when the handover completes. |
| **host** string / required | | HPE Nimble Storage IP address. |
| **invoke\_on\_upstream\_partner** boolean | **Choices:*** no
* yes
| Invoke handover request on upstream partner. This operation is not supported for synchronous replication volume collections. |
| **is\_standalone\_volcoll** boolean | **Choices:*** no
* yes
| Indicates whether this is a standalone volume collection. |
| **metadata** dictionary | | User defined key-value pairs that augment a volume collection attributes. List of key-value pairs. Keys must be unique and non-empty. When creating an object, values must be non-empty. When updating an object, an empty value causes the corresponding key to be removed. |
| **name** string / required | | Name of the volume collection. |
| **no\_reverse** boolean | **Choices:*** no
* yes
| Do not automatically reverse direction of replication. Using this argument will prevent the new owner from automatically replicating the volume collection to this node when the handover completes. |
| **override\_upstream\_down** boolean | **Choices:*** no
* yes
| Allow the handover request to proceed even if upstream array is down. The default behavior is to return an error when upstream is down. This option is applicable for synchronous replication only. |
| **password** string / required | | HPE Nimble Storage password. |
| **promote** boolean | **Choices:*** no
* yes
| Take ownership of the specified volume collection. The volumes associated with the volume collection will be set to online and be available for reading and writing. Replication will be disabled on the affected schedules and must be re-configured if desired. Snapshot retention for the affected schedules will be set to the greater of the current local or replica retention values. This operation is not supported for synchronous replication volume collections. |
| **prot\_template** string | | Name of the protection template whose attributes will be used to create this volume collection. This attribute is only used for input when creating a volume collection and is not outputted. |
| **replication\_partner** string | | Name of the new volume collection owner. |
| **replication\_type** string | **Choices:*** periodic\_snapshot
* synchronous
| Type of replication configured for the volume collection. |
| **state** string / required | **Choices:*** present
* absent
* create
| The volume collection operations. |
| **username** string / required | | HPE Nimble Storage user name. |
| **validate** boolean | **Choices:*** no
* yes
| Validate a volume collection with either Microsoft VSS or VMware application synchronization. |
| **vcenter\_hostname** string | | VMware vCenter hostname. |
| **vcenter\_password** string | | Application VMware vCenter password. A password with few constraints. |
| **vcenter\_username** string | | Application VMware vCenter username. String of up to 80 alphanumeric characters, beginning with a letter. It can include ampersand (@), backslash (\), dash (-), period (.), and underscore (\_). |
Notes
-----
Note
* This module does not support `check_mode`.
Examples
--------
```
# if state is create , then create a volcoll if not present. Fails if already present.
# if state is present, then create a volcoll if not present. Succeed if it already exists.
- name: Create volume collection if not present
hpe.nimble.hpe_nimble_volume_collection:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
name: "{{ name }}"
description: "{{ description | default(None)}}"
state: "{{ state | default('present') }}"
- name: Delete volume collection
hpe.nimble.hpe_nimble_volume_collection:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
name: "{{ name }}"
state: absent
- name: Promote volume collection
hpe.nimble.hpe_nimble_volume_collection:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
name: "{{ name }}"
state: present
promote: True
- name: Demote volume collection
hpe.nimble.hpe_nimble_volume_collection:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
name: "{{ name }}"
state: present
demote: True
- name: Handover volume collection
hpe.nimble.hpe_nimble_volume_collection:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
name: "{{ name }}"
state: present
handover: True
- name: Abort handover volume collection
hpe.nimble.hpe_nimble_volume_collection:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
name: "{{ name }}"
state: present
abort_handover: True
- name: Validate volume collection
hpe.nimble.hpe_nimble_volume_collection:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
name: "{{ name }}"
state: present
validate: True
```
### Authors
* HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#b9d7d0d4dbd5dc94dddaca94cacdd6cbd8dedc94d8cccdd6d4d8cdd0d6d794dcd7de9f9a8a8e829f9a8c8b829f9a8d8182d1c9dc9f9a8d8f82dad6d4)>
ansible Hpe.Nimble Hpe.Nimble
==========
Collection version 1.1.3
Plugin Index
------------
These are the plugins in the hpe.nimble collection
### Modules
* [hpe\_nimble\_access\_control\_record](hpe_nimble_access_control_record_module#ansible-collections-hpe-nimble-hpe-nimble-access-control-record-module) β Manage the HPE Nimble Storage access control records
* [hpe\_nimble\_array](hpe_nimble_array_module#ansible-collections-hpe-nimble-hpe-nimble-array-module) β Manage the HPE Nimble Storage array
* [hpe\_nimble\_chap\_user](hpe_nimble_chap_user_module#ansible-collections-hpe-nimble-hpe-nimble-chap-user-module) β Manage the HPE Nimble Storage CHAP user
* [hpe\_nimble\_disk](hpe_nimble_disk_module#ansible-collections-hpe-nimble-hpe-nimble-disk-module) β Manage the HPE Nimble Storage disk
* [hpe\_nimble\_encryption](hpe_nimble_encryption_module#ansible-collections-hpe-nimble-hpe-nimble-encryption-module) β Manage the HPE Nimble Storage encryption
* [hpe\_nimble\_fc](hpe_nimble_fc_module#ansible-collections-hpe-nimble-hpe-nimble-fc-module) β Manage the HPE Nimble Storage Fibre Channel
* [hpe\_nimble\_group](hpe_nimble_group_module#ansible-collections-hpe-nimble-hpe-nimble-group-module) β Manage the HPE Nimble Storage group
* [hpe\_nimble\_info](hpe_nimble_info_module#ansible-collections-hpe-nimble-hpe-nimble-info-module) β Collect information from HPE Nimble Storage array
* [hpe\_nimble\_initiator\_group](hpe_nimble_initiator_group_module#ansible-collections-hpe-nimble-hpe-nimble-initiator-group-module) β Manage the HPE Nimble Storage initiator groups
* [hpe\_nimble\_network](hpe_nimble_network_module#ansible-collections-hpe-nimble-hpe-nimble-network-module) β Manage the HPE Nimble Storage network configuration
* [hpe\_nimble\_partner](hpe_nimble_partner_module#ansible-collections-hpe-nimble-hpe-nimble-partner-module) β Manage the HPE Nimble Storage Replication Partner
* [hpe\_nimble\_performance\_policy](hpe_nimble_performance_policy_module#ansible-collections-hpe-nimble-hpe-nimble-performance-policy-module) β Manage the HPE Nimble Storage performance policies
* [hpe\_nimble\_pool](hpe_nimble_pool_module#ansible-collections-hpe-nimble-hpe-nimble-pool-module) β Manage the HPE Nimble Storage pools
* [hpe\_nimble\_protection\_schedule](hpe_nimble_protection_schedule_module#ansible-collections-hpe-nimble-hpe-nimble-protection-schedule-module) β Manage the HPE Nimble Storage protection schedules
* [hpe\_nimble\_protection\_template](hpe_nimble_protection_template_module#ansible-collections-hpe-nimble-hpe-nimble-protection-template-module) β Manage the HPE Nimble Storage protection templates
* [hpe\_nimble\_shelf](hpe_nimble_shelf_module#ansible-collections-hpe-nimble-hpe-nimble-shelf-module) β Manage the HPE Nimble Storage shelves
* [hpe\_nimble\_snapshot](hpe_nimble_snapshot_module#ansible-collections-hpe-nimble-hpe-nimble-snapshot-module) β Manage the HPE Nimble Storage snapshots
* [hpe\_nimble\_snapshot\_collection](hpe_nimble_snapshot_collection_module#ansible-collections-hpe-nimble-hpe-nimble-snapshot-collection-module) β Manage the HPE Nimble Storage snapshot collections
* [hpe\_nimble\_user](hpe_nimble_user_module#ansible-collections-hpe-nimble-hpe-nimble-user-module) β Manage the HPE Nimble Storage users
* [hpe\_nimble\_user\_policy](hpe_nimble_user_policy_module#ansible-collections-hpe-nimble-hpe-nimble-user-policy-module) β Manage the HPE Nimble Storage user policies
* [hpe\_nimble\_volume](hpe_nimble_volume_module#ansible-collections-hpe-nimble-hpe-nimble-volume-module) β Manage the HPE Nimble Storage volumes
* [hpe\_nimble\_volume\_collection](hpe_nimble_volume_collection_module#ansible-collections-hpe-nimble-hpe-nimble-volume-collection-module) β Manage the HPE Nimble Storage volume collections
See also
List of [collections](../../index#list-of-collections) with docs hosted here.
ansible hpe.nimble.hpe_nimble_pool β Manage the HPE Nimble Storage pools hpe.nimble.hpe\_nimble\_pool β Manage the HPE Nimble Storage pools
==================================================================
Note
This plugin is part of the [hpe.nimble collection](https://galaxy.ansible.com/hpe/nimble) (version 1.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install hpe.nimble`.
To use it in a playbook, specify: `hpe.nimble.hpe_nimble_pool`.
New in version 1.0.0: of hpe.nimble
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage the storage pools on an HPE Nimble Storage group.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Ansible 2.9 or later
* Python 3.6 or later
* HPE Nimble Storage SDK for Python
* HPE Nimble Storage arrays running NimbleOS 5.0 or later
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **array\_list** list / elements=dictionary | | List of arrays in the pool with detailed information. To create or update array list, only array ID is required. |
| **change\_name** string | | Change name of the existing pool. |
| **dedupe\_all\_volumes** boolean | **Choices:*** no
* yes
| Indicates if dedupe is enabled by default for new volumes on this pool. |
| **description** string | | Text description of pool. |
| **force** boolean | **Choices:*** no
* yes
| Forcibly delete the specified pool even if it contains deleted volumes whose space is being reclaimed. Forcibly remove an array from array\_list via an update operation even if the array is not reachable. There should no volumes in the pool for the force update operation to succeed. |
| **host** string / required | | HPE Nimble Storage IP address. |
| **is\_default** boolean | **Choices:*** no
* yes
| Indicates if this is the default pool. |
| **merge** boolean | **Choices:*** no
* yes
| Merge the specified pool into the target pool. All volumes on the specified pool are moved to the target pool and the specified pool is then deleted. All the arrays in the pool are assigned to the target pool. |
| **name** string / required | | Name of the pool. |
| **password** string / required | | HPE Nimble Storage password. |
| **state** string / required | **Choices:*** present
* absent
* create
| The pool operation. |
| **target** string | | Name of the target pool. |
| **username** string / required | | HPE Nimble Storage user name. |
Notes
-----
Note
* This module does not support `check_mode`.
Examples
--------
```
# if state is create , then create a pool if not present. Fails if already present.
# if state is present, then create a pool if not present. Succeed if it already exists.
- name: Create pool if not present
hpe.nimble.hpe_nimble_pool:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
state: "{{ state | default('present') }}"
name: "{{ name }}"
array_list: "{{ array_list }} "
description: "{{ description }}"
- name: Delete pool
hpe.nimble.hpe_nimble_pool:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
name: "{{ name }}"
state: absent
```
### Authors
* HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#dbb5b2b6b9b7bef6bfb8a8f6a8afb4a9babcbef6baaeafb4b6baafb2b4b5f6beb5bcfdf8e8ece0fdf8eee9e0fdf8efe3e0b3abbefdf8efede0b8b4b6)>
ansible hpe.nimble.hpe_nimble_snapshot_collection β Manage the HPE Nimble Storage snapshot collections hpe.nimble.hpe\_nimble\_snapshot\_collection β Manage the HPE Nimble Storage snapshot collections
=================================================================================================
Note
This plugin is part of the [hpe.nimble collection](https://galaxy.ansible.com/hpe/nimble) (version 1.1.3).
You might already have this collection installed if you are using the `ansible` package. It is not included in `ansible-core`. To check whether it is installed, run `ansible-galaxy collection list`.
To install it, use: `ansible-galaxy collection install hpe.nimble`.
To use it in a playbook, specify: `hpe.nimble.hpe_nimble_snapshot_collection`.
New in version 1.0.0: of hpe.nimble
* [Synopsis](#synopsis)
* [Requirements](#requirements)
* [Parameters](#parameters)
* [Notes](#notes)
* [Examples](#examples)
Synopsis
--------
* Manage the snapshot collections on an HPE Nimble Storage group.
Requirements
------------
The below requirements are needed on the host that executes this module.
* Ansible 2.9 or later
* Python 3.6 or later
* HPE Nimble Storage SDK for Python
* HPE Nimble Storage arrays running NimbleOS 5.0 or later
Parameters
----------
| Parameter | Choices/Defaults | Comments |
| --- | --- | --- |
| **agent\_type** string | | External management agent type for snapshots being created as part of snapshot collection. |
| **allow\_writes** boolean | **Choices:*** no
* yes
| Allow applications to write to created snapshot(s). Mandatory and must be set to 'true' for VSS application synchronized snapshots. |
| **change\_name** string | | Change name of the existing snapshot collection. |
| **description** string | | Text description of snapshot collection. |
| **disable\_appsync** boolean | **Choices:*** no
* yes
| Do not perform application synchronization for this snapshot. Create a crash-consistent snapshot instead. |
| **expiry\_after** integer | | Number of seconds after which this snapcoll is considered expired by the snapshot TTL. A value of 0 indicates that the snapshot never expires, 1 indicates that the snapshot uses a group-level configured TTL value and any other value indicates the number of seconds. |
| **force** boolean | **Choices:*** no
* yes
| Forcibly delete the specified snapshot collection even if it is the last replicated snapshot. Doing so could lead to full re-seeding at the next replication. |
| **host** string / required | | HPE Nimble Storage IP address. |
| **invoke\_on\_upstream\_partner** boolean | **Choices:*** no
* yes
| Invoke snapshot request on upstream partner. This operation is not supported for synchronous replication volume collections. |
| **is\_external\_trigger** boolean | **Choices:*** no
* yes
| Is externally triggered. |
| **metadata** dictionary | | Key-value pairs that augment a snapshot collection attributes. List of key-value pairs. Keys must be unique and non-empty. |
| **name** string / required | | Name of the snapshot collection. |
| **password** string / required | | HPE Nimble Storage password. |
| **replicate\_to** string | | Specifies the partner name that the snapshots in this snapshot collection are replicated to. |
| **skip\_db\_consistency\_check** boolean | **Choices:*** no
* yes
| Skip consistency check for database files on this snapshot. This option only applies to volume collections with application synchronization set to VSS, application ID set to MS Exchange 2010 or later with Database Availability Group (DAG), snap\_verify option set to true, and disable\_appsync option set to false. |
| **snap\_verify** boolean | **Choices:*** no
* yes
| Run verification tool on this snapshot. This option can only be used with a volume collection that has application synchronization. |
| **start\_online** boolean | **Choices:*** no
* yes
| Start with snapshot set online. |
| **state** string / required | **Choices:*** present
* absent
* create
| The snapshot collection operation. |
| **username** string / required | | HPE Nimble Storage user name. |
| **vol\_snap\_attr\_list** list / elements=dictionary | | List of snapshot attributes for snapshots being created as part of snapshot collection creation. List of volumes with per snapshot attributes. |
| **volcoll** string / required | | Parent volume collection name. |
Notes
-----
Note
* This module does not support `check_mode`.
Examples
--------
```
# if state is create , then create a snapshot collection if not present. Fails if already present.
# if state is present, then create a snapshot collection if not present. Succeeds if it already exists
- name: Create snapshot collection if not present
hpe.nimble.hpe_nimble_snapshot_collection:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
state: "{{ state | default('present') }}"
name: "{{ name | mandatory}}"
volcoll: "{{ volcoll | mandatory}}"
description: "{{ description }}"
- name: Delete snapshot collection (must be offline)
hpe.nimble.hpe_nimble_snapshot_collection:
host: "{{ host }}"
username: "{{ username }}"
password: "{{ password }}"
name: "{{ name }}"
volcoll: "{{ volcoll }}"
state: absent
```
### Authors
* HPE Nimble Storage Ansible Team (@ar-india) <[[email protected]](https://docs.ansible.com/cdn-cgi/l/email-protection#a7c9cecac5cbc28ac3c4d48ad4d3c8d5c6c0c28ac6d2d3c8cac6d3cec8c98ac2c9c0818494909c818492959c8184939f9ccfd7c2818493919cc4c8ca)>
| programming_docs |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.