Skip to content

Latest commit

 

History

History
69 lines (60 loc) · 1.88 KB

README.md

File metadata and controls

69 lines (60 loc) · 1.88 KB

nxos_file_xfer

Build Status

This is a role for transferring (large or small) files to NXOS devices. The role will copy the file to a switch. If desired, the switch can then be used as an SCP server by using the "switch_scp_server" option. Then all additional switches in the play will use that switch as the file server in order to speed up the transfer process at remote sites. If "switch_scp_server" is not set to true, files will be sent directly to all switches without using a switch as a local file server.

Requirements

Role Variables

---
log_file_dir: "{{ playbook_dir }}/logs/"
enable_logging: True
transport: scp
ftp_timeout: 600
firmware_destination: "bootflash:"
switch_vrf: management
firmware_force: false
switch_scp_server: false

Example Playbook

---
- hosts: nxos
  connection: local
  gather_facts: yes
  
  roles:
    - nxos_file_xfer

  vars:
    files:
      - firmware_file.bin
      - epld_file.bin
      - config_file.cfg
    firmware_remote_server_path: /scp
    firmware_remote_server: 10.0.0.1
    switch_scp_server: False
    firmware_force: False
    transport: scp

  vars_prompt:
    - name: switch_username
      prompt: "What is the switch username?"
      private: False
    - name: switch_password
      prompt: "What is the switch password?"
    - name: firmware_remote_user
      prompt: "What is the firmware file server username?"
      private: False
    - name: firmware_remote_password
      prompt: "What is the firmware file server password?"

License

BSD