fatal: [192.168.1.64]: FAILED! => {
"changed": false,
"msg": "Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
}- name: newWebsite
win_iis_website:
name: "webSite"
state: started
port: 80
ip: 192.168.1.41
hostname: website.local
application_pool: DefaultAppPool
physical_path: "{{ ansible_iis_root }}\\webSite"
register: website# Create temporary path to download IIS installer
- name: create path
win_file: path=C:\\temp\\IIS\ state=directory
# Download Internet Information Services (10.0) from Microsoft
- name: Download IIS
win_get_url:
url: 'https://download.microsoft.com/download/C/E/8/CE8D18F5-D4C0-45B5-B531-ADECD637A1AA/iisexpress_amd64_en-US.msi'
dest: 'C:\temp\IIS\iisexpress_amd64_en-US.msi'
# Once downloaded, install IIS
- name: Install IIS MSI
win_msi:
path: "C:\\temp\\IIS\\iisexpress_amd64_en-US.msi"
state: present
arguments: /install
wait: yes
# Download and install IIS Managemetn Console.
- name: Install IIS Web Managemnt Console
win_feature:
name: Web-Mgmt-Console
state: present
register: win_feature_result
# Reboot if required.
- win_reboot:
when: win_feature_result.reboot_required
msg: "Rebooting server for changes to be applied. Set up will continue afterwards"
- name: Create direcotry to copy site to
win_file: path={{ ansible_iis_root }}\\acme state=directory
- name: newWebsite
win_iis_website:
name: "webSite"
state: started
port: 80
ip: 192.168.1.41
hostname: website.local
application_pool: DefaultAppPool
physical_path: "{{ ansible_iis_root }}\\webSite"
register: website
- name: Acme IIS site
win_iis_website:
name: "Acme"
state: started
port: 80
ip: 127.0.0.1
hostname: acme.local
application_pool: "acme"
physical_path: c:\inetpub\wwwroot\acme
parameters: logfile.directory:c:\sites\logs
register: website
- name: Copy index.html to site directory
win_copy:
src: files/index.html
dest: "{{ ansible_iis_root}}\\{{ ansible_site_folder }}\\index.html"win_features working in the first place to install IIS (microsofts fault, apparently they dont think we need the required files to install windows features anymore.)
Can you install it manually in PowerShell or have you only tried it through win_feature? I definitely have an eval 2016 box and I was able to install IIS using win_feature without any issues.
Thanks
Jordan