ansible / ansible.netcommon / 3.1.3 / connection / grpc Provides a persistent connection using the gRPC protocol | "added in version" 3.1.0 of ansible.netcommon" Authors: Ansible Networking Team (@ansible-network)ansible.netcommon.grpc (3.1.3) — connection
Install with ansible-galaxy collection install ansible.netcommon:==3.1.3
collections: - name: ansible.netcommon version: 3.1.3
This connection plugin provides a connection to remote devices over gRPC and is typically used with devices for sending and receiving RPC calls over gRPC framework.
Note this connection plugin requires the grpcio python library to be installed on the local Ansible controller.
host: default: inventory_hostname description: - Specifies the remote device FQDN or IP address to establish the gRPC connection to. vars: - name: ansible_host port: description: - Specifies the port on the remote device that listens for connections when establishing the gRPC connection. If None only the C(host) part will be used. env: - name: ANSIBLE_REMOTE_PORT ini: - key: remote_port section: defaults type: int vars: - name: ansible_port password: description: - Configures the user password used to authenticate to the remote device when first establishing the gRPC connection. vars: - name: ansible_password - name: ansible_ssh_pass grpc_type: default: false description: - This option indicates the grpc type and it can be used in place of network_os. (example cisco.iosxr.iosxr) env: - name: ANSIBLE_GRPC_CONNECTION_TYPE ini: - key: type section: grpc_connection vars: - name: ansible_grpc_connection_type network_os: description: - Configures the device platform network operating system. This value is used to load a device specific grpc plugin to communicate with the remote device. vars: - name: ansible_network_os remote_user: description: - The username used to authenticate to the remote device when the gRPC connection is first established. If the remote_user is not specified, the connection will use the username of the logged in user. - Can be configured from the CLI via the C(--user) or C(-u) options. env: - name: ANSIBLE_REMOTE_USER ini: - key: remote_user section: defaults vars: - name: ansible_user import_modules: default: true description: - Reduce CPU usage and network module execution time by enabling direct execution. Instead of the module being packaged and executed by the shell, it will be directly executed by the Ansible control node using the same python interpreter as the Ansible process. Note- Incompatible with C(asynchronous mode). Note- Python 3 and Ansible 2.9.16 or greater required. Note- With Ansible 2.9.x fully qualified modules names are required in tasks. env: - name: ANSIBLE_NETWORK_IMPORT_MODULES ini: - key: import_modules section: ansible_network type: boolean vars: - name: ansible_network_import_modules private_key_file: description: - The PEM encoded private key file used to authenticate to the remote device when first establishing the grpc connection. env: - name: ANSIBLE_PRIVATE_KEY_FILE ini: - key: private_key_file section: grpc_connection vars: - name: ansible_private_key_file certificate_chain_file: description: - The PEM encoded certificate chain file used to create a SSL-enabled channel. If the value is None, no certificate chain is used. env: - name: ANSIBLE_CERTIFICATE_CHAIN_FILE ini: - key: certificate_chain_file section: grpc_connection vars: - name: ansible_certificate_chain_file root_certificates_file: description: - The PEM encoded root certificate file used to create a SSL-enabled channel, if the value is None it reads the root certificates from a default location chosen by gRPC at runtime. env: - name: ANSIBLE_ROOT_CERTIFICATES_FILE ini: - key: root_certificates_file section: grpc_connection vars: - name: ansible_root_certificates_file persistent_log_messages: default: false description: - This flag will enable logging the command executed and response received from target device in the ansible log file. For this option to work 'log_path' ansible configuration option is required to be set to a file path with write access. - Be sure to fully understand the security implications of enabling this option as it could create a security vulnerability by logging sensitive information in log file. env: - name: ANSIBLE_PERSISTENT_LOG_MESSAGES ini: - key: log_messages section: persistent_connection type: boolean vars: - name: ansible_persistent_log_messages ssl_target_name_override: description: - The option overrides SSL target name used for SSL host name checking. The name used for SSL host name checking will be the target parameter (assuming that the secure channel is an SSL channel). If this parameter is specified and the underlying is not an SSL channel, it will just be ignored. env: - name: ANSIBLE_GPRC_SSL_TARGET_NAME_OVERRIDE ini: - key: ssl_target_name_override section: grpc_connection vars: - name: ansible_grpc_ssl_target_name_override persistent_command_timeout: default: 30 description: - Configures, in seconds, the amount of time to wait for a command to return from the remote device. If this timer is exceeded before the command returns, the connection plugin will raise an exception and close. env: - name: ANSIBLE_PERSISTENT_COMMAND_TIMEOUT ini: - key: command_timeout section: persistent_connection type: int vars: - name: ansible_command_timeout persistent_connect_timeout: default: 30 description: - Configures, in seconds, the amount of time to wait when trying to initially establish a persistent connection. If this value expires before the connection to the remote device is completed, the connection will fail. env: - name: ANSIBLE_PERSISTENT_CONNECT_TIMEOUT ini: - key: connect_timeout section: persistent_connection type: int vars: - name: ansible_connect_timeout