hdcary.demo.remote_copy (1.0.0) — module

Copy a file on the remote host

| "added in version" future of hdcary.demo"

Authors: Jesse Keating

Install collection

Install with ansible-galaxy collection install hdcary.demo:==1.0.0


Add to requirements.yml

  collections:
    - name: hdcary.demo
      version: 1.0.0

Description

The remote_copy module copies a file on the remote host from a given source to a provided destination.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
 
# Example from Ansible Playbooks 
- name: backup a config file 
  remote_copy: 
    source: /etc/herp/derp.conf 
    dest: /root/herp-derp.conf.bak 

Inputs

    
dest:
    description:
    - Path to the destination on the remote host for the copy
    required: true

source:
    description:
    - Path to a file on the source file on the remote host
    required: true

Outputs

dest:
  description: destination of the copy
  returned: success
  sample: /path/to/destination.file
  type: string
gid:
  description: group ID of destination target
  returned: success
  sample: 502
  type: int
group:
  description: group name of destination target
  returned: success
  sample: users
  type: string
mode:
  description: permissions of the destination target
  returned: success
  sample: 420
  type: int
owner:
  description: owner name of destination target
  returned: success
  sample: fred
  type: string
size:
  description: size of destination target
  returned: success
  sample: 20
  type: int
source:
  description: source file used for the copy
  returned: success
  sample: /path/to/file.name
  type: string
state:
  description: state of destination target
  returned: success
  sample: file
  type: string
uid:
  description: owner ID of destination target
  returned: success
  sample: 502
  type: int