You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/18 22:16:40 UTC

[GitHub] [airflow] bdsoha commented on a diff in pull request #26824: Added environment to templated SSHOperator fields

bdsoha commented on code in PR #26824:
URL: https://github.com/apache/airflow/pull/26824#discussion_r986706754


##########
airflow/providers/ssh/operators/ssh.py:
##########
@@ -61,9 +61,12 @@ class SSHOperator(BaseOperator):
     :param banner_timeout: timeout to wait for banner from the server in seconds
     """
 
-    template_fields: Sequence[str] = ('command', 'remote_host')
+    template_fields: Sequence[str] = ('command', 'environment', 'remote_host')
     template_ext: Sequence[str] = ('.sh',)
-    template_fields_renderers = {"command": "bash"}
+    template_fields_renderers = {
+        "command": "bash",
+        "environment": "json",

Review Comment:
   @uranusjr The values are later converted into strings *(as all environment variables)*.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org