Improve examples (#18830)
This commit is contained in:
parent
8dc3b60d0f
commit
066872cdc6
1 changed files with 21 additions and 19 deletions
|
@ -82,25 +82,27 @@ author:
|
||||||
'''
|
'''
|
||||||
|
|
||||||
EXAMPLES = r'''
|
EXAMPLES = r'''
|
||||||
# This installs IIS.
|
- name: Install IIS (Web-Server only)
|
||||||
# The names of features available for install can be run by running the following Powershell Command:
|
|
||||||
# PS C:\Users\Administrator> Import-Module ServerManager; Get-WindowsFeature
|
|
||||||
$ ansible -i hosts -m win_feature -a "name=Web-Server" all
|
|
||||||
$ ansible -i hosts -m win_feature -a "name=Web-Server,Web-Common-Http" all
|
|
||||||
ansible -m "win_feature" -a "name=NET-Framework-Core source=C:/Temp/iso/sources/sxs" windows
|
|
||||||
|
|
||||||
|
|
||||||
# Playbook example
|
|
||||||
---
|
|
||||||
- name: Install IIS
|
|
||||||
hosts: all
|
|
||||||
gather_facts: false
|
|
||||||
tasks:
|
|
||||||
- name: Install IIS
|
|
||||||
win_feature:
|
win_feature:
|
||||||
name: "Web-Server"
|
name: Web-Server
|
||||||
state: present
|
state: present
|
||||||
restart: yes
|
|
||||||
include_sub_features: yes
|
- name: Install IIS (Web-Server and Web-Common-Http)
|
||||||
include_management_tools: yes
|
win_feature:
|
||||||
|
name: Web-Server,Web-Common-Http
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install NET-Framework-Core from file
|
||||||
|
win_feature:
|
||||||
|
name: NET-Framework-Core
|
||||||
|
source: C:\Temp\iso\sources\sxs
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Install IIS Web-Server with sub features and management tools
|
||||||
|
win_feature:
|
||||||
|
name: Web-Server
|
||||||
|
state: present
|
||||||
|
restart: True
|
||||||
|
include_sub_features: True
|
||||||
|
include_management_tools: True
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue