【问题标题】:Failling to install IIS on Windows 10 from Ansible [closed]无法从 Ansible 在 Windows 10 上安装 IIS [关闭]
【发布时间】:2021-10-08 14:03:26
【问题描述】:

大家好,我是 Ansible 的新手,我目前正在尝试运行将安装 IIS 的剧本。

当我尝试 ping 到主机服务器(Windows 10 专业版 - 主机服务器)时,我已经配置了所有内容并收到消息成功 我正在使用 WSL(Windows 子系统 linux)也是 Windows 10 专业版的本地计算机运行剧本。

我要运行的脚本是:

---
- name: Install IIS
  hosts: win
  gather_facts: true
  tasks:
   - win_feature:
       name: "Web-Server"
       state: present
       restart: yes
       include_sub_features: yes
       include_management_tools: yes

但我不断收到此错误:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: at <ScriptBlock>, <No file>: line 8
fatal: [MY IP SERVER-censored]: FAILED! => {"changed": false, "msg": "Unhandled exception while executing module: The specified module 'ServerManager' was not loaded because no valid module file was found in any module directory."}

我也尝试安装服务器管理器来解决问题,但说实话并没有帮助。

正如我所说,我是 Ansible 的新手,并且仍在学习中。 我将不胜感激任何帮助。 谢谢。

【问题讨论】:

    标签: windows ansible


    【解决方案1】:

    Ansible 模块“win_feature”仅适用于 Windows 服务器。

    文档 (https://docs.ansible.com/ansible/latest/collections/ansible/windows/win_feature_module.html) 指出:“此模块使用 Windows 2008 R2 上的 Add/Remove-WindowsFeature Cmdlet 和 Windows 2012 上的 Install/Uninstall-WindowsFeature Cmdlet,它们在客户端操作系统机器上不可用。”

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-30
    • 2020-11-02
    • 2020-05-03
    • 2021-06-18
    相关资源
    最近更新 更多