Files
product-demos/windows/install_iis.yml
2023-03-07 09:26:22 -05:00

26 lines
580 B
YAML

---
- name: Install IIS
hosts: "{{ _hosts | default('windows') }}"
vars:
iis_message: undef
tasks:
- name: Install IIS
ansible.windows.win_feature:
name: Web-Server
state: present
- name: Start IIS service
ansible.windows.win_service:
name: W3Svc
state: started
- name: Create website index.html
ansible.windows.win_copy:
content: "{{ iis_message }}"
dest: C:\Inetpub\wwwroot\index.html
- name: Show website address
ansible.builtin.debug:
msg: http://{{ ansible_host }}