community.network.icx_copy 模块 – 从远程 Ruckus ICX 7000 系列交换机传输文件

注意

此模块是 community.network 集合(版本 5.1.0)的一部分。

如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install community.network

要在 playbook 中使用它,请指定:community.network.icx_copy

注意

community.network 集合已被弃用,并将从 Ansible 12 中删除。有关更多信息,请参阅讨论线程

已弃用

删除于:

版本 6.0.0

原因:

此集合及其中的所有内容均未维护且已弃用。

替代方案:

未知。

概要

  • 此模块将文件从运行 ICX 的远程设备传输到本地或从本地传输到远程设备。

别名:network.icx.icx_copy

参数

参数

注释

download

字符串

要下载的资源的名称。与 upload 互斥。

选择

  • "running-config"

  • "startup-config"

  • "flash_primary"

  • "flash_secondary"

  • "bootrom"

  • "fips-primary-sig"

  • "fips-secondary-sig"

  • "fips-bootrom-sig"

protocol

字符串 / 必需

要使用的数据传输协议

选择

  • "scp"

  • "https"

public_key

字符串

用于登录 scp 服务器的公钥类型

选择

  • "rsa"

  • "dsa"

remote_filename

字符串 / 必需

要上传或下载的远程文件/资源的名称或路径。

remote_pass

字符串

用于 scp 登录的远程密码。

remote_port

字符串

远程主机的端口号。将根据协议类型选择默认值。默认 scp:22,http:443

remote_server

字符串 / 必需

远程服务器的 IP 地址

remote_user

字符串

用于 scp 登录的远程用户名。

upload

字符串

要上传的资源的名称。与 download 互斥。

选择

  • "running-config"

  • "startup-config"

  • "flash_primary"

  • "flash_secondary"

注释

注意

示例

- name: Upload running-config to the remote scp server
  community.network.icx_copy:
    upload: running-config
    protocol: scp
    remote_server: 172.16.10.49
    remote_filename: running.conf
    remote_user: user1
    remote_pass: pass123

- name: Download running-config from the remote scp server
  community.network.icx_copy:
    download: running-config
    protocol: scp
    remote_server: 172.16.10.49
    remote_filename: running.conf
    remote_user: user1
    remote_pass: pass123

- name: Download running-config from the remote scp server using rsa public key
  community.network.icx_copy:
    download: running-config
    protocol: scp
    remote_server: 172.16.10.49
    remote_filename: running.conf
    remote_user: user1
    remote_pass: pass123
    public_key: rsa

- name: Upload startup-config to the remote https server
  community.network.icx_copy:
    upload: startup-config
    protocol: https
    remote_server: 172.16.10.49
    remote_filename: config/running.conf
    remote_user: user1
    remote_pass: pass123

- name: Upload startup-config to the remote https server
  community.network.icx_copy:
    upload: startup-config
    protocol: https
    remote_server: 172.16.10.49
    remote_filename: config/running.conf
    remote_user: user1
    remote_pass: pass123

- name: Download OS image into the flash from remote scp ipv6 server
  community.network.icx_copy:
    download: startup-config
    protocol: scp
    remote_server: ipv6 FE80:CD00:0000:0CDE:1257:0000:211E:729C
    remote_filename: img.bin
    remote_user: user1
    remote_pass: pass123

- name: Download OS image into the secondary flash from remote scp ipv6 server
  community.network.icx_copy:
    Download: flash_secondary
    protocol: scp
    remote_server: ipv6 FE80:CD00:0000:0CDE:1257:0000:211E:729C
    remote_filename: img.bin
    remote_user: user1
    remote_pass: pass123

- name: Download OS image into the secondary flash from remote scp ipv6 server on port 5000
  community.network.icx_copy:
    Download: flash_secondary
    protocol: scp
    remote_server: ipv6 FE80:CD00:0000:0CDE:1257:0000:211E:729C
    remote_port: 5000
    remote_filename: img.bin
    remote_user: user1
    remote_pass: pass123

- name: Download OS image into the primary flash from remote https ipv6 server
  community.network.icx_copy:
    Download: flash_primary
    protocol: https
    remote_server: ipv6 FE80:CD00:0000:0CDE:1257:0000:211E:729C
    remote_filename: images/img.bin
    remote_user: user1
    remote_pass: pass123

- name: Download OS image into the primary flash from remote https ipv6 server on port 8080
  community.network.icx_copy:
    Download: flash_primary
    protocol: https
    remote_server: ipv6 FE80:CD00:0000:0CDE:1257:0000:211E:729C
    remote_port: 8080
    remote_filename: images/img.bin
    remote_user: user1
    remote_pass: pass123

返回值

常见的返回值记录在此处,以下是此模块特有的字段

描述

changed

布尔值

当下载任何配置或 flash 时为 true。否则为 false。

返回: 始终

状态

  • 此模块将在版本 6.0.0 中删除。[已弃用]

  • 有关更多信息,请参阅已弃用

作者

  • Ruckus Wireless (@Commscope)