kestra-io / plugin-fs

https://kestra.io/plugins/plugin-fs/
Apache License 2.0
5 stars 7 forks source link

Set ENV variables for the `ssh` command #114

Closed johnsturgeon closed 5 months ago

johnsturgeon commented 5 months ago

Feature description

I would like to initialize the ssh shell with environment variables https://kestra.io/plugins/plugin-fs/tasks/ssh/io.kestra.plugin.fs.ssh.command

environment:
  - B2_ACCOUNT_ID: 0050d2528eaa6af0000000001
  - B2_ACCOUNT_KEY: 7005f3QteNYV4zrj8YaAJHThwJnb9JM
  - RESTIC_PASSWORD: 6RQ2P@txq79aa
  - RESTIC_REPOSITORY: b2:JHS-BucketName:/subfolder

for example the complete task would be:

id: "command"
type: "io.kestra.plugin.fs.ssh.Command"
host: localhost
port: 22
username: foo
password: pass
environment:
  - B2_ACCOUNT_ID: 0050d2528eaa6af0000000001
  - B2_ACCOUNT_KEY: 7005f3QteNYV4zrj8YaAJHThwJnb9JM
  - RESTIC_PASSWORD: 6RQ2P@txq79aa
  - RESTIC_REPOSITORY: b2:JHS-BucketName:/subfolder
 commands:
  - restic backup /Users/auser/important_docs
loicmathieu commented 5 months ago

Done in https://github.com/kestra-io/plugin-fs/pull/117