• 博客
  • Ansible 社区论坛
  • 文档
Ansible Logo
Ansible 社区文档
Ansible

Ansible 入门

  • Ansible 入门
  • Execution Environments 入门

安装、升级和配置

  • 安装指南
  • Ansible 移植指南

使用 Ansible

  • 构建 Ansible 清单
  • 使用 Ansible 命令行工具
  • 使用 Ansible Playbook
  • 使用 Ansible Vault 保护敏感数据
  • 使用 Ansible 模块和插件
  • 使用 Ansible 集合
  • 在 Windows 和 BSD 上使用 Ansible
  • Ansible 技巧和窍门

为 Ansible 做贡献

  • Ansible 社区指南
  • Ansible 集合贡献者指南
  • ansible-core 贡献者指南
  • 高级贡献者指南
  • Ansible 文档风格指南

扩展 Ansible

  • 开发者指南

常见的 Ansible 场景

  • 旧版公有云指南

网络自动化

  • 网络入门
  • 网络高级主题
  • 网络开发者指南

Ansible Galaxy

  • Galaxy 用户指南
  • Galaxy 开发者指南

参考 & 附录

  • 集合索引
    • Amazon 命名空间中的集合
    • Ansible 命名空间中的集合
    • Arista 命名空间中的集合
    • Awx 命名空间中的集合
    • Azure 命名空间中的集合
    • Check_point 命名空间中的集合
    • Chocolatey 命名空间中的集合
    • Cisco 命名空间中的集合
    • Cloud 命名空间中的集合
    • Cloudscale_ch 命名空间中的集合
    • Community 命名空间中的集合
    • Containers 命名空间中的集合
    • Cyberark 命名空间中的集合
    • Dellemc 命名空间中的集合
    • F5networks 命名空间中的集合
    • Fortinet 命名空间中的集合
    • Frr 命名空间中的集合
    • Gluster 命名空间中的集合
    • Google 命名空间中的集合
    • Grafana 命名空间中的集合
    • Hetzner 命名空间中的集合
    • Hpe 命名空间中的集合
    • Ibm 命名空间中的集合
    • Ieisystem 命名空间中的集合
      • Ieisystem.Inmanage
        • 描述
        • 插件索引
    • Infinidat 命名空间中的集合
    • Infoblox 命名空间中的集合
    • Inspur 命名空间中的集合
    • Junipernetworks 命名空间中的集合
    • Kaytus 命名空间中的集合
    • Kubernetes 命名空间中的集合
    • Kubevirt 命名空间中的集合
    • Lowlydba 命名空间中的集合
    • Mellanox 命名空间中的集合
    • Microsoft 命名空间中的集合
    • Netapp 命名空间中的集合
    • Netapp_eseries 命名空间中的集合
    • Netbox 命名空间中的集合
    • Ngine_io 命名空间中的集合
    • Openstack 命名空间中的集合
    • Openvswitch 命名空间中的集合
    • Ovirt 命名空间中的集合
    • Purestorage 命名空间中的集合
    • Sensu 命名空间中的集合
    • Servicenow 命名空间中的集合
    • Splunk 命名空间中的集合
    • T_systems_mms 命名空间中的集合
    • Telekom_mms 命名空间中的集合
    • Theforeman 命名空间中的集合
    • Vmware 命名空间中的集合
    • Vultr 命名空间中的集合
    • Vyos 命名空间中的集合
    • Wti 命名空间中的集合
  • 所有模块和插件的索引
  • Playbook 关键字
  • 返回值
  • Ansible 配置设置
  • 控制 Ansible 的行为:优先级规则
  • YAML 语法
  • Python 3 支持
  • 解释器发现
  • 发布和维护
  • 测试策略
  • 健全性测试
  • 常见问题解答
  • 词汇表
  • Ansible 参考:模块实用程序
  • 特殊变量
  • Red Hat Ansible 自动化平台
  • Ansible 自动化中心
  • 记录 Ansible 输出

