community.windows.win_net_adapter_feature 模块 – 启用或禁用特定网络适配器。
注意
此模块是 community.windows 集合(版本 2.3.0)的一部分。
如果您使用的是 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install community.windows。
要在 playbook 中使用它,请指定: community.windows.win_net_adapter_feature。
community.windows 1.2.0 中的新增功能
概要
- 启用或禁用特定网络适配器或所有网络适配器的某些网络组件。 
参数
| 参数 | 注释 | 
|---|---|
| 指定网络适配器的以下 component_id。 component_id(显示名称) 
 
 
 
 
 
 
 
 如果要设置自定义适配器(如“Juniper 网络服务”),请运行  | |
| 网络适配器接口的名称。例如, | |
| 指定接口的 ms_tcpip6 的状态。 选择 
 | 
示例
- name: enable multiple interfaces of multiple interfaces
  community.windows.win_net_adapter_feature:
    interface:
      - 'Ethernet0'
      - 'Ethernet1'
    state: enabled
    component_id:
      - ms_tcpip6
      - ms_server
- name: Enable ms_tcpip6 of all the Interface
  community.windows.win_net_adapter_feature:
    interface: '*'
    state: enabled
    component_id:
      - ms_tcpip6
