Improve examples (#18830)

This commit is contained in:
Fabio Alessandro Locati 2016-12-15 19:43:50 +01:00 committed by Matt Davis
parent 8dc3b60d0f
commit 066872cdc6

View file

@ -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: win_feature:
# PS C:\Users\Administrator> Import-Module ServerManager; Get-WindowsFeature name: Web-Server
$ ansible -i hosts -m win_feature -a "name=Web-Server" all state: present
$ 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
- name: Install IIS (Web-Server and Web-Common-Http)
win_feature:
name: Web-Server,Web-Common-Http
state: present
# Playbook example - name: Install NET-Framework-Core from file
--- win_feature:
- name: Install IIS name: NET-Framework-Core
hosts: all source: C:\Temp\iso\sources\sxs
gather_facts: false state: present
tasks:
- name: Install IIS - name: Install IIS Web-Server with sub features and management tools
win_feature: win_feature:
name: "Web-Server" name: Web-Server
state: present state: present
restart: yes restart: True
include_sub_features: yes include_sub_features: True
include_management_tools: yes include_management_tools: True
''' '''