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

布尔值

下载任何配置或闪存时为 true,否则为 false。

返回:始终

状态

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

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

作者

  • Ruckus Wireless (@Commscope)