Created
January 15, 2018 23:05
-
-
Save nshores/b2ed0a63cd536b142550cb22f2090dc4 to your computer and use it in GitHub Desktop.
Ansible SCP Copy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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