在Windows 10上从Ansible安装IIS失败



嘿,伙计们,我是Ansible的新手,我正在尝试运行一个剧本,将安装IIS。

我已经配置了一切,当我尝试ping到主机服务器(Windows 10 pro -主机服务器)时,得到了一个消息成功我正在通过我的本地计算机与WSL (Windows子系统linux)运行剧本,也是Windows 10 pro。

我要运行的脚本是:

---
- 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的新手,还在学习阶段。我将感激任何帮助。谢谢你。

Ansible模块"win_feature">

文档(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,它们在客户端os机器上不可用。">

最新更新