netapp / netapp.storagegrid / 21.12.0 / module / na_sg_grid_gateway Manage Load balancer (gateway) endpoints on StorageGRID. | "added in version" 21.7.0 of netapp.storagegrid" Authors: NetApp Ansible Team (@jkandati) <ng-sg-ansibleteam@netapp.com>netapp.storagegrid.na_sg_grid_gateway (21.12.0) — module
Install with ansible-galaxy collection install netapp.storagegrid:==21.12.0
collections: - name: netapp.storagegrid version: 21.12.0
Create or Update Load Balancer Endpoints on StorageGRID.
This module is idempotent if I(private_key) is not specified.
The module will match an existing config based on I(port) and I(display_name).
If multiple load balancer endpoints exist utilizing the same port and display name, use I(gateway_id) to select the intended endpoint.
- name: Create and Upload Certificate to a Gateway Endpoint with global binding netapp.storagegrid.na_sg_grid_gateway: api_url: "https://<storagegrid-endpoint-url>" auth_token: "storagegrid-auth-token" displayName: "FabricPool Endpoint" port: 10443 secure: True enable_ipv4: True enable_ipv6: True default_service_type: "s3" server_certificate: | -----BEGIN CERTIFICATE----- MIIC6DCCAdACCQC7l4WukhKD0zANBgkqhkiG9w0BAQsFADA2..swCQYDVQQGEwJB BAMMHnNnYW4wMS5kZXYubWljcm9icmV3Lm5ldGFwcC5hdTCC..IwDQYJKoZIhvcN AQEBBQADggEPADCCAQoCggEBAMvjm9I35lmKcC7ITVL8+QiZ..lvdkbfZCUQrfdy 71inP+XmPjs0rnkhICA9ItODteRcVlO+t7nDTfm7HgG0mJFk..m0ffyEYrcx24qu S7gXYQjRsJmrep1awoaCa20BMGuqK2WKI3IvZ7YiT22qkBqK..+hIFffX6u3Jy+B 77pR6YcATtpMHW/AaOx+OX9l80dIRsRZKMDxYQ== -----END CERTIFICATE----- private_key: | -----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIB..DL45vSN+ZZinAu L25W0+cz1Oi69AKkI7d9nbFics2ay5+7o+4rKqf3en2R4MSx..vy+iDlOmATib5O x8TN5pJ9AgMBAAECggEADDLM8tHXXUoUFihzv+BUwff8p8Yc..cXFcSes+xTd5li po8lNsx/v2pQx4ByBkuaYLZGIEXOWS6gkp44xhIXgQKBgQD4..7862u5HLbmhrV3 vs8nC69b3QKBgQDacCD8d8JpwPbg8t2VjXM3UvdmgAaLUfU7..DWV+W3jqzmDOoN zWVgPbPNj0UmzvLDbgxLoxe77wjn2BHsAJVAfJ9VeQKBgGqF..gYO+wHR8lJUoa5 ZEe8Upy2oBtvND/0dnwO2ym2FGsBJN0Gr4NKdG5vkzLsthKk..Rm0ikwEUOUZQKE K8J5yEVeo9K2v3wggtq8fYn6 -----END PRIVATE KEY----- validate_certs: false
- name: Create a HTTP Gateway Endpoint with HA Group Binding netapp.storagegrid.na_sg_grid_gateway: api_url: "https://<storagegrid-endpoint-url>" auth_token: "storagegrid-auth-token" displayName: "App Endpoint 1" port: 10501 secure: false enable_ipv4: True enable_ipv6: True default_service_type: "s3" binding_mode: ha-groups ha_groups: site1_ha_group validate_certs: false
- name: Create a HTTP Gateway Endpoint with Node Interface Binding netapp.storagegrid.na_sg_grid_gateway: api_url: "https://<storagegrid-endpoint-url>" auth_token: "storagegrid-auth-token" displayName: "App Endpoint 2" port: 10502 secure: false enable_ipv4: True enable_ipv6: True default_service_type: "s3" binding_mode: node-interfaces node_interfaecs: - node: SITE1_ADM1 interface: eth2 - node: SITE2_ADM1 interface: eth2 validate_certs: false
- name: Delete Gateway Endpoint netapp.storagegrid.na_sg_grid_gateway: api_url: "https://<storagegrid-endpoint-url>" auth_token: "storagegrid-auth-token" displayName: "App Endpoint 2" port: 10502 default_service_type: "s3" validate_certs: false
port: description: - The TCP port to serve traffic on. - This parameter cannot be modified after the load balancer endpoint has been created. required: true type: int state: choices: - present - absent default: present description: - Whether the specified load balancer endpoint should be configured. type: str secure: default: true description: - Whether the load balancer endpoint serves HTTP or HTTPS traffic. - This parameter cannot be modified after the load balancer endpoint has been created. type: bool api_url: description: - The url to the StorageGRID Admin Node REST API. required: true type: str ca_bundle: description: - Intermediate CA certificate bundle in concatenated PEM-encoding. - Omit when there is no intermediate CA. required: false type: str ha_groups: description: - A set of StorageGRID HA Groups by name or UUID to bind the load balancer endpoint to. - Option is ignored unless I(binding_mode=ha-groups). elements: str type: list version_added: 21.9.0 version_added_collection: netapp.storagegrid auth_token: description: - The authorization token for the API request required: true type: str gateway_id: description: - ID of the load balancer endpoint. type: str version_added: 21.9.0 version_added_collection: netapp.storagegrid enable_ipv4: default: true description: - Indicates whether to listen for connections on IPv4. type: bool enable_ipv6: default: true description: - Indicates whether to listen for connections on IPv6. type: bool private_key: description: - Certficate private key in PEM-encoding. - Required if I(server_certificate) is not empty. required: false type: str binding_mode: choices: - global - ha-groups - node-interfaces default: global description: - Binding mode to restrict accessibility of the load balancer endpoint. - A binding mode other than I(global) requires StorageGRID 11.5 or greater. type: str version_added: 21.9.0 version_added_collection: netapp.storagegrid display_name: description: - A display name for the configuration. - This parameter can be modified if I(gateway_id) is also specified. type: str validate_certs: default: true description: - Should https certificates be validated? required: false type: bool node_interfaces: description: - A set of StorageGRID node interfaces to bind the load balancer endpoint to. elements: dict suboptions: interface: description: - The interface to bind to. eth0 corresponds to the Grid Network, eth1 to the Admin Network, and eth2 to the Client Network. type: str node: description: - Name of the StorageGRID node. type: str type: list version_added: 21.9.0 version_added_collection: netapp.storagegrid server_certificate: description: - X.509 server certificate in PEM-encoding. - Omit if using default certificates. required: false type: str default_service_type: choices: - s3 - swift default: s3 description: - The type of service to proxy through the load balancer. type: str
resp: description: Returns information about the StorageGRID Load Balancer Endpoint. returned: success sample: accountId: '0' certSource: plaintext defaultServiceType: s3 displayName: ansibletest-secure enableIPv4: true enableIPv6: true id: ffffffff-ffff-ffff-ffff-ffffffffffff plaintextCertData: caBundleEncoded: '-----BEGIN CERTIFICATE-----MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELM...-----END CERTIFICATE-----' metadata: '...': null serverCertificateEncoded: '-----BEGIN CERTIFICATE-----MIIC6DCCAdACCQC7l4WukhKD0zANBgkqhkiG9w0BAQsFADA2MQswCQYDVQQGE...-----END CERTIFICATE-----' port: 10443 secure: true type: dict