- name: Install IIS Windows 2007
win_feature:
name: "AS-AppServer-Ext,AS-MSMQ-Activation,AS-TCP-Activation,AS-Named-Pipes,FS-FileServer,Web-St
atic-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-Http-Redirect,Web-Asp-Net,Web-Net-
Ext,Web-ASP,Web-CGI,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,Web-Http-Logging,Web-Log-Libraries,W
eb-Request-Monitor,Web-Http-Tracing,Web-Basic-Auth,Web-Windows-Auth,Web-Digest-Auth,Web-Client-Auth,
Web-Cert-Auth,Web-Url-Auth,Web-Filtering,Web-IP-Security,Web-Mgmt-Console,Web-Scripting-Tools,Web-Mg
mt-Service,Web-Metabase,Web-WMI,Web-Lgcy-Scripting,Web-Lgcy-Mgmt-Console,NET-Framework-Core,NET-HTTP
-Activation,NET-Non-HTTP-Activ,MSMQ-Server,RSAT-Web-Server,PowerShell-ISE,WAS-Process-Model,WAS-NET-
Environment,WAS-Config-APIs"
state: present
include_management_tools: yes
Also, the error only happens on state=present. state=absent works fine.