Make linux.scp action backward compatibile.
Now it works either with dest_server parameter (deprecated) or only with
destination parameter (new and preferred approach).
type: 'string'
description: 'Destination of files/directories. This can be either a local path (example: "/path/to/file") or remote path (example: "server.fqdn:/path/to/file"). Paths can also be relative (examples: "folder/a.txt" or "server.fqdn:folder/a.txt") or absolute (Examples: "/etc/hosts" or "server.fqdn:/etc/hosts").'
required: true
+ dest_server:
+ type: 'string'
+ description: 'Destination of files/directories. Deprecated in favor of "destination" parameter. Only here for backward compatibility reasons.'
+ required: false
recursive:
type: 'boolean'
description: 'Boolean flag for recursive copy'
default: '/home/stanley/.ssh/stanley_rsa'
cmd:
immutable: true
- default: 'scp {{args}} -i {{keyfile}} {{source}} {{destination}}'
+ default: 'scp {{args}} -i {{keyfile}} {{source}} {% if dest_server %}{{dest_server}}:{{destination}}{% else %}{{destination}}{% endif %}'
args:
description: 'Command line arguments passed to cp'
default: '-o stricthostkeychecking=no -v{% if recursive == true %} -r{% endif %}{% if force == true %} -f{% endif %}'
