Sha256: 93a3f1a3ced1bd16e59f1f8ec1373d2c4b4e9619be98bf82c5ef5cf7f3e403f8

Contents?: true

Size: 1.69 KB

Versions: 47

Compression:

Stored size: 1.69 KB

Contents

# Action plugin: `scp`

The `scp` action plugin transfers a local file to a remote node (using a [connector](../connector)).
It takes a `Hash` as argument, as a set of source => destination_dir to copy files or directories from the local file system to the remote file system.
The hash can also contain the following properties:
* **sudo** (`Boolean`): Do we use sudo on the remote to make the copy? [default: false]
* **owner** (`String` or `nil`): Owner to use for files, or nil to use current one [default: nil]
* **group** (`String` or `nil`): Group to use for files, or nil to use current one [default: nil]

Example:
```ruby
require 'hybrid_platforms_conductor/executable'

actions_executor = HybridPlatformsConductor::Executable.new.actions_executor

# Copy 1 file
actions_executor.execute_actions('my_node' => { scp: { '/path/to/file' => '/path/to/remote_dir' } })

# Copy several files
actions_executor.execute_actions('my_node' => { scp: {
  '/path/to/file1' => '/path/to/remote_dir1',
  '/path/to/file2' => '/path/to/remote_dir1',
  '/path/to/file1' => '/path/to/remote_dir2',
} })

# Copy a file using sudo on my_node
actions_executor.execute_actions('my_node' => { scp: {
  '/path/to/file' => '/path/to/remote_dir',
  sudo: true
} })

# Copy a file and set it as a specific owner and group on my_node
actions_executor.execute_actions('my_node' => { scp: {
  '/path/to/file' => '/path/to/remote_dir',
  owner: 'remote_user',
  group: 'remote_group'
} })
```

## Config DSL extension

None

## Used credentials

| Credential | Usage
| --- | --- |

## Used Metadata

| Metadata | Type | Usage
| --- | --- | --- |

## Used environment variables

| Variable | Usage
| --- | --- |

## External tools dependencies

None

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
hybrid_platforms_conductor-33.9.5 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.9.4 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.9.2 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.9.1 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.9.0 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.8.4 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.8.3 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.8.2 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.8.1 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.8.0 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.7.4 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.7.3 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.7.2 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.7.1 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.7.0 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.6.0 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.5.1 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.5.0 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.4.0 docs/plugins/action/scp.md
hybrid_platforms_conductor-33.3.0 docs/plugins/action/scp.md