Skip to content

Instantly share code, notes, and snippets.

@nshores
Created January 15, 2018 23:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nshores/b2ed0a63cd536b142550cb22f2090dc4 to your computer and use it in GitHub Desktop.
Save nshores/b2ed0a63cd536b142550cb22f2090dc4 to your computer and use it in GitHub Desktop.
Ansible SCP Copy
---
- name: Copy file over SCP
hosts: SCLH
gather_facts: no
connection: local
#SSHPass is required on the local host running this playbook to pass a SSH passoword.
tasks:
- name: Copy firmware using local scp
local_action: command sshpass -p "{{ ansible_ssh_pass }}" scp -o StrictHostKeyChecking=no /Users/nshores/Downloads/jinstall-ex-2200-15.1R6.7-domestic-signed.tgz {{ switch_user }}@{{ inventory_hostname }}:/var/tmp/jinstall-ex-2200-15.1R6.7-domestic-signed.tgz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment