drone-scp icon indicating copy to clipboard operation
drone-scp copied to clipboard

Support multiple hosts with different passwords ?

Open medivh-jay opened this issue 5 years ago • 2 comments

Hello , Thanks for your scp tool , It saved me a lot of work!

judging from the plug-in documentation, this plugin support multiple hosts, but it seems that all hosts must have the same SSH password, can it support each host to use a different password?

Thanks!

medivh-jay avatar Sep 21 '20 02:09 medivh-jay

UP , I need same features, Thanks.

imkratos avatar Jul 27 '21 10:07 imkratos

Why not just add duplicate steps for hosts with different passwords? Templating could be helpful there:

steps:
...
- name: Settings template
  image: appleboy/drone-scp
  settings: &scp_settings
    source: ./
    target: /tmp/target
  when:
    event:
      - template # Making sure here, the step never executes

- name: Deploy 1
  image: appleboy/drone-scp
  settings:
    <<: *scp_settings
    host:
      - 127.0.0.1
    user: admin
    password:
      from_secret: PASSWORD_1

- name: Deploy 2
  image: appleboy/drone-scp
  settings:
    <<: *scp_settings
    host:
      - 127.0.0.2
    user: admin
    password:
      from_secret: PASSWORD_2

Wolf2789 avatar Sep 29 '21 09:09 Wolf2789

as @Wolf2789 mention. Please try it out.

appleboy avatar Apr 16 '23 03:04 appleboy