路线图

  • Ansible 路线图
  • ansible-core 路线图




Ansible
  • 集合索引
  • Ieisystem 命名空间中的集合
  • Ieisystem.Inmanage
  • ieisystem.inmanage.edit_network_link 模块 – 设置网络链接


ieisystem.inmanage.edit_network_link 模块 – 设置网络链接

注意

此模块是 ieisystem.inmanage 集合(版本 3.0.0)的一部分。

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

要安装它,请使用:ansible-galaxy collection install ieisystem.inmanage。您需要进一步的要求才能使用此模块,请参阅要求了解详细信息。

要在 Playbook 中使用它,请指定:ieisystem.inmanage.edit_network_link。

ieisystem.inmanage 1.0.0 中的新增功能

  • 概要

  • 要求

  • 参数

  • 注意

  • 示例

  • 返回值

概要

  • 在 ieisystem 服务器上设置网络链接。

要求

以下要求需要在执行此模块的主机上满足。

  • Python 3.7+

  • inManage

参数

参数

注释

auto_nego

字符串

此选项允许设备执行自动配置。

以便在该链接上实现最佳操作模式(速度和双工)。

选择

  • "enable"

  • "disable"

duplex_mode

字符串

选择以下任何一种双工模式。

当 *auto_nego=disable* 时为必需。

选择

  • "HALF"

  • "FULL"

host

字符串

指定 DNS 主机名或地址,以便通过指定的传输连接到远程设备。host 的值用作传输的目标地址。

interface

字符串 / 必需

接口名称。

选择

  • "shared"

  • "dedicated"

  • "both"

link_speed

整数

链接速度将列出网络接口的所有支持功能。可以是 10/100 Mbps。

当 *auto_nego=disable* 时为必需。

选择

  • 10

  • 100

password

字符串

指定用于验证与远程设备连接的密码。如果未在任务中指定该值,则将改用环境变量 ANSIBLE_NET_PASSWORD 的值。

provider

字典

包含连接详细信息的字典对象。

host

字符串

指定 DNS 主机名或地址,以便通过指定的传输连接到远程设备。host 的值用作传输的目标地址。

password

字符串

指定用于验证与远程设备连接的密码。如果未在任务中指定该值,则将改用环境变量 ANSIBLE_NET_PASSWORD 的值。

username

字符串

配置用于验证与远程设备连接的用户名。如果未在任务中指定该值,则将改用环境变量 ANSIBLE_NET_USERNAME 的值。

username

字符串

配置用于验证与远程设备连接的用户名。如果未在任务中指定该值,则将改用环境变量 ANSIBLE_NET_USERNAME 的值。

注意

注意

  • 不支持 check_mode。

示例

- name: Link test
  hosts: inmanage
  connection: local
  gather_facts: false
  vars:
    inmanage:
      host: "{{ ansible_ssh_host }}"
      username: "{{ username }}"
      password: "{{ password }}"

  tasks:

  - name: "Set network link"
    ieisystem.inmanage.edit_network_link:
      interface: "dedicated"
      auto_nego: "enable"
      provider: "{{ inmanage }}"

  - name: "Set network link"
    ieisystem.inmanage.edit_network_link:
      interface: "dedicated"
      auto_nego: "disable"
      link_speed: 100
      duplex_mode: "FULL"
      provider: "{{ inmanage }}"

返回值

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

键

描述

changed

布尔值

检查设备上是否进行了更改。

返回: 始终

message

字符串

模块执行后返回的消息。

返回: 始终

state

字符串

模块执行后的状态。

返回: 始终

作者

  • WangBaoshan (@ieisystem)

集合链接

  • 问题跟踪器
  • 存储库(源代码)
上一个 下一个

© 版权归 Ansible 项目贡献者所有。 上次更新于 2024 年 12 月 19 日。